Results 1 to 8 of 8

Thread: Empirical LED Dimming Curve

  1. #1
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    911
    Post Thanks / Like

    Default Empirical LED Dimming Curve

    I'm leisurely working on a mini-flood using 100ma R-G-B-W LEDS in a 6 X 12 array (72 LEDs). I also, want to produce a slowly changing colour wash. Since linear LED dimming may not take full advantage of the colour range. I've decided to use non-linear dimming. Searching this site did not reveal a dimming table. Hence I decided to try making my own.

    Are dimming curves LED dependent?

    My test procedure for a given LED is as follows. Create a program that does 8-bit PWM of at leat 60HZ. (I used old DOS 6 QBASIC and the LPT port -Olsen595 style) To reduce the test time I selected a PWM scheme that has only 32 brightness levels, or steps. The steps are stored in an array. Initially I set the array of 32 equal to 255, where 255 represents full LED current. With my LED on my breadboard I place a sheet of blank paper over the LED so I won't stare into the bright light.
    I set the program to alternate between array(32) value and array(31) value and let each state be ON 1 second long, enough to discern the difference without flicker. Since both contain 255 there is no change in brightness.
    Now decrease the content of array(31) one digit at a time until you just notice a definite change in brightness. Keep this array(31) value. Now alternate the next two adjacent pair, array(31) and array(30). Lower the array(30) value until a similar dimmness occurs. Keep that value.
    Repeat the above until the array is done or until you can't discern any LED brightness. Attempt to keep the visual dim step sizes the same throughout the test, or else larger errors can occur.
    Plot the results on a graph and then draw a "best-fit" curve. I then used this "best-fit" curve to re-create my data array. Visually the LED dimming looks good with this new PWM curve when I let my program scroll through the dimming array at a faster pace.
    The "corrected curve" can now be used to "re-sample" the array for say a 10-bit table instead of 8. The shape of the curve should stay the same. This should also minimize, if not eliminate, any visual discrete steps of LED dimming.

    For those more familiar with mathematics can take the array test results and do a regression type analysis for a best fit curve. I chose a graphical method.

    So far I have done one green 20ma LED on hand. When I get the urge I will try it with a 100ma LEd and see if the dimming curve is roughly the same.

  2. #2
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    911
    Post Thanks / Like

    Default Re: Empirical LED Dimming Curve

    empirical LED PWM.pdf
    Here is my result of a green 20ma LED dimming curve.

  3. #3
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    911
    Post Thanks / Like

    Default Re: Empirical LED Dimming Curve

    Hi, Zeph (response to private email).

    I didn't know how many visual steps I could discern. I was gusessing 40 to 50. Secondly, the biggest steps were expected to be in the upper brightness range. Therefore, I thought I might run out of steps of a 255 step range with my procedure. If I were running out I wanted that to be near the low end. Hence my reason for starting with a fully lit LED, or maximum current.

    My biggest goal of this excercise is to get the basic shape of the non-linear curve from full brightnes to barely ON. The basic curve shape doesn't change with bit resolution, as far as I know. Barely ON will vary if you are doing this in high ambient light so for the last 20 steps or so, I used a dim lit room to get better contrast.

    The "best -fit" curve was done manually, and by eye-ball. I actually plotted my results on a graph made in CorelDraw and used the bezier curve tool with 3 nodes (start-middle-end) to best fit the data. No math was used.

    To convert to, say, 10-bit resolution I would simply change the 32 vertical lines to 1024 lines and read the pointer co-ordinates at each junction of the curve with a vertical line in Corel. Yeah, tedious.... but doable. An alternative is to do a mathematical approximation of the curve using some kind of regression algorithm. The "re-sampled" data should make for a very smooth visual result.

    Yes, I plan to take a RED, GREEN, BLUE and WHITE 100ma LED and repeat the experiment. I need these curve for my mini-flood project. I will post it here when I get there.

  4. #4
    Join Date
    Dec 2011
    Location
    Northern California
    Posts
    871
    Post Thanks / Like

    Default Re: Empirical LED Dimming Curve

    Would you be willing to release a spreadsheet (or similar) with the numeric data when you have done your testing? I don't have Corel but I can play with spreadsheets...

  5. #5
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    911
    Post Thanks / Like

    Default Re: Empirical LED Dimming Curve

    Here is what I have so far.
    LED-PWM-CURVE.xls
    You can observe the somewhat erratic red curve. I suspect this to be due to not having the exact same dimming step when selecting my light leve change. That's the nature of experimental data.

  6. #6
    Join Date
    Dec 2011
    Location
    Worksop UK
    Posts
    474
    Post Thanks / Like

    Default Re: Empirical LED Dimming Curve

    Hi, I did some calculations a few weeks ago to estimate a more effective dimming for leds. Based on the fact that the human eye (& ear) has a logarithmical response to stimulation.
    I made the following assumptions:
    The response of the human eye is log to the base 10.
    The brightness output (luminous intensity)of leds is linear with respect to a dmx value.

    The results are attached below. Your graph and my graph look very similar, to say that one was derived via ‘practical approach’ and the other from a ‘mathematical approach’.
    The object of my work was to be able to produce custom dimming curves that gave a perceived linear progression.
    As it is unlikely that we will ever dim through the full 255 dmx values one at a time (i.e. a 255 stage dim). The idea was to produce 1, 2 & 3 second dimming curves that I could cut and paste as required.

    Notes:
    Vixen 2.x: I would manually assign values to successive ‘squares’ to create a custom dim and cut and paste as required.
    Vixen 3.x: I would create a library curve.

    With regard to the attachment:
    Brightness is the brightness output (luminous intensity) of an led from 0% to 100% expressed on a scale from 0 to 255 (not quite but close).
    Log value is the Log10 value of Corrected DMX that corresponded with the Brightness value.
    Corrected DMX is the DMX value required to create a ‘perceived’ linear dim.

    For the maths people only:
    My maths isn’t as good as it used to be so I cheated and used a trial and error method based on: Brightness / 100 = (Log value) = LOG10(Corrected DMX) and substituted values of Corrected DMX until Log value = Brightness. If anyone can help with how to go from ‘Brightness’ to ‘corrected dmx’ please post.

    Does this mean I'm showing early sighs of 'CLAP'?

    Logs.pdf

  7. #7
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    911
    Post Thanks / Like

    Default Re: Empirical LED Dimming Curve

    Since devices like monitors, film, video cameras, etc have non-linear response to light intensity levels. Gamma is the exponent value used of the power function. It is different for the various devices. What I was curious about is whether gamma is different for different LEDS. This led me to my current experiment.

  8. #8
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    911
    Post Thanks / Like

    Default Re: Empirical LED Dimming Curve

    Here are my measurements of four 100ma LEDs, RED, GREEN, BLUE and WHITE. I needed these measurements to create my dimming curves for my experimental mini-flood light.

    RedGreenBlueWhite.xls

  9. Thanks Zeph thanked for this post

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •