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 ideally require a 5V data signal. If using a 3.3V microcontroller, it’s wise to 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. See the “Logic Level Shifting” page for further information.
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.
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.
Quite often yes — on the Arduino Uno, use the Vin pin next to GND, or the DC jack. Most well-designed boards from companies you recognize will do the right thing when both USB and external power are connected, and they incorporate a low-dropout regulator so a 5V power supply still provides very-nearly 5V to the board…close enough that everything works.
If using a super bare-bones board, perhaps an inexpensive clone or something that’s less clever about handling different power inputs…you can use the 5V pin for input, but it’s a smart idea in that case to not have that and USB connected at the same time; best to disconnect one or the other while iterating a design, always powering the board from just one source.