I'm mainly using JeeNodes to control electronic greenhouses with LED lighting but I thought I'd do something fun with some leftover parts. Enter the wireless programmable light.
It consists of a pentium heatsink in a re-used glass shade. It's got a triple luxeon rebel board fixed to the main heatsink slug, recycled from a dive torch upgrade. While glued onto the veins around the side are three red, three blue and two green power leds. They're 3W leds but I'm only driving them at 350mA on account of limitations of the heatsink and ULN2003 darlington array (I'm using two channels to drive the white leds at about 750mA).
The ULN2003 sinks current from LM317 regulators configured as constant current sources. I'm using the dimmer plug on a JeeNode because I found software pwm was a bit crap. In retrospect I could have easily used the pwm lines from the arduino and done away with the dimmer plug.
The sketch running on the jeenode listens for hope rf packets as you'd expect, the first byte being a command byte with a few different options such as toggling full white and off, instant colour set and a cross fade as well as an alert mode which ramps up to the selected colour and back down to the previous colour.
A python server script acts as a basic web server that only understands get arguments. It runs a serial thread talking to a jeelink. I use the standard rf demo sketch, just sending it the same thing as you'd type to it. Works surprisingly well. I'm using the same mechanism for my greenhouses.
I set up a desktop script to select colour from my lounge/media PC. My Android phone also has a simple toggle full white/off widget on it and of course it sends different coloured alerts to the light from Tasker, if it knows its at home.
Picasa stills showing pics of the unit and light head (it's got two more LEDs from that picture) and super dodgy skint student cardboard box electronics enclosure: https://picasaweb.google.com/mat.bettinson/ArduinoLight?feat=directlink
Here's a video of a fun random mode: http://www.youtube.com/watch?v=EaglutCHDso
Things that came up/to be fixed:
I'm passing a simple loop delay value to change the crossfade speed. It's not super smooth most likely because of delays in the loop checking of RF and maybe I2C as well. I should use a proper timer I guess.
I bought a jeenode to save a few bucks, then scratched my head for ages on why I couldn't program it with an FTDI bub I had. Turned out to be that reset is presented where as the Arduino ide sends a DTR to reset. So at the moment I have to press a ground wire quickly to program it. I also found the cap on the reset line is really rubbish, possibly why my jeenode USB is so unreliable at programming. The cap seems to take forever to discharge so it will reset again. So I ground the reset line directly to program...
One tip I can share: Cheap universal power supplies from China ($18 from ebay) make for awesome power supplies for projects like this. Selectable voltage from 15 to 24v, serious amps out output power, physically handy in-line design rather than fat wall-wart and USB ports which is ideal for grabbing 5V to power the arduino where regulating 15v is a bit naughty and 24v would probably smoke your regulator.
