# 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. – jippie Feb 13 '14 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. – alexan_e Feb 13 '14 at 8:27

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.