LEDs and Photodiodes
A PN junction can turn current into light and light into current. A light-emitting diode (LED) does the first: electrons and holes recombining in the junction give off photons whose energy is set by the band gap. A photodiode does the second: absorbed photons create electron-hole pairs that the junction's field sweeps out as a current. Together they make indicator lights, displays, illumination, remote controls, optical encoders, smoke detectors, pulse oximeters, fibre links and optocouplers. This lesson designs an LED driver and a photodiode receiver, the two circuits behind all of them.
LEDs: colour and forward voltage
In a direct-gap semiconductor such as GaAs, AlGaInP or InGaN, a recombining electron gives most of its energy to a photon of energy close to the band gap (Semiconductors for Circuit Designers):
So the colour decides the gap and the gap roughly decides the forward voltage. Typical values at to (they vary between manufacturers and with current):
| LED | Material | ||
|---|---|---|---|
| infrared | GaAs, AlGaAs | to | to |
| red, orange, yellow | AlGaInP | to | to |
| green (true green), blue | InGaN | to | to |
| white | blue InGaN + yellow phosphor | broad | to |
Blue and green InGaN LEDs drop more than their photon energy because of extra resistance and band offsets in their structure. White LEDs are blue LEDs whose light is partly converted by a phosphor.
The I-V curve is a steep Shockley exponential, just shifted to a higher voltage: a few tens of millivolts change the current by a factor of ten, and falls by about as the LED warms. An LED must therefore be driven by a current, not a voltage. The simplest current source is a series resistor:
The driver efficiency is the fraction of supply power that reaches the LED; the rest heats the resistor. For high-power LEDs, use a constant-current regulator or a switching LED driver instead (An Introduction to Switching Regulators). Brightness is set by current; dimming is usually done by PWM (switching the full current on and off fast) so that the colour stays constant.
LED efficiency has two parts: the wall-plug efficiency (optical watts out per electrical watt in, roughly 30 to 60 % for good white power LEDs in 2026, depending on drive current and colour temperature; lower for green and amber, the "green gap", while deep-red AlGaInP parts are among the most efficient), and the luminous efficacy in lumens per watt, which weights the light by the eye's sensitivity. Most of the rest becomes heat in the junction, which is why power LEDs need heat sinks: their light output and lifetime fall as the junction gets hotter.
Worked example: an LED resistor
Given: a red LED with at , driven from a rail and from a microcontroller pin.
Find: the resistor for , its power, and the driver efficiency; repeat for a blue LED ().
Solve:
Check: the blue LED from is a bad design: with only across the resistor, a spread in between parts (normal) changes the current by 50 %, and a microcontroller pin's own output resistance (tens of ohms) already exceeds . Use the rail and a transistor switch (The BJT as a Switch), or a constant-current driver.
In Python
# LED series resistor from a 5 V and a 3.3 V rail at 10 mA, photon energy E = 1240/lambda
leds = [("infrared", 940, 1.3), ("red", 630, 2.0), ("yellow", 590, 2.1),
("green (InGaN)", 525, 3.0), ("blue", 465, 3.1)]
I = 10e-3
print(f"{'LED':14s} {'nm':>4s} {'E (eV)':>7s} {'VF':>5s} {'R @5V':>7s} {'R @3.3V':>8s}")
for name, lam, vf in leds:
r5 = (5.0 - vf) / I
r33 = (3.3 - vf) / I
print(f"{name:14s} {lam:4d} {1240/lam:7.2f} {vf:5.1f} {r5:5.0f} R {r33:6.0f} R")
# photodiode: responsivity R = eta * lambda / 1240 (A/W), photocurrent and TIA output
eta, lam, P = 0.8, 850, 10e-6 # quantum efficiency, nm, optical power (W)
resp = eta * lam / 1240
iph = resp * P
print(f"responsivity at {lam} nm, eta = {eta}: {resp:.3f} A/W")
print(f"10 uW gives {iph*1e6:.2f} uA; a 100 kOhm transimpedance amplifier outputs {iph*100e3:.3f} V")LED nm E (eV) VF R @5V R @3.3V
infrared 940 1.32 1.3 370 R 200 R
red 630 1.97 2.0 300 R 130 R
yellow 590 2.10 2.1 290 R 120 R
green (InGaN) 525 2.36 3.0 200 R 30 R
blue 465 2.67 3.1 190 R 20 R
responsivity at 850 nm, eta = 0.8: 0.548 A/W
10 uW gives 5.48 uA; a 100 kOhm transimpedance amplifier outputs 0.548 V
The infrared and red rows show close to the photon energy; the InGaN rows show the extra to .
Photodiodes
A photon with more energy than the band gap, absorbed in or near the depletion region, creates an electron-hole pair; the junction's field separates them, and a photocurrent flows in the reverse direction (out of the anode through the external circuit). It is proportional to the optical power :
where is the quantum efficiency (electrons per photon). Silicon photodiodes respond from about to , with a peak responsivity of roughly to in the near infrared; InGaAs covers to for fibre links. Above silicon's photons fall short of and it becomes transparent.
The diode's total current is the Shockley current minus the photocurrent, . Two ways to use it:
- Photovoltaic mode (zero bias): no applied voltage; the dark current is nearly zero, which gives the lowest noise. Short-circuited (into a transimpedance amplifier) it gives a current exactly proportional to light. Left open, it develops a voltage that grows only logarithmically with light, as a solar cell does.
- Photoconductive mode (reverse bias): a reverse voltage widens the depletion region, which lowers the junction capacitance and speeds up the response, at the cost of a dark (leakage) current that adds noise and rises with temperature.
The speed of a photodiode feeding a load resistor is set by : . A bigger gives more volts per microampere but less bandwidth. The transimpedance amplifier (TIA) breaks this trade-off: an op-amp holds the photodiode at a virtual ground, so its capacitance barely charges, and the feedback resistor converts the current to a voltage, (The Ideal Op-Amp; its stability needs care, see Real Op-Amps: Gain-Bandwidth and Slew Rate).
Cross-check with SPICE: an LED and a photodiode's bandwidth
LEDR is a red-LED model written for this course (Shockley with a tiny so that ); DPH a small photodiode with . The photocurrent is a current source across the diode: DC plus AC for the bandwidth sweep. The point of the () response is at .
cat > led.cir <<'EOF'
* red LED from 5 V through 300 Ohm; photodiode bandwidth at 0 V and 5 V reverse bias
.model LEDR D(Is=1e-19 N=2 Rs=5)
.model DPH D(Is=10p N=1.1 Rs=10 Cjo=50p M=0.5 Vj=0.7 BV=30 IBV=1u)
V1 a 0 5
R1 a k 300
D1 k 0 LEDR
* photodiode: anode at the load, cathode at the bias; photocurrent from cathode to anode
VB b 0 0
IPH b p DC 10u AC 1u
D2 p b DPH
RL p 0 10k
.control
op
echo "LED: VF = amp;v(k) V"
let iled = (v(a) - v(k)) / 300
echo "LED current = amp;iled A"
foreach vb 0 5
alter VB dc = $vb
op
echo "bias $vb V: v(p) = amp;v(p) V"
ac dec 50 1k 100meg
meas ac f3db when vdb(p)=-43.0103 fall=1
end
.endc
.end
EOF
ngspice -b led.cir 2>&1 | grep -E '^(LED|bias|f3db)'LED: VF = 2.07244 V
LED current = 0.00975854 A
bias 0 V: v(p) = 0.0999967 V
f3db = 2.943698e+05
bias 5 V: v(p) = 0.1 V
f3db = 8.994166e+05
The LED settles at and (the design assumed ). The photodiode gives in both modes, but its bandwidth triples with of reverse bias: against . Check by hand: at zero bias (actually ) , giving ; at , and .
Interactive: the photodiode as a linear source
For small signals a photodiode is linear: a current source (the photocurrent) in parallel with its junction capacitance. That fits ee-netlist. Set to (zero bias) or ( reverse) and watch the corner move.
At with , reads at , of the low-frequency .
Guided lab: an LED driver and a light sensor
Hand calculation. Red LED from through : about . A small silicon photodiode (a few ) under a desk lamp gives roughly tens of microamperes; into , a few hundred millivolts.
Simulation. The SPICE deck and the lab.
What you would measure. Drive the LED from a bench supply at (current limit ) through ; measure and the resistor voltage: expect to and to . Swap in a blue LED: near , current near . For the photodiode, connect it reverse-biased from with a load as in the figure; read in the dark (millivolts or less), under room light and under a lamp, and point the red LED at it from a few centimetres. To see the bandwidth, drive the LED with a square wave from a function generator through and watch the photodiode's output edges on a scope: the rise time shrinks when you raise the bias from to .
Hazards and safe setup. Low voltage only. Never connect an LED straight across a supply without a resistor. Do not stare into bright LEDs; high-power white, blue and infrared LEDs and laser diodes can harm the eye (infrared is invisible, so you get no warning).
Pitfalls
- Driving an LED from a voltage. A few tens of millivolts change the current several-fold; always set the current.
- Too little headroom for the resistor. If is small, the current depends on tolerance and temperature.
- Reverse voltage on LEDs. Most LEDs tolerate only about in reverse.
- A huge photodiode load resistor. It gives volts per microampere but a bandwidth of a few kilohertz; use a TIA instead.
Practice
- A white LED () must run at from . Find , its power and the driver efficiency.
- What wavelength corresponds to a photon energy of (GaAs)?
- A photodiode with feeds . What is its bandwidth?
Answer
- (E24: , giving ); , so use a or larger part; .
- (near infrared).
- .
Test yourself
A red LED () should carry from . The series resistor is…
Why must an LED be driven by a current rather than a fixed voltage?
- its I-V curve is a steep exponential, so a small voltage change gives a large current change
- LEDs only work on AC
- voltage changes the colour
- LEDs have no forward voltage
Applying reverse bias to a photodiode…
- stops the photocurrent
- lowers its junction capacitance and speeds it up, but adds dark current
- makes it emit light
- doubles its responsivity
A silicon photodiode with quantum efficiency at has a responsivity of about…