---
title: Rectifiers, clippers and LEDs
heading: Diodes at work
eyebrow: C5 · Lesson 7 · Rectifiers, clippers and LEDs
xp: 50
---

::: hook
A diode's one-way behavior turns AC into DC. Every phone charger and computer supply starts with a rectifier: diodes that let the positive half of each cycle through, and a capacitor that holds the voltage up between peaks. The same diodes, pointed different ways, clip signals to safe levels and protect inputs from static. And if the semiconductor is chosen so that electrons falling across its gap emit visible photons (B9.10), the diode lights up.

::: play
- A half-wave rectifier: the diode passes the positive peaks into a capacitor, which feeds the load between them. The scope shows the AC input and the DC output.
- Shrink the capacitor. What happens to the ripple? Lower the load resistance (more current). Same question.
- Where does the output sit compared with the input's peak?
:::
:::

```sim circuit
V1 in 0 sine 10 V 50 Hz     @ 0,0 down
D1 in out                   @ 0,0 right
C1 out 0 100u               @ 2,0 down
RL out 0 1k                 @ 4,0 down
slider: C1 10u..1m log
slider: RL 100..10k log
scope: v(in), v(out)
time: 0..60m s
meter: v(out)
```

::: predict
## A half-wave rectifier on a 50 Hz supply feeds a 10 mA load from a 100 µF capacitor. Roughly how much does the output droop between peaks?

- [ ] 0.1 V
- [x] 2 V
- [ ] 20 V
- [ ] None: the capacitor holds it

::: reveal
About 2 V. Between peaks, 20 ms apart, the capacitor alone supplies the 10 mA, losing $\Delta V = I\Delta t/C = 0.01 \times 0.02/10^{-4} = 2$ V. That's a slight overestimate, since the capacitor is recharged during part of each cycle (the sim above droops about 1.5 V), but it's the standard design figure because it errs on the safe side. A full-wave rectifier recharges every 10 ms and halves the ripple; a bigger capacitor or a regulator (lesson 11) reduces it further.
:::
:::

::: nameit
## Diode circuits

**Half-wave rectifier.** One diode conducts on positive half cycles only. With a reservoir capacitor C and load current I:

$$V_\text{out} \approx V_p - V_D \qquad \Delta V \approx \frac{I}{fC}$$

**Full-wave bridge.** Four diodes route both halves the same way, so the capacitor is topped up twice per cycle:

$$V_\text{out} \approx V_p - 2V_D \qquad \Delta V \approx \frac{I}{2fC}$$

with two diode drops in the path. The diodes must withstand the full peak in reverse.

**Clippers.** A resistor feeding a diode to ground stops the output from going more than one diode drop above ground; a second diode the other way limits the negative side. Clamps like these protect chip inputs from overvoltage and static discharge.

**LEDs.** An LED is a diode whose band gap emits light when electrons and holes recombine: red near 1.8 to 2 V, green and blue around 3 V. Because the current rises exponentially with voltage, an LED is driven at a set *current*, normally through a series resistor:

$$R = \frac{V_s - V_F}{I_F}$$

where $V_F$ is the LED's forward voltage at the desired current $I_F$ (a few to 20 mA for indicator LEDs).
:::

```sim circuit
V1 in 0 sine 5 V 1k Hz      @ 0,0 down
R1 in out 1k                @ 0,0 right
D1 out 0                    @ 2,0 down
D2 0 out                    @ 4,2 up
scope: v(in), v(out)
time: 0..3m s
```

A clipper: two diodes facing opposite ways hold the output within about ±0.7 V, while the resistor takes the rest.

```sim circuit
V1 vcc 0 5                  @ 0,0 down
R1 vcc a 150                @ 0,0 right
D1 a 0 IS=1e-18 N=2         @ 2,0 down
slider: R1 47..2k log
scope: v(a)
time: 0..1m s
meter: v(a), i(D1)
```

A red LED (modeled with a forward drop near 1.9 V) driven from 5 V. Slide the resistor and watch the current change a lot while the LED's voltage barely moves.


::: example
## A half-wave rectifier from a 12 V peak, 60 Hz source charges 1000 µF and supplies 100 mA. Find the output peak and ripple.

