To get started, let’s consider the example of an Arduino microcontroller connected to the computer’s USB port (though it works with many other microcontroller boards as well). We’ll elaborate on the finer points of powering NeoPixels later, but in general you’ll usually be using a 5V DC power supply (e.g. “wall wart”) or — for wearable projects — a 3.7 Volt lithium-polymer battery.

Identify the “input” end of your NeoPixel strip, pixel(s) or other device. On some, there will be a solder pad labeled “DIN” or “DI” (data input). Others will have an arrow showing the direction that data moves. The data input can originate from any digital pin on the Arduino, but all the example code is set up for digital pin 6 by default. The NeoPixel shield comes wired this way.

Some NeoPixel strips have extra wires so they can connect to both a microcontroller and power source, but these will always correspond to one of the same three inputs: +5V, ground or data. If not using the extra wires, you can clip off any exposed tips and/or insulate with some heat-shrink tube.

If there are four distinct wires, then it’s probably a DotStar strip, or maybe LPD8806 (less common nowadays).

NeoPixels powered by 5v require a 5V data signal. If using a 3.3V microcontroller you must use a logic level shifter such as a 74AHCT125 or 74HCT245. (If you are powering your NeoPixels with 3.7v directly from a LiPoly cell, a 3.3v data signal is OK)

If using a Flora, Feather or other microcontroller board with an attached lithium-polymer battery: connect the +5V input on the strip to the pad labeled VBAT or BAT on the board, GND from the strip to any GND pad on the microcontroller board, and DIN to Flora pin D6. If the board doesn’t have a pin #6, you’ll need to modify the example code to change the pin number.

For other Arduino boards with a separate +5V DC power supply for the NeoPixels: connect the +5V input on the strip to the + (positive) terminal on the power supply (don’t connect to the Arduino), DIN to digital pin 6 on the Arduino, and – (minus or GND) on the strip must connect to both the minus (–) terminal on the DC supply and a GND pin on the Arduino (there are usually several — any will do).

“DOUT” or “DO” (data out) at the end of a NeoPixel chain can be left unconnected. If adding more pixels later, data-out from one chain connects to data-in of the next.

The 144 pixel strips are so tightly packed, there’s no room for labels other than –, + and the data direction arrows. Data is the third, un-labeled pad.

The order of the three pins can vary between different strip batches and densities. ALWAYS use the labels printed ON THE STRIP. Look closely, NEVER blindly follow a NeoPixel strip wiring diagram; it might be based on a different product!
When connecting NeoPixels to any LIVE power source or microcontroller, ALWAYS CONNECT GROUND (–) BEFORE ANYTHING ELSE. Conversely, disconnect ground last when separating.
When using a DC power supply, or an especially large battery, we recommend adding a large capacitor (100 to 1000 µF, 6.3V or higher) across the + and – terminals. This prevents the initial onrush of current from damaging the pixels. See the photo on the next page for an example.
With through-hole NeoPixels (5mm or 8mm round), add a 0.1 µF capacitor between the + and – pins of EACH PIXEL. Individual pixels may misbehave without this “decoupling cap.” Strips and boards have these caps built-in.
Adding a ~470 ohm resistor between your microcontroller's data pin and the data input on the NeoPixels can help prevent spikes on the data line that can damage your first pixel. Please add one between your micro and NeoPixels! Our NeoPixel rings already have this resistor on there
Can NeoPixels be powered directly from the Arduino’s 5V pin?

Sometimes. The Arduino can continuously supply only about 500 milliamps to the 5V pin. Each NeoPixel can draw up to 60 milliamps at full brightness. So yes, you can skip the separate DC supply and power directly off the Arduino as long as just a few pixels are used, more if the colors and overall brightness are low. When in doubt, give the pixels a separate power supply.

This guide was first published on Aug 30, 2013. It was last updated on Aug 30, 2013.

This page (Basic Connections) was last updated on Dec 08, 2021.

Text editor powered by tinymce.