Loading header...

Photodiodes and LEDs

LEDs and photodiodes are p-n junctions designed for light. An LED converts forward current into photons. A photodiode converts light into current. Both devices are simple at the symbol level, but reliable designs require current limits, optical geometry, wavelength matching, and noise awareness.

Learning Objectives

By the end of this lesson, you should be able to size an LED resistor, compare indicator and power LED drive, explain photodiode photovoltaic and photoconductive modes, estimate photocurrent conversion, and avoid common optical interface mistakes.

LED Operation

An LED emits light when forward-biased carriers recombine in the junction. The color is set mainly by semiconductor bandgap, not by the package color.

Important LED parameters:

  • (V_F): forward voltage at a specified current.
  • (I_F): forward current.
  • luminous intensity or flux: optical output.
  • viewing angle: how the light is distributed.
  • maximum junction temperature.

Never drive an LED from a stiff voltage source without current limiting. Small voltage changes can cause large current changes.

LED Resistor Calculation

For a simple indicator LED:

[
R = \frac{V_{SUPPLY} - V_F}{I_F}
]

Example: 5 V supply, red LED (V_F = 2.0V), target (I_F = 5mA):

[
R = \frac{5 - 2}{5mA} = 600\Omega
]

Choose 620 ohm as a standard value. Resistor power is:

[
P_R = I_F^2 R = (5mA)^2 \times 620 \approx 15.5mW
]

LED Indicator Circuit

layout direction=LR gap=80

GPIO: Connector_Generic:Conn_01x02 value="MCU pin"
RLED: Device:R value="620 ohm" rotate=270
LED1: Device:LED value="Status LED" rotate=270

group DRIVE label="Digital output" direction=TB {
  GPIO
}
group LIMIT label="Current limit" direction=LR {
  RLED
}
group LIGHT label="Emitter" direction=LR {
  LED1
}

GPIO.1 --> RLED.1 color=#b91c1c
RLED.2 --> LED1.A color=#b91c1c
LED1.K --> global:0V
GPIO.2 --> global:0V

For power LEDs, use a constant-current driver, thermal path, and optical safety review.

Photodiode Operation

A photodiode produces current proportional to incident light over a useful range:

[
I_P \approx R_\lambda P_{OPT}
]

where (R_\lambda) is responsivity in A/W at a wavelength and (P_{OPT}) is optical power in watts.

Two modes are common:

  • Photovoltaic mode: zero bias, low dark current, slower response, useful for precision low-noise sensing.
  • Photoconductive mode: reverse bias, faster response, wider bandwidth, higher dark current and noise.

Transimpedance Amplifier

A photodiode current is often converted to voltage with an op-amp transimpedance amplifier:

[
V_{OUT} = -I_P R_F
]

The feedback capacitor (C_F) is often needed for stability and bandwidth control.

The signal path is: incident light creates photodiode current, the transimpedance amplifier converts that current to voltage, a filter limits noise and bandwidth, and the ADC or comparator reads the conditioned voltage.

Wavelength and Geometry

Optical interfaces fail when the emitter, detector, and mechanics are not matched. Check:

  • LED peak wavelength against photodiode responsivity;
  • ambient light rejection;
  • distance and viewing angle;
  • lens, aperture, and enclosure reflection;
  • saturation under direct light;
  • dark current and offset at high temperature.

Common Mistakes

  • Omitting LED current limiting.
  • Assuming all red, green, or infrared LEDs have the same forward voltage.
  • Driving an MCU pin beyond its current rating.
  • Reading a photodiode with a high-value resistor without considering bandwidth and noise.
  • Ignoring sunlight, fluorescent flicker, or enclosure reflections.

Summary

LEDs are current-driven light sources; photodiodes are light-driven current sources. Good optical design checks current, heat, wavelength, responsivity, geometry, dark current, and the analog front-end.

Further Reading

  • Vishay, "Optoelectronics Basics."
  • Texas Instruments, "Transimpedance Amplifier Design."
  • Hamamatsu, "Photodiode Technical Information."

Mind Map

mindmap root((LEDs photodiodes)) Core concept LED current makes light Photodiode light makes current Wavelength matters Formulas R=(VS-VF)/IF PR=IF^2*R IP=Rlambda*Popt VOUT=-IP*RF Applications Indicators Encoders Optocouplers Light meters Design rules Limit LED current Match spectrum Control ambient light Stabilize TIA Practical checks MCU pin current Thermal path Dark current Saturation Common mistakes Voltage driving LED Wrong wavelength No optical shielding No noise budget