Optoelectronic Devices: LEDs, Photodiodes, Optocouplers & Solar Cells

Where electrons meet photons. Learn LEDs (bandgap and colour, forward voltage, efficiency, current drive, thermal droop), laser diodes (threshold current, drive and safety), photodiodes (photovoltaic vs photoconductive mode, responsivity, quantum efficiency, dark current, capacitance and speed), PIN and avalanche photodiodes (APDs), phototransistors, IR emitters and receivers, optocouplers (CTR, isolation voltage, speed), solar cells (I–V curve, maximum power point, fill factor) and spectral response — with Python for responsivity, a TIA output, optocoupler saturation and a solar maximum power point.

Optoelectronic devices convert between light and electrical signals: LEDs and lasers emit light, photodiodes and solar cells absorb it, and optocouplers use both to pass signals across an isolation barrier.

They appear in displays and lighting, fibre and IR communication, medical sensors (pulse oximeters), industrial safety curtains, solar power and isolated control interfaces.

An analogy

An LED is a diode where electrons 'fall' across the bandgap and release their energy as a photon of matching colour. A photodiode runs the film backwards: incoming photons knock electrons up across the gap, creating current.

LEDs

LED colour depends on the semiconductor bandgap: infrared (GaAs, ~940 nm, V_F ≈ 1.2 V), red (~1.8–2.0 V), green/blue (InGaN, ~3 V), white (blue LED + phosphor). Drive LEDs with controlled current (resistor, current source or constant-current driver), not voltage — V_F varies with temperature and part. Brightness is set by current or by PWM dimming; efficiency falls at high current and temperature (droop), so heatsinking matters for power LEDs.

Photodetectors

Choosing a detector:

Optocouplers and isolation

An LED and photodetector in one package separated by an insulating barrier (e.g. 5 kV_rms). CTR (current transfer ratio) varies from 20% to 600%, drops with temperature and ageing, so design with margin. Transistor-output couplers are slow (µs); logic-output and high-speed couplers reach Mbps. Alternatives: digital isolators (capacitive/magnetic) for high speed and long life. Used in mains-powered SMPS feedback, industrial I/O and gate drivers.

Lasers and solar cells

Laser diodes emit coherent light above a threshold current; drive with precision constant-current sources with slow start and monitor-photodiode feedback — tiny overcurrent spikes destroy them; observe laser safety classes. Solar cells are large photodiodes operated in the fourth quadrant; I–V curves shift with irradiance (I_sc ∝ light) and temperature (V_oc falls ~2 mV/°C/cell). Maximum power point tracking (MPPT) operates panels at the knee of the curve.

Formulas

Worked example: LED colour from bandgap

Given: E_g = 1.9 eV

Find: λ.

Answer: 653 nm (red)

Worked example: Photodiode signal

Given: R = 0.5 A/W, P = 2 µW, R_f = 1 MΩ

Find: V_out.

Answer: 1.0 V

Worked example: Optocoupler margin

Given: CTR_min 50%, I_F 2 mA, R_L 10 kΩ, 3.3 V

Find: Saturates?

Answer: Yes, 3× margin

Photodiode with transimpedance amplifier

                 ┌────[R_f 100k]────┐
                 │       ∥C_f        │
  light ─► ┌─◄─┐ │                   │
           │PD │ ├──(−)╲             │
           └───┘ │      ╲ op-amp ────┴──── V_out = I_ph·R_f
  GND ───────────┴──(+)╱
  photoconductive mode: cathode can be reverse-biased for speed

The op-amp holds the photodiode at 0 V (virtual ground) and converts its current to voltage with gain R_f — the transimpedance amplifier. C_f keeps it stable given the photodiode's capacitance.

Responsivity, TIA, optocoupler and solar MPP

import math
# Photodiode responsivity and TIA output, LED efficiency, optocoupler CTR, solar cell
q, h, c = 1.602e-19, 6.626e-34, 3e8
wl, QE = 850e-9, 0.8
R = QE * q * wl / (h * c)
P = 10e-6                                      # 10 uW incident
Iph = R * P
print(f"responsivity at 850 nm: {R:.3f} A/W, photocurrent {Iph*1e6:.2f} uA")
Rf = 100e3
print(f"TIA with 100k feedback: Vout = {Iph*Rf:.3f} V")
# Optocoupler: CTR 100% at IF = 5 mA, pull-up 4.7k to 5 V
CTR, IF = 1.0, 5e-3
Ic = CTR * IF
print(f"opto collector current {Ic*1e3:.1f} mA available; needed for saturation with 4.7k: {5/4.7e3*1e3:.2f} mA -> saturated")
# Solar cell: Isc = 3 A, Voc = 0.6 V, ideality n = 1.3; find maximum power point numerically
Isc, Voc, n, VT = 3.0, 0.6, 1.3, 0.02585
Is = Isc / (math.exp(Voc / (n * VT)) - 1)
best = max(((V, V * (Isc - Is * (math.exp(V / (n * VT)) - 1))) for V in [i * 0.001 for i in range(600)]), key=lambda t: t[1])
print(f"solar cell MPP: V = {best[0]:.3f} V, P = {best[1]:.3f} W, fill factor {best[1]/(Isc*Voc):.2f}")
# responsivity at 850 nm: 0.548 A/W, photocurrent 5.48 uA
# TIA with 100k feedback: Vout = 0.548 V
# opto collector current 5.0 mA available; needed for saturation with 4.7k: 1.06 mA -> saturated
# solar cell MPP: V = 0.507 V, P = 1.425 W, fill factor 0.79

A silicon photodiode at 850 nm converts 10 µW of light into 5.5 µA; a 100 kΩ TIA turns that into 0.55 V. The optocoupler can supply 5 mA but only 1.06 mA is needed to saturate its output against the 4.7 kΩ pull-up — plenty of margin even as CTR degrades with age. The solar cell delivers most power at about 0.51 V, not at V_oc — hence MPPT controllers.

Common mistakes

Applications

Key takeaways

Going further