Enerduino 2.0 (English)

Finally, after one year of work (few hours in the weekend...), Enerduino 2.0 is here!!
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 it

I 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 modules

The 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.


The 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 added

I 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.

5 commenti:

  1. Hi, thank you for sharing your project.
    Could you please post more details on how to connect to ROTEX RSP3?
    Thank you.

    1. Sure.
      Give me some extra time, I'm pretty busy in these days. Next week I'll come back to you.

  2. Hello.

    Here I am. OK, in order to connect the RSP3 you need a stereo jack (3.5mm) and connect it to the arduino.
    The serial port (jack socket) is in the back of R3 module (you need to open it).
    The jack connection must be done in the following way:

    |#############|_____________ __ __
    |#############|_____________ __ __|>
    |#############| GND................RX TX

    GND and TX must be connected to the Arduino. You can avoid to connect RX.

    Then, you need to enable the "data" pubblication on the R3 module (see the ROTEX manual to do it, anyway it' s very simple).


  3. Questo commento è stato eliminato dall'autore.

  4. Hi,
    I'm sorry for my late reply ;-)
    Thank you again for your support and for your project.