---
title: Clamps, peak detectors and voltage multipliers
heading: Diodes and capacitors that shift, hold and stack voltages
eyebrow: C5 · Lesson 9 · Clamps, peak detectors and multipliers
xp: 40
---

::: hook
A diode and a capacitor can do more than smooth a supply. Put the capacitor in series and the diode across the output, and a sine that swings ±10 V comes out swinging from 0 to 20 V: the capacitor has charged to the peak and now adds it to everything. Follow that with a peak detector and you have 20 V of DC from a 10 V source, with no transformer. Stack more stages and you get the thousands of volts in a photocopier, a bug zapper or a particle accelerator's first stage.
:::

::: play
- A 10 V peak, 1 kHz source drives a **clamp** ($C_1$ and $D_1$): the middle trace is the sine shifted up so its bottom sits near −0.7 V.
- $D_2$ and $C_2$ form a **peak detector** on that shifted wave: the output climbs over a few cycles to nearly 20 V.
- Lower RL to draw current: the output sags and ripples, because the capacitors only top up once per cycle.
:::
:::

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

::: predict
## In the clamp, the diode's anode is at ground and its cathode at the output. Where does a 10 V peak sine's lowest point end up?

- [ ] At −10 V, unchanged
- [ ] At −20 V
- [x] At about −0.7 V
- [ ] At +10 V

::: reveal
At about −0.7 V. On the first negative peak the diode conducts and charges $C_1$ to about 9.3 V, positive on the output side. With nowhere to discharge, the capacitor keeps that voltage and adds it to the input from then on, so the output swings from −0.7 V to 19.3 V.
:::
:::

::: nameit
## Peak detector

A diode feeding a capacitor charges it to the input's peak less a drop, $V_p - V_D$, and holds it. With a resistor R across the capacitor it droops between peaks; for $RC \gg T$ the droop each cycle is about

$$\Delta V \approx \frac{V_pT}{RC}$$

the same reasoning as a rectifier's ripple (lesson 7).

**Envelope detector.** On an AM signal (carrier $f_c$, modulation $f_m$), a peak detector follows the envelope if its RC is long compared with a carrier cycle and short enough to follow the envelope down. For modulation depth $m$, the capacitor keeps up as long as

$$RC \le \frac{\sqrt{1 - m^2}}{m\,\omega_m}$$

## Clamp (DC restorer)

A series capacitor and a diode across the output. The capacitor charges to the peak on the half cycle when the diode conducts, then shifts the whole waveform: with the diode's anode at ground,

$$v_\text{out} = v_\text{in} + (V_p - V_D)$$

so the output's lowest point sits at $-V_D$. Reverse the diode and the top is clamped instead. Old TV receivers used clamps to put the black level of a video signal back at a fixed voltage.

## Multipliers

A clamp followed by a peak detector is a **voltage doubler**: the output charges to about $2V_p - 2V_D$. Each further clamp-and-detector stage adds about $2(V_p - V_D)$, so an **N-stage Cockcroft-Walton** multiplier reaches

$$V_\text{out} \approx 2N(V_p - V_D)$$

with no load. Under load every capacitor droops, and the losses add up stage by stage, so the output sags quickly as N grows: multipliers suit high voltage at small current.
:::

::: example
## A 10 V peak source drives the doubler. What does it reach with no load, and what does a 3-stage multiplier reach?

::: solution
1. **Doubler.**
   $$2 \times 10 - 2 \times 0.7 = 18.6\ \text{V}$$
2. **Three stages.**
   $$2 \times 3 \times (10 - 0.7) = 55.8\ \text{V}$$

**Answer:** the doubler reaches 18.6 V with no load, and a 3-stage multiplier reaches 55.8 V.
:::
:::

::: example
## An AM signal with $m$ = 0.5 carries audio up to 5 kHz. What is the longest RC its envelope detector can use, and is 10 kΩ with 2.2 nF suitable?

::: solution
1. **Longest RC.**
   $$\begin{aligned} RC &\le \frac{\sqrt{1 - 0.25}}{0.5 \times 2\pi \times 5000} \\ &= 55\ \mu\text{s} \end{aligned}$$
