---
title: Protection circuits
heading: Clamps, TVS diodes, reverse-polarity protection and inductive kicks
eyebrow: C5 · Lesson 12 · Protection circuits
xp: 40
---

::: hook
A circuit's connectors are where it meets the world, and the world isn't kind: a finger carries a few thousand volts of static, a battery goes in backwards, a cable shorts a signal to the 24 V supply, a relay coil kicks back when it's switched off. A few diodes and a MOSFET, chosen with a little arithmetic, survive almost all of it. This lesson is that arithmetic.

::: play
- A signal reaches a 3.3 V converter's input through a series resistor. Two diodes clamp the input: one to the 3.3 V rail, one to ground.
- Raise the signal's amplitude well past the rails. Where does the input stop, and which diode conducts on each half-cycle?
- Shrink the series resistor and watch the diode currents. The resistor is what makes the clamp safe.
:::
:::

```sim circuit
VS in 0 sine 10 V 50 Hz      @ 0,0 down 3
RS in a 1k                   @ 0,0 right 3
D1 a vdd                     @ 3,0 up 2
D2 0 a                       @ 3,3 up 3
VDD vdd 0 3.3                @ 6,-2 down 5
slider: VS.amp 1..24
slider: RS 100..100k log
scope: v(in), v(a)
time: 0..40m s
meter: i(D1), i(D2)
```

::: predict
## A 3.3 V microcontroller pin has clamp diodes to its supply (0.6 V drop). A 12 V signal reaches it through 10 kΩ. What happens?

- [ ] Nothing: the pin blocks the current
- [x] About 0.8 mA flows through the upper clamp into the 3.3 V supply
- [ ] The pin rises to 12 V
- [ ] 1.2 mA flows to ground

::: reveal
The upper clamp conducts once the pin is 0.6 V above the 3.3 V rail, so the pin sits near 3.9 V and the resistor carries $\frac{12 - 3.9}{10\text{ k}\Omega}$ = 0.81 mA into the supply. That's within most parts' injection rating, so the pin survives. Without the 10 kΩ, the current would be limited only by the source, and the clamp would burn out.
:::
:::

::: nameit
## Rail clamps

Almost every chip input has a diode to each rail. With a series resistor $R_S$, a signal beyond the rails is clamped one diode drop outside them, and the current is

$$I = \frac{V_\text{in} - V_{DD} - V_F}{R_S},$$

so for a worst-case fault $V_\text{fault}$ and a rated injection current $I_\text{max}$ (a few mA),

$$R_S \ge \frac{V_\text{fault} - V_{DD} - V_F}{I_\text{max}}.$$

The injected current flows into the supply rail. If the rest of the board draws less than that (a sleeping microcontroller), the clamp **pumps the rail up**; a Zener or TVS across the rail, or external Schottky clamps, catches it. $R_S$ also forms a low-pass with the input's capacitance, so it can't be made arbitrarily large on a fast signal.

## TVS diodes

A **transient voltage suppressor** is an avalanche diode built to absorb large pulses. It's chosen by three voltages: the **standoff** $V_{WM}$, above the line's normal maximum, where it leaks only microamps; the **breakdown** $V_{BR}$; and the **clamping voltage** at a pulse current $I_{PP}$,

$$V_C \approx V_{BR} + I_{PP}R_d,$$

with $R_d$ its dynamic resistance. The peak power is $V_CI_{PP}$, often hundreds of watts for tens of microseconds. Everything downstream has to survive $V_C$, not $V_{BR}$. On fast data lines the TVS's capacitance matters too, so low-capacitance arrays are used.

## Electrostatic discharge

The **human body model** for chip-level testing is 100 pF charged to the test voltage and discharged through 1.5 kΩ: a 2 kV zap peaks at $\frac{2000}{1500}$ = 1.33 A with a 150 ns time constant and carries $\frac12CV^2$ = 0.2 mJ. System-level tests use 150 pF through 330 Ω, which is far harsher: 8 kV peaks near 24 A. On-chip protection handles the first; connectors need external clamps for the second.

## Reverse polarity

| Protection | Loss at current I |
| --- | --- |
| Series silicon diode | $V_FI$, about 0.7 to 1 V of drop |
| Series Schottky | $V_FI$, about 0.3 to 0.5 V |
| P-channel MOSFET in the positive line | $I^2R_{on}$ |

The MOSFET sits with its drain toward the battery and its gate to ground. Connected correctly, its body diode conducts first, the gate then sees nearly the full supply and turns the channel fully on; reversed, the gate turns it off and the body diode blocks. A fuse with a diode across the supply is the crude alternative: a reversed battery blows the fuse.

## Inductive kicks

Switching off an inductor's current I makes it raise whatever voltage keeps the current flowing. A clamp of voltage $V_c$ across the coil (a diode, or a diode and a Zener) lets the current decay as $L\frac{di}{dt} = -(V_c + iR)$, so it reaches zero after

$$t = \frac{L}{R}\ln\left(1 + \frac{IR}{V_c}\right).$$

