WS2812 LED bar/Using it/09. When the colours are wrong
Using it · 09 of 9

When the colours are wrong

Six things a TK33 does wrong and where to look first for each. Most of them come down to four facts: DATA is the bottom pin, only LED1 reads your board's signal, the LED reads green first, and nothing leaves the fifth LED.

Pick what you see

Where to look first
nothing lights
Symptom
LED1 reads
your pin
LEDs 2 to 5 read
a copy
Reset gap
80 µs
Check the ground first, then that VCC is on the board's 5V pin, then that the wire in the bottom hole, DATA, goes to GPIO 4 and the sketch says 4. A wire in NC instead of DATA does nothing at all.

Each symptom points at one part of the chain. The four facts under almost all of them:

  • DATA is the bottom pin, and NC above it is connected to nothing.
  • Only LED1 reads your board. Every other LED reads the one above it.
  • The LED reads green first. The strip must be created with NEO_GRB.
  • Nothing leaves LED5. There is no way to chain a second bar after it.

One LED at a time

When the symptom is unclear, strip the sketch back to one colour on one LED:

bar.clear();
bar.setPixelColor(0, 0xFF0000);  // LED1, the top one: red
bar.show();

Red on the top LED and nothing else settles three things at once: the wiring works, pixel 0 is the top LED, and the colour order is right. Then move the red to pixel 4. If the bottom LED lights, the chain is whole.

Measure the supply

With a meter on the header's VCC and GND, a bar powered from an ESP32-S3's 5V pin reads about 4.6 V with a USB cable in. Under 3.5 V, which is what the 3V3 pin gives, the LEDs are below their minimum and nothing else in this list applies until VCC moves.

When it does not work

Every LED is dark and the board is powered.

Ground first, then VCC on the 5V pin, then DATA in the bottom hole. A jumper in NC, one hole above DATA, is the most likely single mistake: NC is connected to nothing. Then make sure the sketch's pin number is the GPIO the wire is on.

The first LED is the wrong colour and the rest are right.

Only LED1 reads your board; LEDs 2 to 5 read a clean copy from the LED above. So the fault is in the signal: a 3.3 V HIGH against a 5 V supply that wants 3.5 V, a long data wire, or a ground that meets only through one thin jumper. Shorten the wire, add the ground, or feed VCC from the board's own 5V pin.

Red and green are swapped.

The strip was created with NEO_RGB, or RGB in FastLED. These LEDs read green first: use NEO_GRB, or GRB. Blue and white look right either way.

The board resets when the LEDs go bright.

Current. Five LEDs at full white draw about 182 mA from the 5V pin, and an ESP32-S3 on Wi-Fi can add up to 340 mA on the same USB port. Lower setBrightness, or give VCC its own 5 V supply with its ground joined to the board's.

A second bar wired after the first stays dark.

There is nothing to wire it to: LED5's output reaches no pin on this board. Put the second bar's DATA on its own GPIO with its own strip object, or on the same GPIO to mirror the first.

Random colours appear when the bar is plugged in.

Before the sketch starts, the data pin can float and a floating input can be read as bits. The first frame clears it, which is why the build sketch sends a dark one in setup(). The data sheet also wants a resistor on the data input against plugging in live, and this bar has none: make the connections with the power off.

Where this goes next

A longer strip, its own supply, and the ESP32 peripheral that keeps the timing.

Addressable LEDs with the ESP32's RMT

Edit this page — content/books/ws2812-led-bar/when-the-colours-are-wrong.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