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
14.53k stars 3.11k forks source link

Flicker on second output in multi GPIO #2268

Open jdavis7765 opened 2 years ago

jdavis7765 commented 2 years ago

Describe the bug -My configuration: Using ESP32 with 3,000 LEDs spread across 5 GPIOs (600 LEDs each GPIO) to a 75x40 matrix. -Issue: When I upgraded from 12.0 to self-compiled 0.13.0-b4 I get LED flickering only on the second output in the configuration page. If I change that second output to a different GPIO, the flickering follows. Even if I change the 2nd output in the config to a working GPIO that was assigned to the 1st output it still follows. I also tried making new protoboards as well as using different ESPs.

-Fix: The only fix that I have found is to downgrade to 0.12.0 and the issues disappear entirely.

To Reproduce Output any moving pattern while using 0.13.0-b4 build 2110110

Expected behavior No flickering

WLED version

Thank you for your help!

blazoncek commented 2 years ago

Replace AsyncTCP library in platformio.ini with v. 1.0.3 and recompile. Report if issue persists.

jdavis7765 commented 2 years ago

Replace AsyncTCP library in platformio.ini with v. 1.0.3 and recompile. Report if issue persists.

I may by no means a pro so bear with me lol. Do I replace that in the section below?

lib_deps = ${env.lib_deps} makuna/NeoPixelBus @ 2.6.7 https://github.com/pbolduc/AsyncTCP.git @ 1.2.0

blazoncek commented 2 years ago

Yes. Replace https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 with: AsyncTCP @ 1.0.3

Then clean up .pio/libdeps/your_env folder.

jdavis7765 commented 2 years ago

Yes. Replace https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 with: AsyncTCP @ 1.0.3

Then clean up .pio/libdeps/your_env folder.

Alright, I changed that in platform.ini but as far as cleaning up .pio/libdeps/your_env folder. Specifically, what part am I cleaning up? Thanks for the help by the way! image

blazoncek commented 2 years ago

Remove all folders starting with AsyncTCP. A proper one will be recreated.

jdavis7765 commented 2 years ago

Remove all folders starting with AsyncTCP. A proper one will be recreated.

I am undoubtedly doing something wrong here.


Library Manager: Installing git+https://github.com/pbolduc/AsyncTCP @ 1.0.3
git version 2.24.1.windows.2
Cloning into 'C:\Users\JD\.platformio\.cache\tmp\pkg-installing-xcltwftw'...
PackageException: Package version 1.2.0+sha.38b8475 doesn't satisfy requirements 1.0.3 based on PackageMetaData <type=library name=AsyncTCP version=1.2.0+sha.38b8475 spec={'owner': None, 'id': None, 'name': 'AsyncTCP', 'requirements': '1.0.3', 'url': 'git+https://github.com/pbolduc/AsyncTCP'}:
  File "C:\Users\JD\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 180:
    env.SConscript("$BUILD_SCRIPT")
  File "C:\Users\JD\.platformio\packages\tool-scons\scons-local-4.2.0\SCons\Script\SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "C:\Users\JD\.platformio\packages\tool-scons\scons-local-4.2.0\SCons\Script\SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "C:\Users\JD\.platformio\platforms\espressif32@2.0.0\builder\main.py", line 223:
    target_elf = env.BuildProgram()
  File "C:\Users\JD\.platformio\packages\tool-scons\scons-local-4.2.0\SCons\Util.py", line 748:
    return self.method(*nargs, **kwargs)
  File "C:\Users\JD\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 62:
    env.ProcessProjectDeps()
  File "C:\Users\JD\.platformio\packages\tool-scons\scons-local-4.2.0\SCons\Util.py", line 748:
    return self.method(*nargs, **kwargs)
  File "C:\Users\JD\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 141:
    project_lib_builder = env.ConfigureProjectLibBuilder()
  File "C:\Users\JD\.platformio\packages\tool-scons\scons-local-4.2.0\SCons\Util.py", line 748:
    return self.method(*nargs, **kwargs)
  File "C:\Users\JD\.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py", line 1104:
    project.install_dependencies()
  File "C:\Users\JD\.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py", line 940:
    lm.install(spec)
  File "c:\users\jd\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 49:
    spec, silent=silent, skip_dependencies=skip_dependencies, force=force
  File "c:\users\jd\.platformio\penv\lib\site-packages\platformio\package\manager\library.py", line 96:
    force=force,
  File "c:\users\jd\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 97:
    pkg = self.install_from_url(spec.url, spec, silent=silent)
  File "c:\users\jd\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 152:
    return self._install_tmp_pkg(pkg_item)
  File "c:\users\jd\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 172:
    tmp_pkg.metadata,
``
blazoncek commented 2 years ago

Did you replace the whole line with AsyncTCP? It only needs to include AsyncTCP @ 1.0.3 and nothing else.

jdavis7765 commented 2 years ago

Did you replace the whole line with AsyncTCP? It only needs to include AsyncTCP @ 1.0.3 and nothing else.

I sure didn't! Looks like it has now been compiled successfully. However, the problem still exists and actually even seems worse spreading to the other outputs as well. Upon flashing 12.0 is disappears entirely.

blazoncek commented 2 years ago

0.12 uses AsyncTCP @ 1.0.3

pbolduc commented 2 years ago
  1. Which GPIO pins are you using? - I would like to attach logic analyze to see if I can reproduce
  2. What kind of ESP32 are you using? I have D1 Mini and MT EH dev boards to test with
blazoncek commented 2 years ago
1. Which GPIO pins are you using? - I would like to attach logic analyze to see if I can reproduce

2. What kind of ESP32 are you using? I have D1 Mini and MT EH dev boards to test with

We talked on SoundReactive discord and figured out that if he reduced the number of pins used the flickering was less intense. He uses NodeMCU compatible ESP32 board.

stale[bot] commented 2 years 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!

Bascht74 commented 2 years ago

bump. still an issue for me...

blazoncek commented 2 years ago

bump. still an issue for me...

Please provide more data about your set-up. Preferably on Discord or WLED forum.

alvinycheung commented 1 year ago

Bump this is an issue. I have an ESP32 board with Ethernet and I tried hooking up data pins to GPIO2 and GPIO4.

Everything is grounded together, so it's not fast flickering but it's definitely flickering. It seems kinda random where the brightness is set to 100% on some of the LEDs on the string of LEDs driven by GPIO4.

I tried other GPIO pins and they all kinda act the same.

raketentimo commented 11 months ago

I had the same problem: Four stripes/segments (á 115 LED SK6812) connected to different GPIO (I tried a lot): Using one stripe everything fine. Using two stripes/GPIO the LAST (2nd segment) random white flickering/flashes 3 Stripes/GPIO everything ok 4 Stripes the LAST segment where flickering

I used every stripe on different GPIO/Segement but always the last Segment was flickering with white flashes. Since it was for me always the last "Segment" I also suspected a ESP32/Firmware problem. Also #230 seems to be very similar.

Anyway:

I use a single SN74HCT125N as driver/level shift for all four GPIOs. Adding a 100nF ceramic capacitor to the Vcc+GND of the SN74HCT125N solved the problem.

I always had the feeling that the 100nF capacitor in different projects were more used like a lucky charm - here it helped me in a very reproduce able way ... Perhaps just add a lot of them.