Help to understand reason for flickering LED-strip with ESP32

I’ve seen a lot of people having problems with flickering LED-strips for different reasons but I haven’t found info on how to correctly connect a ESP32 for controlling a LED strip with an external power supply.

I have had a lot of problems with flickering when trying to extend the data cable between LED strips. Basically have I never gotten it to work in a good way so I’m using different data pins to control different LED strips instead.

I’m currently wanting to extend the data cable between two 5v SK6812 LED strips. The extension need to be around 4.5 meters (15 feet). Since I’m lacking a level shifter am I using a LED pixel instead.
This setup is working with 3 other LED strips that have up to 2 meters (6.5 feet) data cable but not with the longer one, which is flickering.
If I lower the voltage on the external power supply (from 5.x) to around 4.5v the flickering is less frequent. It also flickers less when I put my finger in the LED strip connections (ground problem?).

I tried to add another LED pixel so I got: ESP32 ->Pixel-> 1.5m data cable ->Pixel-> 3m data cable -> LED strip.
That did not fix the flickering.

This setup seem rather simple but since it’s not working a number of parameters comes up when thinking about it:

  1. How should this setup be connected when using an external power supply and have X meters between connected LED strips?
  2. Why does it flicker less when I put my finger on the LED strip connection? Need to connect the ESP32 ground, on the output side, to somewhere?
  3. How important is the cable thickness in a setup like this? I’m using 20 awg (0.5 mm2) for the data cable and thicker for the power (power cables are much shorter).
  4. How much difference would a level shifter make a difference?

I hope that you can read between the lines, if I missed something, and understand my setup and can tell me how it should be done to make it work. I’m getting tired of trying things so I would like to know what works and how it should be done.

This is my current setup:

What type of wire are you using? I had issues with some 3cindictor wire is why I ask.

Also you may try to jumper the ground directly from the pixel to the strip. Keep the other wire from the power supply just add another. Your data and ground should be continuous.

Some wires I’m using is 3-wire power cables. Some wires are ones that I got with the LED-strips: 3-wire 20 awg.

It didn’t help to add a ground cable from the pixel to the LED strip. Still same problem


Just add a diode to the sacrificial pixel +ve line and you should be good to go. The resistor is not necessary however I’ve found it to be a benefit when using very long data lines. In my case over 12m.

Ok, I’ll try and find a diode and try it out.

I added a diode but the result was the same as before.
Now I’m waiting for a level shifter to see if that fixes the problem.

If you reconfigure WLED to support 10 LEDs, does the flickering improve?
If it does, how many LEDs need to be configured in WLED before flickering returns?
If it does not matter how many LEDs are configured in WLED and flickering is always bad, try a filter capacitor across the +5 / GND wires of the power supply, like 1000µF 16V.

I’m using a modified version of WLED to support 4 channels. That version is hard coded to 1200 LEDS (if I understand it correctly) so I’m unsure if I try your suggestion.
I have 4 LEDS connected to the ESP32 and it’s only the ones (2 of them) with longer/extended data channels that flicker.

Maybe I’ll disconnect everything and start over with only one LED strip to see if that makes any difference.

It’s hard-coded to support UP to 1200. If you change it to 10 LEDs, it will address the 1st 10 of all 4 digital outputs. Try it.

The first LED strip (1-300 LEDs) doesn’t have a problem. The second LED strip (300-600 LEDs) have the flickering problem and continues do flicker if I change the number of LEDs - but since it starts at 300 I can’t put it lower than that without re-soldering the data pins which I might do.

I assume you are using the Quindor modified code supporting 4 independent channels. If that’s the case you would need a level shifter on each channel or 4x the sacrificial pixel and diode.

I’m using 2x sacrificial pixels and diode for the 2 LED strips that flicker. I assume that no sacrificial pixels are needed for the 2x LED strips that do not flicker?

It’s a bit of a mess now since I’ve tried multiple things so I might just wait for my ordered level shifters and try again from scratch.

To eliminate the controller do you have another ESP32 you could program and swap over?
This would be my next port of call before spending even more time troubleshooting. I’ve had a few dodgy controllers myself.

Yeah, I got a few more. I’ll use a new one when starting from scratch the next time.

I started fresh. Now I got one small LED strip with 26 LEDs.
Running normal WLED 11.1.
Just to try I connected the LED strip to a 5 meter (16 feet) long 20 awg 3-wire cable and connected +/- to the power supply and the data cable to #2 on the ESP32.
No sacrificial pixels, no diode, not level shifter - and it works perfectly, with 5 meters of cable!
I do not understand this.

Bad connection on the original setup or a different brand led is more sensitive. Out of all the lights I have installed I had one string gave me hell the rest worked great.