Introduction: Intro to LED Strips
LED strips are a very fun and effective way to give lots of glow and color to a project. In this Instructable you will learn about the basic kinds of strips and how to hook them up to the Intel Edison with Arduino breakout board. These circuits include hardware needed for external power and how to set up a button and potentiometer to blink and fade using Intel's special flavor of Eclipse IDE and their LPD8806 library.
Step 1: Analog
There are two basic kinds of LED strips, analog and digital. They are controlled differently, so it's good to know which one you need for your project.
Analog strips come in mono (one color) or RGB (full color spectrum). They are sold on reels and can be cut into small segments. The segments are marked by metal contact pads and sometimes have a scissors icon screen printed right on them (love those!). The strips shown here are segmented in 5cm and 10cm lengths, each segment containing 3 LEDs. Usually strips use 30, 32, 60 or 120 LEDs per meter, which will change price and power consumption.
For each segment the LEDs are wired in series, which means the operating voltages are added up, giving the higher voltage needed. All of the segments are wired in parallel, so they get all get the same amount of voltage all the way down the strip, but the current draw adds up depending on the length of the strip. For more information on how to power your strip, skip to step 3.
The LEDs that fade and blink together, stay together. All the LEDs on the strip will act as one, they are non-addressable. One way to tell by sight is that they do not have any driver chips that you can see on the strip (that would be digital!).
Step 2: Digital
Digital strips come with RGB LEDs and have a driver chip on the strip that control the LEDs individually. These are also called individually addressable or just addressable.
Shown here is a strip using the LPD8806 driver. Other popular ones you will see are using the WS2801 driver and strips using WS2812 RGB LEDs, which have the drivers build right in the LED package! They too come segmented, where they can be cut down to bite-size lengths.
These strips take 5 volts, so they can run straight off a microcontroller. They will power up when attached to 3.3 volts, just not as bright.
You will want to use a microcontroller with these to program cool patterns and make them reactive to sensors and switches. Most of the work is in the software, the hardware set up is simple and will be gone over in a later step. Digital strips get their information from one data-in pin or two data-in and clock-in pins, dependent of what strip is used. Make sure to check the datasheet for the pinout diagram, voltage ratings and other useful information.
The neat thing about addressable strips is that each LED can do it's own thing. It can be any color it wants at any time. The makes blinking patterns and color swirls possible, and so much more.
Step 3: Power
To keep your LED strip project glowing brightly with the appropriate power, you will need to know how much current your project draws and it's operating voltage. Once you know those two things, you can choose a power supply. Keep in mind that current draw can be a tricky thing to figure out. Here we will take information from the datasheet and plug it into some simple equations to get the max current needed, since the information from the datasheet are if the LED is on at full brightness.
To calculate the needed power supply, we will need the following info:
- length of strip
- number of LEDS per meter
- current draw per LED OR power consumption per LED
- operating voltage
LED strips are commonly powered on 5V, 12V and 24V. The number of LEDs per meter (lpm) factors in the power calculation as well. Strips can be 30, 32, 60, 144 or more per meter.
Using Current Draw Per LED
As an example let's look at the white strip's datasheet. We can see the operating voltage is 12V, which should also be screen printed on the strip itself at the cut line of each segment. What we are looking for is the current draw measured in milliamps (mA). It tells us that each segment made up of 3 LEDs draws 60 mA. To make the calculations easier, the current draw can be divided by 3 totaling 20mA per LED. If one meter is being used with 60 LEDs per meter we have this information:
- length of strip = 1 meter
- number of LEDS per meter = 60
- current draw per LED = 20 mA
(Length of LED Strip x LEDs per Metre x LED current draw)
Plug in info:
1 (meter) x 60 (lpm) x 20 mA = 1,200 mA
1,200 mA / 1,000 = 1.2 amps.
Using Power Consumption Per LED
Another way of calculating current draw is using the power consumption per LED. The power consumption can also be used to find current draw if the power consumption, measured in watts per LED is known instead. The datasheet tells us .72 watts for 3 LEDs. First divide .72/3 = .24 watts per led
- length of strip = 1 meter
- number of LEDS per meter = 60
- power consumption per LED = .24 watts
- operating voltage = 12V
(Length of LED Strip x LEDs per Meter x LED Power) / 12
Plug in info:
(1 x 60 x .24) / 12 = 1.2
We now know that we want to use a a power supply that can provide 1.2 amps and 12 volts. Keep in mind that the current draw per LED is at full brightness. If the strips are dimmed through a PWM pin on the Edison, it will take less current. Going by the max amount is still a good guide to know if you have enough to begin with.
Battery life is based on current draw of, again it will fluctuate, especially with the digital RGB strips when patterns and colors are dancing along it. Current draw will fluctuate dependent on the color and brightness the LED is outputting. The way to accurately get the current draw is to hook it up to a multimeter and watch the amps change per pattern cycle, take note and do some calculations.
Another way to find out battery life with a dynamic project, hook up a battery at full strength and see how long it takes to drain.
This aside a general calculation can be made by looking at a batteries mAh rating. Let's stick with the white strip, 6 AA batteries are being used to power the example circuit. AAs roughly have 1500mAh, the 8 batteries are in series so the current stays the same at 1.5 amps. Divide this with the current draw of our project, which is 1.2.
1500 mah/1.2 amps = 1.25 hours of full brightness
Step 4: Cutting
When a specific length is needed LED strips can be easily shorted or joined using wire. Cut where marked with a line with contact pads on both side of it.
If the strip is waterproof, it will be coated in clear silicon. Before wires can be soldered to the pads, the coating needs to removed. Using a sharp blade carefully cut through the coating, go slowly so the blade does not cut the circuit board. Once it's cut the coating can be peeled off easily.
Tin the pads with some solder and do the same to a stripped piece of wire. Cut a piece a heat shrink tubing and slip it over the strip before attaching the wires. Lay the wire on top of the pad, come in with the soldering iron and heat the wire and pad up until the solder flow joining the two.
On the LPD8806 the pins are labeled DI and CI for Data and Clock In, this the side wire should be soldered to. Data Out (DO) and Clock Out (CO) can be used to daisy chain strips togeth
Step 5: Wiring - 12 Volt Analog Strip
Requiring 12V, these strips need more than what the Intel Edison pins output, which is 1.8V.
This can be dealt with by using a high power NPN or N-Channel MOSFET, such as an IRF510 used here. This MOSFET is rated for 5.6 Amps which is enough to power about 9 meters with 30 LEDs per meter. The MOSFET acts as a switch which that is opened to all the higher voltage flow to the strip. For more details on how a MOSFET works check out bildr's tutorial. It allows control signals to be sent from the PWM pins on the Edison and for it to be turned on or fade when the Edison tell's it to.
Let's build the basic circuit needed to control it with a microcontroller. An RGB strip will be used which needs one MOSFET for each color channel, making three total. For mono strips only one MOSFET in needed, so just remove two. An external power source is needed, 8 AAs work well. If using another kind of transistor check out the datasheet for the pin out diagram. Findchips.com is a great source for looking up components and datasheets.
List of Materials
(3) MOSFETs IRF510
(3) 10K Ohm resistor
(1) 12V power source
(some) Jumper wires
Step 6: Wiring - 5 Volt Digital Strip
No need for a transistor since this strip is powered with 5 volts. The Arduino shield has a 5V output pin that you can connect straight to the strip. If using the mini breakout board you can power it from the 3.3V at J18-3 for slightly dimmer LEDs or use an external power source like a 5V wall adapter power supply.
List of Materials
(1) meter LPD8806 strip
(some) Jumper wires
Make these connections:
strip 5V --> Edison 5v
CI --> Pin 13 on Arduino BB / J17-11 on mini
DI --> Pin 11 on Arduino BB / J17-12 on mini
strip GND --> Edison ground
Step 7: Add Inputs
Now that you know how to connect the strips to the microcontroller, let's add some inputs!
In order to get analog input using the Edison, the Arduino shield needs to be used since it supports ADC (analog to digital conversion). The mini breakout board needs external hardware in order to support analog in pins.
Below are the material lists with demo code based on what strip you want to work with. Feel free to hook up two or all three strips!
LPD8806 Digital - Push button 1 for a color chasing effect, push button 2 to populate the strip with 3 different colors. Use the materials needed to hook up this 5V strip plus:
(2) 10K Ohm resistors
Analog Mono - Fade on and off with a push of a button. Use the materials needed to hook a 12V strip plus:
(1) 10K ohm resistors
Analog RGB - Use 3 potentiometers to control the brightness of each color channel. This makes a simple color mixer, allowing you to control what color the strip is by tuning the channels.
(1) meter analog RGB strip
(3) 10K Ohm resistors
(1) 8 AA battery holder
(8) AA batteries
If running both 12V mono and analog strips they can both be powered off of one supply.
Step 8: Uploading to Edison
Intel has extensive documentation on their website for the Edison and Galileo. Below are listed some of the main steps to be aware of when preparing to upload a program to the Edison board with links to relevant pages. For more details and documentation, begin at Intel’s Get Started page. There you will learn how to assemble hardware, download software and find demos and links providing example code.
Get your Edison flashed with the latest firmware and learn how to connect to it through the USB serial port. To upload Eclipse you will also need to connect it to a WiFi network, with Arduino it’s not necessary.
Download Intel’s Arduino IDE , when you open it you will see the Intel Edison and Galileo boards under the Tools menu. An understanding of Arduino is recommended before getting started with Intel’s version. Recommended reading:
Follow the steps to upload your first blink sketch.
To upload a program via Eclipse, the Edison board needs to be connected to a network and your computer needs to be connected to the same network. After flashing the latest firmware and connecting to the USB serial port, visit Intel's Get Started page and choose how you want to get your board online.
If you get stuck, the best place for help with troubleshooting is Intel’s forum.
Step 9: Going Further
1 Person Made This Project!
- BadC_Man made it!