OverviewAfter Christmas I purchased a few strands of the Walgreen "15 C9 Multi-color Light Show" LED Christmas lights (WIC 276754; UPC 049022715905). These have 15 individually addressable LED lights (3 sets of 5 LEDs arranged as red, green, blue, orange, white). If you can find them on sale for a few dollars, they are a great deal.
|The packaging available at Walgreens|
|BriteStar version of the same light set|
The lights are apparently manufactured by BriteStar (www.britestar.com). Unfortunately they have very little info on their website. It appears that they intend to sell these and other similar light sets directly but they are not quite there yet. Maybe by next Christmas season?
Seeing these lights in the package with the little "Try Me" button made it very obvious that the bulbs were individually addressable. The brief demo in the package provides a few patterns. I was immediately curious if they could be hacked to do other things. Turns out that the protocol is very simple and easily implemented with an Arduino.
Tear DownA quick look at the string revealed several interesting things. First, there was a transformer at the head of the string labeled 5V at 500 mA. That seemed promising. Second, there was a small box, near the transformer that had two lines (presumably power) going in and out of it, plus a connector for the "Try Me" button on the outside of the package. The first bulb in the series had two wires going in and three wires going out. That seemed interesting as well.
HardwareI started by pulling apart the small box next to the transformer. My initial thought was that this might be the controller for the strand. Alas, that was not the case. In fact, this little box is only there to provide the connection point for the "Try Me" button and is otherwise useless. However, it might provide a good place to slip in a controller (such as the Arduino Pro Mini) later!
|Input for Try Me button|
|Closeup of the board mounted in the box|
A quick test with the VOM confirmed that the strand ran on 5V DC (as listed on the transformer at the head of the strand).
Next I pulled apart the first bulb in the strand. Inside I found a gold mine. There was a simple board with two wires (power) coming in and three wires going out. Two wires were obviously the power and that left one for signal. In addition to the inputs and outputs there was a bonded processor and an LED.
|First bulb in the string (red) |
with an added input interface wire (white)
|Back of the board|
|The top line is an "on" packet (note the 4 'wide' pulses at the end).|
The second line is an "off" packet (note the 4 'short' pulses at the end).
- 3 start bits, each 6.25 us (microsecond) wide high followed by 6.67 us wide low pulse
- 4 data bits, each is either a 'wide' or a 'narrow' high followed by a 4.33 us low pulse
- A "one" is indicated by a 3.75 us wide high pulse
- A "zero" is indicated by a 1.24 us wide high pulse
- SSS0000 = off
- SSS1000 = dimmer value of 1 (dimmest)
- SSS0100 = dimmer value of 2
- SSS1100 = dimmer value of 3
- SSS0010 = dimmer value of 4
- SSS1010 = dimmer value of 5
- SSS0110 = dimmer value of 6
- SSS1110 = dimmer value of 7
- SSS0001 = dimmer value of 8 (half brightness)
- SSS1001 = dimmer value of 9
- SSS0101 = dimmer value of 10
- SSS1101 = dimmer value of 11
- SSS0011 = dimmer value of 12
- SSS1011 = dimmer value of 13
- SSS0111 = dimmer value of 14
- SSS1111 = dimmer value of 15 (full brightness)
|Startup protocol zoomed way out (note the scale at the top of the chart).|
|Startup packet sequence|
Source CodeSource code for a class implementing the protocol and a quick test program is available in github.
|New Arduino based controller showing 100us interpacket gap|