Questions on LED PWM

I need to drive some RGB LEDs to generate a bit of eye candy and I'm wondering if anybody has some experience on a few questions. First, I'm thinking of using 5 bits of intensity per color since the entire RGB value would fit nicely in 16 bits. Anybody have an opinion whether 32 intensity levels for an LED is "smooth enough" or "disconcertingly jumpy"? The LEDs are going to be pretty busy so I think (hope) I might be able to get away with fewer steps than otherwise.

2nd question, how would the eye perceive the linearity of 32 equal intensity steps (that is, ON times of e.g. 100us, 200us, 300us ... 3100us out of 3100us)? I'm wondering if I may need to go to unequal intensity steps to get a more apparently linear intensity ramp. Anybody have experience with this?

I'll be wiring this up and playing with it before too long, but in the meantime I thought I'd find out if anybody else has dealt with these questions. Many thanks!

Mike

Reply to
Mike Silva
Loading thread data ...

Some articles about it:

formatting link
formatting link

Looks like it is logarithmic. Another example is the magnitude value used for measuring star brigthness:

formatting link

This means the perceived intensity p=2.5*log(r), with r=real intensity =>

r=10^(p/2.5). Maybe there are some additional non-linearities if your PWM rate is near 0% or near 100%, but for good looking results use a high resolution PWM and use a logarithmic lookup table.

Another interesting article about intensity correction:

formatting link

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Reply to
Frank Buss

Reply to
Hao Wang

Look at some of the LED driver devices, with PWM. That will give you an idea of ranges - often they have a RGB section, and a separate brightness control, so that you are not relying on the Colour bits for wide dynamic range. Depends if you want this to operate over a daylight/nightime dynamic range, or just a narrower range.

-jg

Reply to
Jim Granville

I suspect you will want to multiplex drive the display, just to save wires, drivers, etc. That means you will have a time pattern to fire each one. The only reasonable (IMO) control of intensity will be the length of activation pulse in that pattern (which can be delivered to only one end, if desired). This lets you fool with the intensities with a value to time converter somewhere.

Note that you can deliver the three colors in three different time slots, provided the multiplex frequency is high enough.

--
 [mail]: Chuck F (cbfalconer at maineline dot net) 
 [page]: 
            Try the download section.
Reply to
CBFalconer

Op Mon, 06 Oct 2008 04:24:53 +0200 schreef Mike Silva :

Obviously, this depends heavily on the output power and the transition time. But if it is not enough, you could think about a simple routine that will transition between two 16-bit colours in several steps using

24-bit precision.
--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

Depending on what you are displaying, you might find that the difference between 00000/00000/00000(all off) and 00000/00000/00001 is especially noticable, and that the color shifts at the lower end of brightness -- not enough resolution to keep the ratios right. An old trick is to use that extra bit to reduce the brightness of all three colors by a factor of 4, thus giving 7 bits of resolution at the dim end of the range.

--
Guy Macon
Reply to
Guy Macon

That's a very clever idea and I'll be sure to look at it. Since I was going to manipulate the colors as 24 bit data anyway (and only transmit it as 16 bits) this sounds like a good fit. I was definitely thinking that that first level from all OFF would be too large a step, and that the colors at low resolution would be off (but since these will be very abstract patterns this latter may not matter at all, and may even add to the effect).

And thanks to all who posted links and other info.

Reply to
Mike Silva

If you want a reasonably smooth fade, 256 levels per colour would be an absolute minumum.

Reply to
Mike Harrison

absolute minumum.

I agree (well, unless the changes are going to take place rather quickly like a second or two).

The eye is insensitive to small brightness differences, but quite sensitive to small changes in brightness. Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.