# pwm frequency for led dimming

i am using a meanwell LDD-H driver to drive some led for a reef light. (datasheet http://www.kosmodrom.com.ua/pdf/LDD-H.pdf)

standing to datasheet i can use a pwm of 100 ~ 1KHz

what's the difference?

i mean, what should change if i set the pwm to 100 or 1000 on my controller? light will flicker? ldd will consume less? make less 'acoustic' noise? i have to try by myself? there is a scientific explanation about what should happen if i change it? (i can hear a very light biiiiiiiii while they operate)

i am using https://www.adafruit.com/product/815

as pwm generator, that support 12bit, and well into range of LDD datasheet of pwm frequency.

on my test, i setup 1000hz, use the full 12bit resolution and leds work perfectly (i can setup of course 2^12 different 'intensity' of light)

• What will the fish prefer (reef light) do you think? Nov 5 '16 at 9:57
• I will just comment that I find PWM dimming of LED's to be absolutely awful. I mean turning the LED on and off rapidly as a means of dimming. I can't stand the various flicker effects. In most cases (when there is a DC-DC converter with current sensing feedback involved) it is just as easy to adjust the DC current through the LED. I wish designers would stop doing it. Nov 5 '16 at 15:42
• Having said that, I can't tell from the meanwell datasheet whether it actually turns the LED on and off or converts the PWM duty cycle to an analog voltage and drives the LED with smooth DC current. Hopefully the latter. Nov 5 '16 at 15:48
• @mkeith: There are a LOT of ignorant PWM LED implementations. Most of them, I think, in fact. Your notice of "flicker effects" is probably because most implementers have spent zero time studying the literature and/or understanding the circumstances and the human vision model. These circumstances HAVE to include any motion of eye relative to the LED, as that spreads out the spatial positioning onto the retina and makes things very visible if you aren't careful about the design. And that's just one aspect. There are several others. But anyone can do PWM. So there it is.
– jonk
Nov 5 '16 at 20:27
• @mkeith At Seimens' Osram, we were developing RGB modules designed for careful gamut control and white balance for use in very large panels. Each module included separate power supply rails for each color, each with individual "100%" settable levels for current, and then using PWM to achieve a 0% to 100% intensity within those set points. Each module was individually calibrated with a spectrophotometer with the 100% levels set by that process. The consumer would then use the PWM as a means of mixing colors afterwards. Other options weren't commercially viable. Sometimes PWM is appropriate.
– jonk
Nov 5 '16 at 20:33

PWM in this case is probably more about human perception than electronics. Your driver looks like it is simply designed to be a current source that can be turned ON and OFF as you see fit. And asking if $100\:\textrm{Hz}$ is different from $1000\:\textrm{Hz}$ is really more about asking how this impacts human perception than anything else. As you may have already discovered.

I guess I want to start by saying that human vision is far more complex than anyone guessed, even 40 years ago. Some really interesting experiments were done by Edwin Land in the late 1970's and early 1980's, for example. And much more has been learned, since then. But let me give an example from those experiments just to point out how complex it gets. Then I'll get more down to the question, once I've convinced you that none of us really fully understand all the details yet. (Active research continues today, of course.)

A human color perception model was first published in 1931 -- the 1931 CIE standard is often referenced. This came about because "big business" (Sears) was having no end of troubles shipping paint to buyers. They didn't know how to mix colors so that one gallon bought 3 months ago would match another gallon supposedly made to look the same, today. University projects got funded and color blind people were brought in, tests done, etc. Eventually the research culminated in a standard that could be used commercially. (It has been updated a number of times, since.)

But this standard failed to take into account of a very significant elephant in the room. How is it that we can walk into a sunlit room, see the painted wall, and notice the color as "teal," and then when the sun is down use bright incandescent lighting (which is a far cry from the solar radiation curve) and still see the same "teal" color, if perhaps a bit dimmer? And, then, still see the same color when using a light dimmer???

Dr. Land wanted to ask this question. So he set up a canvas on which there were many different swatches of color across it. He set up an incandescent bulb that could be used at various filament temperatures (black body radiation curves being quite different over the range of operation.) Then he tested perception of these colors as he adjusted the filament temperature over a very wide range and found that everyone could see the same colors, regardless, if perhaps having the perception that they were dimmer. (He kept the level of brightness above the photopic levels to avoid scotopic responses.)

The question is this: If the black body radiation yields distributions of wavelengths and their intensities that are so different from each other -- they are, of course -- and if these various color areas are only able to reflect or absorb relative proportions by wavelength of what is incident on them -- also true as measured and confirmed using a spectrophotometer -- then how is it that the changing relationships of the reflected components (which the CIE color model DEFINITELY says has a BIG IMPACT on apparent hue) have only minor (if at all) impacts on perceived color??

Then he did something interesting. He cut a hole in a white cover sheet and draped it over the same canvas in the same setting. And then he performed the same experiments with volunteers, again. In this setting, the apparent color changed A LOT and much much more as with the CIE color models.

What he showed is that human perception of color isn't just what the CIE models suggest, but that our brains use all of the information from surrounding areas (and almost certainly identification of objects in our perception and expectations about them, too) in order to arrive at a color perception of some particular spot. It's vastly more complicated than we'd imagined prior to the 1960's, for example.

Okay. To the point.

There is a term called the critical flicker fusion frequency or CFF. There are different rates at which the human eye will fuse flickering light sources. For humans, broadly speaking and trying to catch about 95% of the cases, you'll find that the CFF should be approximately $70-80\:\textrm{Hz}$. This ONLY applies when you are directly looking at the source and you aren't moving your eyes around and the source also isn't moving around. (Moving the LED rapidly in front of your face spreads the light over different areas of the retina and you will very easily perceive flicker at $100\:\textrm{Hz}$ PWM rates.

As with everything else with human vision, this rate at least partly depends upon the depth of modulation (0% to 100%, or 30% to 75%, or ???) and at least partly also depends on the light intensity level. ("Nothing is simple and everything matters and its complicated.") But in your system, we can't care much about how those factors affect the results mostly because you don't control them. And in any case, I'd have to write way too much more to include them.

If there is motion, or if you want to use rates where even with motion you don't see flicker, it's likely you will have to use PWM rates far higher than what the CFF mentioned above suggests. I find that I can easily perceive flicker when using $100\:\textrm{Hz}$ and not really moving the LED around all that fast. It's pretty easy to spot. To get it down to the point where I find it hard, with rather fast LED motions generated by hand only, I need to use PWM rates of at least several hundred Hertz. $500\:\textrm{Hz}$ is pretty safe from my experience, taking everything into account.

The Talbot-Plateau law states that if a light source blinks fast enough so that it passes beyond the critical flicker fusion frequency (CFF), then the brightness will appear to be the same as if the light source were steadily operated at the time-averaged luminance. In other words, if you operate the light source at twice the luminance but only half the time (50% on and 50% off, but of course flickering faster than the CFF), then it will appear to have the same luminance as that similar light source operated at the lower luminance.

Keep in mind that operating a light at a 50% duty cycle, above the CFF, does not mean that it will appear half as bright as one operated 100% of the time. It means that operating a light at 50% duty cycle and faster than the CFF will make it appear the same brightness as another operating at half the luminence. There is a difference in meaning.

The reason it doesn't look "half as bright" when operating at a 50% duty cycle is that the human eye works according to another law, the Weber-Fechner law. That one states that intensity goes as the logarithm of the physical stimuli.

Well, almost. There's a pair of other ones, the Broca-Sulzer effect and the Bruecke-Bartley effect, that operate at flicker frequencies below the CFF. At around 50ms on-duration and 50ms off-duration, for example, a blinking light source will appear to be brighter than the time-averaged luminance ... in apparent violation of the Talbot-Plateau law. But the Talbot-Plateau law doesn't apply at such low frequencies, so it isn't really a violation.

Actually, there are a lot of "laws" in the field of visual optics and optometry. These are just a few out of many others. I indicated above that there are issues related to the intensity, too, and you should be aware that at certain low levels of lighting or certain high levels of lighting things change radically and there are still more "laws" to add into the mix. (Of course, the scoptic and photopic systems are different too.) But those above should give a good enough "feel" for things in most cases involving LED use.

I'd recommend that you use as high a PWM as you feel comfortable using here. Faster is generally better.

• that was extremely complete, tnx sleep lot. I have do some test for curiosity and yes the flicker depend from a lot of factor even probably in my case from water refraction that it's constantly moved by wavemaker pumps. Nov 5 '16 at 22:32
• Does LED have a "minimum switch on time"? I couldn't find anything about that in the datasheet. If faster is better, it's okay to drive the LED with a 10kHz PWM? May 25 '17 at 12:39
• @M.Ferru Yes, that kind of PWM would be fine. As the frequencies rise, you start dealing with parasitics. But 10 kHz is pretty safe and is just fine.
– jonk
May 25 '17 at 16:11
• Regarding "our brains use all of the information from surrounding areas in order to arrive at a color perception of some particular spot", this illustrated very vividly with this gradient optical illusion. Nov 13 '20 at 17:59