You've done it. You've made LEDs blink. You've even powered an LED strip or two using a LiPo battery or a wall wort. But you crave more. Here are some tips for creating large LED projects that will last.
DANGER. Even 20 milliamps can be fatal, and we'll be working with dozens of AMPS. Never touch ground and power wires at the same time. Use electricians gloves when plugging and un-plugging power, and use insulated connectors wherever possible.
LEDSStep 1: Choose your LED type and quantitySketch out your project. Measure the height and width of your project, and decide how many LEDs you want per meter (or per foot if you're an English system using troglodyte like me). At this step, you may want to run a couple different LED strips with different diffusers to get an idea of how your project will look.
LED strips can look very different depending on the type and quality. For instance, the WS2811s I got from China are less bright than the ones I bought from Adafruit.
Note that depending on the board and the DMX controller or software you use, you may only be able to use a certain type of LED strip.
Should you use RGB, GRB, or RGBW LED strips?
RGB and GRB are essentially the same, other than selecting them in your sketch or software. RGBW LEDs are brighter and often have truer colors and a greater variety of colors. They also require specific libraries (Adafruit Neopixel works) and more power. Of course, if you don't need more than one color at a time, you can save yourself some money and buy non-addressable LEDs. Check out Alex's video about choosing LED strips to learn more.
Should you use 5 volt or 12 volt LED strips?
Here are some factors to take into account when choosing whether to use 5 or 12 volt LED strips:
- Price: 12V are cheaper by the strip, but often more expensive in bulk
- Power supplies: 12V marine batteries are portable, durable, and relatively inexpensive. 5V AC converters, like those used for laptops, are also relatively inexpensive and easy to find.
- Power conversion: If you use LEDs with a voltage different from your power supply, you may pay for it. Buck converters can be expensive, and linear regulators are ininefficient
- Voltage drop: the longer the wire, the more resistance. This video shows the effects of too much voltage drop:
Which microcontroller or mini computer you choose will somewhat depend on the LEDs you chose in step one, and will also be influenced by the software you choose in step three.
Teensy 3.x is my personal favorite. It can be used with Art-Net, Glediator, and can easily run video and show images on an LED grid. The WS8211 adapter board takes some of the thought out of your hardware setup, and it's quite affordable too. It even has the mounting holes in the right places to fit into a CableGuard box (read more on enclosures below). A single one of these bad boys can drive over 10,000 LEDs, although Paul recommends sticking to 1,000 per Teensy for best performance.
FadeCandy is cheap and fast and can be quite powerful when multiple are used in combination with Raspberry Pi. It can run WS2811 or WS2812 LEDs. I'm still trying to wrap my head around all of FadeCandy's firmware awesomeness, like built in color correction and dithering. Color control for LEDs is most dependent on the software, not the hardware, and this is where FadeCandy's firmware shines. You can also run FadeCandy's firmware on Teensy 3.x. Each FadeCandy can drive 512 LEDs, but they're modular so you can use 20 of them to drive up to 10,000 LEDs. Adafruit has some excellent tutorials for FadeCandy, like the
If using Arduino, you'll want to use a beefy Arduino like the Mega or your refresh rates will be visibly slow. You can also use multiple Arduinos in combination with Raspberry Pi or other singleboard computer.
Choosing wire and USBs for signal
CAT5 cable, like the kind you use for ethernet, is both inexpensive and high quality, and it works well for carrying signal over distance. For connecting strips to each other, you'll probably want to use a 3 or 4 stranded wire (depending on the type of LEDs that you bought) that will also work for power and ground.
Note that if you're using multiple controllers, you may run into issues with your USB hub. Read more about that here. USB cable lengths can also be an issue. Don't use USB cable longer than 20 ft. If you have to communicate signal over 20 feet, use a protocol like RS45 instead of USB.
Step 3: Choose a software library or DMX controllerThere are many Arduino libraries for controlling LED strips. FastLED, Adafruit Neopixel, and the OctoWS8211 (best with WS8211 LEDs and Teensy) are some of the the most popular and well established.
If you're doing a full scale lighting piece, you may want to use a DMX software. There are some pretty great opensource and royalty free ones that have been developed.
- Art-net – royalty-free communications protocol for transmitting the DMX512-A lighting contro lprotocol and Remote Device management (RDM) protocol over ethernet
- Glediator –WS2811, WS2812, WS2801 – arduino& teensy compatible
- Fadecandy – FadeCandy, ESP8266 arduino,and lots more
- Udder - Udder is a lighting control server by Mike Bissell that drives the FadeCandy servers with complex, never repeating patterns.
If you are using a 3.3V board to drive 5 volt or 12 volt LEDs, or a 5V board to drive 12 volt LEDs, you are going to need to boost your signal, or else the LEDs will appear "shaky" when changing color. Use a unidirectional The 74HC245 is a quality signal booster, and it's what's in the WS8211 adapter board.
Stay away from active bi-directional logic level converters like the TXB0108 or the CYT1070.
Why? According to Paul Stoffregen in his forum post here:
"TXB0108 chips work similarly to the passive approach, except a circuit detects any unexpected change at the "output" and very briefly drives the other side high very strongly for a brief moment. Thereafter, the output voltage is maintained with only a weak pullup. The momentary strong drive solves the slow low-to-high transition. But the detection circuit is a ticking time bomb, ready to go off and cause incorrect behavior. Those TXB0108 tend to work well when the signals are on short wires between digital chips on the same circuit board. When driving long wires to LED strips, where huge changes in current also happen along shared ground paths, those drivers can easily become a liability."
Also stay away from I2C logic level converters when driving LEDs. They're really only good for I2C. Paul explains:
"Their big weakness is the high level output on either side is only due to the weak pullup resistor, so the low-to-high output is very slow. Because high-to-low is much faster, they result in a distorted waveform output, which is terrible for WS2811 LEDs where the width of the pulses matters. They're unable to source any substantial current into a load, so troubleshooting by connecting a LED to "see" the signal causes trouble. Even just connecting extra wire to the output, especially when experimenting on a breadboard, can really alter the low-to-high speed."
Note that by lowering the power for 5 volt LEDs to between 3.7 and 4 volts, you CAN actually drive them with a 3.3V signal, although your LEDs will of course be dimmer.
POWERHow much current will my LEDs draw?The best way to find out is to test! (Also, read the Adafruit Neopixel Uberguide for more info).
- Estimate the maximum current for WS2811s and 2812s by multiplying the number of LEDs times 50mA
- Use a multimeter to get the actual current from a strip running a pattern that you plan to use.
- If you have a long strip and expect your LEDs to draw more than your multimeter/ammeter can handle, (typically 10 amps for mid-range ammeters), use a current shunt.
If you read the Adafruit NeoPixel Uberguide, you may have noticed that they recommend using a resistor between signal from the board to the LEDS, and a 1,000uF capacitor between the ground and power. Is this really necessary?
The capacitor is only necessary if the distance between the board and the power supply is longer than six inches.
Also, LED strips like the WS8211s and WS8212s have a resistor before each LED, so placing an extra resistor at the beginning is not typically necessary. If you are having trouble with your signal, you may want to test different resistors between your pin and your LEDs to smooth out the data signal.
Choosing a power supplyIs your project an indoor display that can plug into the wall, or an outdoor display that will require batteries or a generator?
If it's an outdoor display, deep cycle marine batteries are affordable, durable, and efficient. Don't forget to factor in power lost to your buck converters (usually they run at 80-90% efficiency) when calculating how many amp hours you'll need.
For indoor projects, 5 volt wall worts like the ones used to power laptops are cheap and can supply many watts of power. If your project requires more than the 100 Amps DC, you should check your breaker box to see how many AC amps your outlet can provide to make sure you're not overtaxing it.
Getting the correct voltage
If you are driving LEDs from a power supply that has a different voltage than your LEDs require, you're going to need some way to regulate the voltage. You could use a linear voltage regulator, a buck converter (to lower voltage), or a boost converter (to raise voltage).
Should I use a buck/boost converter or a linear voltage regulator?
Example –you want need 5 volts at 10 amps, and have a 50 volt power supply
- A linear voltage regulator takes 50 volts at 10 amps (500 watts) and turns it into 5 volts at 10 amps (10% efficiency)
- A buck converter takes ~1 amp and turns it into 5 volts at 10 amps (80+% efficiency)
Boost converters work similarly to a buck converter - stepping up voltage while stepping down amperage.
If buck/boost converters are so much more efficient, who even uses linear regulators?
Well, linear regulators are quite a bit cheaper, so if power isn't an issue, they can be a better option. They also take up less space, and create less noise, so if you have and ADC or something that requires low noise or you have space constraints, linear regulars make sense. They almost never make sense in high power LED projects however.
What happens if I use the wrong voltage power supply?
For 5V LEDs, using more than 5.2 volts will dramatically shorten the life of your LEDs. I once powered a 5V LED strip using 6 volts, and within 6 hours, only the red LEDs were still working.
It's fine to go with a lower voltage, although you'll notice that the LEDs are dimmer.
How to figure out how long your batteries will last
If you're using a wall wort, you won't need to worry about this, but if you're using a battery bank you'll need to pay attention to the amp hours.
Say my batteries are 12 Volt, 7 amp hour, and I measured the amperage in my circuit at 3 amps.
If I used buck switching regulator at 90% efficiency, I can evaluate the battery life. I'll estimate my buck regulator at 90% efficiency.
Energy Out = 0.9 * Energy In.
With a load of 5V @ 3A the energy being delivered out of the buck regulator is 5V*3A = 15W. Applying the 90% efficiency formula the regulator input energy would be 15W/0.9 = 16.6W. This wattage at 12V corresponds to 16.6W/12V = 1.39A draw from the battery. At this lower current the battery would last 7AH/1.39A = 5 hours.
WIREHow to choose wireDon't forget to use the correct wire guage!
When running dozens of amps, the 22 guage wire that you use on a breadboard is NOT going to cut it. This is a great way to start a fire. You're going to need much beefier wires, like the ones used in wiring homes.
Here's a helpful cheat sheet for wire guages.
Wire is only as strong as the weakest link. If you solder 12 guage wire to a 22 guage JST connector, not only will your project look janky AF, the extra current could heat up and melt the JST connector wire's insulation into a heap of melted plastic, causing a short and fire.
Thinner wire has a higher voltage drop
The thinner and/or longer the wire, the higher the resistance.
If you're using long, thin wire, you may end up having to add more boost converters to your project.
Stranded is typically better than solid core
Solid core wire can be frustrating to use because it is more brittle and it breaks when flexed.
Using FusesUsing fuses is a great way to ensure that a short in one area doesn't bring down your whole system. There are many different types of fuses. Fuses can be found at auto parts stores or hardware stores. Indicating fuses let you know if a fuse blows by triggering an LED or audio alarm. Most fuses are one-time use fuses, but there are also resettable fuses.
Make sure that the fuses are the correct size for the amperage that you're using. The fuse should rated at 125% of the normal operating current.
Place the fuses between the battery or power supply and the buck converter or regulator.
TOOLSIf you don't have the correct tools, you'll quickly get frustrated. People who are able to accomplish a lot usually have good tools.
Soldering iron and solderIf you're going to be soldering dozens of LED strips, the first things you'll want to invest in are a decent soldering station and good solder.
I use the Weller WLC100.
If you can splurge, the Weller WD1002N is an amazing soldering iron and will make your tips last much longer. Remember to always use the lowest temperature setting that your solder will melt at (usually around 340 F, but read the solder package to find out the exact temperature).
Kester 44 and Kester 48 are amazing flux core solders that will change your life. Use the correct size solder for the job.
Wire and wire strippersNext, you're going to need a good wire stripper and good wire. Self-adjusting wire strippers are so much faster than a normal wire stripper and can strip multiple wires at once.
We talked about the gauge of wire you'll need above. Thicker guage stranded wire is more forgiving because it's quite hard to break, but for smaller stuff, you'll need good wire. Good wire has insulation that doesn't melt when exposed to heat from a soldering iron and has a sturdy stranded core that won't unravel easily. Good wire can be expensive.
LabelmakerDon't forget to label everything! Invest in a labelmaker
ConnectorsThere are dozens of different connectors available.
Bad: uninsulated spade connectors, wire nuts
I don't know about you, but my wire nuts tend to pop off when they get jostled a lot. When working with high voltages, the last thing you need is a live wire hanging around. Un-insulated spade connectors have a similar problem
Ok: JST connectors, insulated spade connectors
These connectors are all easy to use and provide some insulation. I find that JST connectors can be hard to disconnect, especially when they get dirty, and I've accidentally pulled a few wires apart when attempting to disconnect them.
Good: Automotive connectors, waterproof wire nuts
In the auto parts store, look for the waterproof connectors used for motorcycle or car wiring. Some of these are quite affordable. They're typically only available in larger (greater than 18 guage) sizes.
Great: Delphi Metri-Pack
These things are quite expensive and it can be time consuming to crimp the end of every single wire. They're also not very forgiving if you accidentally crimp before you slide the waterproof cover on. However, nothing beats them for both safety and durability. If you're doing an outdoor installation and you want it to last, use these. They come in all different sizes for different guage wire and different configurations.
Insulation/Heat shrinkI used to hot glue the ends of my LED strips where they joined the connectors. While I still use hot glue as a cheap way to insulate solder joints and keep them in place, I've discovered some other solutions that work better.
Hot glue's downside is that it can be quite rigid, so while it provides some strain relief, it can actually cause some strain as well. Note that it's also not appropriate for anything other than rugged passives, since it insulates components, preventing them from dissipating heat, and can even melt the coating on electrolytic capacitors.
Now I mostly use heat shrink around the wires at the ends of LED strips. Always use the smallest size heat shrink that will fit. If it's a snug fit, it's fine to use some silicone lubricant to get it to slide over the solder joints more easily.
I found that if I first brushed some liquid electrical tape onto the soldered end of the LED strip before adding heat shrink, I was less likely to have a short. It's best to use both together, since liquid electrical tape tends to peel off. Heat shrink lined with internal glue that melts over the solder joints is also available, and I plan to use that in the future for my LED projects.
Enclosures and potting compoundsMounting circuit boards and controllers in plastic enclosures protects them from exposure to the environment and things like rain, snow and insects.
Cableguard boxes are dustproof, and supposedly weatherproof, although the jury is still out on how they fare when left outside for the rainy season in Seattle (I'll update this project to let you know around June 2019). You can also buy neat little screws that will help to organize your wires inside the box (This helpful article about enclosures from DIY Christmas even shows clever ways of mounting the cableguard boxes without compromising their weatherproof shells).
Some other inexpensive enclosure options include:
If you really want something to be waterproof, it's best to use a potting compound. Potting compounds are typically urethane based. You can also use epoxy or silicone caulk as a cheap potting compound, but both of these have their downsides. Epoxy tends to be quite rigid. Silicone caulk tends to be soft, and can pull away from components, leaving them exposed to water. Be sure to research the different properties of the potting material you intend to use, such as flame retardation, conductivity (insulation), temperature, and shrinkage.
Good luck with your LED project, and stay safe!
Comments
Please log in or sign up to comment.