DIGITALbeginner

WS2812 RGB LED Bar

Five addressable RGB LEDs on one data wire. VCC wants 5 V, each colour runs at 12 mA, the LEDs read green first, and the chain ends at the fifth LED.

Comes in this kit — not sold separately

Specifications

LEDs5 × XINGLIGHT XL-5050RGBC-WS2812B, 5 × 5 mm, in a column 5.475 mm apart. Each is a red, a green and a blue LED with its own driver chip, so one data wire sets all fifteen colours
Supply3.5 to 5.5 V on VCC — your board's 5V pin, not its 3V3, which is under the LEDs' minimum. The data sheet claims full operation from 4.5 V
Current12 mA per colour at full brightness, set inside each LED: 36 mA per LED at full white, about 182 mA for all five. About 0.3 mA per LED when dark
DataOne wire at 800 kbit/s, 24 bits per LED. A HIGH must be at least 0.7 × VCC: 3.22 V on an ESP32's 5V pin at about 4.6 V, 3.5 V on a full 5 V, so a 3.3 V pin is marginal on the second
Colour orderGreen, red, blue, most significant bit first. Tell the library GRB (NEO_GRB in Adafruit NeoPixel)
Brightness256 levels per colour. Peak wavelengths 620–625 nm red, 520–525 nm green and 465–470 nm blue; 120° viewing angle
Header4 pins on 2.54 mm pitch, right-angle, out of the left edge: GND, VCC, NC, DATA from the top. NC is connected to nothing; DATA feeds the top LED
ChainEnds at the fifth LED. LED5's data output reaches no pin, pad or hole, so a second bar cannot follow this one; the line on the back that says otherwise is wrong
On the boardThe five LEDs and the header, nothing else: no capacitor, no resistor on the data line, no level shifter
Size22.4 × 30.4 mm TinkerBlock board, two LEGO-compatible holes 24 mm apart down the left side
In the box1 × TK33 WS2812 RGB LED Bar, right-angle header fitted

What it does

Five RGB LEDs, each with its own driver chip, on one data wire. Your board sends 24 bits per LED; the top LED keeps the first 24 and passes the rest down, and each LED after it does the same. A library such as Adafruit NeoPixel does the sending, because the bits are told apart by pulse widths a few hundred nanoseconds apart.

Drag to turn it
The TK33: five LEDs on the right, the header on the left. Turn it over for the back.

Two things to know before wiring

  • VCC goes to 5V, not 3V3. The LEDs want 3.5 to 5.5 V. The data line is read against that supply, which is why a 3.3 V pin is marginal against a full 5 V.
  • The chain ends at the fifth LED. Nothing leaves LED5, so a second bar cannot follow this one. Two bars need two GPIOs.

Wiring, in four lines

  1. GND to GND.
  2. VCC to 5V (VBUS on a Pico).
  3. NC to nothing.
  4. DATA, the bottom pin, to one GPIO: GPIO 4 on the book's ESP32-S3, D6 on an Uno.

Where to start

The handbook below is nine short articles. One wire, five LEDs explains how five colours travel down one wire, and Five volts on VCC why the supply and the data level are one question. The first colours is the ESP32-S3 sketch that walks red, green, blue and white down the bar, and When the colours are wrong is the page to open when it does not.

When it doesn’t work

Can I power it from 3V3?
No. The LEDs' minimum supply is 3.5 V, so on 3.3 V they are outside their data sheet and may be dim or wrong. VCC goes to the 5V pin; on an ESP32 or ESP32-S3 that is the USB cable's 5 V after a diode, about 4.6 V. The data can still come from any 3.3 V GPIO.
Do I need a level shifter on an ESP32?
Usually not, with VCC on the ESP32's own 5V pin: at about 4.6 V the LED wants 3.22 V for a HIGH and a 3.3 V pin just clears it. With VCC on a full 5 V supply it wants 3.5 V, and a fast shifter such as a TXB0108 settles it. Only the first LED reads your pin, so a level problem shows as a wrong first LED.
Red and green are swapped.
These LEDs read green first. Create the strip with NEO_GRB in Adafruit NeoPixel, or GRB in FastLED's addLeds. Blue and white look right either way, so test with pure red.
Can I connect a second bar after this one?
No. The fifth LED's data output is soldered to a pad that no trace reaches, and no pin carries it off the board, whatever the back of the board prints. Put a second bar on its own GPIO with its own strip object, or on the same GPIO to show the same colours on both.
How much current does it need?
About 182 mA with all five at full white: 12 mA per colour, three colours, five LEDs, plus a little for the chips. A USB port can supply that, but an ESP32-S3 on Wi-Fi can peak near 340 mA on the same port, so keep the brightness down or give VCC its own 5 V supply with the grounds joined.

The WS2812 LED bar handbook

9 articles · about 45 minutes

This page is the reference: what the part is, what it is made of, and the questions people arrive already asking. The handbook is the walk — the same part in the order somebody actually meets it.

What it is

2 articles

Five LEDs that each keep a colour and pass the rest along, and what is (and is not) on the board.

Wiring it

2 articles

Why VCC wants 5 V while the data comes from a 3.3 V pin, and why the chain stops at the fifth LED.

How it works

3 articles

Bits told apart by how long they stay high, colours sent green first, and what five LEDs draw.

Using it

2 articles

The first colours on an ESP32-S3, and where to look when they are wrong.

Lessons using TK33

Each one is a working build, not a snippet.

Edit this page — content/modules/ws2812-led-bar.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

WS2812 RGB LED Bar

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum →