WS2812 Breakout Hookup Guide

Pages
Contributors: jimblom
Favorited Favorite 8

Hardware Hookup

The great thing about these LEDs is they're super easy to chain together. Plus just one, single pin from your microcontroller is required to control an entire strip of LEDs. In this example we'll link together five LEDs, but you should be safe to increase that ten-fold or even more.

Solder/Sew/Wire Something

The first assembly step for each of these products is creating a reliable, electrical connection from the LED to your control board. You'll need to solder either headers or wires to your breakout boards. Or sew your LilyPad Pixel with conductive thread. Or strip and splice some wire to connect up the LED strips.

If you're going to stick the boards into a breadboard or other prototyping board, straight male headers might be the best choice.

Breakouts breadboarded

The older WS2812 breakouts linked together on a breadboard. Hidden under each is a white wire that connects DO of one to DI of the next.

If you're going to make a big strip of boards, you may need to opt for the stranded wire route.

Breakouts wired together

Link WS2812-based boards together in a chain, by connecting DIs to DOs (don't forget power too). Sorry, the fancy green boards aren't available :(.

Select a Power Source

The WS2812 requires about 5V to work. It should operate at anywhere between about 4V to 7V , but 5V is readily-available on most boards. The WS2812B operates between about 3.3V to 5V. The 5V header on an Arduino board, for example, is a perfect voltage supply for the LEDs.

Also consider how much current your LED strip is going to pull. With every single LED on at full brightness, each breakout board can pull about 60mA (20mA per channel). Even with just ten breakout boards strung together, you're looking at upwards of a possible 600mA. Yikes! Below are a few power supplies that can power a few addressable LEDs. You may need an additional adapter or cable to connect.

Wall Adapter Power Supply - 5.1V DC 2.5A (USB Micro-B)

Wall Adapter Power Supply - 5.1V DC 2.5A (USB Micro-B)

TOL-13831
$7.95
16
Wall Adapter Power Supply - 5V DC 2A (Barrel Jack)

Wall Adapter Power Supply - 5V DC 2A (Barrel Jack)

TOL-12889
$5.95
16
USB Wall Charger - 5V, 1A (Black)

USB Wall Charger - 5V, 1A (Black)

TOL-11456
$3.95
2

If you're stringing together a lot of these things, make sure your power supply can provide the necessary current-umph. If you end up using an external power supply, make sure you connect the power supply ground to your Arduino ground as well. Here are a few options in our catalog. Make sure to add an additional adapter to your cart as listed in the recommended products.

Mean Well Switching Power Supply - 5VDC, 20A

Mean Well Switching Power Supply - 5VDC, 20A

TOL-14098
$25.95
Mean Well LED Switching Power Supply - 5VDC, 8A

Mean Well LED Switching Power Supply - 5VDC, 8A

TOL-14602
$19.95
Mean Well LED Switching Power Supply - 5VDC, 5A

Mean Well LED Switching Power Supply - 5VDC, 5A

TOL-14601
$14.95

Connecting an Arduino

This hookup is fairly straightforward. You can power the breakout board(s) using the Arduino's 5V and GND pins. Then all you need is to pick a free I/O pin to send data to the LED. Let's go with pin 4. To link more breakouts together, simply connect the output pin of one to the input of the next. Make sure each breakout also gets some power delivered to it.

Five boards hooked up to an Arduino

Protect your WS2812's!

In addition to the hookup above we recommend the following additions to help you get the most out of your WS2812-based devices:

Add a Big Smoothing Capacitor

Before connecting the WS2812 to a power source, connect a big capacitor from power to ground. A cap between 100µF and 1000µF should be good.

1000uF cap

This cap will help to smooth out your power supply. The current draw of a WS2812 can vary wildly, and as current draw grows and shrinks it'll be up to your power source to compensate. The cap will act as a "power reservoir" to store energy in case the supply dips.

Try to place this cap as close to your WS2812 as possible by placing it in parallel to the Vcc and GND pins.

Add an In-Line Resistor On the Data Signal

Placing a small-ish resistor between your Arduino's data output and the WS2812's data input will help protect the data pin. A resistor between 220 and 470 Ω should do nicely.

330 Ohm resistor

A 330Ω resistor that could be used between the Arduino's I/O pin and the WS2812's data input pin.

Try to place the resistor as close to the WS2812 as possible.

Keep Wires Short!

Wires don't conduct perfectly. They'll inevitably induce some voltage loss, especially when they're really long. Try to keep wires between your power supply, Arduino, and WS2812 as short as possible to minimize this loss.

Power Large Loads and Daisy Chained LED Strips

For more information on daisy chaining LED strips, check out this section that talks about avoiding voltage drops.

Voltage Drops with Daisy Chained LED Strips with RGB Colors Turnned on at Full Brightness
Voltage Drops Along the Daisy Chained LED Strips in Mean Well LED Switching Power Supply Hookup Guide: Power Large Loads and Daisy Chained LED Strips