Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anymore then two output pins causing glitching (ESP32-WROOM-32) #3972

Open
1 task done
1liminal1 opened this issue May 13, 2024 · 10 comments
Open
1 task done

Anymore then two output pins causing glitching (ESP32-WROOM-32) #3972

1liminal1 opened this issue May 13, 2024 · 10 comments
Labels

Comments

@1liminal1
Copy link

What happened?

I have five pins with 768 LEDs each (4,16,17,18,19). Under LED preferences when adding any more then two outputs, it starts to glitch. If I add any two pins that are at a

4efbf1f3-8306-4427-94d8-ff076134e498.mp4

ny location they are fine, but when adding more then two they start glitching and get worse with more pins added.

To Reproduce Bug

Add any more then two pins on a ESP32-WROOM-32 and the LED with start to glitch like there is noise on the PIN. The more hardware PINS added the more it glitches with the first two running smoothly, subsequent additions (in any physical hardware order) will glitch progressively worse

Expected Behavior

No glitching

According to WLED https://kno.wled.ge/features/multi-strip/ adding more PINs should distribute the load? and be better for refresh rates.

Install Method

Binary from WLED.me

What version of WLED?

0.15.0-b2

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

Please advise what you need?

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@1liminal1 1liminal1 added the bug label May 13, 2024
@1liminal1
Copy link
Author

If I do two outputs @ 1536, they will be quite stable, but the third @ 768px will glitch like mad.

@blazoncek
Copy link
Collaborator

Try experimental build of 0_15 branch and use WLED_USE_PARALLEL_I2S. Be mindful that each output cannot exceed 256 LEDs due to memory issues.
You need to compile yourself.

@1liminal1
Copy link
Author

1liminal1 commented May 13, 2024

Thank you, I appreciate it, but this documentation says it should work?

This recommends https://kno.wled.ge/features/multi-strip/ that keeping each channel (what are we calling it?) under 800px and that should be fine for high speeds. Or am I missing something?

Is this a bug, or the hardware is not powerful enough?

I need to drive a total of 3840px

image

image

@softhack007 softhack007 added question and removed bug labels May 13, 2024
@softhack007
Copy link
Collaborator

softhack007 commented May 13, 2024

In principle 8 outputs do work. With the number of LEDs you want to drive, I would expect that an esp32 can achieve between 8 and 30 fps (frames per second). However the glitches you describe are something we probably cannot influence in the WLED core software.

  • electrical issues: follow the recommended electrical design, including resistor between esp32 pin and LEDs dataIn. Use a level shifter. Make sure to solder all data connections (I don't know whats below your shrink tubes..). Check that all power cables are big enough so that you don't have voltage drops at high current => 2.5mm stranded copper (13 AWG) is usually a good start. Finally, connect all GND lines.
  • issues in the led driver: we use NeoPixelBus as driver library. The timing of RMT outputs is very critical, and when the driver does not react to interrupts in time, there can be intermittent glitches. Using more outputs increases the "pressure" on interrupt handling in NPB and may lead to glitches. To verify that the timing of outputs is correct, use a logic analyzer. In case of issues, please file a bug report for NeoPixelBus.

Driver timing issues can sometimes be reduced by using a higher flash speed, however not all esp32 work with such "overclocking". To try out, add these two lines in your custom build environment, then build and upload from the VSCode+platformIO development environment.

board_build.f_flash = 80000000L
board_build.flash_mode = dio ;; or dout

@1liminal1
Copy link
Author

Thank you so much for the info. I appreciate it :)

Question about electrical. SO I'm using 5v all the way though, psu though to the 5v LED panels and then off to the 5v on the ESP32. SO, not sure a level shifter is relevant (I also understand that you don't have a lot of context for my set up, so just giving me generic info :)

My total LEDS are 3840 and i'm not using a resistor, happy to try that. But the issue I'm having is the more outputs I add, the more glitching.

If I run two outputs, one @ 1536PX and the other @ the max of 2048, the second output gets very little glitching. Even though I get all these warning in WLED that that I should add more pins (don't quote me, I don't have access to it now). If I run the full 5 outputs all @ 768px each. The 3rd, 4th and 5th glitch with increasing intensity. SO the 3rd less building though to the 5th more.

If I change the Outputs around on different pins, again, the first two is ok and as I add more, starting at the third Output, it starts to glitch. This seems like a bug to me or a sign that the documentation is wrong is relation to 2d matrices?

I will try the overclock and see if that works or helps. But if you're saying this is not a bug, then it appears that, at least with 2d matrices, running less outputs with more pixels is what works and not what the documentation suggests.

@1liminal1
Copy link
Author

1liminal1 commented May 14, 2024

Just to add;

All connections are soldered. with JST connectors with the power removed for addition data connectors

So 62ohm resistor, what about the watts?

image

@blazoncek
Copy link
Collaborator

Please use WLED forum or Discord for help and support questions.

As stated above build your own custom version with experimental parallel I2S support. If that does not work, use 0.14.3 with 4 outputs as more than 5 will hit the bug in RMT driver code.

@1liminal1
Copy link
Author

Just to help anyone that comes across this. I added a 62ohms resistor to the data line, close to the LEDs and it made absolutely no difference to the glitching, it may help someone, but probably don't waste the time.

@robertvb83
Copy link

I see several problems

You have only one main power supply with thin wires. With that many LEDs you have immensely high Current demand.

And then you have only 1 Power injection per 3 panels, this is way too less. Add power injection for each panel.

What size is your PSU? It must be huge!

And the next issue is that you are not using a level shifter, the ESP32 output is not according to the LED panel specification. 5V as input power to ESP32 does not mean that GPIO output is 5V. The level shifter makes sure that these signals are properly adjusted to the LEDs spec.

Usually for very short data lines things work well without LS, longer Data lines are problematic and lead to flicker.

I am building a Matrix with 8 panels and 4 LED outputs. That works without overclocking, without parallel I2S with latest branch 0.15 code

@1liminal1
Copy link
Author

1liminal1 commented May 15, 2024

Thanks for that, but the power injection runs up the middle where the XT60s are :)

Its 20a, but we are not looking for brightness here, it's a feature light, so you can get away a lower brightness. You just want it to be consistent :)

I don't power the LEDs from the ESP32, its the other way round, the LEDs power the ESP32.

image

Power goes up the middle though the power injection. then I have Vin and GND off of one of the panels to power the ESP32, which also gives the first Output of LEDs

You can see it here, along with the other data Outputs

image

I can actually drive 3072px without glitching, If I use two Outputs, Anyway, its all good. I have a fix for it now, Ill post back after testing it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants