Multiple Outputs with ESP32


I have multiple stairs in the backyard setup with ESP32 and WS2815 LED strips (and 3 String Lights with TM1814). Each stair has 3 steps and each step has a WS2815 strip under it.
4 stairs are working fine by now (all the issues were user related) but I can’t figure out the last stairs and hope someone can give me more pointers.

ESP32-CAM is driving 3 outputs via pins 13, 14, 15. Total number of LEDs is 810, steps have 316, 271 and 223 LEDs each. Cable from ESP to LEDs is about 1m (less for the top steps) and I have tried both, with and without level shifter (no difference).

The issue is that the top stair string “flickers”, but only if all 3 outputs are active. If I only define 2 outputs (it doesn’t matter in what combination) everything works fine. Only if I define all 3 outputs I see the flickering. The flickering shows with all kind of brightness level and is noticeable during effects.

Everything is driven by a 300W 12V power supply, the outputs of the power supply are connected to distribution blocks and all LED strips are powered on both sides with 18 AWG wire that are connected to the distribution blocks. The Backup Data In of the WS2815 is connected to the GND distribution block. I have also exchanged the ESP32 CAM module I’m using with a known working one.

I know that flickering usually means that something with the power or data connection is off, but given that everything works fine (if not all are active) I wonder if it could be something else. Given some other experience (see thread about TM1814) I’m wondering if it could be some strange effect where the RMT memories of the ESP32 are messed up because of the number of LEDs?

Is someone driving 800+ LEDs from an ESP32, using multiple (3 or more) outputs?

Does it flicker if all are solid? All speculation but if flickering when solid could be power, while doing effect could be data.

When solid if you can remove the data line only and the flicker continues it is definitely power.

I had noise in my data line once cause by the wire used. It was the 3 conductor wire. I had to separate the data out.

Thank you for the suggestion @Thedannymullen!

I’m very confident it is the data line, haven’t pulled the data line in solid mode yet, but if there is “flicker” in solid mode it matches the solid mode refresh rate.

This is very surprising to me because the wires are 18GA and very short. I need to see how to fix this, because the ends are already sealed with hot glue… I also tested each strip after soldering and glue and didn’t see any issues.

I have two more things I can try and will update here.

1 Like

If the flickering only happens during solid or when all LEDs are on with a high intensity, you are seeing voltage drop and need to inject power to the strip in more places.
If the flickering happens lots of the time, but not all the time, it could be you need a level shifter (or use a single LED pixel close to the ESP32 data pin) to boost the voltage for the dataline.
It might be you need capacitors to avoid power supply noise or voltage droop during fast changing effects.

Thank you @huggy-d1 and @Thedannymullen for the advise.

I thought I had it narrowed down to the data line, but after the last test I’m completely at a lost again.

Clarification for the setup: I’m using a 18ga, 5 wire cable (it’s a direct burial, because I’m working outside and for some stairs it is actually buried). I’m using it for all stairs (5, 15 steps in total). All steps are powered from both sides. This setup works fine for the other 4 stairs (less LEDs) after I did modifications (1) and (2) from below.

Modifications I did:
(1) Connect wire for BI (Backup In on the WS2815) to GND
(2) Connect 5th, unused wire to GND

This lead to 4 out of 5 stairs to just work fine.

Situation for the stairs that are not working:
Top Step (316 LEDs) works fine
Middle Step (271 LEDs) works fine
Bottom Step (223 LEDs) flickers when LEDs are being reprogrammed

Additional debugging steps I did:
(1) Add 1000uF capacitor between 12V and GND
→ No difference
(2) Add 2200uF capacitor between 12V and GND
→ No difference
(3) Change the level shifter to a SN74AHCT125 (I used some bidirectional level shifter module I had lying around)
→ No difference
(4) Directly connect the data wire for bottom step to an ESP32 output instead of the level shifter
→ No difference
(5) Swap the data wire from the “flickering” bottom step with the middle step (adjust number of LEDs, not pi in the settings)
→ No difference, bottom step still “flickering”, middle step working fine
→ Conclusion: No issue with ESP32 or output pin
(6) Cut open cable and separate all wires, so that data wire doesn’t run parallel to power wires
→ No difference
(7) Disassemble stairs and remove LED Strip, use different LED Strip
→ No difference
(8) Change wire used for data connection
→ No difference

