Electronic – Component to detect the state of an external LED

ledlight-sensorphotodiodephotoresistorphototransistor

I need to detect the state of an LED in a machine that I cannot connect to in any electrical way. So I would like to measure the light emitted from this LED.

The conditions:

  • The ambient lighting is low to very low (both the machine containing the LED and the sensing device are inside a box with few and small holes)
  • The sensing component can be very close and well aimed at the LED (distance between 0 and max 5mm)
  • The LED is orange (if that is relevant?)
  • Input will be processed by a PLC

My question is: what component meets the following criteria the most?
Criteria in order of priority (from high to low): reliable detection, simple wiring (few components, easy to wire to let's say an arduino), easy programming the microcontroller, and low price.

I am looking into these alternatives (but maybe there are more?).

  • LDR (light dependant resistor)
  • Phototransistor / photodiode
  • LED as a light sensor (in the same colour as the emitting LED)

Which component meets the criteria the best?

Best Answer

Probably a phototransistor. It would be best if you could shield it from outside light and attach it closely to the target.

One thing to consider is if the LED is actually illuminated continuously or merely appears to be illuminated continuously. The phototransistor will likely be fast enough to pick up multiplexing that would not be obvious visually. If so then you'd need some kind of filter.

The general approach would be to use a phototransistor plus a resistor (maybe a parallel cap) and a comparator such as an LM393 with a reference formed by another couple resistors.

Using an LED as a photodiode (or a real photodiode) is possible, but the output current is very low compared to a phototransistor and it would thus be more sensitive to electrical noise and might require a bit more complex circuit (such as a transimpedance amplifier).