January 09, 2012
It’s gotten cold in Detroit again, and the chickens need the usual TLC: more food, more straw, heated water dispensers, and active heating inside the coop. In previous years we’ve used a single incandescent lightbulb to keep the coop at a hospitable temperature, but this year, we’re trying something different: we’ll use an infrared heat lamp along with a daylight-simulating incandescent lamp. The heat lamp can stay on all night and not bother the birds — inconsistent lighting might have a bad impact on the birds’ health. The incandescent lamp should turn on at the pre- and post-crepuscular hours at dusk and dawn to add a bit of daylight and keep egg production up.
You may remember last year when I posted about the chicken sensor, an arduino with a temperature sensor and an ethernet shield that attached to a wireless mesh node. After the weather got warm enough, I decommissioned the chicken sensor and haven’t touched the arduino platform since. Now it is time for me to jump back into the open source embedded systems fray: either I hack together a system to toggle these lamps and monitor temperature, or my neighbors and I are going to have to run out to the coop during those crepuscular hours and fumble around with electrical switches while getting our hands pecked off by feisty young hens.
So, in the interest of avoiding bloody pecked-up hands, I’ve planned out an upgraded chicken sensor: one could call it v0.2.0 or one could call it by the codename “All Watched Over By Machines of Loving Grace.” I chose this codename because it describes how the chickens will feel.
I’m glad that I have taken my time with the JeeNode: while searcing through the wiki I came across a few shiny gems of projects. The shiniest by far is JeeMon. I was initially planning on writing a little node.js server to listen for temperature packets and post them somewhere on the internet, but JeeMon is a much more full and exciting solution… and an excuse to improve my tcl skills (I’ve done some quick expect scripts before but that’s it). This blog post at jeelabs has a good introduction and quickstart.
So far, JeeMon seems like a winner of a platform for DIY network physical computing projects. It’s backed by a great programmer who develops great hardware. Tcl has some nice text processing features — so much of the work in this type of project is sucking information out of sometimes-garbled strings. Its event-driven-ness makes sense with random bursts of radio-transmitted information. Finally, although it has a lot of examples dealing with the jeenode world of things, it is not at all tied to a specific platform or network technology.
I started looking around the internet for alternative build methods for arduino programs and didn’t really come up with much; there are a lot of one-off projects (see links below) but all of them rely on a forked version of the Arudino libraries, or even a partial set of those libraries. This makes development really tricky, especially if you’re including non-standard libraries.
I’d love to see the Arduino IDE expose some of the development processes via the commandline. Another option might be to do an scons setup that uses the arduino IDE’s hardware/arduino/boards.txt as a reference.
One experiment I’m anxious to try out is to hook a JeeLink to an OpenWRT router and run jeemon right from the router. This might make a good addition to the community wireless toolkit we’re building at The Work Department.
Check your soldering on the jeenode using the voltages listed in the link below. I messed up the RST -> capacitor connection which caused unreliable uploads but didn’t interfere with anything else… kinda hard to track that one down :)
forum topic about makefiles: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1284144128
arduino-makefile fork on github: https://github.com/pix/arduino-makefile
fix math.h compile error: http://forums.reprap.org/read.php?146,107925,107925,quote=1 (in short, add an #undef round before round is defined in avr’s math.h)
oh, this is nice: http://www.tmpsantos.com.br/en/2010/12/arduino-uno-ubuntu-cmake/
random weird project: http://engin1000.pbworks.com/w/page/37615506/RF%20Locator
a nice DS18B20 setup that I’m using: http://www.makershed.com/WaterproofDS18B20DigitalTemperatureSensorExp/mkad37.htm