I set up a string of 4 WS2813B LEDs, connected to a Raspberry Pi Pico microcontroller.

It mostly seems to work, except the first LED shows these glitches:

  1. Sometimes the color just turns white instead of the color I send to it. All subsequent LEDs receive the correct color, so it is not the case that the timings are off. It never happens for any other LED.
  2. Sometimes it changes color by itself, with no signal received. e.g. I turn all the lights green, and then after a few seconds/minutes it turns red by itself.

#1 seems to happen quite often after a long pause. If I update the LEDs many times in quick succession it usually goes away, but if I do a single update the first LED will usually be white.

Datasheet: https://media.digikey.com/pdf/Data%20Sheets/Seeed%20Technology/WS2813B_Ver.V5_10-20-19.pdf

Note that I have tried swapping out the first LED, it makes no difference.

  • 1
    \$\begingroup\$ maybe the device is defective \$\endgroup\$
    – jsotola
    Commented Jan 14, 2023 at 5:45
  • \$\begingroup\$ indeed, maybe, these are fairly fragile compared to other parts. \$\endgroup\$ Commented Jan 14, 2023 at 6:18
  • \$\begingroup\$ Difficult to analyze without seeing your schematics, wiring, or software. You could have an easily spottable simple error but we don't know what you have. \$\endgroup\$
    – Justme
    Commented Jan 14, 2023 at 10:22
  • \$\begingroup\$ Please post the circuit, code and datasheet. \$\endgroup\$
    – Ralph
    Commented Jan 14, 2023 at 11:10
  • \$\begingroup\$ Hi, I've tried swapping out the first LED, it didn't help. \$\endgroup\$ Commented Jan 14, 2023 at 15:17

2 Answers 2


Connect DB (Might also be called BIN) to GND on the first LED.

  • \$\begingroup\$ This works actually. Do you need to connect BIN for all the LEDs? The datasheet wasn't clear on this. \$\endgroup\$ Commented Jan 14, 2023 at 18:50
  • \$\begingroup\$ Good to hear. Only connect the first one to ground. For the next ones you connect it to the DI "the actual input". Purpose of the pin is to avoid whole strip from going blank with one failing led. \$\endgroup\$
    – Ralph
    Commented Jan 14, 2023 at 19:19
  • \$\begingroup\$ Actually, unfortunately this still didn't fix the problem. The first LED is still sometimes off. Funnily enough, all the other ones work perfectly, even though the BIN is disconnected. \$\endgroup\$ Commented Jan 16, 2023 at 22:27
  • \$\begingroup\$ What if you only try to control one? \$\endgroup\$
    – Ralph
    Commented Jan 17, 2023 at 16:26

I have had the same issue with approx. 1m of cat6 between controller (RPi w. level shifter) and the first LED. With individual conductors, all LEDs are flicking and change color randomly.

I have found two solutions:

  1. Connect BIN to GND.
  2. Remove the cable between controller and first LED.

I have also experienced a single LED in the middle of a strip, which corrupted the data-stream on its output, so all LEDs after it showed unexpected colors. I simply cut this LED out and joint the strip without it. Hereafter, the whole strip worked fine.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.