Breaking
June 19, 2025

Hacker Tactic: ESD Diodes Arya Voronova | usagoldmines.com

A hacker’s view on ESD protection can tell you a lot about them. I’ve seen a good few categories of hackers neglecting ESD protection – there’s the yet-inexperienced ones, ones with a devil-may-care attitude, or simply those of us lucky to live in a reasonably humid climate. But until we’re able to control the global weather, your best bet is to befriend some ESD diodes before you get stuck having to replace a microcontroller board firmly soldered into your PCB with help of 40 through-hole pin headers.

Humans are pretty good at generating electric shocks, and oftentimes, you’ll shock your hardware without even feeling the shock yourself. Your GPIOs will feel it, though, and it can propagate beyond just the input/output pins inside your chip. ESD events can be a cause of “weird malfunctions”, sudden hardware latchups, chips dying out of nowhere mid-work – nothing to wish for.

Worry not, though. Want to build hardware that survives? Take a look at ESD diodes, where and how to add them, where to avoid them, and the parameters you want to keep in mind. Oh and, I’ll also talk about all the fancy ways you can mis-use ESD diodes, for good and bad alike!

How It’s Made

The simplest ESD diode is just two diodes in series, with the protected signal connected at midpoint. The wiring is easy to remember – wire the diodes in a way that they don’t conduct from 3.3 V to GND, so, in reverse, same way you’d wire up a diode to shunt a relay coil. It’s only meant to conduct in unprecedented circumstances, not normally.

Say, you use a diode with 0.7 V forward voltage drop. Then, such a configuration will shunt voltages above – into your power rails and ground, both low-impedance with plenty of capacitance and inductance, enough to dissipate the shock energy. Lower than GND – 0.7 V, and higher than VCC + 0.7 V – ever seen that mentioned in datasheets, by the way?

The overwhelming majority of ICs come with ESD diodes built-in. CMOS logic, overwhelmingly prevalent these days, basically requires them – FETs are overwhelmingly sensitive to ESD events, especially their gates. Don’t believe me? Here’s a highly persuasive video we’ve covered, that shows a FET easily dying from an ESD event!

So, is your job done here? Can you just rely on IC-internal ESD diodes? No, sadly. IC-internal ESD diodes are nice and a must have, but not sufficient for a large portion of shock. Effectively, they’re there for lower-grade GPIO protection. If your GPIOs go, or could easily go, to the outside world, or maybe they’re near high-power rails, maybe you’re driving a speaker or some motors with part of your circuit, or if maybe you want to touch your board with your fingers sometimes – you will want to add your own ESD diodes into the mix.

Let’s Protect Some GPIOs


You can use two diodes in a pinch – two 1N4148’s are a valid form of ESD protection. Better yet, you can buy a two-diode component ready to go. Here’s a part number – BAV99; it’s two diodes in series, in SOT23, with midpoint being on pin 3. Top pin to VCC, bottom pin to GND, middle pin goes to your signal – what could be easier to route? BAV99 isn’t quite intended to be an ESD diode, but it will perform wonderfully. This is the most basic protection you can give a GPIO – throw in a low-value series resistor too, if you’re generous. If you’re doing, say, a RP2040 circuit, you will already have some 27R resistors in series – just sprinkle some more of those on your board, and you’re golden.

But Wait, There’s More

Is that all you can do with these? No, there’s more! Remember how you have to put a diode across a relay coil or a motor that you’re driving with a transistor? Here’s a fun relay for you – Omron G6SK-2. It’s a tiny relay for switching signals (think analog audio switching), and what’s cool about it, it’s latching. You know how you need to reverse the voltage polarity on a DC motor in order to reverse the direction it spins? This relay uses polarity reversal to switch, instead of a coil that requires constant power draw to keep one set of contacts connected.

So, a tiny relay for signals, that requires zero power to stay on. Now, how do you drive it? With motors, you drive them with a H-bridge – one transistor from VCC, one from GND, for each pole, and these four transistors are typically put inside a single IC. However, using a whole H-bridge IC on a tiny relay that barely needs any power to begin with? Feels quite wasteful!

A GPIO set to output is electrically equivalent to a H-bridge. Put the relay’s coil between two GPIOs instead, and you can effortlessly switch it. What about a back EMF protection diode? Can’t put it across the coil anymore, then you couldn’t switch polarity. Instead, just put a pair of ESD diodes on the GPIOs, and you’re good.

You can drive a fair bit of stuff this way – not just cool low-power relays, but also linear actuators like iPhone’s Taptic Engines, vibromotors, and tiny electromagnets. So, if you needed to stock up on BAV, this is your extra reason to do so.

Where would you commonly put these kinds of diodes? On external GPIOs, yes, but also buttons – even if they’re behind a thin layer of plastic!, – and keypads, user-touchable pogo pins, off-board connectors, headphone jacks, iButton pads, and so on. These are not the only diodes you’ll ever want, of course. Let’s talk about ESD diode capacitance and where it starts to matter.

High Speed, High Demands

Imagine a Pi Pico. On it, there are GPIOs worth protecting. What else? The USB port, for sure – and if you’re daring enough to wire Ethernet to a Pico, also those pins. However, if you do use BAV, you might experience signal degradation, or other unexpected side effects. Why? One major reason is ESD diode capacitance.