::: solution
1. **Output peak.**
   $$12 - 0.7 = 11.3\ \text{V}$$
2. **Ripple.**
   $$\begin{aligned} \Delta V &= \frac{I}{fC} \\ &= \frac{0.1}{60 \times 10^{-3}} \\ &= 1.67\ \text{V} \end{aligned}$$
3. **Output range.** The output swings between about 9.6 and 11.3 V.

**Answer:** the output peaks at 11.3 V with 1.67 V of ripple, so it swings between about 9.6 V and 11.3 V.
:::
:::

::: example
## A red LED ($V_F$ = 2.0 V) runs at 15 mA from 5 V. What resistor, and how is the power shared?

::: solution
1. **Resistor.**
   $$\begin{aligned} R &= \frac{5 - 2}{0.015} \\ &= 200\ \Omega \end{aligned}$$
2. **Resistor power.**
   $$3 \times 0.015 = 45\ \text{mW}$$
3. **LED power.**
   $$2 \times 0.015 = 30\ \text{mW}$$
   Most of the power goes into setting the current.

**Answer:** use 200 Ω; the resistor dissipates 45 mW and the LED 30 mW.
:::
:::

::: example
## A 10 V peak sine drives 1 kΩ into a diode returned to a 2.6 V reference, so the output can't rise above 3.3 V. What current does the diode carry at the peak, and for how much of each cycle does it clip?

::: solution
1. **Current at the peak.** The resistor drops 10 − 3.3 = 6.7 V, so the diode and the reference carry 6.7 mA.
2. **Where clipping starts.**
   $$\begin{aligned} 10\sin\theta &= 3.3 \\ \theta &= 19.3° \end{aligned}$$
3. **Where it ends.** Clipping ends at 180° − 19.3° = 160.7°, so it lasts
   $$\begin{aligned} 160.7° - 19.3° &= 141.5° \\ \frac{141.5°}{360°} &= 39.3\% \end{aligned}$$
   The rest of the time the diode is off and the output follows the input.
4. **Where this is used.** This is how an ADC input is protected: the series resistor limits the current, and whatever holds the reference has to be able to absorb it.

**Answer:** the diode carries 6.7 mA at the peak, and it clips for 141.5° of every 360°, 39.3% of the cycle.
:::
:::

::: check
given: Vp = 10 | 12 | 17
answer: Vp - 0.7
unit: V
tolerance: 0.5%

## A half-wave rectifier (diode drop 0.7 V) is fed a sine of {Vp} V peak. Roughly what DC voltage does its capacitor charge to?

::: right
Right. The peak minus one diode drop: {answer}.
:::

::: misses
- [Vp/sqrt(2)] The capacitor charges to the peak, not the RMS value.
- [Vp - 1.4] That's a bridge, with two diodes in the path.
- [any] Not yet. $V_p - V_D$.
:::
:::

::: check
given: I = 10 | 50 | 100; f = 50 | 60; C = 100 | 470 | 1000
answer: I*1e-3/(f*C*1e-6)
unit: V
tolerance: 0.5%

## A half-wave rectifier on {f} Hz feeds {I} mA from a {C} µF capacitor. What's the ripple?

::: right
Right. $I/(fC)$ = {answer}.
:::

::: misses
- [I*1e-3/(2*f*C*1e-6)] That's for full-wave. Half-wave recharges once per cycle.
- [any] Not yet. $\Delta V = I/(fC)$.
:::
:::

::: check
given: I = 100 | 500 | 1000; f = 50 | 60; C = 1000 | 2200 | 4700
answer: I*1e-3/(2*f*C*1e-6)
unit: V
tolerance: 0.5%

## A full-wave bridge on {f} Hz supplies {I} mA from {C} µF. What's the ripple?

::: right
Right. $I/(2fC)$ = {answer}.
:::

::: misses
- [I*1e-3/(f*C*1e-6)] A full-wave rectifier recharges twice per cycle.
- [any] Not yet. $\Delta V = I/(2fC)$.
:::
:::

