Replies: 4 comments 1 reply
-
Disclaimer: I haven't tested I think you're onto something, the PWM frequency (maybe also the number of gray levels) largely affects the performance, and I'll admit it flickers heavily at low brightness levels on my Obegränsad device. On my Frekvens device hover, it's perfectly fine, maybe not butter smooth, but quite smooth, even at the lowest brightness setting. My recommendation is therefore to max out the brightness. Both Obegränsad and Frekvens are using the same SCT2024 PWM-controller chips, so in theory there shouldn't be any difference between the two devices. The only major difference is the LED-diodes itself, so my guess is that the ones in Obegränsad are slower to respond, and therefore respond negatively to the higher PWM frequency. You could try to experiment with a higher frame rate EDIT: ESP32-S3 works perfectly fine with 78 fps, so there's no need to change the SPI frequency. |
Beta Was this translation helpful? Give feedback.
-
|
This raises a valid point about performance, but it doesn’t currently point to something directly actionable, so I’m converting it to a discussion. Performance is still important—if anyone has ideas, insights, or potential improvements, feel free to share them there. |
Beta Was this translation helpful? Give feedback.
-
TL;DR
Increasing the frame rate to 114 FPS (from the default 60 FPS) does improve the visual appearance of the Metaballs mode, making motion noticeably smoother. However, it does not eliminate the lagging that appears at the lowest brightness levels. The main issue seems to be the interaction between hardware and software PWM. Global brightness is controlled via
Switching to full software PWM was also tested. This slightly reduced lag in higher brightness ranges, but made the low end significantly worse. The lagging became much more pronounced, and even static content (like clocks) started flickering heavily. In practice, this suggests that full software PWM is not a viable solution on ESP32-class hardware, even if it might work on more capable systems like e.g. Raspberry Pi Zero 2W. For comparison, The frame rate difference is easy to experiment with — setting In my testing, ~114 FPS appears to be the practical upper limit, and reaching it required increasing the SPI clock to ~13.3 MHz. Overall, the behavior points to a fundamental trade-off: grayscale resolution vs frame rate vs visual stability at low brightness. The current lagging is not primarily a frame rate issue, but a consequence of mixing hardware and software PWM. |
Beta Was this translation helpful? Give feedback.
-
|
Add this to #define PWM_DEPTH 8That basically resolves the flickering. 🎉 Trade-off: lowering the PWM depth shifts the gamma/brightness curve. The lower end becomes heavier, the upper range has less visible effect, and the minimum brightness becomes brighter. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Version
main
What happened?
On my device the metaballs mode is flickering really hard, while the blob plugin in the Obegränsad firmware is buttery smooth.
Could this be related to the PWM frequency or the increased number of gray levels?
There were also some changes to the blob plugin lately.
Note
I'm not using a level shifter yet. So this could also be related to my hardware setup.
Steps to Reproduce
No response
What did you expect to happen?
No response
Which ESP32 board are you using?
No response
Relevant Logs or Error Messages
Any other helpful information?
No response
Beta Was this translation helpful? Give feedback.
All reactions