Too-cool Rainbow Headband

40,514

86

43

Introduction: Too-cool Rainbow Headband

About: Challenged... but not scared See my blog at http://johncohn.org

This project will help you create a halo of wild LED color whenever you go out I've been wearing one of these for two years at conferences, schools, burning man.. and Makerfaire and I always have happy people coming up to take a look. People will smile when you're wearing yours !   They smiled when I wore it here



The construction is simple providing you have the secret ingredient which is a length of RGB lighting strip based on the HL1606 LED controller from Wuxi Asic's Corp in China. I got mine while on a business trip in Shanghai. These light strips are becoming popular for signage and architectural lighting around the world. I have attached a picture of the 5 Meter strand I bought along with it's controller box. While they aren't common in this country (yet), there are several suppliers in the orient who will ship you some of this magic stuff. Check out these suppliers. Supplier 1 , supplier 2. There will be many more soon, no doubt ! (Note: watch this space.. I think I may be buying some of these stripes from China soon. I'd be happy to get some for folks if there's interest)

These light strips consist of a flexible copper tape with very (!) bright surface mount RGB LED's spaced at every inch. Each pair of LED's is controlled by an HL 1606. The strips are sold in many lengths each composed of shorter lengths which contain 20 LED's with 10 driver chips. My headband is made of one of those 20 LED segments.

The real trick to making this work was reverse engineering the HL 1606. This chip is a mystery.. with no English language documentation, and only very marginal documentation in Chinese.Using a scope, a demo driver I purchased, and rough translation of the documentation I was able to reverse engineer the signaling required to drive the strips.

The input signaling uses a Serial Peripheral Interface (SPI ) bus which uses one data pin (D_I) .. and a clock pin (C_I) to shift in the control bits to load the color info to the strip. A Latch signal (L_I) is used to latch the data for one HL 1606 and pass it's old data to the chip on it's right. There is also a pulse width modulation (PWM) control pin (S_I) which controls color brightness and fades. Note this project does not use these fade features due to code size restrictions.. but they are very cool to explore.

Once I figured it out, it was pretty straightforward to program a micro controller to drive the strips. I used a PICAXE 08-M . I chose the PICAXE because a) I had them laying around :-) and b) they require very few external components to use.
The PICAXE 08M is a Microchip PIC12F683 which comes preloaded with a simple tokenized basic interpreter The PICAXE family as a nice, easy to use integrated development environment which is available free of charge for download here.

All that was left was to write the code, download it to the PICAXE, and solder it together. Happy Building !!!



Step 1: Cut the Light Strip to Length

The strips are sold in many lengths each composed of shorter lengths which contain 20 LED's with 10 driver chips. My headband is made of one of those 20 LED segments.

To cut your own headband, find one of the soldered connections attaching the fist set of 20 LEDS to the next section. Carefully cut at the soldered connection with sharp scisors. Use a fine tip, low heat soldering iron to clean off and re-tin the solder connections to the strip segment you just cut.

Step 2: Collect Components

The parts list for this project is pretty easy. In addition to the light strip you cut in step 1 , you will need the following:

- a PICAXE-08M microcontroller available from Revolution Education
- PICAXE programmer likethis one.. Note It's also easy to build your own programmer.. or even to program the PICAXE in your circuit. Feel free to progam the chip any way you choose :-)
- an 8 pin low profile ic socket
- 5V 1Amp regulator like an LM7805
- a 9Volt batter connector
- a 9 volt battery
- some hook-up wire
- some copper clad perf board with an IC friendly pattern
- some velcro male and female strips
- electrical tape

for tools you will need
- a fine tip soldering iron and solder
- wire clippers
- scissors

Step 3: Cut the Perf Board

Drop the IC socket in the perf board so that it lines up with the IC friendly pattern. By IC friendly I mean that the perf board makes it easy to solder multiple wires to each IC's pins like this one. . Use a scroll saw to cut the perf board so that it's small as possible to accomodate the voltage regulator and the IC. Leave enough board to allow at least two wires to be soldered to each IC pin