2. **The proposed RC.**
   $$10\ \text{k}\Omega \times 2.2\ \text{nF} = 22\ \mu\text{s}$$
3. **Check it.** 22 µs follows the envelope and is still 22 carrier cycles long at 1 MHz.

**Answer:** the RC can be at most 55 µs, and 10 kΩ with 2.2 nF (22 µs) is suitable.
:::
:::

::: example
## A ±5 V, 1 kHz square wave passes a 1 µF clamp into a 100 kΩ load. What range does the output cover, and how much does its top sag?

::: solution
1. **Output range.** The clamp adds $V_p - V_D$ = 4.3 V, so the output runs from −0.7 V to 9.3 V.
2. **Load current.** For the 0.5 ms the output sits high, the load draws about 93 µA from the capacitor.
3. **Sag.** The capacitor loses
   $$\begin{aligned} \Delta V &\approx \frac{9.3 \times 0.5\ \text{ms}}{100\ \text{k}\Omega \times 1\ \mu\text{F}} \\ &= 47\ \text{mV} \end{aligned}$$
   0.5% of the step; the diode tops it back up in each low half.
4. **Choosing the RC.** An RC a hundred times the half-period keeps the tilt this small; make it comparable and the clamped wave droops visibly.

**Answer:** the output covers −0.7 V to 9.3 V, and its top sags by about 47 mV, 0.5% of the step.
:::
:::

::: check
given: Vp = 3 | 10 | 24
answer: 2*Vp - 0.7
unit: V
tolerance: 0.5%

## A clamp with its diode's anode at ground shifts a {Vp} V peak sine. What is the output's highest point?

::: right
Right. Shifted up by $V_p - V_D$: {answer}.
:::

::: misses
- [2*Vp] The clamp holds the bottom at $-V_D$, not at zero.
- [any] Not yet. $v_\text{out} = v_\text{in} + V_p - V_D$.
:::
:::

::: check
given: Vp = 5 | 12 | 24
answer: 2*Vp - 1.4
unit: V
tolerance: 0.5%

## A voltage doubler runs from a {Vp} V peak source. What is its output with no load?

::: right
Right. $2V_p - 2V_D$ = {answer}.
:::

::: misses
- [2*Vp - 0.7] Two diodes each take a drop.
- [any] Not yet. Clamp, then peak detect: two drops.
:::
:::

::: check
given: N = 2 | 3 | 5; Vp = 10 | 100
answer: 2*N*(Vp - 0.7)
unit: V
tolerance: 0.5%

## A {N}-stage Cockcroft-Walton multiplier runs from a {Vp} V peak source. What does it reach with no load?

::: right
Right. $2N(V_p - V_D)$ = {answer}.
:::

::: misses
- [N*(Vp - 0.7)] Each stage adds twice the peak: a clamp and a peak detector.
- [any] Not yet. $2N(V_p - V_D)$.
:::
:::

::: check
given: Vp = 5 | 10; f = 100 | 1000; R = 100 | 470; C = 1 | 10
answer: Vp/(f*R*1000*C*1e-6)
unit: V
tolerance: 0.5%

## A peak detector holds {Vp} V on {C} µF with {R} kΩ across it, from a {f} Hz input. How far does it droop each cycle?

::: right
Right. $V_pT/RC$ = {answer}.
:::

::: misses
- [Vp/(2*f*R*1000*C*1e-6)] It's refilled once per cycle, not twice.
- [any] Not yet. $\Delta V \approx V_pT/(RC)$.
:::
:::

::: check
given: m = 0.3 | 0.5 | 0.8; fm = 1 | 5
answer: sqrt(1 - m^2)/(m*2*pi*fm*1000)*1e6
unit: µs
tolerance: 0.5%

## An envelope detector must follow AM with modulation depth {m} and audio up to {fm} kHz. What is the longest RC it can use?

::: right
Right. $\frac{\sqrt{1 - m^2}}{m\omega_m}$ = {answer}.
:::

