Skip to content

Findings regarding flickering issues and how to proceed #5264

Open

Description

@DedeHai

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

Pinned by softhack007

Activity

  1. changed the title [-]Findings regarding Flickering issues and how to proceed[/-] [+]Findings regarding flickering issues and how to proceed[/+] on Jan 3, 2026
  2. added theissue type on Jan 3, 2026
  3. softhack007 commented on Jan 3, 2026

    @softhack007
    Member

    Hi @DedeHai, interesting summary 👍 I'll need some time to digest everything.

    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

    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".

  4. DedeHai commented on Jan 3, 2026

    @DedeHai
    CollaboratorAuthor

    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.

  5. DedeHai commented on Jan 24, 2026

    @DedeHai
    CollaboratorAuthor

    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:

    • pulse length for a "0" must be within certain limits shown in the table
    • "1" pulses have a minimum pulse-width but no maximum, it can be several times larger than any datasheet suggests - I only tested up to 5000ns (datasheet spec is usally around 1000ns max)
    • "do not clock too fast" i.e. a minimum total period must be respected but it can be as long as the "reset period" (not measured) in general: keep the period below 5000ns
    • where a "0" ends, a "1" starts, some LED types have a "dead zone", some do not. i.e. 5ns can make the difference between a "0" and a "1"

    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.

    LED Type Scenario / Setup 0-bit min (ns) 0-bit max (ns) 1-bit min (ns) 1-bit max (ns) Period min (ns) Notes
    WS2811 12V 10 cm cable 40 510 520 >5000 850 —
    WS2811 12V 4 m telephone cable (30 Ω data resistor) 40 510 520 >5000 850 Flickers below 40 ns; not solid white like before
    WS2811 12V I2C shifter, 10 cm data wire 40 510 520 >5000 850 No change compared to proper shifter
    WS2811 12V I2C shifter + 4 m telephone cable 40 510 520 >5000 850 No change compared to proper shifter
    WS2812 (not genuine) 10 cm cable 70 510 520 >5000 970 —
    WS2812 (different DIE, probably not genuine) 10 cm cable 70 450 470 >5000 720 —
    WS2812B (classic, genuine) 10 cm cable 130 590 610 >2000 1140 Does not work without shifter
    WS2812B (classic, genuine) I2C shifter, 4 m data wire 140 610 620 >5000 1150 —
    WS2812B (classic, genuine) I2C shifter, 4 m, full brightness (rainbow) 160 610 620 >5000 1150 Slight timing difference with I2C shifter
    WS2813 (not genuine, probably CS2803) 10 cm cable 90 480 520 >5000 830 —
    WS2813 (genuine) credits @maxroseGIT 10 390 420 >5000 760 —
    WS2814 (24 V, groups of 6) 10 cm cable 40 470 480 >5000 840 —
    WS2815 (12 V individual addressable) Strip A 40 520 540 >5000 970 —
    WS2815 (12 V individual addressable) Strip B (same DIE, different LED layout) 40 510 510 >5000 970 —

    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.

  6. DedeHai commented on Jan 24, 2026

    @DedeHai
    CollaboratorAuthor

    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:

    • high speed mode decreases the period by 20% i.e. ~1MHz (330ns low pulse, 660ns high pulse)
    • low speed mode increases the period by 20% i.e. ~700kHz (480ns low pulse, 960ns high pulse)

    keep the timings for 3-step cadence I2S identical to the RMT timings to avoid future discrepancies.

  7. maxroseGIT commented on Jan 27, 2026

    @maxroseGIT

    @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?

  8. DedeHai commented on Jan 27, 2026

    @DedeHai
    CollaboratorAuthor

    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

  9. patme1 commented on May 4, 2026

    @patme1

    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

  10. softhack007 commented on May 4, 2026

    @softhack007
    Member

    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.

    @patme1 which kind of MCU? esp32, esp32-s3, esp32-c3 ?

  11. patme1 commented on May 4, 2026

    @patme1

    Oh sorry. Esp32

  12. DedeHai commented on May 4, 2026

    @DedeHai
    CollaboratorAuthor

    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)

  13. patme1 commented on May 4, 2026

    @patme1

    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

  14. DedeHai commented on May 4, 2026

    @DedeHai
    CollaboratorAuthor

    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

    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.

  15. ljmerza commented on Jul 8, 2026

    @ljmerza

    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.

  16. DedeHai commented on Jul 8, 2026

    @DedeHai
    CollaboratorAuthor

    @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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions