User Tools

Site Tools


tutorials:products:digitalrgbledstrip:index.html

This is an old revision of the document!


Introduction

We love some good LED blinking as much as the next person but after years of LED-soldering we need something cooler to get us excited. Sure there are RGB LEDs and those are fun too but what comes after that? Well, we have the answer: Digital LED Strips! These are flexible circuit boards with full color LEDs soldered on. They take a lot of LED-wiring-drudgery out of decorating a room, car, bicycle, costume, etc. The ones we carry come with a removable waterproof casing.

There are two basic kinds of LED strips, the "analog" kind and "digital" kind. Analog-type strips have all the LEDs connected in parallel and so it acts like one huge tri-color LED; you can set the entire strip to any color you want, but you can't control the individual LED's colors. They are very very easy to use and fairly inexpensive.

The Digital-type strips work in a different way. They have a chip for each LED, to use the strip you have to send digitally coded data to the chips. However, this means you can control each LED individually! Because of the extra complexity of the chip, they are more expensive.

You can buy waterproof digital RGB LED strips by the meter at the Adafruit shop!

"Digital" LED strips

This tutorial is for the Digital RGB LED strips only! See the 'analog' RGB strip product page for tutorials on that kind

Technical specs:

We used to carry the HL1606-chip-based LED strips and now carry the superior LPD8806-type. They look very very similar but have a few differences, in the following specifications the width is different:

  • 19mm (0.75") wide (HL1606) or 16.5mm (0.65") wide (LPD8806), 4.5mm (0.18") thick with casing on, 62.5mm (2.45") long per segment
  • 32 LEDs per meter (16 segments)
  • Removable IP65 waterproof casing
  • Maximum 5V @ 120mA draw per 2.5" strip segment (all LEDs on full brightness) - about 2A per meter
  • 2 common-anode RGB LEDs per segment, individually controllable
  • LED wavelengths: 630nm/530nm/475nm
  • Microcontroller required to control strip

Project Ideas

The Adobe Flash Plugin is needed to display this content.





The Adobe Flash Plugin is needed to display this content.


1-dimentional cellular automata!

The Adobe Flash Plugin is needed to display this content.


Light-edge clock

Schematic

The strip is made up of 2.5" segments. Each segment is independent and so you can cut the strip down on the segment boundaries, or extend them, or split them up, etc.

This is what the HL1606-based strip segments look like:

the LPD8806-based strip looks like this (its thinner, and has fewer 'pads' on the side)

Each segment basically acts like this

There is one chip (either HL1606 or LPD8806) latch chip, it controls 6 LEDs (2 x RGB) with 2 or 4 input data lines and 2 or 4 output data lines. The HL1606 uses 4 pins, the LPD8806 uses only 2. For both, data is sent on the DI(data in) pin and CI (clock in) pin. The HL1606 also uses the LI (latch in) pin to 'push' the data down the line to the next chip through the DO (data out), CO and LO pins. The LPD8806 has a slightly smarter method by which you send special data to let it know its time to latch. By alternating data sends and latching, you can write to near infinite number of LEDs in the strand - limited pretty much by the power supply!

The SI pin is used by the HL1606 to 'strobe' the built in fading function. We've had difficulty getting it to work reliably in a way that doesn't suck so we wont be using it in the tutorial.

The whole thing is run off of 5V, and data signal should be 5V (although we suppose you can try 3.3V data signals, it might work)

Current draw

Each segment has 6 LEDs total (two red, two green and two blue). Each LED draws about 20mA when lit at full brightness. So if you have the segment set to full white, that will be 120mA from a 5V supply.

Each meter has 16 segments, 32 LEDs so we multiply 16 * 120mA to get the maximum current. Per meter, this comes out to 1.92 Amps. Since the chips also draw a little power, we will round this up to 2A per meter!

For this reason we suggest getting a large power supply. You can use an ATX power supply (available at every computer or electronics store, really!) and connect the PWR_ON green wire on the large ATX plug (leftmost in the image above) to ground (black) to activate it. Then grab 5V and ground from one of the 4-pin hard drive connectors.

