Help! Problem with low brightness color fading!
I am trying to scroll through the Hue wheel (0-255) offset across the leds in my projects, at a very low brightness. When I get below a certain “maximum brightness” level, the fading effect becomes very choppy.
My best guess is that when the maximum brightness is set to 24 (for example) the brightness resolution of each color is now only 24 instead of 255. This creates a choppy flashing effect when fading between between colors.
Does anyone know if there is a way to dim all the LEDS without sacrificing brightness resolution in the rest of the program?
This is the line of code I’m using to fade colors:
leds[x][i] = CHSV((((i * 255 / (NUM_LEDS_PER_STRIPwidth))) +j/(speed))+(xoffset), 255, 255);
Im using 4 strips of 12 WS2811B… is it just a limitation of the WS2811 chip?
Thanks in advance!
I must admit that I’ve never used WS2812Bs in low brightness projects, I use SK9822s for this kind of thing and don’t have any problems with them even running at a maximum brightness of 4/255.
This could be because these particular chips use a constant current driver for brightness rather than PWM. One day I might do a comparison…
The visual difference between 1/255 and 2/255 and 3/255 and 4/255 (etc) is just super perceptible. Consider for example that 2/255 is literally twice as bright as 1/255; there’s no way to hide that, and there’s no “half way” value between 1 and 2 since these pixels all use integers.
Choppiness at the low end of brightness is (almost totally) unavoidable because the brightness steps are so big relative to the total light output.
A difference of “1” doesn’t make much difference in the mid range of brightness between say 165/255 and 166/255, but down at the low end, each step is unavoidably visually large.
(Temporal dithering can help in a few cases, but that’s a whole ton of work and coding to make it look okay, and comes with a whole second set of problems.)