- Before connecting NeoPixels to any large power source (DC “wall wart” or even a large battery), add a capacitor (500–1000 µF at 6.3V or higher) across the + and – terminals as shown above. The capacitor buffers sudden changes in the current drawn by the strip.
- Place a 300 to 500 Ohm resistor between the Arduino data output pin and the input to the first NeoPixel. The resistor should be at the end of the wire closest to the NeoPixel(s), not the microcontroller. Some products already incorporate this resistor…if you’re not sure, add one…there’s no harm in doubling up! Also, newer NeoPixels are less picky about this. Nothing’s needed at the “out” end of a strip…you can leave the data out “floating.”
- Try to minimize the distance between the Arduino and first pixel, so the signal is clear. A meter or two is usually no problem. Much longer and things can become unreliable. Individual NeoPixels can act as repeaters for long runs.
- Avoid connecting NeoPixels to a live circuit. If you simply must, always connect ground first, then +5V, then data. Disconnect in the reverse order.
- If powering the pixels with a separate supply, apply power to the pixels before applying power to the microcontroller. Otherwise they’ll try to power “parasitically” through the data line, which could spell trouble for the microcontroller.
- Observe the same precautions as you would for any static-sensitive part; ground yourself before handling, etc.
- NeoPixels powered by 5v ideally need a 5V data signal. If using a 3.3V microcontroller you must use a logic level shifter such as a 74AHCT125 or 74HCT245. See the “Logic Level Shifting” page for more details. If you are powering your NeoPixels with 3.7v directly from a LiPoly cell, a 3.3v data signal is OK.
- Make sure that your connections are secure. Alligator clips do not make reliable connections to the tiny solder pads on NeoPixel rings. Better to solder a small pigtail wire to the ring and attach the alligator clips to that.
- If your microcontroller and NeoPixels are powered from two different sources (e.g. separate batteries for each), there must be a ground connection between the two.
Some of our projects don’t make the above precautions…these are typically small battery-powered devices and power spikes aren’t a big concern. Any project with a lot pixels or a large power source should definitely include the power capacitor and data line resistor.
NeoPixels are not intended for long-term permanent use such as room lighting…but here are some tips to make the most of it:
It’s not clear what the mean time between failures (MTBF) is for NeoPixels, but we’ve seen figures of ≥50,000 hours quoted for similar addressable LEDs. On the surface this sounds phenomenal…that’s over 5 years of 24/7 use…but it’s important to understand the term “mean” here. You may have seen MTBF used in hard drive specifications, but it’s also common in lighting and many other electronic components. Everything eventually has to give, and unfortunately there’s just no One True Number for this. The mean time is a statistical average, a point on the bell curve where most parts will expend their usable lifetime. But any bell curve has outliers — in this case, a small number of seemingly immortal components in one direction, and those meeting an early demise in the other.
The “gotcha” with any sort of addressable LEDs is their “downstream” nature. If any pixel in a strand should fail, every pixel further down the line is also affected. Those subsequent pixels are not damaged by this…but until the failed pixel is replaced, they’re all but useless.
In a typical hobby project with a meter of LEDs or a couple of NeoPixel rings, and run for an hour or two here and there, you’ll probably never encounter this issue…most of us never do. But when projects increase in scope…hundreds or thousands of pixels running continuously…the probability of a short-lifespan outlier appearing becomes more likely, almost inevitable.
Nothing can eliminate this, but some best practices include:
- For large “wall power” installations, use high-quality power supplies with adjustment pots, configured for no higher than 5V DC output.
- Do what you can to ensure airflow. All LEDs emit a small amount of heat, and LED strips in open air seem to fare better than enclosed strips stewing in their own warmth.
- Dry environments are preferable to humidity, even with the weatherproof covering of most LED strips.
- Design for quick replaceability in sections…for example, identical 1-meter sections with JST connectors at both ends. If any section has a failure (knocking out everything downstream), swap in a known-good spare, then troubleshoot the failed section on its own, perhaps reflowing a single bad pixel and then setting this strip aside as a future spare.
- Rather than one long LED run, design for shorter parallel runs, as is done with the Feather RP2040 SCORPIO, NeoPXL8 or Pixelblaze Output Expander. This will not reduce the number of failures at all, but limits the scope to a small distraction rather than the whole installation.
The first failed pixel might be a statistical outlier, but take a look at that graph and notice something: this is the start of a ramp-up. More will follow, and at shorter intervals. For large-scale architectural installations, big “art cars” and so forth, it’s not uncommon to hear after about one year that maintenance becomes near constant.
You may have seen elaborate retail window displays or theme park decorating that successfully uses large numbers of addressable LEDs. How is this done? Partly through the techniques listed above. Parallel runs localize any visual disturbance, modular replaceability allows quick overnight repairs, or a showpiece might simply be switched off until repaired. Mostly though: such setups are intended for limited runs: window displays might only be used for 2–3 months, and theme parks will redecorate annually for different seasons and events. We wish these things ran forever but large numbers just statistically work against us.
Text editor powered by tinymce.