Repository navigation
Description
There was a lot of reports and discussion around the "xxx causes flickering/ flashing" issues.
I have spent quite some time trying to collect the information and correlate it to measurements. Here is what I found in a nutshell:
- RMT causes flickering in 0.15.0 (confirmed and fixed in 0.15.3 and nightly by high priority interrupt driver)
- ESP32 C3 still suffers from RMT interrupt latency as the fix can not be applied (causes crashes) - investigation ongoing
- First port / second port causes flickering: this is related to I2S and RMT outputs having slightly different timings, causing one or the other to work better.
So basically it all comes down to 0.15.x and 0.16 mixing I2S with RMT outputs which was not the case in 0.14.x: the first 8 outputs always used RMT.
Since user reports about different LED types and setups wildly differ it can not just be pin-pointed to a single cause. For some the RMT flickers, for other the I2S does.
0.15.0 with I2S is a special case as it seems to be using 4-step-cadece timing and has been reported to work better on some setups.
Here are the measured timings for WS281x:
| Mode / Version | 1 High | 1 Low | 0 High | 0 Low |
|---|---|---|---|---|
| I2S 0.15.1–0.16 | 840 ns | 420 ns | 420 ns | 840 ns |
| I2S 0.15.0 | 940 ns | 310 ns | 310 ns | 940 ns |
| RMT | 800 ns | 450 ns | 400 ns | 850 ns |
Proposal for possible fixes
First off we should use either RMT or I2S, mixing them "at random" leaves users puzzled as there is no clear indicator of what driver is being used.
I would propose to use RMT as a default and only pull in I2S if more than 8 outputs are used OR the already existing "Use parallel I2S" is checked, but rename it to "Enable I2S" and maybe even restrict to 8 outputs if that is not checked so users are aware they are enabling a different driver, helping them to narrow down the problems and also make better reports on what causes the issue (i.e. less of "I swapped stuff and reconfigured at random and it stopped").
Second I would add additional (maybe RMT only) timings for users to choose from. From a report the WS2813 seem to be a bit picky or the datasheet values are not really any good. Fastled uses a 1:4 (0bit) / 1:1 (1 bit) timing which was reported to work where as the default WS281x timing which is well withing datasheet bounds did not work for that user.
So adding different timings gives users options which may work better on some LED types. Ultimately I would like to see a "expert" type that just lets you manually enter timing of the RMT driver but this is currently not feasible as it needs a rewrite of the NPB library (different init structure).
I would propose to add these types as additional alternatives to the current WS281x:
- WS2811 - NPB already has adjusted timings for it, RMT only
- WS281x fast - decrease cycle period from 1.25µs by 10% to ~1.1µs
- WS281x slow - increase cycle period by 10% to ~1.4µs
- WS2813 - just a variation of WS2811 with shorter "1" pulses
these could be added to 0.16, probably not all of them are needed in the end but its impossible to know without user feedback.
@netmindz @willmmiles @softhack007 what are your thoughts on this? any additional insights?
CC: @blazoncek @Makuna
Today I upgraded from 0.15.5 to v16 and I got flickering on my WS2814 (169 LEDs). A downgrade back to 0.15.5 has no flickering anymore. Another WS2814 LED stripe with 84 LEDs has no problems with flickering in v16
@patme1 this makes it highly likely your hardware is very boarderline stable/unstable. in 16.0 in LED settings you can check "show advanced" and then choose the hardware driver. Choices are RMT and I2S. If both choices flicker in 16.0 I have no idea what could be the cause (the difference between them is marginal but on some setups it seems to matter, I was never able to reproduce it)
Activity
[-]Findings regarding Flickering issues and how to proceed[/-][+]Findings regarding flickering issues and how to proceed[/+]softhack007 commentedon Jan 3, 2026
Hi @DedeHai, interesting summary 👍 I'll need some time to digest everything.
This would be a very good, also for another reason: Hub75 on esp32 abuses the I2S units for parallel driving of the hub75 connector. So with hub75, and audioreactive, and I2S LEDs output we might have a problem.
It's different on S3 where hub75 uses the LCD driver unit, but even on S3 there might be use cases where it's better to have an option like "use RMT only".
DedeHai commentedon Jan 3, 2026
Ultimately we want to be moving to a hardware-resource based approach as proposed by @willmmiles. Move all the hardware complexity out of the UI and let the firmware deal with that, informing the UI what is available.
i.e. if SPI is used elswhere, its not available for LED's (not currently used but I do have a working PoC test with 4 outputs on a C3 using DMA). If I2S is used by AR, it's not available to drive LEDs etc. - maybe a similar structure like the pin-manager uses.
The only downside of using RMT only is performance but if users need performance the option to switch to I2S is available.
DedeHai commentedon Jan 24, 2026
Got some samples and dug up some older strips and ran quite a few tests. Here are the results showing the minimum/maximum timings for several LED types.
In general the LEDs care about these things:
The internals of the LEDs follow a clocked state machine and the clock speed determines the accepted pulse-width's. I only had two "identical" strips from different batches and they were pretty close in timing (5%).
I also found that fotos of genuine parts mostly do not match with what I got from ali. Apart from an old WS2812B I got, none of the Strips seem to be genuine worldsemi parts and all of the tested LEDs are A LOT more tolerant to timings compared to datsheet values and also absolutely insensitive at values that different WLED versions offer (see above). Even the old WS2812B strip I tested (purchased like 10 years ago and looks like a genuine DIE) is way more tolerant than datasheet values with the exception of the minimum period - which is actually not within specifications.
Given the resources at hand I am now even more convinced that the reported "flickering" issues are either some old or exotic LED strips or just plain bad wiring and/or hardware.
You can see from my tests that on a modern "WS2811" (probably a clone as it is no where near the datasheet limitations) even a plain unmodified I2C shifter performs decent at a 4m distance - which really surprised me, see https://wled.discourse.group/t/levelshifter-analysis/11871
with the exception of the old WS2812B all tested LEDs seem to re-shape the data pulse - i.e. if the first LED works, all of them work. The old one has a "transition region" of about 50ns where the first few would work and further down the line LEDs start to flicker more and more.
I did the tests in increments of 10ns where 10ns below/above the limits in the table the ledw would not work or flicker and be dead-on stable within the limit.
DedeHai commentedon Jan 24, 2026
Given these results my suggestion would be this:
for WS281x type LEDs, add an option to the UI if this type is selected to choose a "high speed" and "low speed" mode:
keep the timings for 3-step cadence I2S identical to the RMT timings to avoid future discrepancies.
maxroseGIT commentedon Jan 27, 2026
@DedeHai Thanks a lot for these details. I hope this will help to reduce reports about flickering issues in the future.
You noted the tolerance obeserved with the I2C levelshifter. This might be observed by others already. For example in sparkfun products like the DMX shield the I2C levelshifter is explicity advertised to work with all types of LEDs and especially with APA102c.
Have you had the chance the observe any signals behind your 4m wire when using the I2C levelshifter? How much distortion or slewing did it produce?
DedeHai commentedon Jan 27, 2026
I did that analysis a while ago and the signal does not look too good. Hence my surprise the timing is almost identical. https://wled.discourse.group/t/levelshifter-analysis/11871
patme1 commentedon May 4, 2026
Today I upgraded from 0.15.5 to v16 and I got flickering on my WS2814 (169 LEDs). A downgrade back to 0.15.5 has no flickering anymore.
Another WS2814 LED stripe with 84 LEDs has no problems with flickering in v16
softhack007 commentedon May 4, 2026
@patme1 which kind of MCU? esp32, esp32-s3, esp32-c3 ?
patme1 commentedon May 4, 2026
Oh sorry. Esp32
DedeHai commentedon May 4, 2026
@patme1 this makes it highly likely your hardware is very boarderline stable/unstable. in 16.0 in LED settings you can check "show advanced" and then choose the hardware driver. Choices are RMT and I2S. If both choices flicker in 16.0 I have no idea what could be the cause (the difference between them is marginal but on some setups it seems to matter, I was never able to reproduce it)
patme1 commentedon May 4, 2026
Yes. That is the solution. I2S shows no problems. Thank you very much.
But its still strange, I ve got a level shifter installed and the cables and Power injections are much oversized.
The only thing I could do is to instal a resistor for
DedeHai commentedon May 4, 2026
in one of my findings I wrote that most such cases are related to "bad hardware setups" - yours is such a case. A shifter alone is not enough if you run anything longer than like 1m of data line. Even then, if it is all "spaghetti wiring" it can disturb a high speed signal.
I was only able to reproduce flickering with a lot of outputs, using I2S as well as RMT (which stresses the system hard) and in addition throwing a lot of wifi traffic at it. In that combo, it would flicker reliably every few seconds.
ljmerza commentedon Jul 8, 2026
I have 3 QuinLED unos that all have the blinking issue when upgrading past 0.15.5. I wouldn't consider these bad hardware setups.
DedeHai commentedon Jul 8, 2026
@ljmerza you can test my (still in progress) new output driver https://github.com/DedeHai/WLED/actions/runs/28814579033#artifacts
it allows to fine-tune the timings in hardware settings by checking "advanced settings" than set the LED timing (from -30% to +30%), it has many more feature like custom bus with any channels or timings you want