Electrical – 3V3 uC input protection from higher voltage

circuit-protectionswitches

I wanted to confirm some of my suspicion on this particular matter.
This is a part of a switching circuitry with a button.
I derived this circuit from a circuit divider to make this part of the switch work under lower voltages (button tolerates <20V across). So the button enables the MOSFET switch. Yet I need to monitor the state of the button and thus have protected a uC inpt from the gate with a schottky diode.

schematic

simulate this circuit – Schematic created using CircuitLab

I can measure gate voltage from the voltage divider on the planned uC input pin node. The idea of the shottky diode was to protect the input from those 'high' voltages but ofcrs could be measured on that node (currently floating).

Should I consider input protection (such as a zener) to limit the voltage on that pin ? Although there's potentially low currents there (due to reverse current of the diode).

Best Answer

As shown D1 blocks and positive voltage on SW1 so you will never get ANY voltage on R4 except due to leakage in D1. Placing a resistor Rpu = say 10k from uC input to +3V3 will return 3V3 when SW1 is open and about 0.4V (Vfwd across D1) when SW1 is closed.

The ~~= 10 uA leakage current via D1 is notionally able to possibly cause unexpected effects in the uC but is unlikely to in practice.
The most sensitive feature of a uC is often A2D inputs, which can be adversely affected by very low substrate diode problems.
Equipping D2 with a suitable value zener can prevent this but is unlikely to be necessary. Note that zener diode voltages are usually specified at currents of 10 mA or sometimes 1 mA, so with very low current Vzener will be well below the rated voltage. If you do use a zener, check the spec sheet to determine the appropriate marked value.