In reality, this is an upper limit. If your project doesn't light up all the LEDs, and uses colors instead of just bright white, the power usage will be a quarter or half. Either way, you'll want to keep this in mind, the power usage adds up and overdrawing from a small power adapter can damage it permanently

Which type of strip do I have?

As we mentioned, there are two strips you may have. If you ordered before August 2011 its going to be the HL1606 type, otherwise you probably have the LPD8806 type. Its not too hard to tell the difference. Look at the segments of the strip and find the 'pads' on the side of each 2.5" segment. The HL1606 strips have 6 pads on each side. the LPD8806 have 4 pads on each side:

This is what the HL1606-based strip segments look like:

the LPD8806-based strip looks like this (its thinner, and has fewer 'pads' on the side)

IF YOU HAVE THE HL1606 BASED STRIP, CLICK HERE TO CONTINUE THE TUTORIAL - We split off the tutorial here to avoid confusion since the strips look similar!

Wiring the LPD8806 based strips

This wiring tutorial is for the LPD8806 only - its a little bit different than the HL1606 so if the photos don't match up, check which kind you have!

The toughest part of the project is probably just soldering to the strip, its very easy to use! First, cut the piece to the length you want, on the cuttable boundaries. Next, tin the 4 INPUT pins (make sure you're connecting to 5V/CI/DI/GND which is input, not the corresponding 5V/CO/DO/GND pins!). To make the images clearer, we removed the plastic covering for this tutorial. However, you can just cut a little bit away on yours to allow you to access the pads. Once you take off the plastic cover its a bit difficult to get it back on

JUST BECAUSE YOU HAVE A STRIP WITH WIRES SOLDERED ON DOES NOT MEAN THEY ARE ON THE RIGHT SIDE, THEY COULD BE ON THE OUTPUT PINS. CHECK THREE TIMES TO MAKE SURE YOU ARE CONNECTING TO THE INPUT SIDE!

Tin the pads by carefully melting a little solder onto the pads

Start by soldering a red wire to the +5V power line

Next connect two wires to the data and clock pads. We'll use yellow for the Clock pin (CI) and green for the data pin (DI)

Finally, solder a black wire to ground

That's it! Now you're ready to use the strip. You may want to use heatshrink to provide a secure cover for the wires, or stuff hotglue in the end, which will do the same.

Using the LPD8806 based strips

The LPD8806-based strips are easier to use than the HL1606, with fewer pins and only one library so this section will be nice and short!

First, connect the strip up to your microcontroller (we'll be using an Arduino)

  • Connect the Black Ground to the ground pin of the microcontroller (this is for data and power ground)
  • Connect the Yellow Clock wire to digital Pin 3 (you can change this later)
  • Connect the Green Data wire to digital Pin 2 (you can change this later)
  • Connect the Red +5V power wire to your 5V power supply.

You will need a lot of power for these strips so be sure to read the documentation above to specify a proper supply. Don't just connect it to the Arduino +5V pin and cross your fingers, you could damage your power adapter!

Next you'll need to install the LPD8806 library code. Download the library from github by clicking the DOWNLOADS button in the top right corner, rename the uncompressed folder LPD8806. Check that the LPD8806 folder contains LPD8806.cpp and LPD8806.h

Place the LPD8806 library folder your <arduinosketchfolder>/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE.

Load up the File→Examples→LPD8806→StrandTest sketch, you might want to change the line that says

LPD8806 strip = LPD8806(32, dataPin, clockPin);

so that the first argument to the object is the number of LEDs in your strip. Each meter has 32 LEDs so count them or do the math. Now upload it to your Arduino, your strip should start to perform a bunch of demonstration tests!

/home/ladyada/public_html/wiki/data/attic/tutorials/products/digitalrgbledstrip/index.html.1313010327.txt.gz · Last modified: 2016/01/28 18:05 (external edit)