High-capacitance diodes will mess with high-speed signals. That’s why we have lower-capacitance ESD diodes, though. SRV-05 is one of these – it’s an old and trusty part, with many pin-compatible successors and clones alike. Four diodes inside, one pin for VCC, one for GND – it just works, whether you do USB2, Ethernet 100 or 1000 – or even capacitive touch pads! Captouch benefits a whole lot from ESD protection, as you might guess, and low-capacitance diodes are a must – just remember to also check the docs of the captouch chip you’re using and see what it says about the matter.

Using a SOT23-6 pack like this to protect USB lines? Watch out for how you’re supposed to wire it up. Some diode packs have internal connections and expect you to interrupt the signal under them, and other ones require you to pull wires under the package; some of them include inductors. Check the datasheet for an example schematic and compare with yours.

Another pitfall to mind. Remember how there’s one path to GND and one to VCC? Well… What if your GPIO is powered, but your VCC isn’t? Power will flow from the GPIO into VCC – you might remember this one from the cut-down ATTiny we’ve featured. This is also a problem you can stumble upon if you put chips with multiple power inputs and don’t think about it.

Where else could this situation appear? Why, USB-C. If you’re connecting ADC channels to CC pins, like you would if you want to check that you do get 3A at 5V, you’ll want to protect that. Or maybe you have a PD controller on your board – you’ll want to protect its CC pins, for sure. Now, remember how CC negotiation works? A PSU has a resistor from its VBUS to the CC pin(s), and it measures the CC voltages, expecting a 5.1K resistor. What if your VBUS isn’t powered and you use a VBUS-connected ESD diode on CC? Part of the CC pullup current flows into VBUS, voltage sags, CC voltage is lower than expected, and the PSU never ends up supplying VBUS.

No VBUS, No Problems

Bad? Bad. I’ve stumbled upon this one recently, in my own project, was quite a headscratcher. Thankfully, you don’t actually need a VBUS connection – really, all you need is to shunt voltage if it exceeds a certain threshold. We have diodes for that, too! They’re called TVS – it’s kind of like a Zener, but better. In fact, since SOT23-6 ESD diodes tend to contain a TVS, you might be able to disconnect VBUS from your SOT23-6 altogether. However, you should still know about yet another breed of ESD diodes – for a start, they’re probably the flattest ESD diodes you’ll work with.

In VBUS-less ESD diodes, instead of a VBUS connection, the top point goes to a TVS diode to ground. When the top point voltage raises above the TVS diode’s threshold voltage, the diode starts conducting. The TVS diode has to dissipate the ESD shock energy now, but they’re big boy TVS diodes, they can handle it.

DFN25-10 format diodes. Where have you seen them? A Raspberry Pi, for one – there, they’re right next to the HDMI connector(s), three of them at the very least! These diodes are great for general purpose protecting whatever you want, too – you can put them on USB, Ethernet, USB CC pins, keyboard matrix pins. My fave part number is TPAZ1043, but don’t hold onto that – just look up DFN2510 and you’ll find alternatives aplenty.

Any catches with these? The threshold voltage, for one. If you’re doing 3.3V GPIOs, you want to make sure your diode won’t start shunting them – and if you buy a diode aimed at protecting modern-day interfaces like USB3, its threshold might very well be 3.3V or a little below – borderline if not outright disqualifying if you want your GPIO (or a USB2 connection) to stay unaffected. It’s a wonderful diode, of course, just, the wrong application.

They’re the nicest to route, too. Put them inline with signals, put a via down to your GND (0.5/0.3 via will do wonders), and you’re set. The catch with that? You might relax a little too much when using them, gotta remember to keep on your toes.

A Key Element

Think we’re done? Not yet. Remember that they’re very flat? Now, where could you use some very flat diodes? How about… a handheld keyboard with NKRO? NKRO needs diodes on every key, but if you’re doing a even 50-key handheld keeb, you might not necessarily want to use 50 separate diodes. Not to worry – the to-ground diodes inside the DFN2510 ESD diode pack are still good to go. Able to connect four keys per diode pack, these are way easier to handle and pick-and-place than regular tiny-package SMD diodes, and they make sure your keyboard can do all sorts of key combos. You know, to compensate for the lower amount of keys.

The hacks are cool, of course, but above all, ESD diodes are meant to make sure that your hardware lasts. Whether you’re building a devboard, a captouch arts installation, a trusty pocket electronics multitool, a custom clock to gift to your kid, or the tiniest keyboard ever, ESD diodes are your friends. You should sprinkle them on your circuits, keep them in your stock, spread the word, and they will protect you in turn.

Liked this article? Check out one of the previous Hacker Tactic installments, where I’ve shown you how to detect internal ESD diodes with a multimeter, specifically, to probe wiring continuity and reverse-engineer circuits! You should know about it, too.

 

This articles is written by : Nermeen Nabil Khear Abdelmalak

All rights reserved to : USAGOLDMIES . www.usagoldmines.com

You can Enjoy surfing our website categories and read more content in many fields you may like .

Why USAGoldMines ?

USAGoldMines is a comprehensive website offering the latest in financial, crypto, and technical news. With specialized sections for each category, it provides readers with up-to-date market insights, investment trends, and technological advancements, making it a valuable resource for investors and enthusiasts in the fast-paced financial world.