View Full Version : Detecting different LED states
I'm doing a project where I need a sensor to monitor a standard green LED and determine if it is ON, OFF, or BLINKING. I have been considering using a phototransistor or photodiode, but I am not sure how I would use one of these to tell the difference in the LED being on or blinking.
Does anyone have any experience with something similar to this?
mdjensen22
Oct4-10, 02:40 PM
What is the environment of the application (distance from the sensor, ambient lighting, sensor output requirements, etc.)
A good place to start if it needs to be optical is to determine the wavelength the sensor is required to detect (green in this case) - 500-~580nm.
this is especially important if ambient lighting is a factor - you want the sensor to be mostly sensitive to the light that you are trying to detect.
With a photo transistor, you should be able to read this just like a normal transistor which makes the rest pretty straightforward.
The photodiode approach will give an analog voltage (you can use a comparator to get digital if needed). With the circuitry you set-up for the photodiode, the blink rate of the LED can become your largest challenge. If you use a large capacitor, it might not discharge in time to detect the flashing.
That sounds like a logic probe.
Have a look at this circuit:
http://ecelab.com/circuit-logic-probe.htm
http://ecelab.com/circuit-logic-probe.jpg
This would go after your photo-transistor detecting circuit.
or search Google for logic probe circuits.
Thanks for the responses. I will look into those solutions. The detection would only need to occur from a short distance (within 10cm). The lighting is a little bit of a wild card, but it will be used indoors with variable lighting.
mdjensen22
Oct6-10, 01:56 PM
If you can connect to the LED directly, the approach as recommended by vk6kro is ideal.
Your detector would probably have to be very close to the LED and ideally mounted so that ambient light could not reach the detector.
Otherwise, it is going to be very difficult to tell if light is coming from the LED or from room lighting.
As MDJensen says, if you can access the wires going to the LED, that would be a lot better. You need several volts to drive a circuit like the logic probe above and it is going to be difficult to get that much signal from a light detector.
mdjensen22
Oct6-10, 10:17 PM
If ambient lighting is a concern, you could always use the Photodiode and baseline out the ambient level and look for a change in the reading - maybe you end up using two sensors - one to look at the led, and one to read the ambient lighting.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.