A bare diode ($V_c \approx$ 0.7 V) is safe but slow: a relay releases late. A Zener in series speeds the release, at the price of the switch seeing $V_{CC} + V_c$.
:::

::: example
## A 3.3 V converter input has rail clamps rated for 5 mA. A wiring fault can connect it to 24 V. What series resistor protects it, and what does the resistor dissipate during the fault?

::: solution
1. **Smallest resistor.**
   $$\begin{aligned} R_S &\ge \frac{24 - 3.3 - 0.7}{5\ \text{mA}} \\ &= 4.0\ \text{k}\Omega \end{aligned}$$
   Use 4.7 kΩ.
2. **Dissipation during the fault.** It drops about 20 V, so
   $$\begin{aligned} P &= \frac{20^2}{4700} \\ &= 85\ \text{mW} \end{aligned}$$
   fine for a ¼ W part indefinitely.
3. **Where the current goes.** The 4.3 mA it passes goes into the 3.3 V rail, so check that something on the rail draws at least that much, or add a clamp across the rail.

**Answer:** a 4.7 kΩ resistor (4.0 kΩ at least) protects it, and it dissipates about 85 mW during the fault.
:::
:::

::: example
## A 12 V, 3 A load needs reverse-polarity protection. Compare a silicon diode ($V_F$ = 0.9 V at 3 A), a Schottky (0.45 V) and a P-channel MOSFET with $R_{on}$ = 10 mΩ.

::: solution
1. **Silicon diode.**
   $$0.9 \times 3 = 2.7\ \text{W}$$
   and it drops 0.9 V from the supply.
2. **Schottky.**
   $$0.45 \times 3 = 1.35\ \text{W}$$
3. **MOSFET.**
   $$3^2 \times 0.01 = 0.09\ \text{W}$$
   and it drops 30 mV.
4. **Compare.** The diode needs a heat sink and costs the load almost a volt; the MOSFET needs neither. That's why battery-powered products with any real current use the MOSFET, even though it costs a part more than a diode.

**Answer:** the silicon diode loses 2.7 W and drops 0.9 V, the Schottky loses 1.35 W, and the MOSFET loses only 0.09 W and drops 30 mV.
:::
:::

::: example
## A 24 V industrial input is protected by a TVS with a 26 V standoff, a 28.9 V breakdown and 1 Ω of dynamic resistance. A surge drives 10 A through it for 20 µs. What voltage does the circuit behind it see, and how much energy does the TVS absorb?

::: solution
1. **Clamping voltage.**
   $$\begin{aligned} V_C &= 28.9 + 10 \times 1.0 \\ &= 38.9\ \text{V} \end{aligned}$$
2. **Energy.** The peak power is 389 W, so the energy is about
   $$389\ \text{W} \times 20\ \mu\text{s} = 7.8\ \text{mJ}$$
3. **Normal operation.** The standoff of 26 V keeps it quiet at the normal 24 V.
4. **What the circuit behind it needs.** Everything behind it must take 39 V: a regulator rated for 40 V input survives, one rated for 35 V doesn't, even though both are "24 V parts".

**Answer:** the circuit behind it sees 38.9 V, and the TVS absorbs about 7.8 mJ.
:::
:::

::: check
given: Vf = 12 | 24 | 48; VDD = 3.3 | 5; I = 1 | 5 | 10
answer: (Vf - VDD - 0.7)/I
unit: kΩ
tolerance: 1%

## An input with rail clamps rated for {I} mA runs from {VDD} V and may be shorted to {Vf} V. What's the smallest series resistor that protects it?

::: right
Right. $R_S \ge \frac{V_\text{fault} - V_{DD} - V_F}{I_\text{max}}$ = {answer}.
:::

::: misses
- [(Vf - VDD)/I] The clamp diode drops about 0.7 V too.
- [Vf/I] The pin is held near the rail, not at ground.
- [any] $R_S \ge \frac{V_\text{fault} - V_{DD} - V_F}{I_\text{max}}$.
:::
:::

::: check
kind: choice

## Which protection fits which threat? A long cable to a 24 V sensor input that may see surges from nearby motors.

- [ ] A series Schottky diode
- [x] A TVS diode with a standoff above 24 V
- [ ] A flyback diode
- [ ] A P-channel MOSFET in the supply line

::: right
Right. Surges are short, high-current pulses; a TVS is built to absorb them and clamp the voltage.
:::

::: misses
- [1] A series diode only stops reverse voltage; a positive surge goes straight through.
- [3] A flyback diode clamps an inductor in your own circuit, not a surge arriving on a cable.
- [4] The MOSFET protects against a reversed supply, not a surge.
:::
:::

::: check
kind: parts
given: VBR = 6.8 | 15 | 33; Rd = 0.2 | 0.5 | 1.5; I = 5 | 20

## A TVS with $V_{BR}$ = {VBR} V and $R_d$ = {Rd} Ω takes a {I} A pulse.

::: part
answer: VBR + I*Rd
unit: V
tolerance: 0.5%

