I’ve taken a new approach with my landscape lights.
To recap, I needed a system that had remote on/off from a few (2 or 3) locations perhaps 150′ or so away from the transmitter. My plan was to do a simple remote pushbutton system, and then to run two runs of wires out to the remote locations – 12VAC for the lights, a second pair of wires for the pushbutton.
I bought the main wire, and at about $0.30/foot for 12 gauge, that was $150 in wire for 500′. I spent some time looking for all my local sources, but nothing I could find was much less than $0.30/foot, which would mean at least another $100 to get to those two locations. Plus, while the main wire was rated for outdoor applications, I was having trouble finding something thing (say, 25 gauge) that was outdoor rated, and I was concerned that it wouldn’t last very well running from here to there through the woods. Not to mention the pain of running two lines over one line.
So, I needed a way to get rid of the cable. My first thought was to do some sort of higher-frequency signaling over the main power line, but a) I don’t know a lot about that area, ii) I don’t want to know more about that area, and 3) the X10 folks had a fair bit of trouble getting it to work reliably. If I went that direction, I could put in a whole lot of work without getting something that worked reliably, which would be more than a bit annoying.
The second option I considered was wireless. I dug out some links I had kept, and once again came across the xbee stuff. At something like $20 per node, I could build a base station node + 2 remotes for less than the cost of the wire. After a bit of though, I decided to build one base station node and one remote that will live in the ski car. I also decided that I would probably go with the XBee pro implementation for the extra range, as I’m at the limit of where the normal xbee stuff works reliably, and the place I plan to mount the transformer may not be the best location for radio. The pro nodes are a bit pricier, but it will still be a wash compared to cable and I have a couple of other wireless projects in mind.
Granted, this will be a ridiculous amount of overkill. I’m going to use a full-duplex 256Kbit link to send simple on/off commands. I thought about using some of the other wireless approaches out there that are a bit cheaper, but I think the XBee will work well for a couple of other projects that I’m considering, and I’d rather bite off that part once.
You can get the xbees from a few places. I ended up ordering mine from SparkFun, two XBee pros, and then a couple of breakout boards – one USB one, and one simpler one. I also ordered a new transformer, which is a fair bit nicer than the previous one, and has the added advantage that it, like, works. Last weekend, on my last day of vacation, I hooked plugged each of the xbees into the USB, ran X-CTU, and upgraded them both to the newest firmware.
Last night, I dug out an ATMEGA16 processor, put it in the programmer, and started writing code. I chose that processor because it’s the only one that I have right now that supports USART serial, and I wanted it to be serial. Put it in the programmer, got things running, and wrote some code to put the XBee into command mode “+++†(the xbee should respond with “Okâ€). Hooked up the XBee to the USART, and nothing happened.
Put my scope on the data line, and it looked like the characters were there. Modified the code so that it looped on writing characters, and I could see the serial data on the scope (well, not the data itself, but the fact that there was data). Still nothing from the xbee. Did a bit more thinking, and then remembered that some of the avrs aren’t shipped at the proper clock rate. I fired up avr studio (which is better for this), had it read the fuse bits, modified them so that it would run at 8MHz on the internal processor, and burned them to the chip.
At that point the xbee started responding, and I could go to the second xbee (hooked up to X-CTU), and send messages back and forth. Whee!
Now that I’ve proved it works, I’ve ordered a couple of ATTiny2313s (the smallest AVR that has an USART) and some project boxes, and a new solid state relay to replace the one that died with the last transformer.
Next step is to do some range testing, to see how far I can get it to reach, and then when the new stuff shows up I’ll get into some more serious prototyping.
Oh, and I also managed to get a bunch of the cable run over the holidays.
So, what do you think ?