Can IR differentiate between colors?

Status
Not open for further replies.

ikalogic

Member
I don't think so.. i'm quite sure the answer is no!

here is the point: i want to build a color sensor, that is immune to ambiant light, so i thought about using one of those IR receivers locked at 38Khz.. but i don't think they will be compatible with the standard Red-Green-Blue LEDs arrangement used in color detectors...

in case they can't, as i thought.. any idea for a simple color detector that would be immune to ambiant light?

if i'll have to modulate the 3 LEDs and them demodulate them.. it will get really messy.. unless there is a dedicated chip for that..

Also.. i have an old 3 Mpixel camera, is there a way to dramatically reduce image quality, input the image data into a uC and deduce the color? (plz ignore this last question if it's really science-fiction! sorry, i can't help my imagination! )

thx
 
The answer is no...let me tell you why.

YOu do realize you need ambient light to see colour right? Do you also realize that visible light and IR are essentially the same thing but different frequencies? That means you can't use IR to tell if something is red, green, or blue. YOu need to use visible light, by definition. Ambient light isn't even a problem- you want it. As a result, you don't need "immune to ambient light". That has no meaning when you are talking about a colour detector. You can't detect light unless it reflects off of something- which means you can't see it in mid-air (assuming the air is free of particulates).

Just get three photo sensors with a R, G, and B filters in front of each one...easy enough, simple. All you need is a 3-channel ADC. The only concern is that if the ambient light is unbalanced (ie. if there is only red light around, all objects will appear red- except pure black, blue, and green objects will all appear black). Is this what you mean by immunity to ambient light? All if you have to do is have white LEDs or another source of white light shining whever the colour sensor is looking to provide all the wavelengths of light so the true colour can be accurately reflected.

And yes, if you can read the data from your camera you can deduce the colour. You can also buy one from www.picaxe.com in camera-form where it has been simplified to be just a colour sensor (no imaging), just in case this was part of a larger project and you only wanted to build one because you couldn't find one.
 
Last edited:
hi ikalogic,
when using 904nM laser trasnsmitter/detectors I have used a narrow band pass optical filter to block ambient light. There are a range of 'plastic' sheets
which are able to narrow pass just the light spectrum/band of interest.

Using three suitable optical filters, and matched detectors, it should be
possible to get some correlation between rgb and intensity.

Sounds a very intresting project, good luck!

Regards
EricG
 
You can make IR devices immune to ambient light so that they only receive light form their receiver. But that is not what the OP is asking for- he wants to detect all reflected visible light while blocking out all ambient visible light which is unecessary (if not contradictory.) The only concern is that not all wavelengths of ambient light are present to reflect the true colour of the object.
 


Well, the idea i had (which needed to ignore ambiant light) was to use 3 LEDs (one of each cooulor, and 1 LDR in the midle. this idea was proposed in one of my electronics magazines, but they said that the sensor had to be totally protected from ambiant light.

The idea is to send Only red light, and record the LDR reading
Send Green only, then record the LDR reading,
Blues Only, the record again the LDR reading,
you get the RGB values of the Object's surface. (sure after some calibration) but the problem with this idea is -as you sure realized- is very sensitive to ambiant light.....

Your Idea Of Filter is very interresting also... how can I buy/build filters like those...? i have no Idea.. thx
 

will an 38Khz IR sensor respond to other colors of Light, emmited at the same frequency..? this would totally solve my problem!
 
I guess for filters you could get pretty fancy (and expensive) by using dye or gel filters.

But I think that coloured transparent paper (the purest red, blue, and green you can find) should be sufficient for your purpose. (You *might* be able to find photo-sensors with the filters already there like enclosed in red/blue/green plastic, but I doubt it). You might be able to steal the lid of an LED and use that on top of a photosensor.

Perhaps what the magazine meant is that you don't want light sources shining directly into the colour sensor blinding it (ie. you can't see the green wall if the lamp is shining in your face). All that is needed then is a simple hood.

ikalogic said:
will an 38Khz IR sensor respond to other colors of Light, emmited at the same frequency..? this would totally solve my problem!

What makes one colour different than another IS the frequency. So the answer is no, unfortunately.
 
dknguyen said:
Perhaps what the magazine meant is that you don't want light sources shining directly into the colour sensor blinding it (ie. you can't see the green wall if the lamp is shining in your face). All that is needed then is a simple hood.

No,Even If some light from a lamp, is INDIRECTLY sent to the LDR, by hitting the measured object first, it will give false readings, or at least, the LDR won't give the same readings in case there is no ambiant light.. see what i mean?
 
Oh, here is the datasheet for the camera-colour sensor I was talking about...
https://www.electro-tech-online.com/custompdfs/2007/01/axe045.pdf

Here is the manufacturer:
http://www.taosinc.com/category.asp?cateid=11

ikalogic said:
No,Even If some light from a lamp, is INDIRECTLY sent to the LDR, by hitting the measured object first, it will give false readings, or at least, the LDR won't give the same readings in case there is no ambiant light.. see what i mean?
No, I do not understand because you need ambient light to be the source for the reflected light off of the object in order to detect colour. Do you know the process by how you see light? Ambient light hits an object. The object will absorb some of the frequencies of light that reach it, but it will reflect certain frequencies. These specific reflected frequencies that hit your eye determine the colour you see. Therefore you need ambient light. If the ambient light is missing certain frequencies of light that the object would normally reflect, the object's colour will be distorted because it is not able to reflect these frequencies since they are not there. BUt then all you need to do is have a bright white light nearby to produce these missing frequencies.