Step 4: Wire Up the Perf Board

Wiring this project up is a snap ! ..

-Solder the ICsocket into the board being careful not to bridge between connections.

-Then place the LM7805 voltage regulator just above and to the left of the IC socket so it's output pin (pin 3) is closest to the IC socket pin 1. Make a small jumper to connect the regulator output to pin 1 of the IC socket. This will provide +5 volts to the PICAXE.

- Solder in the 9 volt battery clip. The red lead is soldered to the the input pin (pin 1) of the voltage regulator, the black lead is connected to the ground connection (pin 2). Jumper from hear to IC socket pin 8 to provide the ground connection to the PICAXE

-

Step 5: Wire to the LED Strip

This step takes some careful soldering.

- Cut 6 small (1.5") segments of fine hook up wire and strip both ends
- Carefully solder one wire to each of the 6 connections on the end of the LED strip you cut. The labels should all be right side up. The inputs should read top to bottom, GND , SI, DI, CI,LI and 5V .

- now connect the wires to the appropriate pin on the IC socket.
-- GND on the strip is connected to pin 8 of the IC (0V)
-- SI on the strip on the strip is connected to pin 7 of the IC (output 0)
-- DI on the strip is connected to pin 6 of the IC (output 1)
-- CI on the strip is connected to pin 5 of the IC (output 2)
-- LI on the strip is connected to pin 3 of the IC (output 4)
-- 5V on the strip is connected to pin 1 of the IC (5V)

- You must also make one additional connection to keep the PICAXE serial input from floating
-- Pin 2 of the IC (Ser IN) is connected to Pin 8 of the IC (0V)

Step 6: Download the Code

Now it's time to download the basic code to the PICAXE. Here are the steps

- Start the PICAXE interactive development environment (IDE) .
- plug in your PICAXE programmer to the serial port of your computer (or a USB to Serial adapter if you don't have a serial port). Make sure there's a blank PICAXE 08M in it's programming socket

- Configure the IDE by choosing View->Options Choose 'Mode' 08M in the Mode Tab, Choose the Serial port tab to select your serial port.

- load the file 'INSTRUCTABLES_HEADBAND.BAS using File-> Open
- Compile and download the file by selecting PICAXE->Run. You should see the progress bar as the file downloads, and a Download complete message at the end.

I've included some sample code for this project. You can use it as is, or modify it to make your headband unique.

Got questions ? Just drop me an email at johncohn@us.ibm.com

Step 7: Test It

Take the PICAXE out of your programmer and install it in the 8 pin IC socket, beign careful to pay attention to the orientation. Double check all of your connections., Do whatever good luck dance you normally do before trying soemthing.. then hook up the battery. Your lightstrip should start doing its thing !

Step 8: Make the Headband

Now lets make the lightstrip into headware !

-Find some velcro strips that are at least as wide as the LED strip and long enough to go around your head. You may have to cut your strip down if it's two wide. Find a piece of the soft velcro..not the pointy ones... and make a strip just as wide as your RGB strip .

- Find the length of velcor necessary to go completely around your head with about 3 inches ov overlap. Cut the velcro to that length

- remove the adhesive backing from the the velcro and place it carefully on the back side of the LED strip. Be aware that it is very difficult to remove once the adhesive touches the strip, so align your work carefully

- leave the last 6 inches or so of backing intact on the strip. Use electrical tape to protect the wiring between the perf board and the light strip. Also put a strip of electrical tape around the battery connector to give it soem stress releif

- cut a strip of the 'prickly' velcro that is the length of the 6 inch piece which still has its backing. Remove the backing and stick the two types of velcor together back to back sticky side in. This will form the fastener for the head band

- place a fresh 9 Volt battery on the 'prickly velcro. Position it so that you can easily attach the battery clip .

- Cut two more short pieces of 'prickly' velcro and use them to fashion a loop to hold the battery down. Do this by attaching the end of the 'prickly' piece to the 'soft' velcro on the inside of the headband, loop it tightly over and around the battery, then attach the other end of the 'prickly' loop to the ' soft' velcro on the inside of the band. It may sound complicated.. but it's not :-). Use the other 'prickly' strip to make a simple cover for the perf board. This will prevent you from loosing your PICAXE processor when your out dancing.

Step 9: Put It on and Enjoy !

Strap the headband around your head, engage the velcro snugly to keep it in place. Put on the battery clip and walk out into the world smiling !

Please let me know what modifications you make to the code or to the design.
Thanks !

-jc

johncohn@us.ibm.com

ps. Now there's also a happy afterward to this story !.. I was wearing this thing to Makerfaire in San Mateo CA in Jun of 2009. Many folks gave me nice comments on this headband. One guy, Xander H was working at the Monkey Electric booth (proud sponsors of the Instructables LED contest !). He too had been trying to reverse engineer the HL1606. We exchanged business cards. and the next week traded several emails. As a result, Xander has been able to port the full function of the light strip to the Arduino platform. Check out this link for all the code

Get the LED Out! Contest

Runner Up in the
Get the LED Out! Contest

Share

    Recommendations

    • Fix It! Contest

      Fix It! Contest
    • Tiny Home Contest

      Tiny Home Contest
    • Metalworking Contest

      Metalworking Contest

    43 Discussions

    Hey! I just found them selling the strips at Adafruit, along with providing some shanzy  example code and tutorials. Here's a link to the product page.

    Has anyone been able to write another subroutine for this on Picaxe? Perhaps something that strobes in different colors or a 'Night Ryder' effect?

    MY finished project. THANKS AGAIN JOHN!

    https://www.youtube.com/watch?feature=player_embedded&v=QoWAe6N0u54

    3 replies

    Professor Futon.. nice work !.. I haven't written pattens on this for a while. .I'm now using an atmel chip and different code. I'd be happy to walk you through how to do a night rider thing, though.
    -jc

    That would be great! I dove through the coding trying to dissect everything, but I'm not too familiar with how the outputs of the Picaxe drive the LEDS especially when in sequence. I appreciate your willingness to help someone with your old project! Thanks again!

    English language version of the HL 1606 documentation is available free from LED Lighting specialist at eyecatchu@yahoo.com.au

    1 reply

    You sooooooo look like David Lee Roth in this picture.
    Very Cool!

    I found a less expensive source: Blueview.cn Email dianawu@blueviewled.com Approx $17.50/meter for 32-LED version, $14.50 for 24-LED; minimum 10 meters, and these are silicone covered and a lot less fragile than other strips I've worked with. We could put together a group buy for those interested. I'm aware of the Arduino library; does anyone have a summary of the HL1606 command set so we can do SPI control with, say, a PIC? Also, I may be able to get a Chinese HL1606 datasheet translated better than Google does. Where can that be found?

    5 replies

    32-LED /m dream color led strip, really excellent, we can provide this model also.
    I have made a video on our led flexible strip light, you are welcome to check the bellow links:
    http://www.youtube.com/watch?v=93yxkXm8sLs
    If you want to get some further information, please contact me by trustrobin@gmail.com
    I am Robin from Shenzhen China, we are ShenZhen HuiHongXing Optoelectronic CO.,LTD

    Your first link is what I bought. Diana at BlueView was a pleasure to work with and they ship to the US in 3-4 days. The shipping costs are a bit high if you're just going to order 1m. But let me know if you need a few meters and I can get you some.

    The blueview link looks like the one I have. The eBay one is 12v, no serial control -- all LEDs in the strip will be the same color.

    Any new leads as to sources for the LED strips?
    Thanks for this neat project...

    Is that a ThinkPad X41 Tablet Pc?
    I have the same..!!!

    This is amazing and these LED strips are EXACTLY what I need for some projects I have been planning!

    Please definitely keep us up to date on any new sources for these things - it looks like I'm going to have to try and buy some off some fellow instructablers who have imported more than they need..hopefully they'll still have some when I get my other components all in and am ready to really start!

    Thank you so much for sharing!