Mittwoch, 14. Dezember 2011

Energy monitor redesign

Yesterday i did a complete redesign of my energy monitor system. It is based on an Atmega32 running on a Pollin RF-Evaluation Board connected to three current clamps for measuring the current in the three phases of my house wiring. The current clamps are place just before the RCD in our home.

The software on the Mega32 Energy-Node was based on the ethersex-framework. It worked pretty well, until i added more wireless node to the 433 MHz network. After a Jeenode running ethersex went online, i experienced frequent hangups of the energy node.
So i had the choice between either fixing the hangups or port the Arduino-compatible JeeLib software to my controllers. As the ethersex framework  has grown to a really big project i found it hard to surf through all the source to check whats going on in the software. So i decided to go for the arduino stuff. This code basically consists of small hardware drivers and the main application loop. Clean, simple, easy to understand, and until now - stable.
Especially the JeeLib-Code is designed for low-power devices, and it will be easier to build a battery based application with this codebase.
So first i set up an Eclipse environment for development. I ported the arduino stuff to work inside a C++ Eclipse project and integrated support for automatic programming with avrdude. The arduino Mac application is fine for an easy start, but i like my used eclipse environment for development. This was all pretty straight forward due to the work auf the AVR-Eclipse-Plugin, the Crosspack AVR Crosscompiling-Toolchain for Mac OS X and theAVR-Netino project.

After the Basestation and Energymonitor-Node were able to run basic demo "sketches" (Arduino slang for 'main application loop'), is continued added more functionality. More on this later.

Keine Kommentare:

Kommentar veröffentlichen