In actuality, all the ambient light is absorbed by an object (rather than some of them) and certain frequencies are re-emitted (rather than reflected).
 
Last edited:
okay, now: FILTTERS...

For example, What exactly a RED couloured filter will do? will will block RED light right, and pass the rest? right?

I don't need a very accurate sensor, so i'll try to build it myself (interessting challenge! )
 
You'd think that right? But normally when people say a red filter, they mean a filter that PASSES red because it looks red (since it blocks the other frequencies of light going through it.

I've never actually thought about that before lol. But I guess the terminology can be misleading!

I should have said a red band-pass filter, although filters do exist that just block red (these are actually yellow filters! since they pass green and blue. green + blue = yellow).

Weird huh?

I should also add that you may want to you might also want an IR filter covering ALL the photo-sensors in addition to the colour filter, becuase photo-diodes can react to IR light.
 
Last edited:
well.. but how come a RED object, will absorb all light and reflect the RED (that's why we see it RED right?!)

A RED transparent filter will do the oposite?? pass the red and reflect the rest?

well that's weird!
 
dknguyen said:
I should also add that you may want to you might also want an IR filter covering ALL the photo-sensors in addition to the colour filter, becuase photo-diodes can react to IR light.

Aha! important note... but i am planning to use LDR.. i don't think they are sensensitive to IR.. are they?
 
ikalogic said:
well.. but how come a RED object, will absorb all light and reflect the RED (that's why we see it RED right?!)

A RED transparent filter will do the oposite?? pass the red and reflect the rest?

well that's weird!

Actually, a red filter will pass red light and ABSORB (not reflect) blue and green light. The red filter we see is due to the light passing entering the filter on the opposite side and only the red wavelengths pass through to hit our eyes. The red light coming from our side just passes through the filter and ends up on the other side and we never see it.

If the red filter simply reflected green and blue light, it would appear clear to us if there was white light on our side. It would only appear red if it was totally dark on our side and light was on the other side of the filter passing through to reach our eyes.

ikalogic said:
Aha! important note... but i am planning to use LDR.. i don't think they are sensensitive to IR.. are they?
I don't know much about LDRs. But they are probably made from different materials to be sensitive to different wavelengths. Some LDRs might be made to be sensitive to IR (this does not mean they cannot also see visible light, it probably means they are less sensitive to visible light though). You would have to check the LDR datasheet for it's frequency response. I would not be suprised if "visible-light LDRs" were sensitive to IR light though...in fact most transistors are sensitive to visible light - but they are in opaque black packages to prevent them from reacting to light.

Cadium-sulfide has a similar response to that of the human eye (but it's less sensitive). This means it's sensitivty peaks at green light and it falls off and dies right around ultraviolet and infrared. Cadmium is toxic though so don't throw it in the trash. I'm pretty sure there are other less toxic compounds that also have the same response as the human eye, but I don't know what they are.
 
Last edited:
I think you missed what he posted earlier.

He wants to take the RGB readings seperately, which is why he does not want the "white" (ambient) light.
 
Sig239 said:
I think you missed what he posted earlier.


He wants to take the RGB readings seperately, which is why he does not want the "white" (ambient) light.

that's was at first, we then found agreement dknguyen and me!

we concluded that i would apply filters on 3 different LDR...
 
hi ikalogic,
Just a thought will reading the latest posts, jogged my memory cell.
Used to work on a polychromater system.
It used a prism to diffract the 'white' light source into the spectrum, photo
detectors placed along the spectrum to detect the intensity of the light
at that point of interest in the spectrum.

I still think the optical filters will be best for you experiments.
As suggested by our co-poster, bog standard red,green, blue plastic filters
using a 'white' light illumination source. Check the light/resistance curve
for your LDR, see if it covers the light range of your filters.

Regards
EricG
 
Yes, but now the accuracy of your results will depend on the "purity" of the white light. I suppose you could compensate for it, but that would add useless complexity right? Since you would have to compensate differently with each light source. The advantage of using the RGB light sources is that you only calibrate once. You will know the purity specs of your filters when you buy them, then it is just a matter of making sure the amount of light emerging from the other side of the filters are the same (dimmers? to adjust). I believe measuring brightness is easier than measuring purity, and you always use the same light sources. I assume these are some of the reasons the folks who wrote the magazine article had in mind. Clearly both methods have compromises, I guess it just depends how you will be using it. I agree with everything dknguyen posted earlier, I just wasn't sure if he was clear on what your original intentions were. Good luck and keep us posted!

EDIT: I couldn't see erics post until I hit the submit button on my post! I like the prizm idea.
 
Last edited:
hi sig,
In some of the 'light' measurements systems I have used, I found that a
lookup table in the MCU, [ created in a calibrated set up] worked well.
By using the 'address' calculated from the apparent light intensity as a pointer
to the table, it was possible to give fair measurement repeatabilty.

Nice chatting, looking fwd to your post guys.

EricG
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…