### What voltage does it clamp to?

::: misses
- [VBR] The pulse current raises the voltage above breakdown.
- [any] $V_C = V_{BR} + I_{PP}R_d$.
:::
:::

::: part
answer: (VBR + I*Rd)*I
unit: W
tolerance: 0.5%

### What's its peak power?

::: misses
- [VBR*I] Use the clamping voltage.
- [any] $V_CI_{PP}$.
:::
:::
:::

::: check
kind: parts
given: V = 2 | 4 | 8

## A human-body-model zap of {V} kV: 100 pF discharged through 1.5 kΩ.

::: part
answer: V*1000/1500
unit: A
tolerance: 0.5%

### What's the peak current?

::: misses
- [any] $\frac{V}{1.5\text{ k}\Omega}$.
:::
:::

::: part
answer: 0.5*100e-12*(V*1000)^2*1000
unit: mJ
tolerance: 0.5%

### What energy does it carry?

::: misses
- [100e-12*(V*1000)^2*1000] Half of $CV^2$.
- [any] $\frac12CV^2$.
:::
:::
:::

::: check
kind: parts
given: I = 2 | 3 | 5; Vf = 0.6 | 0.9; R = 5 | 20 | 50

## A load draws {I} A through reverse-polarity protection.

::: part
answer: Vf*I
unit: W
tolerance: 0.5%

### What does a diode with $V_F$ = {Vf} V dissipate?

::: misses
- [any] $V_FI$.
:::
:::

::: part
answer: I^2*R/1000
unit: W
tolerance: 0.5%

### What does a MOSFET with $R_{on}$ = {R} mΩ dissipate?

::: misses
- [I*R/1000] For the MOSFET it's $I^2R_{on}$.
- [any] $I^2R_{on}$.
:::
:::
:::

::: check
given: L = 50 | 100 | 200; I = 0.1 | 0.2; R = 40 | 120; Vc = 0.7 | 12.7 | 24.7
answer: L/R*ln(1 + I*R/Vc)
unit: ms
tolerance: 1%

## A {L} mH relay coil with {R} Ω of resistance carries {I} A and is clamped at {Vc} V when switched off. How long until its current reaches zero?

::: right
Right. $t = \frac LR\ln\left(1 + \frac{IR}{V_c}\right)$ = {answer}.
:::

::: misses
- [L*I/Vc] That ignores the coil's own resistance, which helps the current fall.
- [L/R] The time constant alone doesn't account for the clamp.
- [any] $L\frac{di}{dt} = -(V_c + iR)$ gives $t = \frac LR\ln\left(1 + \frac{IR}{V_c}\right)$.
:::
:::

::: check
kind: derivation
vars: V = 5..100, D = 1..15, F = 0.2..1, I = 0.0001..0.02, L = 0.0001..0.05

## An input with rail clamps (diode drop F) runs from supply D. A fault can reach V, the clamps take at most I, and the rest of the board draws L from the rail.

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

### What's the smallest series resistor?
:::

::: step
answer: (V - D - F)^2/((V - D - F)/I)

### What does that resistor dissipate during the fault?
:::

::: step
answer: I - L

### With the fault on, how much current is left over to pump the rail up (negative means none)?
:::

::: right
Right. The clamp current has to go somewhere, and if the load doesn't take it, the rail rises.
:::
:::

::: explain
## Why does an input protected by clamp diodes still need a series resistor?

::: model
The clamp diodes hold the input within a diode drop of the rails, but they don't limit the current: once a diode conducts, the only thing between the fault and the diode is whatever resistance is in the path. Without a series resistor, a stiff source could push amps through a diode built for milliamps and destroy it. The resistor sets the current to the fault voltage minus the clamped voltage, divided by its resistance, which can be chosen to stay within the diode's rating. It also has to be chosen small enough not to slow the signal with the input's capacitance, and the injected current still has to be absorbed by the supply rail.
:::
:::

::: practice

::: check
given: Vf = 15 | 30; VDD = 3.3 | 5; R = 2.2 | 10
answer: (Vf - VDD - 0.7)/R
unit: mA
tolerance: 1%

## {Vf} V fault, {VDD} V rail, {R} kΩ series resistor. Clamp current?

::: misses
- [any] $\frac{V_\text{fault} - V_{DD} - V_F}{R_S}$.
:::
:::

::: check
given: VBR = 10 | 24; Rd = 0.3 | 1; I = 8 | 30
answer: VBR + I*Rd
unit: V
tolerance: 0.5%

## TVS: $V_{BR}$ = {VBR} V, $R_d$ = {Rd} Ω, {I} A pulse. Clamping voltage?

::: misses
- [any] $V_{BR} + I_{PP}R_d$.
:::
:::

::: check
given: I = 2 | 6; R = 4 | 30
answer: I^2*R/1000
unit: W
tolerance: 0.5%

## A MOSFET with $R_{on}$ = {R} mΩ carries {I} A. Loss?

::: misses
- [any] $I^2R_{on}$.
:::
:::
:::
