Phototransistor sensor

Hi everyone, just looking for a quick bit of insight/knowledge. So I have set up a light sensor using a phototransistor, ir diode and resistor (classic circuit you see everywhere) and I have been trying to detect colour. I was assuming that red and green would give different values due to them reflecting differently, however right now red, green and white are giving the same values +- about 2.

I've seen a couple of tutorials using RGB leds but I was hoping to just use the ir diode. Am I wrong in thinking I can detect colour this way? The only other thing I'm thinking is the ir diode is to bright and flushing the values too much. Turning them down a bit gets a difference between red, green and white but not much (around 10 difference between them all) and that still seems a little unreliable.

Any insight is appreciated and I can answer any questions you have

Thanks!!! :slight_smile:

An IR LED outputs infra-red light that is not anything like the same frequency that visible light uses.


And the photo diode is not normally frequency specific and relies on packaging material filters to limit the frequency response. To detect the colour temperature of the light source you need a different sensor (maybe the TCS3200) or need colour gels over the receiver.

Many common phototransistors and photodiodes are most sensitive to IR, and have limited response in the range of human color vision.

Either use colored LEDs as photodiodes to detect specific wavelength bands, or use something like the TCS3200 color sensor.

Typically silicon photo diodes and transistors are sensitive across the whole spectrum, any wavelength less
than or equal to the silicon bandgap, right up to UV, but the sensitivity drops as you go from red to blue, but
this means its no use for detecting colour - you need three different sensors for each primary colour, and
they need to be calibrated somehow - the integrated colour sensors do all this for you.

Ah yes, this explains quite a bit, thanks for educating me :slight_smile:

I was hoping to get away with using what I have, would changing to just a white light source make much of a difference? Regardless I'm going to get another sensor type but just curious from a practical stand point.

Thanks!

Alexisa:
Ah yes, this explains quite a bit, thanks for educating me :slight_smile:

I was hoping to get away with using what I have, would changing to just a white light source make much of a difference? Regardless I'm going to get another sensor type but just curious from a practical stand point.

Thanks!

Depends on the source of the "white light". Most devices sensing colors use a zenon lamp. White LEDs are normally not "white", but we see it as white.

Paul