I have a microcontroller with a built in ADC that I am using to read from an input pin (ATMEGA328P to be specific). I want to allow switching of resolutions on the input for our users (0-5V range, and 0-10V range) which i was planning on doing via a voltage divider. The thing I'm worried about is if the user has our unit in 0-5V mode and plugs in a higher voltage by mistake. I want some sort of overvoltage protection on the output of the voltage divider to protect my ADC. I don't care if this is a crowbar circuit that doesn't reset without removing power, anything that protects the unit will do. I'm open to all suggestions. Thanks!
You can use a non-inverting comparator op-amp such that the basic configuration for the circuit detects when the input signal, VIN is ABOVE or more positive than the reference voltage, VREF producing an output at VOUT which is HIGH as shown.
credits go to : electronics-tutorials.com
Zeners may be a good solution, however in practice a little bit complex circuitry is required to get low capacitance and leakage current:
A good source of information on the subject is on Maxim
The approach I've most often used has been diode clamps, usually to a convenient power rail or a buffered version of the reference that can sink current. Even if you include other auto-detection circuits for scaling, it can be nice to also have them for ESD protection.
App notes like Ti's tend to show diode clamps (or suggest buffering with an op-amp that has a limited output range), though you have to be careful about leakage currents. Over temperature it can cause a great deal of skew, so BAV199 and CMPD6001S low leakage variants are helpful. If you must use a schottky at least avoid BAT54s (some ADCs behave poorly with slightly out of range inputs).
Edited to add links to diodes.