# Use voltage regulator instead of zener to protect GPIO

I've read several articles about protecting 3.3v GPIOs from unregulated over voltage, all of which involve using a zener diode, a diode for reverse protection and resistors in some fashion. example 1 example 2

What I'm wondering is why I couldn't instead use a voltage regulator and get some of the benefits of thermal overload protection and reverse current protection all built into one IC. To me using a voltage regulator seems to be much more robust way of protecting the GPIOs with just one component and without having to get into logic levers or more complex solutions with many more components.

Here is the voltage regulator I'm considering using knowing that my typical input voltage is <9V and typical current well beneath 100mA.

Thank you

Scott

• The average GPIO pin cannot source enough current to come even close to the thermal overload of a voltage regulator. Many regulators don't like sinking current on their output and that is what often happens, check the datasheet for details. Feb 13, 2014 at 6:24
• Clamping diodes work much better that zener for I/O protection. Use a resistor in series with the incoming signal and two Schottky diodes (low Vf) connected from GPIO to each supply rail (Vcc, GND). The diodes will conduct if the GPIO voltage goes higher than Vcc+0.3v or lower than GND-0.3v. Feb 13, 2014 at 8:27

Assuming you're trying to protect an input (the outside world connects to the LDO input).. it does not provide protection against input voltages below ground. Absolute maximum input voltage is -0.3V.

It might work with a series Schottky diode, say for +/-30V inputs, but you'd have to evaluate whether the few hundred mV loss in voltage was acceptable for normal inputs (what your $V_{IH}$ is vs. $V_{OH}$) . I don't see where thermal protection would ever come into play, either as an input or as an output. If you exceed the 30V abs. max. input voltage, the part may fail.

You're going to need something like a capacitor in series with a resistor loading the output to keep it from oscillating. That will slow down the response considerably (you may want to add a load resistor to ground as well) and the capacitor could conceivably damage the GPIO under some conditions without a series resistor (if Vdd gets crowbarred).

Once you look at one diode, LDO, 3 resistors and a ceramic capacitor per input, it doesn't look quite as clean.

• Long story short my desire to use a load regulator as an easier solution that provides more surge protection than just a zener diode is a dead end. Feb 13, 2014 at 16:33