# What is the intensity of LED rope lights as a function of PWM pulse width?

It appears that the brightness of rope lights is not linear in the PWM pulse width.
The intensity varies a lot at small pulse widths, and not much at all at the wider widths.
It seems like the intensity is somewhat proportional to the square root of the pulse width.

What is the relationship?

I'm using an Arduino UNO with a SparkFun power shield to run CoolNeon 12VDC LED rope lights.

Pete

pvanderbilt:
It appears that the brightness of rope lights is not linear in the PWM pulse width.
The intensity varies a lot at small pulse widths, and not much at all at the wider widths.
It seems like the intensity is somewhat proportional to the square root of the pulse width.

What is the relationship?

I'm using an Arduino UNO with a SparkFun power shield to run CoolNeon 12VDC LED rope lights.

Pete

That is probably more a function of the LED current Vs LED light output, they are not necessarily linear in relationship. You would need to check with the LED datasheet to see if they show it's intensity characteristics vs current flow.

One could possibly use the Arduino map function to scale a usable LED intensity range.

http://arduino.cc/en/Reference/Map

I think it is a logarithmic relationship.

The eyes response to increasing brightness is not linear, so even if the light output is directly proportional to the pulse width the perceived brightness is not.

And just to make things more complicated, the human eye/brain does not perceive intensities the same
across all frequencies. i.e. a green light source and a blue light source emitting the same amount of light (energy) will
not look the same brightness.

--- bill

Since LED's temporal response is in the sub-microsecond range, normal PWM (at kHz frequencies) wlll be very linear - averaged output light intensity proportional to duty-cycle. However as has been mentioned the human eye's response is roughly logarithmic over many orders of magnitude - thus the difference between 1%, 2%, 4%, 8%, 16%, 32% and 64% duty cycle will seem like equal steps.

When you start to combine light before it gets to the eye (mixing RGB for instance) the linearity of LED response is more convincing (equal ratios of duty-cycle for separate colours look the same colour).

Hi, I noticed the same thing some time ago when i started playing with leds.
Is there a simple way to map a linear input value to have a logarithmic output for the LED's PWM?

ex:

i have a byte (greyscale brightness) as an input and want the perceived output brightness to be kind of linear.
the map() function does scale a range but it does not 'map' it to a different function.

You use gamma correction:-

http://www.cgsd.com/papers/gamma_intro.html