Repository navigation
Description
What happened?
I'm using 168 WS2805 RGB+CCT pixels with a QuinLED Dig-Quad running WLED 0.16.0.1.
I occasionally noticed very brief flashes from white LEDs that should not be illuminated. I was able to narrow this down to particular combinations of master brightness and color/CCT state.
The issue is especially reproducible with master brightness values 126–130 / 255. At brightness 128, a saved preset can reliably reproduce the flickering.
Known flickering state:
{
"bri":128,
"seg":[{
"id":0,
"bri":255,
"cct":127,
"col":[
[255,206,166,0],
[8,255,0,0],
[0,0,0,0]
],
"fx":0
}]
}Making a very small adjustment to the Kelvin/temperature slider stops the visible flickering without changing master brightness.
Stable state after that adjustment:
{
"bri":128,
"seg":[{
"id":0,
"bri":255,
"cct":127,
"col":[
[255,214,177,0],
[8,255,0,0],
[0,0,0,0]
],
"fx":0
}]
}Reloading the original saved preset causes the flickering to return.
Additional observations:
- Brightness 126–130 produces the issue most noticeably.
- Values immediately outside that range appeared stable during short tests.
- A very small Kelvin/temperature adjustment can eliminate the flicker.
- Sometimes the expected bad state doesn't immediately flicker, but changing to blue and then back to white causes it to return.
- The visible flashes appear to come from white emitters that should otherwise be off.
- This occurs directly from the WLED web interface, independent of Home Assistant/MQTT.
- Solid effect (fx:0) reproduces it.
- 168 WS2805 RGB+CCT pixels.
- GPIO 16.
- The problem appears related to the combination of brightness and color/CCT rather than brightness alone.
Possibly related to Flickering - WS2805 - ESP32 C3 mini #5198, although that report is using ESP32-C3 while this setup uses a Dig-Quad/ESP32.
To Reproduce Bug
Hardware:
- QuinLED Dig-Quad / ESP32
- 168 WS2805 RGB+CCT pixels
- WLED 0.16.0.1
- WS2805 RGBCCT configured as the LED type
- Data GPIO 16
I can reproduce the flickering using the following steps:
- Set the effect to Solid.
- Set the master brightness to 128/255.
- Set the LEDs to a warm white color.
- With the following state, some of the white emitters that should not be illuminated will intermittently flash:
{
"bri": 128,
"seg": [{
"id": 0,
"bri": 255,
"cct": 127,
"col": [
[255, 206, 166, 0],
[8, 255, 0, 0],
[0, 0, 0, 0]
],
"fx": 0
}]
}Expected Behavior
No flicker
Install Method
Binary from WLED.me
What version of WLED?
0.16.0.1
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
Anything else?
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Activity
softhack007 commentedon Oct 1, 2026
@coderabbitai please review the code paths related to WS2805 RGB+CCT, and check if there are some numerical instabilities or uninitialized value access that could explain the white channel flickering.
[-]WS2805 RGBCCT flickering at specific brightness/color combinations on ESP32 / WLED 0.16.0.1[/-][+]WS2805 RGBCCT flickering at specific brightness/color combinations on ESP32 / WLED 16.0.1[/+]coderabbitai commentedon Oct 1, 2026
🧩 Analysis chain
🏁 Script executed:
Length of output: 48822
🏁 Script executed:
Length of output: 50983
🏁 Script executed:
Length of output: 67720
🏁 Script executed:
Length of output: 54776
🏁 Script executed:
Length of output: 16107
🏁 Script executed:
Length of output: 20705
@softhack007I reviewed the v16.0.1 release code, its pinned NeoPixelBus dependency, and the corresponding paths on current HEAD.I found an ABL white-channel conversion defect. I did not find an uninitialized read or numerical instability that directly explains the reported intermittent flicker. The ABL defect is a useful suspect if the current limiter activates near the reported brightness.
1. ABL discards the original WW/CW values
In
BusDigital::applyBriLimit(), Line 234–Line 242 ofbus_manager.cpp:PolyBus::getPixelColor()reduces the two white channels toW = max(WW, CW).calculateCCT()splits that reduced value into WW/CW again.This applies the CCT split twice instead of scaling the existing channels.
An independent arithmetic check illustrates the loss:
*Using the existing CCT brightness-scaling formula.
There is a second problem.
WS2812FX::show()restores the previous global CCT before ABL runs. See Line 1727–Line 1735 ofFX_fcn.cpp. Therefore, ABL can use a different CCT from the pixel’s segment CCT. If the restored CCT is-1, ABL derives CCT from the already processed RGB values.Expected impact: incorrect white brightness or WW/CW ratio when limiting activates. This can also introduce a discontinuity at the limiting threshold. It does not, by itself, establish why an unchanged Solid state would flicker intermittently.
The appropriate correction is to scale the existing five output channels directly, without reconstructing and splitting
W.2. The normal WS2805 path initializes its channel values
I checked these apparent risks:
BusDigital::setPixelColor()initializescctWW,cctCW, andwwcw.PolyBus::setPixelColor()assigns all RGB fields. Its WS2805 branch constructsRgbwwColorwith all five channel values.malloc(), the pinnedNeoPixelBus::Begin()clears both buffers throughSwapBuffers(). The allocation comments alone are misleading.I found no uninitialized white-channel read in those paths.
3. The arithmetic preserves zero white
For the configured CCT range, the CCT calculations use bounded integer arithmetic with nonzero divisors.
approximateKelvinFromRGB()also guards the cases that could otherwise divide by zero.The white brightness formula is:
When
channel == 0, the result remains zero for every brightness from 0 to 255. There is no zero-to-nonzero transition at brightness 128.However, preset
W = 0does not guarantee zero WW/CW output. Auto-white modes can generate white from RGB. The two presets do not include that configuration.Recommended next checks
hw.ledandlight.gcconfiguration sections. These identify auto-white mode, CCT derivation, white-balance correction, driver selection, and current limits. Omit network credentials.This was a source review with independent arithmetic checks, not a firmware or hardware reproduction.
#5198provides driver-related context, but its ESP32-C3 diagnosis does not establish the cause on this ESP32 setup.You are interacting with an AI system.
softhack007 commentedon Oct 1, 2026
@coderabbitai could the CCT discontinuity identified in #5862 (comment) contribute to the problem, or is it something unrelated?
coderabbitai commentedon Oct 1, 2026
🧩 Analysis chain
🏁 Script executed:
Length of output: 45916
🏁 Script executed:
Length of output: 32136
@softhack007The specific discontinuity reported in#5862is unrelated to the WS2805 output path.DedeHai’s later comment identifies the cause:
duty + hpointexceedsmaxBri. The hardware cuts the pulse.That mechanism occurs in
BusPwm::show(). WS2805 usesBusDigitaland serial transmission through RMT or I2S. It does not use those LEDC duty, phase-shift, or dithering operations. The PWM inside the WS2805 IC is separate from the ESP32 LEDC peripheral.What can still be related
Both bus types use
Bus::calculateCCT(). However, the discontinuity in#5862came from the PWM output stage, not from that shared calculation. My earlier reply on#5862described the expected CCT curve but did not identify the hardware cause.The ABL CCT reconstruction defect from my previous analysis remains a separate suspect. If ABL activates, it can change the WW/CW ratio or brightness incorrectly. It still does not establish a cause for intermittent flashes.
Also, both presets in
#5877retaincct: 127. The “temperature adjustment” changes RGB from[255,206,166,0]to[255,214,177,0]. Thus, the supplied states do not show the segment CCT crossing a blend boundary. If auto-white or CCT derivation from RGB is enabled, that RGB change can still change the white-channel output.The most useful next check remains the transmitted WW/CW values. If those values remain zero during a visible flash, neither the shared CCT calculation nor the ABL reconstruction directly generates that flash. Transmission or strip-side behavior then becomes the main investigation path.
You are interacting with an AI system.
jlt24 commentedon Oct 1, 2026
Here are the requested hw.led and light.gc sections from the configuration that reproduces the issue. I have not changed ABL or the LED driver since reproducing the flicker.
{ "hw": { "led": { "total": 168, "maxpwr": 20000, "cct": false, "cr": true, "ic": false, "cb": 0, "fps": 42, "rgbwm": 2, "ins": [ { "start": 0, "len": 168, "pin": [ 16 ], "order": 1, "rev": false, "skip": 0, "type": 32, "ref": false, "rgbwm": 0, "freq": 0, "maxpwr": 0, "ledma": 83, "drv": 0, "text": "" } ] } }, "light": { "gc": { "bri": 1, "col": 2.8, "val": 2.8 } } }jlt24 commentedon Oct 1, 2026
I tested the suggested RMT vs I2S comparison.
My original configuration was using: "drv": 0
which is RMT.
With RMT, the installation generally operates normally. The reported flicker is primarily reproducible with the specific brightness/color state described above (particularly master brightness 126–130).
I then changed only the LED hardware driver from RMT to I2S, leaving the LED type, GPIO, pixel count and other configuration unchanged.
With I2S, the behavior becomes dramatically worse. The LEDs flash continuously/severely regardless of the preset, selected color, or brightness. I was unable to obtain stable output with I2S.
I switched back to RMT afterward.
I also checked /json/info while the original RMT flickering condition was actively occurring. WLED reported:
softhack007 commentedon Oct 2, 2026
@coderabbitai the last comments by the user point more into the direction of LED timing issues #5264, that will (hopefully) be resolved when #5704 is ready to get merged into 17.0.0-dev.
coderabbitai commentedon Oct 2, 2026
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash gh issue view 5264 --repo wled/WLED --json title,body,state,comments gh pr view 5704 --repo wled/WLED --json title,body,state,isDraft,mergedAt,baseRefName,filesLength of output: 25575
@softhack007Thanks for the guidance. The new results make output timing or signal integrity the leading hypothesis for#5877.#5264documents driver-dependent flicker and differences between RMT and I2S timing. Its published timing measurements concern WS281x, so they do not establish the correct timing for this WS2805 strip.#5704is a relevant test path, not yet a confirmed fix. It remains open and unmerged. It replaces NeoPixelBus with WLED Pixel Bus and provides timing adjustment from −30% to +30% in 10% steps.When a suitable test build is available, compare the same failing state with the new driver at default timing first. Then vary only the timing setting. A repeatable change in flicker would strengthen the timing hypothesis. A waveform capture at the strip input would help distinguish driver timing from signal distortion.
✏️ Learnings added
You are interacting with an AI system.
softhack007 commentedon Oct 2, 2026
@jlt24 can you check if "off refresh" (LEDs settings) makes a difference for you? There are some strips that need continuous refresh, even when the effect looks static.
softhack007 commentedon Oct 2, 2026
@coderabbitai please check the neoPixelBus repo https://github.com/Makuna/NeoPixelBus for any hints about timing problems with WS2805 type chips.
coderabbitai commentedon Oct 2, 2026
🧩 Analysis chain
🏁 Script executed:
Length of output: 9440
🏁 Script executed:
Length of output: 195755
🏁 Script executed:
Length of output: 46531
@softhack007Yes. NeoPixelBus contains relevant timing hints. The strongest code-level hint is that its WS2805 RMT and I2S methods use different pulse widths. I found no confirmed upstream fix for the exact symptoms in#5877.1. RMT and I2S do not produce the same WS2805 waveform
These definitions are unchanged between WLED’s pinned NeoPixelBus commit
1d7ff38…and the upstreammasterinspected:T0HT0LT1HT1LSources:
NeoEsp32RmtMethod.h,NeoBits.h, andNeoEsp32I2sMethod.h.The I2S values are calculated from its requested 1125 ns bit period and encoding proportions. They are not measured values. Hardware clock quantization can change the actual widths. RMT also quantizes its timing constants.
WLED’s custom RMT method uses
NeoEsp32RmtSpeedWs2805, so the upstream constants are relevant to this installation.This difference could explain why changing to I2S makes the fault much worse. It does not prove that either waveform violates the requirements of this particular strip.
2. The maintainer explicitly reports WS2805 speed sensitivity
In NeoPixelBus
#865, Makuna states:Makuna recommends checking individual zero/one pulse widths and the frame reset interval. Makuna also highlights signal-level and pulse-shape problems.
However, that report concerned possibly proprietary lights. The reporter eventually obtained working output with WLED’s
SM16825 RGBCWselection. It is not evidence that standard WS2805 requires inter-byte gaps or that this selection would help#5877.3. The early “600 kbit/s” advice was corrected
The initial discussion in NeoPixelBus
#764suggested slower timing.Makuna later identified a datasheet translation error. NeoPixelBus PR
#794updated the WS2805 methods and aliased WS2814 to them.Therefore, the old 600 kbit/s comment is not a sufficient reason to slow down all WS2805 output.
Implication for
#5877The upstream evidence strengthens the timing hypothesis. It does not establish a continuous-refresh requirement.
Your “off refresh” comparison remains useful. If it changes the result, capture the actual frame spacing as well as the bit timing. A refresh-dependent result alone would not distinguish a strip refresh requirement from periodic correction of corrupted data.
The most useful waveform comparison is at the first strip input, using the same failing state:
T0H,T0L,T1H, andT1L.For testing
#5704, preserve the five-channel format and vary only timing. The upstream findings support that test, but do not yet establish#5704as a fix.You are interacting with an AI system.
DedeHai commentedon Oct 2, 2026
@jlt24 does disabling the brightness limiter change anything? If not this is probably a wiring issue. My new driver may fix it as it lets you fine tune the hardware timing
jlt24 commentedon Oct 3, 2026
Using the same known-failing state with the RMT driver, I compared the behavior with Off Refresh disabled and enabled.
Result: No observable difference. The flickering still occurs with Off Refresh enabled.
I also confirmed that disabling the brightness/current limiter does not change the behavior.
Current results so far:
I'm happy to test the new driver/timing adjustments from New LED hardware driver: WLED Pixel Bus #5704 when an appropriate build is available.
DedeHai commentedon Oct 3, 2026
There are, either the artifacts from the PR or the ones from my branch.
sammccants commentedon Oct 5, 2026
I'm experiencing what appears to be a very similar issue with WS2805 RGBCCT strips on WLED 0.16.0.1, although I'm using an Athom ESP32-C3 controller rather than a Dig-Quad.
My setup is 200 WS2805 pixels (12V, 60 LEDs/m / 20 pixels/m). I see very brief flashes of corrupted colours affecting variable portions of the strip. It can occur at any colour/brightness and still happens with power injection disconnected and with the strip shortened to only 80 pixels.
Interestingly, the flickering is strongly correlated with activity in the WLED web UI. Changing colour/brightness frequently triggers it, navigating between settings pages can trigger it, and simply viewing the Pin Info page causes almost continuous flickering.
The affected position isn't fixed — sometimes only later pixels are corrupted, while other times corruption starts near the beginning.
softhack007 commentedon Oct 5, 2026
@sammccants this is a different, well-known bug that mainly affects esp32-C3. It's an interrupt latency problem, and the only solution unfortunately is a complete re-write of the NeoPixelBus driver. See #5704, or #5690 for a minimal workaround.