Diodes and LEDs
Rectifier, Schottky, Zener and TVS diodes, bridge rectifiers, and LED types with current limiting.
How a diode works
A diode lets current flow in one direction only, from anode to cathode (the arrow in the symbol points the way current flows; the bar marks the cathode, and the physical part has a stripe at that end). In the forward direction a diode conducts once the voltage across it reaches the forward voltage Vf, about 0.6–0.7 V for silicon. In reverse it blocks, until it reaches its breakdown voltage.
- Forward voltage drop means power is lost: P = Vf × I. A silicon diode carrying 1 A dissipates about 0.7 W.
- Reverse voltage rating (VRRM) is the largest reverse voltage it will block. Choose one well above the highest voltage that can appear, including spikes.
- A diode is not a resistor. The forward voltage is nearly constant, so the current is set by the rest of the circuit. Always limit the current with a resistor or a driver.
Types of diode
| Type | Example | Forward drop | Rating (typical) | Use |
|---|---|---|---|---|
| Signal | 1N4148 | 0.6–0.7 V | 100 V, 200 mA, very fast | Logic, clamping, small flyback |
| Rectifier | 1N4001–1N4007 | 0.7–1.0 V | 50–1 000 V, 1 A, slow | Mains and low-frequency rectification, flyback |
| Schottky | 1N5819, SS14 | 0.2–0.45 V | 20–100 V, 1–3 A, very fast | Switching supplies, reverse protection, low drop |
| Fast / ultrafast | UF4007, MUR-series | 0.9–1.3 V | To 1 000 V, 50 ns recovery | High-frequency rectifiers, snubbers |
| Zener | BZX55 (2.4–75 V) | reverse regulating | 0.5 W, 1 W | Reference, simple regulator, clamping |
| TVS | SMBJ-series | reverse clamping | 5–400 V, 600 W pulses | Surge and ESD protection |
| LED | many | 1.8–3.4 V | 10–20 mA (small) | Light; see below |
| Photodiode | BPW34 | — | Reverse-biased | Light sensing, receivers |
A Schottky diode has a metal-semiconductor junction. It drops much less voltage and switches faster than a silicon diode, but leaks more in reverse and has a lower voltage rating.
Rectifiers and power supplies
Rectifying turns AC into pulsating DC. A half-wave rectifier is one diode and passes one half-cycle. A full-wave bridge uses four diodes so that every half-cycle goes the same way through the load; the current always passes through two diodes, so the loss is about 1.4 V. A filter capacitor then fills the gaps between the peaks.
VDC ≈ VRMS × 1.414 − 1.4 V ripple ΔV ≈ I ÷ (2 × f × C) (full-wave)
Worked example: a 12 V AC secondary into a bridge
- Peak voltage: 12 × 1.414 = 17.0 V. After two diode drops: 17.0 − 1.4 = 15.6 V DC at the peaks.
- For a 0.5 A load at 60 Hz, a ripple of 1 V needs C = I ÷ (2 × f × ΔV) = 0.5 ÷ (2 × 60 × 1) = 4 167 µF. With a standard 4 700 µF capacitor, the ripple is 0.5 ÷ (120 × 0.0047) = 0.89 V.
- The minimum voltage (peak minus ripple) must still stay above the regulator’s required input, or the output will dip every cycle.
- Pick diodes rated for at least 2× the peak reverse voltage and with a current rating above the average load current, and remember that the charging pulses are much larger than the average current.
The result is a rough DC supply; follow it with a regulator (see Batteries and Power Supplies). Mains-powered circuits can kill: use a ready-made, certified supply unless you are qualified.
Zener diodes and TVS
A Zener diode is designed to be used in reverse. Above its rated voltage it conducts and holds the voltage nearly constant, which makes a simple reference or a clamp. A TVS (transient voltage suppressor) is a Zener-like part built to absorb large short pulses: put one across a supply or a data line to clamp surges and static.
Rseries = (Vin − VZ) ÷ (IZ + Iload)
Worked example: a 5.1 V Zener from 12 V
- The load takes 10 mA, and the Zener needs at least 5 mA to regulate: R = (12 − 5.1) ÷ (0.005 + 0.010) = 460 Ω. The nearest standard value is 470 Ω.
- Current in the resistor: 6.9 ÷ 470 = 14.7 mA, of which 4.7 mA flows in the Zener.
- Power: resistor 0.10 W (a ¼ W part is fine), Zener 23.9 mW.
- If the load is removed, the Zener carries all 14.7 mA, so it must be rated for 5.1 × 14.7 mA = 74.9 mW.
- A Zener regulator wastes power and has a poor output resistance. It suits references and tiny loads; for anything else use a regulator IC.
LEDs
A light-emitting diode gives off light when current flows forward. The color sets the forward voltage; the brightness follows the current, not the voltage. The longer lead is the anode (+), and the flat side of the lens marks the cathode.
| Color | Forward voltage (typical) | Notes |
|---|---|---|
| Infrared | 1.2–1.6 V | Remote controls, sensors |
| Red, orange, yellow | 1.8–2.2 V | Lowest forward voltage |
| Green | 2.0–3.3 V | Varies widely with type |
| Blue, white, UV | 2.8–3.4 V | Little headroom on a 3.3 V supply |
| RGB | per color | Three LEDs in one package; common anode or common cathode |
- Maximum current for a 5 mm indicator LED is about 20 mA. For normal use, 5–10 mA is plenty bright, and it lasts longer.
- Brightness is not proportional to current. Perceived brightness is roughly logarithmic, so halving the current looks only slightly dimmer.
- Power LEDs (1 W and up) need a heat sink and a constant-current driver, not a resistor.
Choosing the LED resistor
R = (Vsupply − Vf) ÷ ILED
The table gives the calculated resistance for 10 mA, the nearest standard (E24) value, and the actual current that results.
| LED (Vf) | 3.3 V supply | 5 V supply | 12 V supply |
|---|---|---|---|
| Red (2.0 V) | 130 Ω → 130 Ω (10.0 mA) | 300 Ω → 300 Ω (10.0 mA) | 1 kΩ → 1 kΩ (10.0 mA) |
| Green (2.2 V) | 110 Ω → 110 Ω (10.0 mA) | 280 Ω → 270 Ω (10.4 mA) | 980 Ω → 1 kΩ (9.8 mA) |
| White / blue (3.2 V) | not enough headroom | 180 Ω → 180 Ω (10.0 mA) | 880 Ω → 910 Ω (9.7 mA) |
- Blue and white on 3.3 V is fragile. With Vf = 3.0 V the resistor is only 30 Ω; because Vf varies from part to part (2.8–3.2 V), the current could be anywhere from 3.3 to 16.7 mA. Use a higher supply or a constant-current driver.
- Several LEDs in series need the supply to exceed the sum of the forward voltages, with one resistor: three red LEDs on 12 V need R = (12 − 6) ÷ 0.010 = 600 Ω → 620 Ω.
- LEDs in parallel should each have their own resistor, because they do not share current evenly.
- Power in the resistor: P = (Vsupply − Vf) × I. For 12 V and a red LED at 10 mA, that is 0.1 W, so a ¼ W part is enough.
Driving LEDs well
- From a microcontroller pin: the pin supplies only 10–20 mA, so use one LED per pin through a resistor. For more, switch with a transistor (see Transistors).
- Dimming: use PWM (switch on and off fast, at least 200 Hz so it does not flicker). The color stays true, unlike lowering the current.
- LED strips and modules usually have the resistors built in and run at a fixed 5 V, 12 V or 24 V. Use a supply rated 20 % above the strip’s total current and check the wire gauge for long runs.
- Reverse polarity damages some LEDs: they tolerate only about 5 V in reverse. Mind the orientation.
- Addressable LEDs (WS2812, “NeoPixel”) contain a driver chip in each package, are chained on one data line and need a 5 V supply with decoupling and a small series resistor on the data line.
Related
- Electronics Fundamentals: the overview of this guide.
- Resistors: picking the standard value and power rating.
- Transistors: driving bigger loads.
- Inductors, Transformers and Relays: flyback diodes and transformers.
FAQ
Can I connect an LED straight to a battery?
Not safely. The LED’s current rises steeply once it turns on, so with no resistor it draws as much as the battery can give and burns out. A coin cell (CR2032) has enough internal resistance to limit the current, which is why some LED throwies work, but it is not good practice.
Why use a Schottky diode?
It drops less voltage than silicon (0.3 V against 0.7 V), so it wastes less power and leaves more voltage for the load, and it switches faster. It is the usual choice for reverse-polarity protection of low voltages and for the diode in a switching regulator.
What is the difference between a Zener and a TVS?
Both clamp voltage. A Zener is built to hold a voltage steadily and carry a modest current; a TVS is built to absorb a short, large energy pulse such as a static discharge or a motor spike. Use a TVS for protection and a Zener for reference.
Why does my LED glow faintly when it should be off?
A tiny leakage current, from a pull-up, a transistor’s off-state current or a long wire coupling mains noise, is enough to give a faint glow. Add a resistor in parallel with the LED, or a bleeder at the switch.
How do I tell which side of a diode is the cathode?
Look for the stripe on a rectifier or signal diode; on an LED, the flat side of the lens or the shorter lead is the cathode. Or use the diode-test range of a multimeter: it reads about 0.6 V with the red lead on the anode.
References
- Horowitz, P. and Hill, W., The Art of Electronics, 3rd ed., Cambridge University Press: chapter 1 (diodes) and chapter 2.
- Manufacturer datasheets for 1N4148, 1N4001–1N4007, 1N5819, BZX55 and SMBJ series (for example Vishay, onsemi, Diodes Inc.).
- LED manufacturers’ datasheets (for example Kingbright, Lite-On, Cree): forward voltage and current ratings by color.
- IEC 60063, preferred number series (E24) for resistor selection.
Last reviewed: October 2026. Values are typical: check the datasheets of the parts you use. Mains-powered rectifiers can kill: use certified supplies unless you are qualified.
