As part of “Project G3H“, want the greenhouse to operate stand-alone, but also be able to log data on a remote server. To achieve this, the greenhouse will be monitored and controlled from a stand-alone, arduino based mote. This mote will monitor the environment in the greenhouse and contain the logic to control the environment based on those measurements (i.e. water the soil, switch on grow lights, etc). To implement the remote data logging capabilities an Xbee RF radio module is added by means of an XBee-shield. This allows for wireless serial communication to another Xbee radio.
That other Xbee radio is placed on top of a second Arduino board and will receive the data from the mote wirelessly. The receiver will also sport an ethernet connection to connect the whole thing to the internet.
This means that the receiver consists of an Arduino (Duemilanove), Ethernet shield and an Xbee shield. The ethernet-shield must be stacked on top or the Arduino first, as the Xbee-shield does not lead through all the pins from the Arduino. The Ethernet shield does. Another problem presents itself when you want to stack the Xbee-shield on top of the ethernet-shield though. The Xbee-shield draws its power from the 6-pin ICSP header on the Arduino, but the ethernet-shield does not lead those pins to the top.
So, I made a short cable to connect the ICSP pins from the Arduino to the ICSP header on the bottom of the Xbee shield. Below are a few photo’s to show the process:
The hand-made cable consists of 2x 3 female 0.1″ pitch (2.54mm) headers with 6 jumper wires soldered to them. The cable is a one-off, and not very pretty as I did not know how to cleanly cut 2 rows of 3 headers out of a long strip of 40. With a glue gun, I covered the solder points to isolate them from each other and prevent the from touching the ethernet-shield above.
To add it all together, I first put the hand-made cable on the ICSP header of the Arduino, then stacked the ethernet-shield on top of that.
Then connected the six ends of the hand-made cable to the ICSP female header on the bottom of the Xbee-shield.
Finally stacked the Xbee-shield on top of the ethernet-shield. Be careful though as you stack those two. The Xbee shield will not fit snugly on top of the ethernet-shield as the RJ-45 connector is so high, it blocks one corner of the Xbee shield. You can gently push the corner of the Xbee-shield next to the RJ-45 connector housing. That way, the Xbee shield can be perpendiculat to the other two shields.
And now I have a gateway device capable of wireless communication with other Xbee radio’s as well as an internet connection. The Xbee radio’s (Series 2) are capable of setting up a wireless mesh network. This means several more radio’s can be added in the future to all communicate to one coordinator-node in the network. This gateway device will be setup as a coordinator, while the greenhouse controller will be a router/end device. This means it can send its own data to other nodes, like the coordinator, but also route other mesh-nodes messages if necessary. More information on that can be found on the Digi support website.
Big thanks to Pieter Floris, from floris.cc. I bought the shields from him and as soon as I realised that I had to craft a cable to connect the ICSP pins and headers, he sent me a few male and female headers for free. Thanks Pieter!