The path to my front door is long and very poorly lit. There’s a sensor light mounted above it, but that’s never worked and, living in a rental, getting it fixed has been a bit of a task. So I bought a roll of 3-wire LED rope light on eBay. Cable-tied it to the underside of the bottom stretcher of the fence running alongside the path. The power cable was fed in through a window by the front door, and I had nice, bright, even illumination. But it was still kind of boring. So I bought an ethernet-capable arduino.
My rope light has three wires — two strings of LEDs and a common ground. It also has a little control box with a rectifier and an MCU with a handful of pre-programmed modes. I cut the cable between the controller and the rope, and was incredibly surprised to discover that the LEDs were being fed with 240V DC. At a very low current, but still dangerous enough to make me throw away initial plans and approach it again with a lot more care. Also beefier relays.
The rest, though, was very straightforward. The Arduino Playground has plenty of information about interfacing with relays. I’ve got 12V relays, so I’m using a 12V wall wart to power my Arduino board, and then run Vin from the Arduino out to power the relays via a simple driver circuit. I’m not too pleased about running separate power supplies for the rope lights and the lower-powered control electronics, but I’m definitely not capable of doing anything about combining them yet, so that’s the way it will stay for now.
My first revision of this project used four of these drivers (I thought I’d find a use for the others… eventually) on a piece of prototype board, with header pins attached so I could attach it to the Arduino as a shield. It was my first non-trivial Arduino project, and first time I’d done any serious soldering for a while, so it looked rough as guts. But it worked, and gave me much more interesting ways to control my lighting. The first test of the full system, with a two-channel variant of the Blink demo sketch, looked like this (direct youtube link).
I ran this board for a while, but wanted to control the outside lights from the same system as the power controller I built recently, so build new drivers for my relays on the side of that shield. The end result was a very, very full short shield, but the entire thing looks much nicer, and very deserving of the translucent case I mounted it in. I still want to do a little more work with the hardware. First to add a hardware (illuminated) button for separate control of the outside lights, and then maybe look in to using an external voltage regulator to supply the 12V and 5V I’m using for the control board instead of feeding 12V in to the Arduino. But I’m very happy with the project so far.
I haven’t yet uploaded the software I wrote to run all of this. It needs tidying, and there’s a weird bug in the timers still, and sooner or later I’m going to have to change the hardcoded password in my branch. However, I love showing off the webpage, so check this out:


[…] more here, find the code at […]