[Help] RGB LED Generate and Feedback

xela

Newly Enlightened
Joined
Sep 17, 2006
Messages
8
I am going to use RGB LEDs to generate "white light" and "tungsen light".
I decide to use a microcontroller (8051) to control and switch the color temperature of the light.
Also, the color temperature of LEDs may change for using periods of time.
So I need a feedback system to control it.
However, I have no idea how this can be done. May anyone give some advices to me??
:ohgeez:
 

wakibaki

Newly Enlightened
Joined
Jan 11, 2007
Messages
128
Location
Plymouth, UK
How do you propose to sense the output? Or don't you know?

If you look at this Gretag Macbeth colorimeter you might get some ideas.

http://www.bodoni.co.uk/gretagmacbetheyeonedisplay2-p-143.html

How accurate do you require the system to be? How much money are you prepared to spend?

Once you know the CT and illuminance of the LEDs the rest is straightforward. You could measure at switch on at a known current and calculate the required output and set the brightness on a session basis or you could have a proper feedback loop to maintain a set level for each LED. The set level is biassed according to your knowledge of the individual LED's CTs.

Generally the brightness is controlled by PWM when using a microcontroller, but you can output a value to a DAC, and use the voltage to program a current source.

w
 

xela

Newly Enlightened
Joined
Sep 17, 2006
Messages
8
Thank you for your reply but I think the colormeter u provided is just too good.
Maybe I should tell more details.
This is my electronic project and my budget remained is about US$300.
um...I think I should firstly ask about the methodology of the generation and feedback.

PS: I am looking over an IC ADJD-J823
 

wakibaki

Newly Enlightened
Joined
Jan 11, 2007
Messages
128
Location
Plymouth, UK
ADJD-J823. This looks pretty good and will probably do everything you want once you figure out how to calibrate it.

There might be some interesting problems with the physical layout. I can't tell from the datasheet where the sensor window is.

You need 3 PWMmable LED drivers and an I2C eprom for a minimum. For a host system you can bit-bash a few bytes out through a couple of microprocessor pins, or maybe just use the PC printer port while experimenting. An eprom programmer may be necessary depending on which route you go.

You can have the host system manage the calibration information by connecting the prom to the host, or you can connect the prom directly to the device to be read once at switch on.

If you want to change colour without rebooting you need the microcontroller, or you could have 2 eproms, DIP switches and power cycle.

There is an issue regarding sequencing at power up and power down, if necessary you can get dedicated management chips to help with this.

w
 

xela

Newly Enlightened
Joined
Sep 17, 2006
Messages
8
Thank you.
I've already had some LED drivers(PWMmable). As I know the duty cycle of each RGB LED affect the color temp, but I dun know the details...
I remember I've seen some threads talking about this but I can't find them. May you give me some link to the information please?

Also the feedback. I totally have no idea about how it works.
 

cdosrun

Enlightened
Joined
Sep 22, 2006
Messages
369
Location
West Sussex - England
Just an idea for the calibration. I don't know how practical the following is, but I am sure you could figure it out.

If you use PWM dimming; a photodetector (I wouldn't know the best one to go for) with a fairly fast response could be setup to detect the output of all the LEDs. If the PWM sycnhing is sequential for the colours (such that at no time, or at least not at the time of calibration more than one colour is illuminated at once), the detector will give the output of each colour. You would need some sort of colourimeter to calibrate the feedback circuit at the beginning. Once setup, it should be able to monitor itself.

If you are using current control, or can't afford to have the PWM syched as described above, three photodetectors, each with a narrowband filter corresponding to R,G or B placed in front of them would give you the necessary feedback. Obviously, all would need A/D conversion to be read by the micro and, again, you would need some means to calibrate the system.

If all the above is too complicated for the micro, you could use analogue feedback based on the three detector solution. Taking the outputs of the detectors into analogue comparators, you could have a 'digital' output. i.e. Red>Green<Blue for instance. The micro would then have to be setup with feedback loops to stabilise the outputs. It would, of course, be oscillating permanently as it attempted calibration. In the analogue case, the detectors would need some sort of damping, otherwise the PWM would cause havoc.

I will happily try to explain my above ramblings in more detail, but I imagine you will get someone much better qualified to answer shortly.

Sorry, I hadn't looked at the ADJD component suggested above - looks perfect for the job.
Andrew
 

wakibaki

Newly Enlightened
Joined
Jan 11, 2007
Messages
128
Location
Plymouth, UK
OK the feedback compares the light you're getting to a standard (numbers) that you program into the device. This generates an error signal (difference between measured numbers and standard) 3 numbers RGB. Each number R, G, B is used to set RGB PWM drivers. If error signal is zero, then no change to PWM. If difference is big, big change to PWM. (must change in right direction). All this is automatic in this chip.

You don't need to care about duty cycle and CT.

You stick it somewhere it can see the light, wire it up, set the numbers, forget it...

w
 

SemiMan

Banned
Joined
Jan 13, 2005
Messages
3,899
In addition to the Avago color sensor you mentioned, they also have a chip that does the feedback as well as the PWM generation. I can't remember the number though. I was given a demo.

To calibrate any system like this, you are going to need an accurate color meter or spectrophotometer. Maybe someone can lend you one. You will only need it once for the system calibration. They are $2,000+ though.

If I remember the Avago sensor is human eye response like so it may handle variations in the wavelengths of the LEDs especially the green. You really do not want to simple narrow band sensor as this will result in color errors. An eye response sensor calibrated to the actual LEDS you are using will give the best result.

Semiman
 

xela

Newly Enlightened
Joined
Sep 17, 2006
Messages
8
Until Now, I plan to use MCS3(color sensor) with MTI04(opamp) to output a analog voltage. Then A/D convertor converts the analog to digital signal.
However I can't figure out how the calibration can be done.:ohgeez:
 

xela

Newly Enlightened
Joined
Sep 17, 2006
Messages
8
Another question, what is the optimum frequency of the PWM for RGB to generate "white" or "tungsen" light??
 
Top