Zener diode protection on MCU digital pins

Status
Not open for further replies.

boylesg

Advanced Member level 4
Joined
Jul 15, 2012
Messages
1,023
Helped
5
Reputation
10
Reaction score
6
Trophy points
1,318
Location
Epping, Victoria, Australia
Activity points
11,697
If I was to implement a small shield for an ESP32 MCU on which there were zener diodes on each pin in order to prevent over voltage (from a 5V logic sensor), then what properties in particular should I look for in the zener I choose. I was reading some where that if the zener can't pass enough current then over voltage can still occur. Is there a minimum Pd I should look for perhaps?
 

I use ESP32s on mains detection circuits using nothing more than a potential divider to drop rectified 240V down to 3.3V. To protect the pins, I add BAT54 diodes between the divider junction and the ESP32 3.3V supply and a 10K resistor in series with the GPIO input pin. The diode prevents the voltage rising above about 3.7V, even if the mains voltage rises well above normal and the series resistor limits the current that can flow into the pin.

The high impedance of the divider prevents very fast operation but if you are working with lower voltages the values would be lower and speed faster. If you want to use Zener clamps, I would suggest using 2.7V diodes and a series resistor from the source. My tests show the logic threshold on ESP inputs is almost exactly half VDD so anything above about 1.6V will be seen as a logic high.

You may have to factor in the internal pull-up and pull-down resistors on some ESP32 modules, typically the reset line and GPIO0 pins have pull-ups and I think it's GPIO2 has a pull-down. Other inputs are very high impedance.

Brian.
 

You want some series limiting resistance to "let the
zener win". But series R and shunt C (zener, pin load,
PCB) will also degrade signal edge rates, and there's
probably a spec or a calculation of tolerable pin risetime
to respect there.
 


OK. So the schottky conducts excess voltage into the power supply.
Assuming you have a 3.3V square wave going into a pin then what does the signal look like if you add a 3.3V zener diode to the pin?
 

Hi,

OK. So the schottky conducts excess voltage into the power supply.
Assuming you have a 3.3V square wave going into a pin then what does the signal look like if you add a 3.3V zener diode to the pin?

it depends on series resistance/impedance.

What about using a free simulation tool like LTspice?
Then you can play around and get fastest results.

Klaus
 

For starters; zener voltages are rated at a particular current (Izt), usually around 10 ma, but it will start conducting much earlier, feebly at first and then increasing until Izt has been reached.

This is called the knee region. And it can create issues with in A/D ports.
That is the reason schotkys are preferred.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…