Learn More: Neopixels

Looking to start using BlueGhozt in your custom lighting builds? If you are new to neopixels, this tutorial will guide you through the ins and outs of neopixels. You’ll learn the basics of how they work and you’ll learn some pitfalls and some best practices when using them.

What is a Neopixel?

First thing is first, a neopixel is an addressable LED. What does that mean? That means that each LED has a smart controller chip that allows you to send a digital message to command each LED to a given color and brightness.

A single Neopixel

Above is a diagram of a single Neopixel LED. Each one has a power and a ground plus they each have a “data in” and “data out” signal. A color command can be sent to the “data in” pin and the LED will pass along subsequent messages to the next LED.

Neopixels come in many types, including both 5V and 12V variations and RGB, RGBW, and other color combinations.

How do Neopixels work Together?

When you have a strip of neopixels, they are connected together as shown in the diagram below. This allows the data to be passed all the way down the string so that every LED can be commanded. Power and ground are shared. The data out comes out of the last LED in the string and can be connected to another strip in order to continue the chain.

In theory, a neopixel string can be of unlimited length. However, the longer the string, the more data must be sent during each refresh cycle. For BlueGhozt, we limit the maximum string size to 350 for RGB or 260 for RGBW in order to maintain a 40 Hz refresh rate.

Power Distribution

Most neopixels use 20 milli-amperes (mA) of current for each LED (red, blue, and green) when turned on. This means that they can each use 60mA to make white at full brightness. The most common types of Neopixels use 5 volts (V) for power.

In an electrical circuit, you can think of voltage as the amount of energy that each electron has and the current as how many electrons are flowing.

The flow of current in a neopixel circuit is shown above. Electrons flow in from the positive supply, through the LED and back to the source through the ground wire. Ground is often called “return” because it is the path allows electrons to flow back to the power source, completing the circuit.

Power Distribution in the Real World

The diagrams in the previous section show an “ideal” circuit. That means that electrons can flow through the wires without giving off any energy. That isn’t accurate in the real world. In this section, we’ll show how the distinction can sometimes cause major problems for your setup.

The Resistance of a wire, measured in Ohms, is a measure of how efficiently electrons can flow through it. The amount of energy given off depends on the current and the resistance of a wire (Volts = Resistance * Current).

It is common to use #22 AWG wire with neopixels. As shown in the table below, this will have a resistance of 16 milli-ohms per foot. Therefore, a 10-foot run of #22awg will have a resistance of 0.16 ohms.  

American wire gauge table. (https://en.wikipedia.org/wiki/American_wire_gauge)

Now suppose you have 20 neopixels all set to white, which will draw roughly 1 amp of current. That one amp will flow through 0.16 ohms on the way to the neopixel and 0.16 ohms on the way back. This means that there will be a 0.32V drop on the round trip, which means that the neopixels will only see about 4.68V instead of 5V.

As you can imagine, the 20 neopixel example is not a huge problem. However, if you step up to 170 neopixels, which will draw about 10 amps, then the problem becomes ten times worse. Instead of a 0.32V drop, you will have 3.2V of drop. In other words, the LED will only see 1.8V. The result is that your LEDs will flicker, turn yellowish, or become noticeably dimmer because they are starved for power.

Worth noting is that very little current flows through the data wire. Therefore, the wire gauge isn’t very important for the data connection. In fact, thinner wire can actually be better for data.

Improving Power Distribution

Now let’s talk about how to distribute power better for setups with many neopixels.

The first and obvious idea is to use shorter lengths of wire. This isn’t always feasible, depending on where you need to locate things on the vehicle, however. 

The next obvious solution is to use thicker wire gauge for long runs. The same 10-foot run of wire would have a resistance of just 0.012 ohms if you used #18AWG wire, which translates to a loss of just 0.24 V in the 10-amp example.

Another idea is to minimize the number of connectors and to use high-current connectors. Each JST 3-pin SM-series connector can add 20 milli-ohms to both the power and ground. One way to do this is to utilize the supplemental power connections that come on many neopixel strips as shown in the diagram below.

Another thing to keep in mind is that the strip itself has some resistance. If you have a long strip or multiple short strips, then these resistances can add up. This makes it even more important to utilize the supplemental power connections. Run power and ground to each end of each strip for the best results.

And last but not least, try switching to 12-volt neopixels. Each 12-volt neopixel has what’s known as a Point of Load (POL) converter that steps the 12V down to 5V locally. This means that even if you drop several volts in your wiring, the LED itself will still get the full 5V. The result is that your LEDs will appear brighter with truer colors.