# What happens when voltage divider output exceeds acceptable voltage of microcontroller ADC? Can it destroy it?

Imagine you want to measure higher voltage using ADC of some MCU, such as that used in Arduino boards. Those are usually operating at 5V and can only read values in range of 0 - 5V.

So you create a voltage divider let's say with 100k Ohm on Z1 and 10k on Z2

From 0 up to 55V you will be getting 0-5V on Vout so you are going to be able to reliably measure up to 55V. Problem is that anything higher than 55V on Vin is going to result in output voltage higher than 5V on Vout.

Now if you connected say 80V power source to Vin, you get 7.2V on Vout - could this fry the MCU or would the impedance of voltage divider protect it by limiting the current that goes through? Is this safe to do?

• 100 Meg in parallel with 10k is still 10k within 1%, so 7.2 (actually 7.27) is correct. Nov 28, 2022 at 20:36
• Some of microcontrollers, for instance PICs, have diode from input to Vcc. Nov 28, 2022 at 23:11
• You can tune your Z1, Z2 to map a higher range of voltages to 0-5V, so 80V becomes 5V and 55V becomes 3.4375V. This will ensure that you never exceed 5V at the cost of having a lower resolution for your desired range. Nov 29, 2022 at 9:14
• Diodes like this nexperia.com/products/diodes/switching-diodes/… Nov 29, 2022 at 9:38

It's probably not safe. There's usually an ESD structure on the input pins that may clamp the input voltage to the supply rail. It may handle a few mA of current, so if your divider impedance is high enough you might get away with it.

However, it's usually not guaranteed, (unless explicitly stated) and applying any voltage greater than the abs max rating in the datasheet is unwise and of course may damage the device.

You could try adding an external Schottky diode to clamp the input to the rail, but they are leaky and could affect the accuracy of your reading. You might be able to split the upper resistor and use an appropriate lower leakage TVS device to clamp the voltage, or buffer the divider with a circuit that can handle your max input voltage.

• A TVS is for dissipating fast transients rather than acting as a sort-of-Zener. Among other things, they have a very inaccurate clamping voltage as that's suitable for ESD dissipation. The BAT54 (or similar) that I spookily predict @PStechPaul will recommend in the future is a better idea, clamping to the rail like you suggest. Nov 28, 2022 at 20:48
• A BAT54 Schottky diode has only 1 uA leakage at 25C, but 5 uA at 60C and 100 uA at 100C. With a 10k sampling resistor at 5V (500 uA), leakage at room temperature will be negligible, and may cause 2% error at 60C, which might be acceptable. This should be OK for overvoltage protection, but accuracy and operation of all analog circuitry may be unpredictable while the overload exists. Nov 28, 2022 at 20:49
• @TonyM There are many types of TVS diodes, some are rated for very high currents, not just ESD and can be used as a zener replacement. The clamping voltages ARE inaccurate, but you can find some that are not terrible and might be good enough for the OP's application depending on the requirements. It's not clear that the OP ISN'T trying to protect against fast transients either. Nov 28, 2022 at 21:18
• Well, the OP clearly states they're thinking of "say 80V power source", so protecting against transients would just be guesswork. And if they wanted a TVS to clamp fast transients, it'd go across the terminals, not through a series resistor. But my point isn't that a TVS can't do it (it's just a component meeting a set of specifications) but that it's a poor choice and there's far better alternatives, like the diode to rail which is simple and, being relatively very accurate, has predictable behaviour. Nov 28, 2022 at 21:36
• Thanks for a reasoned exchange and I think that's a fair pov for you to take on it. Nov 28, 2022 at 23:19

Now if you connected say 80V power source to Vin, you get 7.2V on Vout - could this fry the MCU or would the impedance of voltage divider protect it by limiting the current that goes through? Is this safe to do?

The data sheet will probably indicate that the maximum MCU input voltage is around 5.3 volts and, 5.3 volts is exceeded if the input voltage is greater than 58.3 volts: -

However, if the MCU data sheet states that the maximum input pin current is (say) 1mA then you might decide that 0.5 mA is acceptable and it's a different scenario: -

So, you may be able to get over 100 volts at the input without over-stressing the MCU input. I think 80 volts stands a reasonable chance of being fine. However, if the input is an analogue input, you won't magically extend the ADC input range; maximum discernible voltage will occur close to 5 volts on the pin.

• Why dont you model the ADC input impedance of the MCU as a 100Meg resistor(the value for Arduino)?
– GNZ
Nov 28, 2022 at 21:43
• @GNZ Because it is insignificant. Once the input protection diode starts conducting, the 100M input impedance becomes even more insignificant.
– qrk
Nov 28, 2022 at 21:54
• @GNZ micro-cap is free and has a full library of parts so, maybe you might want to try this out. spectrum-soft.com/download/mc12.zip Nov 28, 2022 at 22:13