By now (it got too late and too dark) the only thing I haven’t changed is the wire for 12V and GND which I’ll do in the next days. They only explanation I would have right now is, that the GND wire is somehow bad (because I reused the GND and 12V wire).

If anyone has anything else I can try, please let me know.

Have you any other mains cables or local RF signals running near or close by the data line that could be introducing any noise?
Have you tried defining a different pinout on the problem channel?
Have you tried another ESP32 just to be sure?

Your above checklist is pretty comprehensive so it could end up being down to the old Sherlock Holmes theory ‘…when you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.’

@mala Did you ever solve your issue?
I’m having similar problems where my led strips are working OK when I only have one output active on ESP32. If I enable more outputs I get flicker on the first output that was previously working. I haven’t still tried all the tricks, but would be good to know if there was a solution for you.
Fortunately my setup is lying on the floor, and I have to get it working there before installing under the stairs.
My setup is ~1500 pixels of SK6812 WWA led strip, 5V 60A PSU, 16 stairs and power injection to each ~1m strip. Between each step there is 1.5m of data wire, so it’s always ~100 leds and 1.5m data wire. The initial data wire from the ESP32 to the first strip is shielded, and the shield is connected to GND on the ESP-side. Other end is floating. The first strip of each ESP32 output is working fine, and to my surprise, one of the 4 outputs is always working fine with 4 “stairs” behind it. So far I have built 12 stairs, so it’s 3 outputs with 4 “stairs” behind each output. My issues started when I had 3 outputs connected and I guess the 4th is not going to make it better…
I’m about to try level shifter and adding ferrites to data lines to see if it helps. And btw. I’m using a ESP32 breakout board with screw terminals in my setup.

EDIT 6 weeks later:
I managed to solve the flickering in my setup. If someone might find themselves battling with similar issues, here’s what made me solve the issues. First of all, there were multiple things involved that eventually made the flicker disappear.

  1. Used separate 5Vdc power supplies for the ESP / LED strip.
  2. Made sure the grounding wire between the 2 power supplies is sturdy enough. Good contact is essential! I’m using 6mm2 wire which is 20cm long.
  3. Level shifter. I used SN74AHCT125N that seems to be the recommended type.
  4. To my surprise, the shielded wire that was grounded from the other end gave more issues that it was able to solve. So I eventually disconnected the shields from the ground. Now the shield is just floating. Don’t know if it is doing anything anymore, but it’s still there… Btw. my data wire is rather thin, only 0.14mm2 / 26AWG and the longest run is approx. 3m. It’s not running near the power lines, except near the LED contacts were it’s running in parallel for 10cm on each strip.

With this setup I got rid of most of the flickering. What I mean by most, is I didn’t notice any flickering for several days. But then out of a sudden, there was a quick glitch. Wait, was there a glitch? I stopped to stare at the led-strip. I waited for a minute. Another glitch! The another in 15-30s. So the setup just only just barely stable.

  1. Finally I installed 4x ferrite beads to each 4 power junctions that I have in the setup. There are 4 led strips connected to each 4 power junctions (makes 16 led strips), where I’m feeding the 5Vdc current with 6mm2 cables to each junction. The ferrite bead is as far away from the 5Vdc power supply as possible (as close to the leds as possible), in the negative conductor. The bead is making an audible sound, so I guess it’s doing something.

This was the final step needed, and I haven’t seen any flickering since.
Hopefully my story helps someone battling the led-flicker.

And thanks for the awesome WLED -project and the WLED-community!

1 Like