Hi Chaps. I have a question about How Low Can you Go with LEDs generally? By low I mean low lightness and low saturation colours. Think colours like dark Grey and similar. Basically, Im wondering how much of the RGB colour space can I actually reproduce? One of course can’t shine ‘black’ light so presumably there is a limit and is this limit on reproducability affected by the LED manufacturer and model or are all LEDs roughly the same in this regard? Cheers!
Dim LEDs? Why would anyone want a dim LED?
Well it’s a difficult concept to explain, but it’s a relief that you’re one of the few people that I don’t have to explain it to.
Most people are using bright colors, often a mix of the primaries so they never experience these issues.
My experience with dim LEDs has been very frustrating. Color fidelity at low light levels is terrible. At low light levels it is impossible to change the brightness of a color without also changing it hue. Try making the common rainbow test pattern but at low light levels. The lower the level the more banding you get, jumping transitions between colors.
At least part of the issue is that the eye’s response to light is non linear, especially at low light levels. So the eye perceives a large difference in light levels between rgb 2,2,2 and rgb 4,4,4. The eye perceives almost no difference between rgb 253,253,253 to 255, 255, 255. This is what gamma correction is designed to compensate for, but no library I know of does it. Maybe Daniel Garcia and Mark Kriegsman will bless us with such a capability.
The problem is that gamma correction really means throwing away at least two bits of dynamic range. So now you have 5 or 6 bits to work with. That’s not enough dynamic range to change the brightness of most colors, without changing the hue.
Temporal dithering comes to the rescue because it gives another couple of bits back. It’s included in the beta 2.1 of FastLED. The problem there is that there are timing issues that are difficult to reproduce. Essentially you’re pulse width modulating an LED that is already being pulse with modulated by the LED driver chip. These kinds of aliasing and timing issues are especially a problem with the very popular WS2812s because it pulse width modulates at a relatively slow 700hz. The WS2801 pwm is 7000hz but it has it’s own problems.
All in all I’ve had mixed luck with dithering. It’s still a work in progress.
Another possibility is the LPD1886 which has 12 bits per pixel, no dithering required (not to be confused with the LPD8806). FastLED doesn’t yet support any 12 bit chips. Maybe Daniel Garcia and Mark Kriegsman will bless us with such a capability. https://github.com/FastLED/FastLED/wiki/Chipset-reference
Fade Candy does gamma correction. We’ve gotten a (very rough) approximation of gamma correcting brightness values with the dim8_raw/dim8_video methods (note that the HSV conversion is doing this internally).
Adding a gamma correction lookup table inside the library is on the list for a future release - one piece I want to work out first is how to make sure that it doesn’t penalize users (in terms of memory/performance) who aren’t using it.