calibrating RGB LEDs? (using shiftBrite)

Hi - (this has probably been asked a zillion times, sorry. I'm getting errors when I try to use the 'search' function with this forum.)

Anyway - I have some shiftBrite LEDs and they are very nice. I'm having trouble though getting predictable perceived colors since the individual R, G, & B LEDs that make up the shiftBrite don't seem to have the same intensity range. I haven't used RGB LEDs at all before but I imagine this is typical.

Is there some formula, at least as a starting point, to compensate in software for the differences in intensity? Something more than trial and error?

thanks!

--Roy

The differences in intensity are manufacturing variations.

How would the software know anything about the hardware that is attached to any given pin?

If the software is to behave differently depending on what you plug into a given pin, you have to program it to behave differently.

Trial and error is the only way to make the software behave the way you want.

For ordinary RBG LED's one way to match them would be to use different current limiting resistors, or even small trimpots.

But i guess the current limiting resistors are an integrated part of the shiftBrite LED's making that impossible / difficult.

at least as a starting point, to compensate in software for the differences in intensity?

There are two problems here:-

  1. The three LEDs have different luminosity outputs for the same current.
  2. They eye responds differently to the same luminosity at different colours.

So if you are doing it properly look at the data sheet and calculate what current is needed through each LED to produce the same output. Then use the different forward voltages (best measure this as data sheets are a bit useless) for each colour to calculate a different current limiting resistor for each.
For problem 2 you could try to put in a precompensated output luminosity into the first step based on a spectral response of the eye (Google it)

Alternately try it and see.

There are two problems here:-

  1. The three LEDs have different luminosity outputs for the same current.
  2. They eye responds differently to the same luminosity at different colours.

Yes, these are the issues. The blue seems relatively weak, green moderate and red strong so I am thinking to try adjustment factors to throttle back the R & G. I can't hack the shiftBrite afaik hence will try to adjust in code with different PWM rates - at least that is the idea.

I figured this is a common problem with RGB LEDs in general so thought there might be some formula/rule of thumb.

The blue should actually be the brightest. It almost sounds like you don't have enough power...what voltage and amperage is your power supply? Please note that you need more power than the Arduino can provide alone.

After that's sorted out, I typically set the current controls (not PWM control) to 120, 100, 100 for red green blue respectively. The other factor is human perception, even though the PWM control is providing a linear change in brightness, the human eye is a peak detector. If you need a brightness change that appears linear, you may need to use a logarithmic brightness curve.

..what voltage and amperage is your power supply?

I'm using a separate bench variable power supply set to provide 7.5v. One shiftBrite appears to be drawing between .01-.03 amps.

After that's sorted out, I typically set the current controls (not PWM control) to 120, 100, 100 for red green blue respectively

I'm using the example code straight from the shiftBrite docs - so it should be setting the current to those values each time 'WriteLEDArray()' is called.