2
\$\begingroup\$

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!

\$\endgroup\$
4
  • \$\begingroup\$ How about a 5V Zener Diode across the input? Anything above 5V is clamped to 5V. There is of course some tolerance on the actual Zener voltage. \$\endgroup\$
    – crj11
    Jun 20, 2018 at 22:08
  • \$\begingroup\$ Between 5V and 10V is only 1 bit of resolution. You might want to consider keeping the voltage divider in circuit and scaling the value in software, with 2x oversampling if you need the extra bit. \$\endgroup\$ Jun 21, 2018 at 0:06
  • \$\begingroup\$ What is the maximum current that an input can take when overloaded with a higher voltage feeding through a resistor? \$\endgroup\$
    – Andy aka
    Jun 21, 2018 at 8:49
  • \$\begingroup\$ Assuming you'll be using an R-C antialiasing filter at the input, you can be safe even just dimensioning the R to limit the pin input current to the maximum rated. Adding diode clamps will provide further protection, also to ESD/surge voltages. You didn't mention the frequency range or the constraints on the phase delay of the input signal, which can affect the selection of input filtering. As you're (apparently) directly driving the ADC I suppose also that even leakage currents aren't that much influent in your design. \$\endgroup\$
    – LuC
    Apr 19, 2023 at 9:13

3 Answers 3

1
\$\begingroup\$

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. enter image description here

credits go to : electronics-tutorials.com

With the help of a NPN you can pull the voltage applied to the ADC Pin down to zero by using this circuit " one of my designs "enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ The NPN has C/E swapped. R2 is protecting up to a limit, depending on the source impedance at the input. \$\endgroup\$
    – LuC
    Apr 19, 2023 at 8:55
  • \$\begingroup\$ I forgot to mention that this solution has inherently a slow intervention: the comparator/BJT could start dampening the input after some time, so that a fast enough transient can get through and kill your input. \$\endgroup\$
    – LuC
    Apr 19, 2023 at 9:19
1
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

Zeners may be a good solution, however in practice a little bit complex circuitry is required to get low capacitance and leakage current:

enter link description here

A good source of information on the subject is on Maxim

\$\endgroup\$
1
  • \$\begingroup\$ This is normally a good solution. Capacitance influence is a factor of the signals involved; with an ADC input of the mentioned MCU it shouldn't be much of a problem, as you would already use a much larger buffering capacitor at the input itself - to overcome the switching capacitive transients of the sampling T/H. \$\endgroup\$
    – LuC
    Apr 19, 2023 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.