On this page
An LED is usually something you drive with a current to get light. Run it the other way and it works as a light sensor: shine light on it and it produces a small current. In 1992 the amateur scientist Forrest Mims described a pocket instrument that used six ordinary LEDs, with no filters, to measure how hazy the sky was. The physics is the band gap, applied to absorption instead of emission.
Can an LED really detect light?
Yes. An LED is a p-n junction, and any p-n junction can act as a photodiode. When a photon with energy greater than the band gap E_g is absorbed in or near the depletion region, it lifts an electron from the valence band to the conduction band and leaves a hole behind. The built-in electric field of the junction sweeps the electron to the n side and the hole to the p side. That drift is a reverse current that grows with the light intensity. How a photodiode is biased and which quadrant of the I-V graph it works in is covered in photodiode, LED and solar cell I-V curves; here we only need the absorption condition.
The current is small because the chip is tiny. In his 1992 paper in Applied Optics, Mims reported that some LEDs with a built-in lens gave more than 10 µA in direct sunlight, while his instrument used an operational amplifier with gains of 10³ and 10⁴ for the rest. In dimmer light you are down to nanoamperes, so you need a high-resistance meter or an amplifier, not a basic multimeter on its current range.
Why does a red LED see green light but a green LED is blind to red?
A photon can create an electron–hole pair only if hν ≥ E_g. Since E = hc/λ, there is a longest wavelength the junction can absorb:
λ_c = hc / E_g = 1240 / E_g (λ_c in nm, E_g in eV)
Light bluer than λ_c (shorter wavelength, higher photon energy) can be absorbed. Light redder than λ_c passes straight through the junction and gives no current. The same 1240 / E_g rule tells you an LED's emission colour, as explained in why the colour of an LED depends on its band gap. For detection it becomes an inequality.
Worked example: which colours can each LED detect?
Take round illustrative band gaps (real chips vary): a red AlGaInP LED with E_g ≈ 1.9 eV and a green InGaN LED with E_g ≈ 2.3 eV.
Cut-off for the red LED. λ_c = 1240 / 1.9 = 653 nm.
Cut-off for the green LED. λ_c = 1240 / 2.3 = 539 nm.
Photon energies of three test colours. Red 630 nm: 1240 / 630 = 1.97 eV. Green 525 nm: 2.36 eV. Blue 470 nm: 2.64 eV.
Red LED (1.9 eV). All three photons have more than 1.9 eV, so red, green and blue can all be absorbed.
Green LED (2.3 eV). Green (2.36 eV) and blue (2.64 eV) pass the test. Red (1.97 eV) does not, so the green LED gives essentially no current under red light.
Rule of thumb. An LED can only detect light at or bluer than roughly its own colour. Bluer light passes the energy test; redder light fails it.
Is an LED's detection band sharp?
No, and this is where the textbook picture needs a correction. The band-gap rule only sets the long-wavelength limit. Measured LED responses are bands with a peak, not a step that stays high for everything bluer. Mims found that LEDs respond over a band similar to their emission band, typically 25 to 35 nm wide at half maximum for visible LEDs. A 1998 test by Brooks, Mims and colleagues found an emerald green LED that emits at 558 nm had its detection peak near 525 nm, about 33 nm bluer, with a half-maximum width of about 75 nm. They also noted that the link between emission and detection spectra is not understood well enough to predict one from the other, so each LED's response has to be measured.
One likely reason the response falls off at short wavelengths is that high-energy photons are absorbed very close to the surface, in layers above the junction, where many of the electron–hole pairs recombine before the field can separate them. So a red LED does respond to green and blue, but more weakly than to orange-red light just bluer than its own glow. That narrow band makes an LED a cheap colour filter and detector in one.
How do two LED readings measure the haze in the sky?
Point a green LED at the Sun through a narrow tube so that it sees only the Sun's disc. Its signal V depends on how much green light survives the trip through the air. The air scatters and absorbs light along the path, so by the Beer–Lambert law
V = V₀ e^(−τm)
where V₀ is the reading you would get above the atmosphere, τ is the optical depth straight up, and m is the air mass, the path length through air compared with the path straight up. For a flat-layer atmosphere m = 1/cos z, where z is the Sun's angle from overhead. This works well until the Sun is about 70° from overhead; closer to the horizon, Earth's curvature and refraction start to matter.
Taking logs gives ln V = ln V₀ − τm, a straight line when you plot ln V against m. This is a Langley plot. Mims's paper shows nearly straight Langley plots for his LEDs up to air masses near 9.
Worked example: optical depth from two readings
Illustrative readings. V₁ = 0.80 V at m₁ = 1.5 (the Sun 48.2° from overhead, since cos z = 1/1.5). V₂ = 0.62 V at m₂ = 3.0 (70.5° from overhead).
Divide to remove V₀. V₁/V₂ = e^(τ(m₂ − m₁)), so τ = ln(V₁/V₂) / (m₂ − m₁).
Calculate τ. τ = ln(0.80/0.62) / 1.5 = 0.2549 / 1.5 = 0.170.
Find V₀. V₀ = V₁ e^(τm₁) = 0.80 × e^(0.255) = 1.03 V. (Because m₂ = 2m₁ here, V₀ = V₁²/V₂ = 0.64/0.62 also works.)
Interpret. With the Sun overhead, the fraction of green light that comes straight through is e^(−0.170) = 0.84, so 84% gets through and 16% is scattered or absorbed.
Part of τ is scattering by air molecules, which can be calculated and subtracted; what is left measures aerosols, the dust, smoke and droplets we call haze. A higher τ on a smoggy day means more haze.
Safety: never look at the Sun, and never point any sensor at the Sun through binoculars or a telescope.
If you want more band-gap and photon-energy numericals like these, the Fermi Problem Library has a step-by-step solver that explains the reasoning. Your phone's screen-brightness sensor uses a dedicated photodiode instead of an LED, as covered in how auto-brightness senses light.
Quick checklist
Any p-n junction, including an LED, gives a photocurrent when hν ≥ E_g.
Cut-off: λ_c(nm) = 1240/E_g(eV); 653 nm for 1.9 eV, 539 nm for 2.3 eV.
A red LED can detect green; a green LED cannot detect red.
Real LED responses are bands peaking a little bluer than the emission.
V = V₀e^(−τm), m = 1/cos z; τ = ln(V₁/V₂)/(m₂ − m₁).



