I've been scratching my head over this for about an hour now - and seemingly can't get my head around it.
I've got a requirement, which I thought was quite simple. I'm using a 3v3 MCU (i.e. Due board), and have the internal pull ups enabled - then simply switch the pin to ground to signal a low. Elementary, done.
Now, a) I want the pin protected against ESD, so have a unidirectional TVS ESD diode connected to ground (http://www.mouser.com/ds/2/240/Littelfuse_TVS_Diode_Array_SPA_SP1003-221268.pdf). Good.
b) I also want the pin to be protected against against continuous overvoltage, i.e. somebody incidently connects the pin to 5V, 10V etc etc, so - adding some series R after the TVS, then a Zener just over 3.3v (MCU tolerance to 3.3 + 0.7V). So, if the pin is connected to 5V - the current is limited and the Zener clamps the pin to say 3.5V. Fine.
Here's the schematic - right hand diode is the TVS diode, left hand just a 'normal' Zener. Note the input voltage to the ADC, 2.2V - seems there's lots of leakage through the diodes. I should really run this in SPICE later on, as opposed to cheap iPad app. [/URL]
Now - here's the challenge, I also want to be able to connect an analog voltage to this pin sometimes, such as a potentiometer, instead of a switch to ground, however - the pot is often likely to be supplied by 5V or 10V. Which isn't a problem in itself as the pin voltage is now clamped, but is is a huge problem in that it makes only a very small portion of the pot travel usable.
So, I tried running a quick sim with the pot feeding into a voltage divider (oh dear, divider into a divider!!!) as shown in the sim screenshot below - however, I'm getting all sorts of problems with the readings being thrown off by things like the pot value, reverse leakage through the diodes, leakage through the bottom of the divider etc, and so simply can't hope for any amount of accuracy at all.
The divider is sized so that at 10V, the output is 3.3V, but as I say - it's not that simple with all the leakages etc.
The 6.6meg resistor is the ADC input based upon the +-0.5uA leakage current into the ADC (which at 3.3V should give 6.6meg, R = V/I).
So, what am I to do - I need the pin protected against ESD, continuous overvoltage and able to read a potentiometer full swing from 0 - 5, 10 or 12V etc.
Many, many thanks in advance with this...