I've rebuilt the Project Piano LED Visualizer but I'm experiencing some issues with the LED strip that I don't understand.

I'm using a 10A/5V power supply to power a strip of precisely 180 WS2812B LEDs while powering the Pi-Zero seperately with an "adequate phone charger".


simulate this circuit – Schematic created using CircuitLab

At first, I used 0,3mm solid Wire for GND and the PWM-pin, which worked fine, the LEDs lit up and everything was good. Until the wire broke, because it was quite fiddly and bound to break given the necessity of mounting the project to a Piano.

So I changed the wiring to a 0,5mm stranded wire, which is more flexible and thus made positioning and such way more easy. I also made it a bit longer to better position the pi, so the wire has about 30-45cm of total length (more guesswork as I'm currently not there to check)

However, when hooking everything up, the played notes lit up correctly with an "extra LED" along with slight flickering. Before only a single LED lit up as it should.

A short clip of the problem

The problem appears to be worse when white-color is used then when a single color is used.

The functionality still was ok, but the glitchy behaviour was odd and also not constant on every note played. That randomness also makes it a bit distracting.

I was wondering...

  • ..does this come from the stranded Wire?
  • ..is there some other error in the setup, that's been overlooked in the project?
  • ..is it the length of the new Wire?
  • ..is it a problem in the programming?

I should mention that this project includes a HAT for controlling the strip:

  • \$\begingroup\$ The extra LED makes me suspect the data interface. Did anything change in the data wire or the program? \$\endgroup\$
    – mbedded
    Sep 6, 2020 at 21:54
  • \$\begingroup\$ Nothing changed in the program, it starts right after bootup and has been the same as before the re-wiring. \$\endgroup\$
    – HackXIt
    Sep 6, 2020 at 22:04
  • \$\begingroup\$ So the data wire was replaced with the power/ground? Check those connections. Assuming they're soldered, you might want to retouch those joints to make sure they are solid. A loose connection may appear to the strip as extra edges/bits, but a bit-shift on your strip would probably result in varied colors. Are the extra LEDs white or colored? \$\endgroup\$
    – mbedded
    Sep 6, 2020 at 22:26
  • \$\begingroup\$ Appearantly the problem disappeared, only rarely there's a slight glitch noticeable. Which means I suspect the ground connection to be the culprit. I'm unable to upgrade the connection however since the project was already given away \$\endgroup\$
    – HackXIt
    Sep 11, 2020 at 11:14

1 Answer 1


Voltage drop in the DC wiring could be a problem. Do you have a multimeter you can use to check the voltage at the DC power connections at both ends of the strip?

The wire being stranded isn't a problem. Not being thick enough would be a problem. If you can't check if you are getting a good 5 V at both ends of the stop just try using thicker wire for the power connections. Providing 5 V and ground connections (not data) to the far end of the strip can also help.

(Modifying your code to provide a test static led pattern will make voltage measurements easier.)

  • \$\begingroup\$ I'll try and check. The awkward thing is that I didn't even change the wiring that goes to the LEDs, just the wiring going to the Pi zero. There are WAGO clamps being used to connect the 3 GND connections, 2 VCC connections and 2 DATA connections. By connection I mean purely the wiring, hopefully that's not misunderstood. \$\endgroup\$
    – HackXIt
    Sep 6, 2020 at 22:08

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.