Hi, I’ve been looking for answers to this specific problem all over the internet, without much success.
I have a ESP32 with WLED flashed into it, connected to some ws2811 12v strips. ESP and strips are powered by different power supplies. Data and GND is connected from the output of the ESP32 to the first LED of the strip. ESP32 is powered by a 5v 2A power supply. The ESP32’s output is connected to a level shifter, from 3,3v to 5v (something similar to this one).
Everything works fine, but every maybe 5 seconds all the LEDs flash white for 1 frame. I suspect that maybe something that the ESP32 does consumes some spike of power and the voltage of the control circuit comes down for a fraction of a second, making the level shifter lower the signal voltage. I cannot test this practically on location, the installation is somewhat inaccessible, so I need to be sure of what to do before modify anything.
Any idea of what is the origin of the problem and how to better solving it? Thank you.
Make sure the grounds of the ESP and the separate power supply are tied together.
Definitely check for common grounds.
The other thing you may need to watch is the type of levelshifter you referenced.
Those are I2C compatible devices that are often too slow to work properly with WLED.
You’ll do better with a 74AHCT125 device, make sure you tie unused inputs to VCC or Gnd and add a 0.1uF bypass capacitor.
You might even try with no shifter at all for a short data connection from the ESP32 to the strip.
Common ground is connected (I send data and ground to the beginning of the strip). I don’t believe it has to do with the shift registers, why? I have 3 separate outputs, one of those is connected to a pair of MAX845 boards to send data over a long wire. That one doesn’t flash. It seems to be that the MAX845 receiver recreates the signal with a stable voltage level. I suspect it has to do with voltage level (ESP32 consuming spikes of current) that make the power source drop voltage, making the level shifters send a signal of lower voltage for a brief moment.
The MAX485 devices typically will work as a “builtin” levelshifter as their specs for ViH are at TTL levels (2.4V) which is easily obtained from the MCU.
This all points to an issue with your I2C compatible shifters as I mentioned above. It wouldn’t shock me at all if they were glitching some of the “steady” data stream. What we think is a solid unchanging colour on our strips is actually driven by a fairly complicated data pattern with lots of room for screwups under the hood.
Try without those shifters, with a 74AHCTxxx (125 or 32), or even use a TxRx MAX485 pair if you’ve got them. The MAX485 don’t care if your wires are short or long.