Active Components
Lesson 2 of 7beginner
16 min read

LEDs & Photodiodes

Light-emitting diodes, current limiting, photodetection

Theory

🎧 Listen to this lesson

What is an LED?

A Light-Emitting Diode (LED) is a special diode that emits light when forward-biased. When current flows through the PN junction, electrons recombine with holes and release energy as photons. The colour of the light depends on the semiconductor material and the energy gap between bands.

LED Forward Voltages by Colour

  • Red — V_f ≈ 1.8–2.0 V
  • Orange / Yellow — V_f ≈ 2.0–2.2 V
  • Green — V_f ≈ 2.0–3.0 V (varies widely between standard and high-brightness)
  • Blue — V_f ≈ 3.0–3.5 V
  • White — V_f ≈ 3.0–3.5 V (white LEDs are blue LEDs with a phosphor coating)
  • Infrared (IR) — V_f ≈ 1.1–1.5 V
Warning
Unlike resistors, LEDs do not obey Ohm's Law. A small increase in voltage causes a very large increase in current. That's why you ALWAYS need a current-limiting resistor in series with an LED.

The Current-Limiting Resistor

LEDs are specified for a certain operating current — typically 10–20 mA for standard indicator LEDs. Without a resistor to limit the current, the LED would draw excessive current and burn out almost instantly. The resistor value is calculated from the supply voltage, the LED forward voltage, and the desired current.

Key Concept
R = (V_S − V_LED) / I_LED. This is the most-used formula in beginner electronics. Memorise it!

Brightness & Efficiency

  • Luminous intensity is measured in millicandela (mcd). A standard indicator LED is about 20–50 mcd; high-brightness LEDs can exceed 10,000 mcd.
  • Viewing angle — how wide the light spreads. Narrow angle (15°) = focused beam. Wide angle (120°) = broad illumination.
  • Efficiency — LEDs convert 20–50% of electrical energy to light (far better than incandescent bulbs at ~5%).
  • More current = more brightness, but only up to the rated maximum. Beyond that, heat destroys the LED.

Multi-colour & RGB LEDs

An RGB LED contains three separate LED chips (Red, Green, Blue) in a single package with either a common cathode or common anode. By varying the current through each chip, you can mix any colour. Addressable LEDs like WS2812B (NeoPixel) integrate an RGB LED with a tiny controller IC — each LED in a strip has its own address and can be individually controlled over a single data wire.

Photodiodes

A photodiode works in reverse: instead of converting current to light, it converts light to current. When photons hit the PN junction, they generate electron-hole pairs, producing a small current proportional to the light intensity. Photodiodes are operated in reverse bias (photoconductive mode) for speed, or zero-bias (photovoltaic mode — like a tiny solar cell) for precision.

  • Phototransistor — a photodiode + transistor in one package. More sensitive but slower.
  • Solar cell — essentially a large-area photodiode optimised to generate power from sunlight.
  • IR receiver — photodiode sensitive to infrared, used in TV remotes and proximity sensors.
Tip
LEDs can also work as crude photodiodes! An LED generates a tiny voltage when light of a shorter wavelength hits it. This is sometimes used for simple light-sensing tricks.

Formulas

Interactive Diagram

Interactive Circuit Diagram

5.0V220ΩI = 22.7mAP = 113.6mW
5V
3V12V
220Ω
47Ω1000Ω

Calculator

R=fracVsupplyVfIfR = \\frac{V_{supply} - V_f}{I_f}

Circuit Challenges

Challenge 1 of 2
LED Resistor Calculation

Calculate the current-limiting resistor for a blue LED (V_f = 3.2 V) running at 15 mA on a 9 V supply.

R=VSVLEDILEDR = \frac{V_S - V_{LED}}{I_{LED}}
+9V?RA
9V
3.2V
0.015A
? Ω

Calculate & fill in:

Ω

Knowledge Check

Question 1 of 5

Why do LEDs need a current-limiting resistor?