LED (light-emitting diode)
Diode / Optoelectronic
A diode that emits light when forward current flows. Polarised - only works one way. Needs a current-limiting resistor.
Schematic symbol
LED
How led (light-emitting diode) appears in a circuit diagram.
Types & variants
Key specs
Forward voltage (Vf)
VVoltage drop when lit (~1.8-2.2V red, ~3-3.4V blue/white).
Forward current (If)
mAOperating current, typically 10-20mA for indicators.
Wavelength / colour
nmDetermines the colour of light.
Viewing angle
degreesHow wide the light spreads.
Laws that govern it
An LED is a diode: current rises exponentially with voltage, so you can never set brightness with volts — a few tenths too many and it dies.
- Ohm's lawV = I × R
The series resistor does the real work: R = (Vsupply − Vf) / I is the single most-used calculation on this whole site.
- Watt's lawP = V × I = I²R = V²/R
P = Vf × I is what the package must shed; it is why a 1 W LED needs a metal-core board and a 20 mA indicator does not.
- Inverse square law of illuminationE = I / d²
Illuminance from the LED falls as 1/d², which is why a bright indicator is blinding at 10 cm and invisible across a lit room.
Each law is stated in full — with its diagram, variables and worked meaning — on the electrical laws page.
Markings
Longer leg = anode (+), flat side / shorter leg = cathode (-).
Standard values
Resistor for 5V supply, red LED, 10mA: R = (5 - 2) / 0.01 = 300Ω (use 330Ω).
How to choose
Pick colour/brightness, then size the resistor with the LED-resistor calculator: R = (Vsupply - Vf) / If.
Pinout & package
5 mm through-hole
Check first: Longer leg is the anode (+). The flat on the rim and the shorter leg mark the cathode (−).
2 leads (anode +, cathode -). Polarised.
Example circuits
- LED + series resistor on a GPIO pin
- Status indicator
- IR remote emitter
Common failures
Burns out if run without a resistor (overcurrent); dims with age; wrong polarity = no light.
How to test
Multimeter diode mode across leads (red probe to anode) - should glow faintly. Reverse = nothing.
Substitutes
Any LED of same colour/package; recheck the series resistor for the new Vf.