::: misses
- [sqrt(1 - m^2)/(m*fm*1000)*1e6] Use $\omega_m = 2\pi f_m$.
- [any] Not yet. $RC \le \sqrt{1 - m^2}/(m\omega_m)$.
:::
:::

::: check
given: m = 0.4 | 0.7; fm = 3 | 10; R = 4.7 | 22
answer: sqrt(1 - m^2)/(m*2*pi*fm*1000*R*1000)*1e9
unit: nF
tolerance: 0.5%

## For the same kind of detector (depth {m}, audio to {fm} kHz) with R = {R} kΩ, what is the largest capacitor?

::: right
Right. {answer}.
:::

::: misses
- [any] Not yet. Divide the longest RC by R.
:::
:::

::: check
kind: choice

## Which circuit turns a ±10 V sine into a waveform swinging from about 0 to 20 V?

- [ ] A peak detector
- [x] A clamp
- [ ] A clipper
- [ ] A bridge rectifier

::: misses
- [1] A peak detector gives a steady DC level near the peak.
- [3] A clipper cuts off part of the waveform; it doesn't shift it.
- [4] A rectifier folds the negative halves up.
:::
:::

::: check
kind: parts
given: Vp = 3 | 5 | 10; f = 0.5 | 1 | 5; R = 10 | 100; C = 1 | 10

## A ±{Vp} V square wave at {f} kHz passes a {C} µF clamp into a {R} kΩ load.

::: part
answer: 2*Vp - 0.7
unit: V
tolerance: 0.5%

### What's the top of the output?

::: misses
- [Vp - 0.7] The clamp adds $V_p - V_D$ to the input's top, $V_p$.
- [any] $2V_p - V_D$.
:::
:::

::: part
answer: (2*Vp - 0.7)*0.5/f/(R*C)
unit: mV
tolerance: 1%

### How much does the top sag?

::: misses
- [any] $\Delta V \approx \frac{V\,T/2}{RC}$.
:::
:::
:::

::: check
kind: derivation
vars: V = 1..100, R = 1000..1000000, C = 0.000000001..0.0001, f = 50..100000, x = 0.001..0.1, m = 0.1..0.9, w = 100..100000

## A peak detector holds a peak V on a capacitor C discharged by a load R, recharged once per cycle at frequency f.

::: step
answer: V/(f*R*C)

### How much does it droop between peaks?
:::

::: step
answer: 1/(f*x)

### What RC keeps the droop to a fraction x of the peak?
:::

::: step
answer: sqrt(1 - m^2)/(m*w)

### What's the longest RC that still follows an envelope modulated to depth m at angular frequency w?
:::

::: right
Right. The RC must be long against the carrier and short against the envelope.
:::
:::

::: explain
## How does a clamp shift a waveform without any DC supply?

::: model
On the first half cycle that forward biases the diode, current flows through the series capacitor and charges it to nearly the input's peak. When the input swings back, the diode turns off and the capacitor has no path to discharge, so it holds that voltage like a small battery in series with the input. From then on the output is the input plus the capacitor's voltage, so the whole waveform is shifted by about its own peak. The diode only conducts briefly at each extreme, topping the capacitor up.
:::
:::

::: practice

::: check
given: Vp = 3.3 | 5 | 10 | 12 | 15 | 20
answer: Vp - 0.7
unit: V
tolerance: 0.5%

## A peak detector with no load sees a {Vp} V peak. What does it hold?

::: misses
- [any] The peak less one drop.
:::
:::

::: check
given: Vp = 2 | 4 | 5 | 9 | 10 | 12
answer: -0.7
unit: V
tolerance: 1%

## A clamp with its anode at ground shifts a {Vp} V peak sine. Where is the output's lowest point?

::: misses
- [any] One diode drop below ground.
:::
:::

::: check
given: Vo = 1000 | 5000; Vp = 120 | 340
answer: ceil(Vo/(2*(Vp - 0.7)))
tolerance: 0.1%

## How many Cockcroft-Walton stages give at least {Vo} V with no load from a {Vp} V peak?

::: misses
- [any] Each stage adds $2(V_p - V_D)$.
:::
:::
:::
