# Arduino protecting analog input with internal voltage reference

Usually a common way to protect an analog input consists on reducing voltage and current in the following way:

Current limiting components, as Resistors or inductors and voltage limiting components as diodes, zener, tvs.

In this case for components availability I have used two resistors and a zener diode.

The circuits aims to accept a 0-10V input and read it with the internal reference voltage 1,1V.

The question is the following: Assuming I want to use a 2,2V zener diode as overvoltage protection and 1,1V internal voltage reference, can I consider it safe or the 2,2V of zener will be too much for the 1,1V reference?

simulate this circuit – Schematic created using CircuitLab

NOTES: I am using 2,2V zener diode because is the smallest size I can found. I could use two normal diodes to reach 1,4V but maybe it will be too much for 1,1V reference and the result could be the same. I could also add an external reference, but I would like to know if I can have problems with this configuration.

## 2 Answers

Yes, it is safe. The reference voltage is only used as a comparison. The ADC is still powered by, and limited by, the chip's supply voltage (5V).

The AREF voltage has no bearing on what limits there are on voltages you can apply to a pin. All that will happen is that voltages above 1.1V will register as 1023. You can go right up to 5V safely.

As far as I know, no one uses a zener diode in a analog circuit that is used to measure a voltage. Well, at least no one who is serious and knows what he/she is doing.

The zener diode will start leaking at a lower voltage and it might introduce noise. I never use a zener diode in a analog input circuit that is used to measure something.

What is the maximum positive and negative voltage that you want to protect the Arduino against ?

Suppose using a 5V ATmega chip, with R1 = 100k, R2 = 10k, C1 = 10nF, with 1.1V as reference (and no extra ESD or clamping diodes and no zener diode). Then you are protected up to 160 V.
That is a constant voltage of 160 V that is allowed, as long as R1 can dissapate the heat.
That means without the zener and better choosen values of the resistors, it becomes more accurate and safer and more sturdy.

Calculation: A0 can be up to 5.5V. Then the internal diodes start to conduct, and it is allowed to push 1mA into the pin.
Current R2 = 5.5 / 10k.
Current into pin = 1mA.
Voltage over R1 = 100k * ((5.5/10k) + 1mA).
External signal = 5.5 + voltage over R1.

Suppose a leakage current for a 2.2V at 1V is 0.02mA. That seems a reasonable number from what I can find. That will influence your measurement by maybe 2 percent (I'm not sure, I didn't do the calculation). That would mean that of the 10-bit resolution you dropped to 6-bit resolution (I'm also not sure about this one).
To protect the analog input, instead of a 2.2V zener, a 5V zener would be more appropriate (that is: when going down the wrong path to use a zener). The 1N4733A has a leakage current of 10 µA at 1V, and that will still influence the analog signal and still cause a less accurate voltage measurement.

• Nice to know that the leakage current can cause problems. For sure I can use a 5V zener diode, the 2,2V was for having something closer to 1,1V in the assumption that could cause a problem. Zener diode was goot also for the reason that protects against reverse voltage. Finally I should use TVS or maybe two diodes (one from ground to analog line and the other from analog line to VCC? Commented Sep 18, 2017 at 9:15
• @piertoni, the 5 V zener diode still leaks at 1V as I wrote, that still causes inaccuracy for the reading. Without a zener diode and with the right values for the resistors you are better protected !
– Jot
Commented Sep 18, 2017 at 9:19
• @piertoni You are not going to use a zener diode, are you ? Why do it deliberately wrong, when it is easier to do it right ?
– Jot
Commented Sep 20, 2017 at 9:22
• I think Zener will be sufficient for the following reasons: - Availability. - I only need to discriminate from 0-10V to 3 speed of a fancoil, so a minimum leakage will not be a problem neither the accuracy of readings. - DIP PCB. When I will try to protect an ADC needing accuracy I will keep in mind your helpfull explanations. I will also keep it in mind for all the rest of my projects. Commented Sep 28, 2017 at 9:31
• Without the zener diode (and with better values for the resistors) you are better protected.
– Jot
Commented Sep 28, 2017 at 10:33