3

Are there sensors that can detect the color of an LED?

I am working on an Arduino project that needs to detect the color of an LED on an external device. I am trying to identify a light sensor that can be connected to the Arduino's input that can tell me the color of light the LED is currently emitting. The LED is capable of displaying red, green and yellow.

1

You mean like this one?

Adafruit RGB Color Sensor

They have similar products in different form factors.

2

You can use an LED as a light sensor - http://www.instructables.com/id/LEDs-as-light-sensors/

In theory, LEDs should be most sensitive to the frequency it emits - if this is true, the same type of red/green/yellow LED would be best.

I don't know how sensitive this will be.

If you control the "external device", then you could get much better accuracy by blinking the LED at very high rates (not visible to the human eye). Or, if you can get at the legs of the LED, you can tap into the signal directly (you should use an opto-isolator - even if powered at a few volts, the ground of your project may be different from the ground of the external device, causing 100s of volts to run through your Arduino - not good!).

2

There are a few different things you can do to detect a color.

The Arduino starter kit that I got when I first got into Arduino had some photoresistors plus some colored films. One of the projects in the project book had you put a different color film over each photoresistor, so that only that color of light would hit the sensor. You could do something like that if you only need to check for a small number of distinct colors.

There are also a wide array of color sensors and sensor modules available (just search your favorite online store for "color sensor" or "arduino color sensor"), which will allow for far more detailed and precise color readings, but at a higher price point.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.