::: check
given: Vs = 3.3 | 5 | 12; Vf = 1.8 | 2.0; I = 5 | 10 | 20
answer: (Vs - Vf)/(I*1e-3)
unit: Ω
tolerance: 0.5%

## An LED with a forward voltage of {Vf} V is to run at {I} mA from {Vs} V. What series resistor?

::: right
Right. $(V_s - V_F)/I_F$ = {answer}.
:::

::: misses
- [Vs/(I*1e-3)] Subtract the LED's voltage first.
- [(Vs - Vf)/I] Convert mA to A.
- [any] Not yet. $R = (V_s - V_F)/I_F$.
:::
:::

::: check
kind: choice

## Why must an LED have a series resistor (or a current-controlled driver) instead of being connected straight to a voltage supply?

- [ ] To make it brighter
- [x] Its current grows exponentially with voltage, so a fixed voltage slightly too high would push a destructive current
- [ ] LEDs only work on AC
- [ ] The resistor sets the color

::: right
Right. A resistor turns the steep exponential into a predictable current.
:::

::: misses
- [1] The resistor limits the brightness.
- [3] LEDs run on DC.
- [4] The semiconductor's band gap sets the color.
:::
:::

::: check
kind: parts
given: Vp = 5 | 10 | 15; Vc = 2.5 | 3.3; R = 1 | 4.7

## A {Vp} V peak sine drives {R} kΩ into a diode clamp that holds the output at or below {Vc} V.

::: part
answer: (Vp - Vc)/R
unit: mA
tolerance: 0.5%

### What current flows in the clamp at the peak?

::: misses
- [Vp/R] The output sits at the clip level, so the resistor drops $V_p - V_c$.
- [any] $\frac{V_p - V_c}{R}$.
:::
:::

::: part
answer: (180 - 2*asin(Vc/Vp)*180/pi)/360*100
unit: %
tolerance: 0.5%

### For what percentage of each cycle does it clip?

::: misses
- [any] Clipping lasts from $\arcsin\frac{V_c}{V_p}$ to $180° - \arcsin\frac{V_c}{V_p}$.
:::
:::
:::

::: check
kind: derivation
vars: V = 3..24, F = 1.5..3.5, I = 0.001..0.05

## An LED with forward voltage F runs at current I from a supply V through a resistor.

::: step
answer: (V - F)/I

### What resistor?
:::

::: step
answer: (V - F)*I

### What does the resistor dissipate?
:::

::: step
answer: F/V

### What fraction of the supply's power reaches the LED?
:::

::: right
Right. A low supply wastes less; a constant-current driver wastes less still.
:::
:::

::: explain
## How does the reservoir capacitor turn a rectifier's pulses into nearly steady DC?

::: model
The diode only conducts near the peaks of the input, when the input rises above the capacitor's voltage, and charges the capacitor up to nearly the peak. For the rest of each cycle the diode is reverse biased and the capacitor alone supplies the load, its voltage falling slowly as it discharges. A large capacitor or a small load current makes that fall small compared with the output, so the result is DC with a small ripple, of size about the load current times the time between recharges divided by the capacitance.
:::
:::

::: practice

::: check
given: Vp = 5 | 9 | 10 | 12 | 15 | 18 | 24
answer: Vp - 1.4
unit: V
tolerance: 0.5%

## A bridge rectifier, {Vp} V peak input, 0.7 V per diode. DC output (light load)?

::: misses
- [Vp - 0.7] A bridge has two diodes in the path.
- [any] $V_p - 2V_D$.
:::
:::

::: check
given: Vs = 5 | 9; R = 150 | 330; Vf = 2
answer: (Vs - Vf)/R*1000
unit: mA
tolerance: 0.5%

## A 2 V LED with {R} Ω from {Vs} V. Current?

::: misses
- [Vs/R*1000] Subtract the LED's drop.
- [any] $(V_s - V_F)/R$.
:::
:::

::: check
given: C = 1.5 | 2 | 2.2 | 3 | 4 | 5 | 10
answer: 1/C
tolerance: 0.5%

## The reservoir capacitor is made {C} times larger. By what factor does the ripple change?

::: misses
- [C] Ripple falls as C grows.
- [any] $\Delta V \propto 1/C$.
:::
:::
:::
