WS2812B

1-wire RGB · WorldSemi · ws281x

Channels
RGB
Bits / channel
8
Supply ≠
3.5–5.3 V
PWM ≠
400 Hz
Backup data
no
Packages
4

Datasheets disagree

The sources we hold state different values for the facts below. Rather than pick one quietly, both sides are listed with where each was read. Check the datasheet for the exact part number and revision you are buying. How this is shown.

Reset period

The original sheet asks for a reset of more than 50 µs; every later WorldSemi sheet asks for more than 280 µs.

What each source says about reset period
SourceSaysPage
ws2812b RES above 50 µs 3
ws2812b-v5-c114586 RES > 280 µs 3
FastLED led_timing.h (driver-tuned) 280 µs —

What we show. Both are kept: this page is the older silicon, and WS2812B-V5 is its own protocol with the 280 µs figure. A gap of 280 µs or more is safe on either, so use it if you cannot tell which reel you have.

Bit timing

The bit-timing windows were rewritten between the original sheet and V5.

What each source says about bit timing
SourceSaysPage
ws2812b T0H 400 ns, T1H 800 ns, each ±150 ns 3
ws2812b-v5-c114586 T0H 220–380 ns, T1H 580 ns–1 µs 3
FastLED led_timing.h (driver-tuned) T0H 250 ns, T1H 875 ns —

What we show. Both datasheet sets are listed in the timing table, the original first. FastLED’s figures are tuned to drive real parts and clones, not a specification.

PWM frequency

The original sheet gives a minimum scan frequency of 400 Hz; the V5 sheet says 2 kHz.

What each source says about pwm frequency
SourceSaysPage
ws2812b scan frequency not less than 400 Hz 1
ws2812b-v5-c114586 scan frequency 2 kHz 1

What we show. 400 Hz is shown here because this page describes the original sheet; the 2 kHz figure is on the WS2812B-V5 page. The newer silicon flickers less on camera.

Supply voltage

Supply range differs by sheet generation.

What each source says about supply voltage
SourceSaysPage
ws2812b VDD +3.5 to +5.3 V 2
ws2812b-v5-c114586 VDD +3.7 to +5.3 V 2
ws2812b-v6-c52917433 VDD +3.3 to +5.3 V 3

What we show. The original sheet’s range is shown here; later generations are on the WS2812B-V5 page. 5 V is inside every range.

The part most people mean by “NeoPixel”. Four pins, integrated driver, reverse-polarity protection over the WS2812. If a project or a strip says “WS2812” without qualification in the last decade, this is almost certainly what it is.

Refresh & flicker

400 Hz PWM on pre-V5 silicon; visible flicker on camera. V5 raises this substantially - see ws2812b-v5.

Timing

Sources disagree. This is normal and worth understanding: FastLED's numbers are tuned to drive real parts reliably, including clones, while the datasheet gives the manufacturer's nominal figures. Both are recorded here rather than picking one and hiding the conflict.

WS2812B bit timingWS2812B bit timing: a zero bit is 400 nanoseconds high then 850 low; a one bit is 800 high then 450 low; tolerance plus or minus 150 nanoseconds; reset 50 microseconds low1 · Bit encoding, to scaleDINhighlowbit 0 period 1250 nsbit 1 period 1250 nsT0H 400 ±150 nsT1H 800 ±150 nsT0L 850 ±150 nsT1L 450 ±150 ns"0" bit"1" bit02505007501000125015001750200022502500time, ns± tolerance on each falling edge2 · One frame: 24 bits, most-significant bit firstDIN170110010007100110101700101100bitG · 8 bitsR · 8 bitsB · 8 bitsWire order GRB · frame = 24 × ~1250 ns ≈ 30 µs · example data, first bits 1 0 1 …3 · RESET / latchlast bits of frame 1first bits of frame 2LEDs latch the data they receivedRESET: DIN low ≥ 50 µs (not to scale)4 · Cascade: each DOUT feeds the next DINMCULED 1DINDOUTLED 2DINDOUTLED NDINDOUTLED 1 keeps the first 24 bits, re-shapes the signal and sends the rest out on DOUT;LED 2 keeps the next 24, and so on. The last LED's DOUT is left unconnected.
T0H 400 / T0L 850 · T1H 800 / T1L 450 ns · ±150 ns · period 1250 ns · reset 50 µs source: datasheet
SourceT0HT0LT1HT1LPeriodRateReset±
fastled ↗ 250 ns 1000 ns 875 ns 375 ns 1250 ns 800 kHz 280 µs —
FastLED uses a 280 us reset for the whole WS2812 family, which is safe on both old and V5 silicon. The datasheet’s 50 us is not safe on V5.
datasheet ↗ 400 ns 850 ns 800 ns 450 ns 1250 ns 800 kHz 50 µs 150 ns

Clones & compatibility

“Compatible” is never stated bare here — each relationship carries how strong the claim is, and what bites if you assume too much.

Library support

FastLED
WS2812B ↗
Adafruit_NeoPixel
NEO_GRB + NEO_KHZ800
WLED
WS281x

The default assumption of every library and every tutorial.

Parts using this protocol

Dating evidence

Evidence, not a release date. A library commit proves the part existed by that date and says nothing about how long before.

  • 2013-07-23 first library support FastLED — first commit introducing WS2812B ↗ day
  • 2016-09-11 first library support WLED — first commit introducing WS2812B ↗ day