LED strips are thin conductive circuit ribbons which have tiny surface-mount LEDs (and other components) soldered to them. On account of this, LED strips are flexible in more ways than one. They can provide lighting in hard to reach spaces, be attached to things which bend, follow contours of non-linear shapes, and glow in any color you can imagine. On account of their compact size, brightness, and variability, there is a world of possibility illuminated by LED strips.
The most common type of LED strip you will encounter are analog strips. These can be either single or multi-color. These types of LED strips typically use 12V power, but you will want to double check. Sometimes they can also be 5V.
Single color LED strips are quite simple to power up. They have two wire attachments, one for 12V power and one for ground. When they are connected to a power source, they glow a single color.
You can find single color LED strips in a variety of colors.
Multi-color LED strips are a little bit trickier to use. These consist of surface mount multi-color LEDs, which can produce colors across the visible spectrum. This makes them very versatile and fun to play with.
By varying the amount of electricity being applied to the red, green or blue pins, you can mix the three light sources and create a wide range of different colors.
The easiest way to control analog LED strips is with a out-of-the-box LED strip controller. These plug-and-play controllers are typically suitable for most LED strip projects. Before I try to build custom circuitry, I always check to see if there is a controller that suits my needs.
These controllers are simply connected in series between the LED strip and the power.
They are then controlled wirelessly via remote. Different controllers have different functionalities which you can tell by looking at the remote. At that, they are dead simple to use.
One thing to keep in mind about wireless control, is that there are two types of ways these comes. Some are radio, which works even if the receiver is hidden. Others are IR (infrared) and require the remote to have "line of sight" to the receiver (like your TV). These receivers have a cable connected to a little plastic box.
The only thing to be mindful of is whether you are getting a controller for single color LED strip or multi-color LED strip. The quickest way to tell the two apart is that multi-color controllers have color settings on their remotes and single color controllers don't.
To put it simply, the transistor allows you to use the small 5V current being output by the Arduino pin to control the large 12V current required for the LED strip to function. Note that the 12V ground gets connected to the 5V power supply ground. When wiring together different DC electricity circuits, ground always gets connected even if the voltage is different.
Wire the circuit as follows:
- Arduino Pin 5 to transistor base (pin 1)
- LED strip power to 12V power
- LED strip ground to transistor collector (pin 2)
- 12V and Arduino ground to transistor emitter (pin 3)
The base of a TIP120 transistor is wired to the I/O pin on the Arduino. By applying voltage to this pin, a proportional voltage is sent through the LED strip.
The LED strip is turned on and off in relation to the amount of current applied to the transistor pin.
Should you want to try it out, here is code which blinks the LED strip. Albeit this code does not fade the LED strip, it can be easily modified to do so. With this setup you simply control the LED strip that same you control a single LED.
To control a multi-color LED strip, you just need to add a new transistor for each new color wire.
The above code cycles through different colors at random. It demonstrates how varying the amount of power applied to each RGB wire, changes the color being displayed.
Aside from analog strip, there is also addressable LED strips. This type of LED strip uses a digital communication protocol to control each LED or "pixel" individually. While all of these strips operate roughly the same, there are a number of
different communication protocols for controlling LED strips. It is important to understand which protocol to use. This can be determined by checking the documentation provided by the distributor of the LED strip.
For our example we are going to use Adafruit's 60 LED neopixel LED strip. This LED strip uses a single-wire protocol, and by varying the length the signal is high (5V) or low (ground), determines the type of data being sent. It is very confusing.
Fortunately, Adafruit has created a library to do all the complicated timing and single-wire communication for you. It just requires downloading, and copying their Neopixel library into your Arduino software's library folder. Once it's copied, just reset the Arduino software and it should be installed.
To make use of the Neopixel library, load the following file:
File --> Examples --> Adafruit Neopixel --> RGBWstrandtest
The LED strip should now run through a series of test routines to demonstrate their use. Notice how each LED is capable of being a different color. This is what sets addressable LED strips apart from analog.
To learn much more about addressable LED strips (and Arduino), check out the Arduino class.
For this lesson we will begin making a trash can that looks a barrel of glowing radioactive waste. In this lesson we will add a multi-color analog LED strip, and in the next lesson, we will add a glowing EL panel decal.
For this project you will need:
(x1) Adhesive-backed RGB multi-color LED strip
(x1) RF wireless color remote
(x1) RF wireless monochromatic remote
(x1) 20cm x 15cm EL panel
(x1) EL wire Inverter
(x1) 12V / 2A power supply
(x1) Power adapter splitter
(x1) Power jack
(x1) Power plug
(x1) 12" x 12" adhesive vinyl sheet
(x1) Black trash bin
(x1) Roll of black tape
If you are not interested in making a glowing radioactive trash bin, you may post a picture of any new (to you) project that you have made using multi-color analog LED strip.
To begin, we are going to make an extension cable that will easily mount through the side of the trash can. To do this we are going to use a jack's mounting nut.
Solder a black wire to the jack's middle terminal, and a red wire to the terminal connected to the round contact in the center of the jack.
Insulate these connections with shrink tube.
Next, we want to attach a plug to the other end of the jack's wires.
Take the plug apart, and first slide it's cover onto the wires before you solder them.
Solder the red wire to the center terminal, and the black wire to the outer terminal.
When complete, twist the cover back onto the jack.
Drill a 5/16" hole anywhere near the bottom edge of the trash bin.
Mount the jack in this hole using its nut.
This will be the power jack for the trash can. Everything else will get plugged in using the plug on the inside.
Peel off the adhesive backing from the LED strip and wrap it two or three times around the inside of the rim.
Trim it along one of the marked cut lines using diagonal cutters when done.
Attach in series the inner power plug, the RF color receiver, and the LED strip.
Your LED strip circuit is now complete!
While not the prettiest solution, using black tape is the easiest and most effective way to clean up the wires inside of the trash bin.
Simply tape them down to secure and hide them.
Plug in the 12V power cable to the jack on the outside.
Put the lid back on.
Finally, when it's all set up, you can turn is on easily using the power button.
Also, press the button to change the color of the LED strip to aqua. This will match the color of the EL panel and make it seem more aesthetically pleasing.
All goes well, your trash can should now have an inner glow.
In the next lesson, we will add a glowing radioactive symbol to the outside of the trash can.
Share a photo of your finished project with the class!
Nice work! You've completed the class project