What it does#
Each LED has four pins: VDD (5 V), GND, DIN and DOUT. The
microcontroller sends a stream of colour data into the first LED’s DIN; each
LED keeps the first 24 bits (green, red, blue) and forwards the rest out of
DOUT. One GPIO drives hundreds of LEDs. Libraries: FastLED, Adafruit
NeoPixel, ESP-IDF’s led_strip, QMK/ZMK RGB.
The catalog has three packages with different pinouts (one symbol each):
| Part | Size | Use |
|---|---|---|
| WS2812B-V5 | 5 × 5 mm | underglow, strips, status |
| WS2812B-2020 | 2 × 2 mm | small status lights |
| SK6812MINI-E | 3.2 × 2.8 mm, reverse mount | per-key light shining up through the switch |
Wiring#
- 100 nF per LED between VDD and GND, close to the LED. The classic WS2812B datasheet draws one per LED; the V5 revision says it needs none, but the capacitor is cheap insurance on a long chain.
- 330 Ω in series with the data line at the first LED (reduces ringing and protects the input). Adafruit recommends 300–500 Ω at the LED end of the wire.
- Bulk capacitor where 5 V enters (electrolytic for strips).
- Supply: WS2812B-V5 3.7–5.3 V, SK6812MINI-E 3.7–5.5 V. A 5 V rail suits both; a nearly empty LiPo (3.5 V) is below the minimum.
- Data level: the input needs 0.7 × VDD to read a one: 3.5 V at 5 V (classic WS2812B, SK6812MINI-E). The WS2812B-V5 asks for 0.63 × VDD = 3.15 V, so 3.3 V logic meets it with almost no margin. On short wires it often works; on cables and with ground noise it fails. Use a level shifter.
Power#
The WS2812B-V5 and SK6812MINI-E datasheets rate each colour at 12 mA, so full white is about 36 mA per LED. Adafruit budgets up to 60 mA per pixel at full white for NeoPixels in general (other revisions and clones). Plan with 60 mA: 60 LEDs can then draw 3.6 A, more than USB gives. Limit brightness in firmware and size the supply and the copper.
Pitfalls#
- Pinout differs per package. Do not swap a 5050 footprint for a 2020 part; use the matching generic.
- First LED as level shifter. Some boards power the first LED from ~4.3 V (5 V minus a diode) so 3.3 V data meets its threshold; it works but is a hack.
- Hot-plugging a strip with the data connected first can kill the first LED. Connect GND first, then 5 V, then data.
- Reset time differs: the V5 needs more than 280 µs of low between frames (the classic part 50 µs). Current libraries handle it; very old code may not.
Footprint#
- Hand soldering: 5050 is easy, 2020 needs hot air.
- JLCPCB: all three are extended parts (feeder fee). SK6812MINI-E is reverse mount: it sits in a hole in the PCB and shines through it.