Using an LED as a Photodiode

Circuit diagram of a darlington pair amplifying the output of a reverse-biased LED Circuit diagram of a darlington pair amplifying the output of a reverse-biased LED +9V +9V +9V +9V D2 D2 D1 D1 Q1 Q1 R1 R1 Q2 Q2 R1 R1 D2 D2 Q2 Q2 Q1 Q1 D1 D1 SVG Image created as reverse_led.svg date 2024/01/21 15:01:48

An LED is a device which takes in electricity and emits light. Some electronic components work in reverse: a speaker can be used as a microphone and a motor can be used as a generator. It is reasonable to ask then, “can we shine light on an LED to produce electricity?” The answer is a surprising yes! LEDs can be made to work as photovoltaics 1, but the reason you don’t see this in practice is that they are really bad photovoltaics. Still, we are able to use this effect in practice, and this trick could even save the hobbyist from having to buy more specialized components.

When I first learned about this, I had to run an experiment. My first attempt was to put a reverse-biased LED on the base of a PN2222 transistor to see if I could get any output, but nothing visibly happened. Next, I fed the emitter of the first transistor directly into the base of a second (creating a Darlington Pair) as seen in the diagram.

This configuration works remarkably well in ambient light conditions for being so simple. The indicator LED (D2) dims and brightens as shadow and light pass over the detector (D1). Using a red LED for the detector produces a more sensitive response than a shorter wavelength (i.e. green or blue) LED, as expected due to red’s smaller band gap. When used as a photodiode, an LED will be sensitive to any wavelengths shorter than its emission wavelength. This gives red the advantage for visible light, covering more of the spectrum than any other visible color.

This circuit is susceptible to noise, and probably isn’t the best choice if you need to sense light with any degree of precision. It is, however, perfectly suited to demonstrate the effect and takes all of one minute to put together on a breadboard.

Component Value
D1 (detector) LED (red)
D2 (indicator) LED (any color)
Q1, Q2 PN2222 NPN BJT
R1 ~470Ω

  1. Technically the detector LED is acting as a photodiode in the configuration I have presented due to being reverse-biased. The LED would act as a photovoltaic cell if zero-biased.