Electronics / Theory / Diodes & LEDs
Theory 03

Diodes & LEDs One-way valves. They rectify AC, protect against reversed supplies, absorb the spike from a motor coil, and — as LEDs — provide the first circuit almost everyone builds and the first component almost everyone destroys.

needs ResistorsLED calculator
Tier 0 · Groundwhat it does

The one-way valve

Module 0.1

Forward voltage and direction

Why a diode is not a resistor
anode ──▶|── cathode current flows this way only │ the BAR marks the cathode, on the symbol and as a printed stripe on the real part

A diode conducts in one direction and blocks the other. While conducting it drops a roughly fixed forward voltage — about 0.7V for standard silicon, 0.3V for Schottky, and 1.8V to 3.4V for LEDs depending on colour.

The critical difference from a resistor: beyond that forward voltage, a tiny increase in voltage produces a huge increase in current. The relationship is exponential, not linear. A diode therefore cannot limit its own current — something else in the circuit must do it.

TypeVfUsed for
1N4148 (signal)0.7VSmall-signal switching, logic protection
1N4001–4007 (rectifier)0.7VMains-adapter rectification, flyback, polarity protection
Schottky (1N5817)0.3VLow-loss protection, higher speed, power paths
Zenerreverse, fixedDeliberately conducts backwards at a set voltage — simple regulation and clamping
LED1.8–3.4VLight, and useful as a rough voltage reference
Module 0.2

The three protective jobs

Where a 3p component saves a £30 one
  • Rectification — converting AC to pulsing DC. A single diode gives half-wave; four in a bridge give full-wave. A capacitor after it smooths the result. This is what is inside every plug-top adapter.
  • Reverse-polarity protection — a diode in series with the supply means connecting the battery backwards does nothing instead of destroying the board. Costs you 0.7V (or 0.3V with a Schottky); a P-channel MOSFET does the same job with almost no drop.
  • Flyback / freewheeling — across any coil: relay, motor, solenoid. Covered below, and the most commonly skipped component in beginner projects.
Flyback, properly explained. An inductor resists changes in current. Switch a relay coil off and the collapsing magnetic field generates a reverse voltage spike — easily tens or hundreds of volts — that will punch through the transistor driving it. A diode connected across the coil, cathode to the positive side, gives that energy a harmless loop to circulate in. It does nothing at all in normal operation, which is why people forget it, and then their transistor dies after a few dozen switching cycles.
Tier 2 · Choosethe calculation

LEDs and their resistor

Module 2.1

Sizing the series resistor

The first calculation, and the reason LEDs die
+5V ──[ R ]──▶|── GND LED long leg = anode (+) short leg / flat side = cathode (−)
R = (V_supply − V_forward) / I_desired

// red LED (Vf ≈ 1.8V) at 10mA from 5V
R = (5 − 1.8) / 0.010 = 320Ω  -> use 330Ω (nearest E12 above)
P = I²R = 0.010² × 330 = 0.033W  -> ¼W part is fine

Always round up to the next standard value: slightly less current means a marginally dimmer LED, whereas rounding down pushes past the rating. And note what the formula is really saying — the resistor's job is to absorb the leftover voltage, which is why a blue LED on 3.3V behaves oddly: there is barely any left over for the resistor to work with.

LED resistor calculator

Practical notes

  • Brightness is not linear with current. A modern LED at 5mA is usually plenty for an indicator; 20mA is often uncomfortably bright and wastes battery.
  • Several LEDs: give each its own resistor. In parallel behind one shared resistor, small differences in Vf mean one hogs the current and the others stay dim.
  • In series they share the same current, which is efficient — but the supply must exceed the sum of all the forward voltages.
Drill 1

You connect a white LED (Vf 3.2V) directly across 5V with no resistor. What happens?

Nothing limits the current. Past the forward voltage the current-voltage curve is exponential, and the LED's resistance actually falls as it heats — so the process runs away. The series resistor is the component doing the limiting, which is why the formula involves the supply and the target current, not the LED itself. A bench supply with a current limit would save it; a USB port or battery will not.
Tier 4 · Faildiagnosis

Diagnosing diodes

Module 4.1

Testing and failure modes

Two probe touches settle it

A multimeter's diode test mode answers this in seconds: forward-biased it should read the forward voltage (roughly 0.5–0.8V for silicon, 1.5V+ for an LED, which may also glow faintly); reversed it should read open. Anything else is a verdict:

ReadingMeans
~0V both directionsShorted — failed, usually from over-current or reverse breakdown
Open both directionsBlown open, or you are probing the wrong pins
Correct one way onlyHealthy — and the polarity is now confirmed regardless of stripe wear

An LED fitted backwards simply does not light; below its reverse breakdown it is undamaged, so reverse it and try again. That makes an LED a handy first test load — but note it will not survive a large reverse voltage, which is why LEDs on AC or reversible supplies get a protective diode in parallel, facing the other way.

Referencesearchable

Glossary