Go Down

Topic: Math Formula to Calc LED PWM Brightness (Read 12232 times) previous topic - next topic

frank26080115

I've got this LED matrix designed, it needs to light three LEDs at once, each LED is on 33% of the time. So imagine if a LED is being PWMed at 33% duty cycle.

I have a few questions

Should I be caring about Lumens or Candelas? I really only care about what my eyes perceive. Which one is more linear with what my eye perceives as brightness? This question is just out of curiosity about the two units of measurements.

At 33% duty cycle, what will be the perceived brightness of the LED in comparison with a 100% duty cycle? Is it a linear function (answer would be 33% ?) or is it something else?

Does the PWM frequency have a significant effect on perceived brightness? I think it should ideally be kept above 60 Hz, like TV, to avoid noticing the flickering, correct? Will it appear slightly brighter if the frequency is changed a certain way?

robtillaart

Interesting questions! => google

Quote
Which one is more linear with what my eye perceives as brightness?


Brightness is a perception thing while lumen and candela are measured things. From - http://www.crompton.com/wa3dsp/light/lumin.html -

Luminance vs. Brightness
A photometer and a pilot's eyes are receiving light from the same point on a display' s screen ( SEE http://www.crompton.com/wa3dsp/light/lightcov.html ). Measuring the luminance of the light from that point is straightforward and highly repeatable We can go a step further and take a second measurement at a different point on the screen. We can then calculate the contrast between the two points. The pilot's perception of brightness, however, is complicated by human visual phenomena such as time-dependent light and dark adaptation, simultaneous contrast, lateral inhibition (Mach effect), dazzle (contrast overload), and color. The pilot's perception of display contrast is intimately related to his perception of brightness .

    The concept that is now known as "luminance " was for many years designated by the term "brightness. " This led to much confusion between the objective concept of "brightness" as intensity per unit of projected area, and' the subjective concept of "brightness" which referred to a sensation in the consciousness of a human observer. The newer term). "luminance" was adopted to avoid this confusion. - from Optics by Francis Weston Sears (Addison-Wesley, 1949)

Is there enough of a difference between luminance and brightness to justify the distinction? Has there ever been a case where a display had an incorrect specification, didn't perform properly, or cost too much because somebody said "brightness" when he or she should have said "luminance"? Many professionals in the display community say that they say "brightness" because many people don't know what "luminance" is. But to believe that the words brightness and luminance are essentially interchangeable ignores the clear distinction in the definitions of these two words, and the differing realities behind the words. If the luminance of a viewed light source is increased 10 times, viewers do not judge that the brightness has increased 10 times. The relationship is, in fact, logarithmic: the sensitivity of the eye decreases rapidly as the luminance of the source increases. It is this characteristic that allows the human eye to operate over such an extremely wide range of light levels ( SEE http://www.crompton.com/wa3dsp/light//light4a.html ).



Backgrounders (not for the faint of heart ;)
- http://en.wikipedia.org/wiki/Weber%E2%80%93Fechner_law -
The case of vision
The eye senses brightness approximately logarithmically over a moderate range (but more like a power law over a wider range), and stellar magnitude is measured on a logarithmic scale.[1] This magnitude scale was invented by the ancient Greek astronomer Hipparchus in about 150 B.C. He ranked the stars he could see in terms of their brightness, with 1 representing the brightest down to 6 representing the faintest, though now the scale has been extended beyond these limits; an increase in 5 magnitudes corresponds to a decrease in brightness by a factor of 100.[1] Modern researchers have attempted to incorporate such perceptual effects into mathematical models of vision.[2][


- http://www.stanford.edu/class/ee368b/Handouts/09-HumanPerception.pdf -
- http://jgp.rupress.org/content/7/2/235.full.pdf -


Quote
At 33% duty cycle, what will be the perceived brightness of the LED in comparison with a 100% duty cycle? Is it a linear function (answer would be 33% ?) or is it something else?


So, if I understand the theory correctly :

B1 = c.log(I)       // Brightness = constant * log of the intensity  // there are always such constants
B2 = c.log(I/3)   // LED at 33%

B2 = c.log(I) - c.log(3);

relative brightness
B2/B1 = 1 - c.log(3) / c.log(I) = 1 - log(3) / log(I);

conclusion:
the difference would be logarithmic and depends on the original intensity ==> less than the factor 3,

Another point:
The human eye will adapt and perceive the new brightness as a new reference (assuming no other lightsources). This can be experienced if you dim your laptop at night vs during the day. In its faintest setting it will look "bright" at night.

So the short answer is: something else ;)

my 2 cents
Rob

PostScript:
You can make a test device with a potmeter and two LED's. 1 LED will run 100%, Ask the testperson to adjust the second LED so it appears 50% as bright. (the potmeter controls the PWM of course)  Do this with 5 persons and you will get a workable average setting. Do the same experiment for 25% and 75% and you have enough points to approximate a formula. If you do this test please share the results.




Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

frank26080115

Thanks for the detailed answer, you brought up many points I have not considered.

Go Up