WS2812 LED bar/Wiring it/04. Where the chain ends
Wiring it · 04 of 9

Where the chain ends

The fifth LED's output is soldered to a pad that no trace reaches, so the data stops on this board. A second bar cannot be chained after this one, whatever its back says. Two bars need two GPIOs, or one GPIO and the same colours on both.

LED5's output goes nowhere

In the net list, the DATA pin goes to LED1's input, and each LED's output goes to the next one's input. LED5's output is on a net with nothing else in it: the pad at the LED's corner, and no trace, via, pin or hole.

So whatever reaches LED5 after its own 24 bits is sent into that pad and lost. The board has no way to hand data on. A second bar cannot be chained after this one, and the line printed on the back that says otherwise is wrong.

Two bars, three ways to wire them

The chain ends at LED5
one bar
Second bar
Colours sent
5
LEDs lit
5
Bits per bar
120
Five colours in, five LEDs lit. The stream ends at LED5, whose output reaches no pin: tell the library 5 LEDs, not more.

After the first: there is nothing to wire to. A sketch that sends ten colours lights five, and the second bar stays dark.

On its own pin: the second bar's DATA on a second GPIO, and two strip objects in the sketch, five LEDs each. Each bar gets its own colours. This is the way to drive ten different LEDs.

On the same pin: both DATA pins on one GPIO. Each bar's LED1 hears the same frame, so both show the same five colours. Useful for a mirror, and for nothing else.

Tell the library five

A strip object's LED count is the number of colours it sends. On this bar the right number is 5. More is not an error, just wasted time and a promise the board cannot keep; fewer leaves the bottom LEDs with whatever they had last.

When it does not work

I told the library ten LEDs and only five light.

That is all there is to light. The library sends ten colours; the five LEDs keep the first five, and the other 120 bits leave LED5's output onto a pad that goes nowhere. Set the count to 5. For ten LEDs, put a second bar on its own pin and give it its own strip object.

Can I solder a wire to LED5's output pad?

Not in any way the board was designed for. The pad is at the LED's corner, with no trace, via or hole to reach it, and heating a 5050 LED on a finished board risks the LED. Two bars on two pins does the same job with no soldering.

Two bars on one pin both show the same colours. Is that safe?

Yes, on short wires. One GPIO can drive two LED inputs; each bar's LED1 hears the same frame and shows it. It is a mirror, not ten LEDs: the second bar can never show anything the first does not.

Where this goes next

How the LED tells a 0 from a 1, and why digitalWrite cannot.

Bits as pulse widths

Edit this page — content/books/ws2812-led-bar/where-the-chain-ends.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