Detecting color of a light source electronically

Thread Starter

ltkenbo

Joined Sep 11, 2008
30
Was wondering what the best way to go about detecting color, and I don't mean of an object, I'd like to be able to detect when a light source is a certain color from a distance, such as the status of a distance traffic light with a μC. Any ideas on how I could go about doing this? Searched around and found a tiny bit of information about using colored LED's as photodiodes but don't know if this would work at longer distances. Not sure the best way to implement this so any help would be appreciated thanks.
 

Wendy

Joined Mar 24, 2008
23,429
Generally it works around colored lenses to filter the light. Same type of sensor, each with its own color lens. Some calibration is required.
 

Thread Starter

ltkenbo

Joined Sep 11, 2008
30
What type of sensor would be best like a photo-transistor? So I guess the principle with the lenses is that other colors passing through will be less intense than the color of light that the lens is? What about white light though? Is a red light shining on a red lens allow more intensity than a white one (say the sun, or a streetlight)?
 

wayneh

Joined Sep 9, 2010
17,498
telescope + spectrophotometer

The latter could possibly one of those things used to calibrate monitors. I don't think you can detect a red or green dot in a sea of visible light unless you focus in on the light, hence the telescope.
 

solis365

Joined Nov 5, 2008
21
telescope + spectrophotometer

The latter could possibly one of those things used to calibrate monitors. I don't think you can detect a red or green dot in a sea of visible light unless you focus in on the light, hence the telescope.

if you are talking about traffic lights from more than a few inches away, wayneh is right. you will need optics to focus the light on any circuit component.

the better way to do it is take a digital picture/video and run some image processing algorithms on it to detect the color, this would be a much more reliable solution than any circuit using photodiodes/photoresistors/telescopes
 

retched

Joined Dec 5, 2009
5,207
Many moons ago, I worked for A photo finisher. We had a device that would check the reflected and transmissive light through or off of a "test print"

It would "read" the colors or the Red/Green/Blue patches on the photo to see if they were of proper tolerance. This let us know that the chemistry was mixed properly and the at the proper temperature.

I cannot remember the name of the device itself. but it was a form of spectrophotometer.
 

Thread Starter

ltkenbo

Joined Sep 11, 2008
30
if you are talking about traffic lights from more than a few inches away, wayneh is right. you will need optics to focus the light on any circuit component.

the better way to do it is take a digital picture/video and run some image processing algorithms on it to detect the color, this would be a much more reliable solution than any circuit using photodiodes/photoresistors/telescopes

Would these optics be able to focus a wide field or need to be aimed at a particular point?

Also could this image processing algorithm be run by a microcontroller and if so any good tutorials or links to interfacing imaging and microcontrollers?
 

wayneh

Joined Sep 9, 2010
17,498
I think any wide field is going to make it really tough to sort out what's what, even for a PC. That's why I think you need a field of vision that is dominated by the light being watched. Think how many stray sources of green and red light there are; sun on trees, brake lights, reflective flashes off car bodies, neon signs, police cars, and on and on. Heck, even humans can have a tough time of it.
 
Top