Hello
I've been thinking about this for a while and now I need to implement it in a project.
I'm controlling 24 channels of Leds and I'm trying to linearize the percieved luminous intensity output of the Leds versus the PWM input .
Seeing as I can't find any info about this on google I've decided to draw up a diagram of what I think is going on .
The graph is a PWM duty cycle versus percieved luminous intensity
The purple curve is approximately how I think (from experiments) we percieve the light intensity(from leds at least) versus PWM duty cycle .
The dashed black is the desirable response and the green is the correction that I have to add to the purple to get the dashed linear black right ?
I am asking for some mathematical help as to how I could do it .
I've tried writing some weak algorithms to correct this but to no avail.
Basically I've got an array of values Pwm_index[240]; which hold 12 bit PWM values from 0 to 4095 and I need to shift each value (which is a function of the value in question) down by some value to give me the linear result .
Anyone have any ideas for an algorithm?
Or maybe if someone can throw me a math function ( for the green curve) which I can then program into the algorithm myself .
I program in C , atmel studio 6 (AVR).
I've been thinking about this for a while and now I need to implement it in a project.
I'm controlling 24 channels of Leds and I'm trying to linearize the percieved luminous intensity output of the Leds versus the PWM input .
Seeing as I can't find any info about this on google I've decided to draw up a diagram of what I think is going on .
The graph is a PWM duty cycle versus percieved luminous intensity
The purple curve is approximately how I think (from experiments) we percieve the light intensity(from leds at least) versus PWM duty cycle .
The dashed black is the desirable response and the green is the correction that I have to add to the purple to get the dashed linear black right ?
I am asking for some mathematical help as to how I could do it .
I've tried writing some weak algorithms to correct this but to no avail.
Basically I've got an array of values Pwm_index[240]; which hold 12 bit PWM values from 0 to 4095 and I need to shift each value (which is a function of the value in question) down by some value to give me the linear result .
Anyone have any ideas for an algorithm?
Or maybe if someone can throw me a math function ( for the green curve) which I can then program into the algorithm myself .
I program in C , atmel studio 6 (AVR).