Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
15.09k stars 3.27k forks source link

Flickering ws2812 while using multiple stripes #3661

Closed Titanium177 closed 5 months ago

Titanium177 commented 10 months ago

What happened?

On ESP32-C3 whit WLED V0.14.1-b3 - Flickering (ws2812) while using 2x PWM + ws2812 (using just 1x PWM + ws2812 works fine)

See here: https://youtu.be/Iuy7_qMrHKg?si=UGeykAd4Z1jnEBEl 0:00 - 0:10 PWM RGB(static) + ws2812(wipe random) on = no flicker 0:11 - 0:23 PWM RGB(static) + ws2812(wipe random) + PWM White on = flicker 0:24 - 0:28 PWM RGB(static) + ws2812(wipe random) on = no flicker 0:29 - 0:32 PWM RGB(static) + ws2812(wipe random) + PWM White on = flicker 0:33 - 0:39 PWM RGB(static) + ws2812(wipe random) on = no flicker 0:40 - 0:46 PWM RGB(colorloop) + ws2812(wipe random) on = no flicker

To Reproduce Bug

Setup an ESP32-C3 whit WLED V0.14.1-b3 and connect ws2812 to IO 1,2,3 or 8 (tested all). Then connect 4 mosfets to IO 4,5,6 & 7 for the PWM outputs (can't be changed since i use this board: https://w2.electrodragon.com/Board-dat/NWI/NWI1126-DAT/NWI1126-DAT.md

5V (IO1,2,3 or 8) = ws2812 12V (IO5,6,7) = RGB Strip 24V (IO4) = W Strip

Sharing ground between every power supply.

Expected Behavior

no flickering

Install Method

Binary from WLED.me

What version of WLED?

WLED V0.14.1-b3 Build 2401060

Which microcontroller/board are you seeing the problem on?

ESP32-C3

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

blazoncek commented 10 months ago

C3 is still in experimental phase. You'll need to diagnose stuff on your own and then (hopefully) contribute back. Be aware that C3 is severely limited.

softhack007 commented 10 months ago

Hi, the flickering in your video looks like an electrical issue - the complete ws2812 is flickering; for me it seems to lose power for very short but regular times. Maybe a big capacitor will help to stabilize your power supply, see KB.

In contrast, the "software driver timing" related flickering typically shows as a) single LEDs not showing the right color b) short white "flashes" at random intervals (10s or more between flashes).

Unfortunately there is nothing we can do in our software. The PWM driver is the standard ledcWrite() from espressif framework, and the ws2812 driver is from NeoPixelBus by makuna.

Both drivers are not under our control.

In addition, as @blazoncek already pointed out, ESP32-C3 is still considered experimental for WLED. And its a lot slower (i.e. sensitive to background activities causing jitter) than classic ESP32.

duckdnssiedem commented 10 months ago

I have the quite similar problem but with classic ESP32, one WS2815 and one PWM White. While WS2815 is set for solid color, after enabling PWM (even for 5% brightness), whole RBG strip changes colors randomly. For me is that mosfet switching causes noise on data line. Hint: While tested on bench this exact setup two hours earlier I didn't notice any issues, but after mounting both strips in rail problem apearred.
Just started with that WLED thing two days ago...

Titanium177 commented 10 months ago

@softhack007 Hi, the flickering in your video looks like an electrical issue - the complete ws2812 is flickering; for me it seems to lose power for very short but regular times. Maybe a big capacitor will help to stabilize your power supply, see KB.

Definitely no electrical issue possible, the power supply got 40A available. Also, no voltage drop readable via multimeter. The length of the stripes also doesn't matter.

@softhack007 In contrast, the "software driver timing" related flickering typically shows as a) single LEDs not showing the right color b) short white "flashes" at random intervals (10s or more between flashes).

Unfortunately there is nothing we can do in our software. The PWM driver is the standard ledcWrite() from espressif framework, and the ws2812 driver is from NeoPixelBus by makuna.

Both drivers are not under our control.

In addition, as @blazoncek already pointed out, ESP32-C3 is still considered experimental for WLED. And its a lot slower (i.e. sensitive to background activities causing jitter) than classic ESP32.

@duckdnssiedem I have the quite similar problem but with classic ESP32, one WS2815 and one PWM White. While WS2815 is set for solid color, after enabling PWM (even for 5% brightness), whole RBG strip changes colors randomly. For me is that mosfet switching causes noise on data line. Hint: While tested on bench this exact setup two hours earlier I didn't notice any issues, but after mounting both strips in rail problem apearred. Just started with that WLED thing two days ago...

I guess the mosfets are the issue which create some kind of noise. Even while it makes no sense, since i can use WS2812 + PWM RGB (also 3 mosfets in use for that) just fine. Adding then PWM W (just 1 identical mosfet) creates this flickering on WS2812 (PWM RGB doin fine). Also, changing the mosfet IO order doesn't change anything... adding PWM W creates flickering on WS2812 every time. So maybe something just with the code for PWM W?

@blazoncek C3 is still in experimental phase. You'll need to diagnose stuff on your own and then (hopefully) contribute back. Be aware that C3 is severely limited.

For myself not fixable, since WLED is way too complex for my current skills. Maybe i can spot some diffs in the code, if u tell me exactly where to look for PWM W & PWM RGB.

tomasz-s commented 10 months ago

In my (@duckdnssiedem) case it was a signal ground issue. Ground was connected only through power injection 20cm from beginning of strip, and signal ground had bad connection. PWM W may have different frequency than PWM RGB? Just guessing.

github-actions[bot] commented 6 months ago

Hey! This issue has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs. Thank you for using WLED! ✨