What's new? Let's have a look:
In few words, I upgraded the Enerduino (power meter monitor, see old post) with a wireless connection (XBee), I added another logger to monitor the solar power plant (Rotex) and both are sending data to a coordinator which sends the data in CACTI (an rrd tool) to show graphs. The idea was to build two autonomous nodes, able to store data locally and send them to a central system (coordinator) when it is available. Then data are loaded in a web tool like CACTI:
How I did itI decided to buy a couple of Arduino Stalker from www.seeedstudio.com with enclosure. The reason is mainly because these boards already have a built in storage (SD Card), clock, XBee socket and look very very robust. I'm very happy with them.
With these I bought also 3 XBee modules (XBee PRO Series 2) with one UART module to connect (via USB) the XBee coordinator to the PC.
The source code for the data loggers and the server side scripts are available at SourceForge (it was compiled with arduino 0023, in a while I'll convert them for 1.0).
The Coordinator and XBee modulesThe first thing to remember is to upgrade the XBee firmware with the last (and correct) version. Then, I selected the AT command mode. The modules must be configured as ROUTER for the two nodes (ENERDUINO and ROTEXUINO) and as COORDINATOR for the Coordinator.
The nework identifiers (ATNI) will be
All the modules must be in the same PAN.
The Coordinator will be just an XBee module (with antenna) mounted on UART to connect it to a PC via USB. As you can see I used some "friendly plastic" to lock the module at the case:
The Coordinator will be only an interface to connect the two nodes, all the logic is in the xh.pl perl script which waits for the "SYN" packet from the nodes and then saves locally the data collected. Then, data are loaded in two different RRD databases with the rrdload.pl script.
Look at the comment of the rrdload.pl script to see the rrdtool command used to create the databases.
Then you can have a look to this to understand how to configure CACTI to read the databases.
ENERDUINO & ROTEXUINOThe two nodes are built with two Arduino Stalker and two XBee:
To build the ENERDUINO cable (to read flashes) see the old ENERDUINO post. ROTEXUINO uses a serial connection to the Rotex R3 solar plant. You can refer to the manual to configure the serial connection on it.
The two modules, try to reach the coordinator at configured hours (see sources). If the coordinator is found, collected data are sent and removed from the SD card. Otherwise they will retry later. You can modify the source to meet your requirements on this. The sources are here (Rotexuino.pde and Enerduino.pde).
Updated 22 Apr 2012: Checksum addedI modified the sources for Enerduino, Rotexuino and xh.pl. I added a checksum when the file is sent via XBee, so that xh.pl checks for it before saving it and give the OK to the Enerduino/Rotexuino.
I did it because sometimes the data were corrupted during the wireless transfer.