![]() |
This website is under construction. Some features may not work properly. Please be patient. |
|
Menu |
Light Controller
About
No doubt everybody has seen computerized christmas lights. This looked pretty cool when I saw it, and the idea sat in the back of my head for years. I looked into what was already on the market (Light-O-Rama seems to have a monopoly), and realized how much this stuff was going for. Their cheapest product (16 channel, 30A) cost over $400! Thats $25 per channel- I read somewhere that homemade devices can go to $5 a channel. That still sounded like a lot, so I tried to do better than that. I think I've got it. Design![]() I wanted this to be completely customizable, with support not only for switching outlets on and off, but expandible to pretty much anything computer-controller (firework launcher?). This lends itself to a single "main box" which branches out into customized "sub-boxes". The main box is what interfaces with the computer. It processes the signal, and sends raw data out to the sub boxes- nothing more than VCC, GND, enable, and 4 data lines. This leaves 4 bits for addressing which sub-box to enable, giving 16 sub-boxes per main box. Each sub-box also works using addressing; 3 of the bits going to determine which of 8 outlets to enable, and a final data bit to set the state of that outlet. 16x8=128 circuits max. Remember, you can have any number of sub-boxes hooked up at any time, offering expandability. DetailsAs any electronics-savvy person has probably guessed, the main box is nothing but a 4 to 16 decoder (74154), decoding the most significant nibble (MSN) into enable lines for the 16 sub-boxes. The LSN lines are split 16 ways to go to each of the sub-boxes. The sub-box is only slightly more complicated. The chip that does all the work is the 8-bit addressable latch (74259). It works perfectly for the purpose, acting as both a decoder and 8 D-latches. The output lines are put through 1K resistors and into transistors to switch 5V relays. The cost for the main box is incredibly cheap- it literally contains of one chip. The sub-box costs about $1 for the chip, $2.50 for the transistors and resistors, and $8 for the 8 relays, and probably about $16 for other parts (ports, box, outlets) totalling around $28 per box, or $3.50 per circuit. The main box is actually a bit more than one chip- it's one chip if you interface with something simple like the parallel port. I did that for a while, but was annoyed at the length limitations and the thick cable I had to move around. Luckily, I was finishing another project around the same time as this one- the Ethernet controller. Ethernet to 8 bits, could it have fit more perfectly? I scored a bunch of relays for really cheap at Goldmine. Each relay is DPST with contacts rated for 5A 250V. I put both switches in parallel, so that gives me 10A 250V per circuit, 80A per box (ouch- not like I'll ever use that much). PicturesAll that up there? That's all theoretical. What I have actually built is a main box with 4 of the possible 16 ports, and a complete sub-box. SoftwareI hacked together some Java code to control the lights. It listens for notes to be played on a given silent channel of a MIDI, and sends corresponding codes to the controller. So far I've sequenced one song- themes from Pirates of the Carribbean. I used Anvil Studio for the sequencing, as Melody Assistant didn't have enough MIDI capabilities. It took about 4-6 hours over 3 days to sequence the 3 minute song with 6 channels.
Pirates of the Carribbean Medley on a Christmas Tree Future: I plan on making more of these, and figuring out an easy way to put them together. Once that works, I might try selling them small-scale. But that's a long way off. |