PCB Design
How to protect an input pin with a zener clamp
A zener clamp protects a chip's input with two parts: a resistor in series with the input, and a zener diode from the pin to ground, cathode on the pin. Above the zener voltage, 5.1 V here, the zener conducts and holds the pin there. Below about −0.7 V it conducts forwards and holds the pin there instead. The resistor limits the current to something the zener can survive.
Why inputs need one
Inside a board everything is 5 V and polite. A connector pin is wired to a cable, a sensor on a long lead, a motor, or a finger carrying static. Swings of ±30 V happen, and a 5 V chip's input is typically rated to only about half a volt beyond its supply rails. Past that, it's damaged.
Size the resistor
With +30 V through 1 kΩ, the zener takes (30 − 5.1) ÷ 1000 ≈ 25 mA, and turns 25 mA × 5.1 V ≈ 0.13 W into heat: easy for a half-watt zener.
Through 10 Ω it fails. A real zener has a few ohms of its own, about 5 Ω here, so roughly 1.7 A flows, the pin is pushed up to about 13.4 V, and the zener averages 12.7 W over the swing, twenty-five times its rating. It neither survives nor protects. The resistor sets the current; the zener sets the voltage.
Live experiment
Clamp a ±30 V swing
A connector swings ±30 V through R1 into a chip's pin, with a 5.1 V zener to ground. Pick R1 and see the pin's voltage and each part's heat: 10 Ω swamps the zener, which averages 12.7 W; 1 kΩ clamps to about 5.2 V and −0.75 V at 0.08 W. Then fit the zener backwards.
“Catch the spike” is lesson 3 of 6 in Solder Strait, PCB Design World 2. Free with an account. Lessons unlock in order, so you’ll do the 9 before it first.
Don't forget the resistor's heat
Most of the spike's energy lands in the resistor. With ±30 V through 1 kΩ, it sees about 25 V at the top of the swing and 29 V at the bottom: 0.62 W and 0.86 W, about 0.74 W on average, so it needs a 1 W part. Drop to 470 Ω and the resistor averages 1.6 W, even though the zener runs cool. A steady ±30 V square wave is a harsh test; real spikes are usually brief, but the sizing works the same way.
Where to put it
Right at the connector, before the signal goes anywhere else on the board, with short, wide traces from the zener to ground. A spike that has to travel across the board first can couple into neighbouring traces on the way.
Zener, TVS, or the chip's own diodes
Most chips have small clamp diodes inside every pin, but they're meant only for small currents; a series resistor of 1 to 10 kΩ keeps a small over-voltage within what they can take. For bigger ones, add the external zener. For static and surges, which rise in nanoseconds, use a TVS diode, a zener built to absorb a burst of hundreds of watts. USB and HDMI ports have arrays of them on every data line.
Free lesson
Now build it yourself
Each lesson comes in three short parts: see the idea, try it on a live board, then build it yourself, with quick checks as you go.
“Catch the spike” is lesson 3 of 6 in Solder Strait, PCB Design World 2. Free with an account. Lessons unlock in order, so you’ll do the 9 before it first.
Or start from the very first lesson, no account neededWork it out
Practice questions
Three quick questions from the lessons. Pick an answer to check it.
Show the answer
Answer: About −0.7 V: the zener conducts forwards. A zener is a diode: below −0.7 V it conducts the ordinary way and holds the pin there.
- Why not “0 V exactly”? A conducting diode always keeps its forward drop, so the pin sits a little below ground, near −0.7 V.
- Why not “−5.1 V”? 5.1 V is the zener's reverse breakdown. At −30 V it's forward biased and drops only about 0.7 V.
- Why not “−30 V”? The zener conducts forwards below about −0.7 V and holds the pin there, so the full −30 V never reaches it.
Show the answer
Answer: About 0.7 V: it's just a diode now, and the signal is clamped to nothing. Forwards it conducts at 0.7 V and the top of the swing is pinned there. Reverse-biased, cathode on the node, is where the 5.1 V comes from.
- Why not “−0.7 V”? −0.7 V is where a correctly fitted zener holds the bottom of the swing. Forwards, at +30 V, the node sits at +0.7 V.
- Why not “5.1 V”? 5.1 V comes from reverse breakdown, which needs the cathode on the node. Fitted forwards it conducts at about 0.7 V.
- Why not “30 V”? Fitted forwards, the zener conducts at +30 V and pulls the node down to its forward drop.
Show the answer
Answer: At the connector pin, before anything else. The spike should meet the clamp first and the chip never. Short traces from the pin to the zener to ground.
- Why not “Anywhere”? Placement matters: the clamp should be the first thing the spike meets, with short traces to ground.
- Why not “At the chip”? By then the spike has travelled along traces and can couple into everything nearby. Catch it where it enters.
- Why not “At the supply”? The spike arrives on the signal line at the connector, not on the supply, so a clamp there won't stop it.
“Catch the spike” is lesson 3 of 6 in Solder Strait, PCB Design World 2. Free with an account. Lessons unlock in order, so you’ll do the 9 before it first.
Questions people ask
How does a zener diode clamp work?
The zener sits from the input pin to ground, cathode on the pin. Below its zener voltage it barely conducts and the signal passes. Above it, it conducts hard and holds the pin there. Below about −0.7 V it conducts forwards like any diode and holds the pin there instead.
What value resistor should I use with a zener clamp?
Big enough to keep the zener's current, and the resistor's own heat, within their ratings at the worst voltage you expect. From ±30 V, 1 kΩ limits the zener to about 25 mA, but the resistor itself averages about 0.74 W, so it needs a 1 W part.
Should I use a zener or a TVS diode?
A TVS diode is a zener built for surges: it reacts in nanoseconds and can absorb hundreds of watts for a few microseconds. Use a TVS where static discharge or lightning-induced surges can arrive, and a zener with a series resistor for slower over-voltage.
Related topics
- How does a Zener diode work?A diode built to conduct backwards at a set voltage, then hold it: the simplest regulator.
- How does a diode work?A one-way valve for current: anode, cathode, the 0.7 V forward drop and Schottky diodes.
- Reverse polarity protection explainedStop a backwards battery wrecking a circuit: the simple diode, and the MOSFET trick that costs almost nothing.
- Electrical power explained: P = V × IP = V × I: how fast energy turns into heat, and why a resistor has a power rating.