EMDyna Sandbox Scene Details
Overview Manual & Theory Validation Suite Python API Gallery Open Simulator

← Back to Scene Gallery

OfficialBasicLighting an LED

A 5 V battery and a 150 Ω resistor drive about 20 mA through a red LED (forward voltage 1.8 V) to light it. An LED lights only when current flows forward. Select the LED and click "Reverse polarity": it is reversed and goes dark. A smaller resistor increases the current and makes it brighter (a real LED breaks if too much current flows). Select the LED to change its color or the current at full brightness.

Oct 19, 2026 • 9 views

Launch & Remix in Simulator

Read the explanation, with equations and figures ↓

Modify this scene in the simulator, then open the "Scene" tab and click "Publish Current Scene to Gallery" to share your remix!

·

In short

A Light Emitting Diode (LED) turns electric current directly into light. A battery powers a red LED through a switch and a small resistor.

When current flows forward through the LED, electrons drop into empty spaces in the crystal, releasing their energy as flashes of light. If you turn the battery backward, the diode blocks the current and stays dark.

What you are looking at

This scene models the fundamental operation of a Light Emitting Diode (LED) connected in a DC circuit. A 5 V5\text{ V} battery powers a red indicator LED through a 150 Ω150\ \Omega series current-limiting resistor and an interactive knife switch.

When the switch is closed, current flows in the forward direction from anode to cathode, forward-biasing the compound semiconductor PN junction (VF≈1.8 VV_F \approx 1.8\text{ V}). The resulting forward current (IF≈21 mAI_F \approx 21\text{ mA}) causes radiative electron-hole recombination, illuminating the LED with vibrant red light. Opening the switch or reversing the diode polarity immediately turns off the emission.

How it works

Direct Bandgap Electroluminescence

Unlike standard silicon or germanium diodes (which have indirect bandgaps where recombination releases energy predominantly as lattice vibrations and heat), LEDs are fabricated from direct bandgap compound semiconductors (such as Gallium Arsenide Phosphide GaAs1−xPx\text{GaAs}_{1-x}\text{P}_x or Aluminium Gallium Indium Phosphide AlGaInP\text{AlGaInP} for red/amber, and Indium Gallium Nitride InGaN\text{InGaN} for blue/green).

Under forward bias:

  1. Electrons are injected across the depletion zone from the n-side conduction band into the p-side, while holes are injected from the valence band into the n-side.
  2. In direct bandgap crystals, an conduction electron can drop directly into a valence hole without requiring phonon momentum assistance.
  3. The transition emits a photon with energy Ephoton=hνE_{\text{photon}} = h \nu corresponding to the semiconductor bandgap EgE_g:
Ephoton=hν=hcλ≈qVFE_{\text{photon}} = h \nu = \frac{h c}{\lambda} \approx q V_F

For a red LED emitting at wavelength λ≈650 nm\lambda \approx 650\text{ nm}:

Eg=hcλ=(6.626×10−34 J⋅s)(3.0×108 m/s)(650×10−9 m)(1.602×10−19 J/eV)≈1.91 eVE_g = \frac{h c}{\lambda} = \frac{(6.626 \times 10^{-34}\text{ J}\cdot\text{s})(3.0 \times 10^8\text{ m/s})}{(650 \times 10^{-9}\text{ m})(1.602 \times 10^{-19}\text{ J/eV})} \approx 1.91\text{ eV}

This bandgap energy dictates the characteristic forward knee voltage of approximately VF≈1.8 to 2.0 VV_F \approx 1.8\text{ to }2.0\text{ V}.

Current Limiting and Kirchhoff's Voltage Law

Because the exponential Shockley diode equation yields an extremely steep I-V curve once V>VFV > V_F:

I=Is(eqVηkBT−1)I = I_s \left( e^{\frac{q V}{\eta k_B T}} - 1 \right)

Connecting an LED directly across an ideal voltage source would cause catastrophic overcurrent and thermal destruction. A series ballast resistor RR is mandatory to stabilize the operating point:

Vbat=IFR+VF  ⟹  IF=Vbat−VFRV_{\text{bat}} = I_F R + V_F \implies I_F = \frac{V_{\text{bat}} - V_F}{R}

Substituting the scene parameters:

IF=5.0 V−1.8 V150 Ω=3.2 V150 Ω≈21.3 mAI_F = \frac{5.0\text{ V} - 1.8\text{ V}}{150\ \Omega} = \frac{3.2\text{ V}}{150\ \Omega} \approx 21.3\text{ mA}

This provides optimal brightness without exceeding the standard 20 to 30 mA20\text{ to }30\text{ mA} maximum continuous forward current rating of a standard 5 mm5\text{ mm} indicator LED.

ParameterValueDescription
Power Supply VbatV_{\text{bat}}5.0 V5.0\text{ V} DCConstant DC voltage source
LED ChemistryDirect Bandgap (Red)GaAsP\text{GaAsP} / AlGaInP\text{AlGaInP}
Forward Voltage VFV_F1.8 V1.8\text{ V}Threshold for radiative recombination
Ballast Resistor RR150 Ω150\ \OmegaLimits forward current
Operating Current IFI_F≈21.3 mA\approx 21.3\text{ mA}Nominal indicator operating point
Optical OutputRed (≈650 nm\approx 650\text{ nm})Luminous intensity proportional to IFI_F

Try it

  1. Toggle the knife switch: Click on the switch in the 3D view to open and close the circuit. Observe the current drop to zero and the LED immediately extinguish.
  2. Reverse diode polarity: Click on the LED and select Reverse Orientation. Notice that the diode blocks reverse current, current drops to zero, and no light is emitted.
  3. Change brightness: Click on the 150 Ω150\ \Omega resistor and reduce its resistance to 100 Ω100\ \Omega or increase it to 470 Ω470\ \Omega. Observe how changing the current directly affects LED brightness.
  4. Change LED color: Click on the LED to change its emission color (such as green or blue). Notice how different colors require different forward bandgap voltages VFV_F.

Comments