Recently I’ve been playing with something I think is somewhat of a holy grail in LED enthusiast circles: the addressable RGB LED strip.
Non-addressable RGB strip (meaning you can turn the whole strip a particular color but not any individual LED) is becoming easier to find in the market but a RGB strip where you can actually control each LED individually has only been the subject of geek fantasy. Every time I’ve done something public with common RGB strip, someone has come up to me and said “oh wow man, can you control those LED’s individually?”. No, sorry, with those strips you couldn’t — but with this strip you can!
So where do these fabled strips come from? Well, the one I’ve been playing with fell into my lap a few months ago — tossed there by my friend Dan who got it from a shady-looking factory in China while there evaluating LED video wall products. I’ve asked him for the name of the factory but he’s so far been drawing a blank.
At the time he assumed (as did I when I first saw it) that the strip consisted nothing more of RGB LED’s hooked up to standard standard shift registers, similar to how I built my single-color LED serial strip. This turns out not to be the case and that the chips driving the LED’s are actually packed with a bit of smarts to them.
This became evident when I built a simple test program which treated the strip like a common shift register but failed in confounding ways to work. Eventually I had to cut away some of the silicone liner on the strip to get a closer look at the driver chip. The chip turned out to be a “HL1606″, nothing I’d ever heard of. A few hours of online research left me with a datasheet for the HL1606 written only in Chinese and a single posting by one “John Cohn” from September 2007 looking for anybody who had more information on how to drive the chip. The posting didn’t get any useful replies.
I tried running the datasheet through Google translate which was somewhat successful but left me scratching my head over the precise way to interpret sentences like this:
When a data bit for the Road 10 (D2D1 or D4D3 or D6D5) and latches valid, the corresponding LED driver output state for Prescribed changes gradually, when the change to keep the brightest light of the state, until the new data is entered and effective latch.
It *sounds* like english, right? Yeah, anyways, trying to decipher the datasheet lasted for only so long before I got pulled away to more important distractions and the RGB strip sat on my bench untouched for months.
Then Maker Faire happened and, by some freak chance, while I was chatting to people about the MonkeyLectric bike wheels, a guy came by wearing a most eye-catching headband. The headband was constructed out flexible circuit board material on which RGB LEDs were mounted and were clearly being controlled individually. Obviously, this was a guy I had to talk to. After a short conversation I learned that he had found the strip from an electronics booth in China, the strip was built using HL1606 driver chips, and he too had had a heck of a time (and only partial success) figuring out how to drive them. We exchanged contact info and a pledge to get in touch after the faire to share data and geek out on the strips. It wasn’t until after I had gotten home did I piece it together that this guy was none other than the “John Cohn” whose lonely, unanswered call for help in 2007 was the only evidence I was able to find that anybody else in the world was playing with these strips.
Maker Faire rocks.
Anyways, shortly after we got to our respective homes, John sent me a copy of the datasheet in Chinese which I had already found earlier as well as the PIC code for his headband. The PIC code was the missing key to the puzzle and by studying it in conjunction with the machine-translated datasheet I was finally able to get my head wrapped around how the chip worked.
Below is a short video showing off a basic rainbow-scroll (the “hello world” of addressable RGB strip effects):
So that nobody has to ever go through what John and I went through to get these strips to work, I wrote an Arduino library for the HL1606 and open sourced it. It’s still a bit unpolished and under-documented but it’s feature-complete in the sense that it can control all of the features of the HL1606.
Oh, and before anybody asks, I don’t yet have a solid source for more of the strips but I’ve found them being sold online. So far I’ve only been able to find them being bundled with a controller and I’d like to find a source selling them without one (hopefully at a reduced price). To hunt them down on your own, the keywords to look for are HL1606 and 5-volt operation. The 5-volt operation is actually the key distinguisher, as all of the non-addressable RGB strips run on 12V or higher.
Update 6/18/09: I see John’s posted an Instructable on his Too-cool Rainbow Headband. In it he documents more what you need to do to drive the chip and even suggests some possible suppliers for the strips. Check it out (and if you like it, give him a vote for the ‘Get the LED Out’ contest he’s entered it into