Skip to content
A

LED / Strip

Controlling WS2812B Strip LED / Strip with Arduino Uno

What is the WS2812B Strip?

A single-wire addressable RGB LED strip — each pixel individually controllable — used in everything from ambient lighting to LED matrix art.

Specifications

LED typeWS2812B — driver chip integrated into each individual LED
Operating voltage5 V DC
InterfaceSingle-wire, timing-critical protocol (~800kHz NRZ) — not I2C/SPI
Current draw~60 mA per LED at full white — a 1m/60-LED strip can draw ~3.6A at full brightness
CascadingDOUT of one strip feeds DIN of the next for longer runs

WS2812B Strip Pinout

PinNameDescription
15VPower — use an external supply sized for the full strip length, not the MCU board's 5V pin
2GNDGround — must be common with the MCU's ground
3DINData in — connect to a digital GPIO on the first segment of the strip
4DOUTData out — feeds the next strip's DIN when chaining multiple segments (present on some strip variants, not all)

A 330Ω resistor in series on the DIN line and a large (~1000µF) capacitor across 5V/GND at the strip's input are cheap insurance against corrupted first pixels and power-on glitches.

Setting Up WS2812B Strip with Arduino Uno

Library

FastLED by Daniel Garcia / Community

Arduino IDE → Tools → Manage Libraries → search "FastLED"

Wiring

Component pinArduino Uno pinNote
VCC5VFor more than ~8 LEDs, power the strip from a separate 5V supply, not the Uno's onboard regulator
GNDGNDCommon ground with the Uno is required even when using an external supply
DINPin 6A ~330-470Ω resistor in series on this line reduces reflections on longer strips

Example code

C++

Each LED at full white brightness can draw ~60mA — a 30-LED strip at full brightness can exceed 1.5A, far more than the Uno can supply. Power longer strips from a dedicated 5V supply and only use the Uno for the data line.

Related Guides & Projects