WS2812 LED bar/Wiring it/03. Five volts on VCC
Wiring it · 03 of 9

Five volts on VCC

The LEDs want 3.5 to 5.5 V on VCC, so on a 3.3 V board VCC goes to the 5V pin, not 3V3. The catch is the data: the LED counts a HIGH only above 0.7 of its own supply, and a 3.3 V pin sits right on that line.

VCC wants 5 V

The data sheet gives the LED a supply of 3.5 to 5.5 V, and says it works fully from 4.5 V. A 3.3 V board's 3V3 pin is under both. So VCC goes to the 5V pin: on an ESP32, an ESP32-S3 or an Uno it is the USB cable's 5 V, and on a Pico it is the pin called VBUS.

On a 3V3 pin the bar may still light, dimmer. That is the trap: it looks like it works, and nothing about it is promised.

The data is read against VCC

Is 3.3 V HIGH enough?
VCC 4.6 V, data 3.3 V
VCC from
Data from
HIGH needed
3.22 V
HIGH given
3.3 V
Margin
+0.08 V
It clears by 0.08 V: the reason a bar on an ESP32's 5V pin usually just works. Nearly nothing to spare, and a supply closer to 5 V takes it away.

The LED decides whether DATA is HIGH by comparing it with its own supply. A HIGH must be at least 0.7 × VCC; a LOW at most 0.3 × VCC. Between the two, the data sheet promises nothing.

On an ESP32-S3 with a USB cable in, the 5V pin is about 4.6 V: 5 V through a Schottky diode. 0.7 of 4.6 V is 3.22 V, and a 3.3 V pin's HIGH clears it by less than a tenth of a volt. That is the reason the plain wiring usually works.

Feed VCC a full 5 V instead, from an Uno or a bench supply, and the LED wants 3.5 V. A 3.3 V pin is then 0.2 V short on paper. Many WS2812s read it anyway, which is why the direct wire is everywhere, but a different batch, a longer data wire or a warmer room is enough to lose it.

Only LED1 has to read your pin

The margin matters once. LED1 reads your board's signal; every LED after it reads a fresh copy from the LED above, at the bar's own supply. So a level problem shows as a wrong or flickering first LED with the others behaving.

When to add a shifter

On an ESP32 or ESP32-S3 with VCC from its own 5V pin: usually not. With VCC on a separate 5 V supply, or when the first LED misbehaves, put a fast level shifter in the data line. The logic level converter book walks through one channel of a TXB0108. A MOSFET converter such as the TK97 raises its output through a resistor, and for pulses a third of a microsecond long that is marginal.

When it does not work

The bar lights from 3V3. Is that fine?

It is out of the LED's range. The data sheet's minimum supply is 3.5 V, and it only claims full operation from 4.5 V, so at 3.3 V the colours may be dim or off, and the LEDs are promised nothing. Move VCC to the 5V pin. The data can stay on the same GPIO.

The 5V pin measures 4.6 V. Is it broken?

No. On the ESP32 and ESP32-S3 boards the 5V pin is the USB cable's 5 V after a Schottky diode, which costs three or four tenths of a volt. The LEDs are happy at 4.6 V, and it helps the data: 0.7 of 4.6 V is 3.22 V, which a 3.3 V pin just clears.

Do I need a level shifter?

On an ESP32 or ESP32-S3 powered from its own 5V pin, usually not: the margin is small but positive. With VCC on a full 5 V supply the LED wants 3.5 V and gets 3.3, and a shifter settles it. Use a fast one such as a TXB0108; a MOSFET converter like the TK97 rises through a resistor and is marginal for pulses this short.

Can a 5 V board drive DATA while VCC is on its 5V pin?

Yes, and on an Uno that is the ordinary way to wire it. A 5 V HIGH is well above the 3.5 V the LED needs, and both come from the same supply, so the level question never comes up.

Where this goes next

Why a second bar cannot follow this one, and the two ways to drive two.

Where the chain ends

Edit this page — content/books/ws2812-led-bar/five-volts-on-vcc.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