Arduino analog input pin protection

Thread Starter

HappyHippo

Joined Aug 19, 2013
11
I read that the Arduino analog pin should not go below -0.5 volts. In my project, I'm measuring cell voltages with the Arduino Uno. It occurred to me that I should protect the Arduino in case I accidentally hook up the cell to be measured in reverse (the battery voltages will be less than 5V). I tested the following circuit on a breadboard without the Arduino (ignore the periods). In case this crude picture doesn't come out right, it's a 100 kOhm resistor in series with the analog pin and a Schottky diode between the analog pin and ground.

Bat + ------100 kOhm ----|--------- A0 pin
.....................................|
.............................1N5819 Schottky
.....................................|
Bat - -----------------------|-------- GND

When the battery is in the right polarity, the voltage from A0 to GND is correct. When I reverse the polarity, the voltage is about - 0.25 V. The current draw is only 0.7 uA in the reverse polarity state. So this circuit looks like it would work to protect the Arduino's analog pin from reverse polarity. Am I not considering a potential drawback or is there a better way to do it? I'd like to keep the current consumption low. The batteries I'm measuring can range from 1.5 V alkaline cells to 7.4 Lipo batteries (with voltage divider).
 

ErnieM

Joined Apr 24, 2011
8,377
While that provides negative voltage protection it kills the positive voltage reading with the very high series resistor. Inserting a resistor there will well exceed the input resistance max of the converter.

You could put an op amp there in the unity gain configuration, drawback is an extra part and a bit of offset to measure and compensate for.
 

#12

Joined Nov 30, 2010
18,224
I say do not be concerned with the current lost when the battery is connected backwards because you will not leave it connected backwards for very long.
You need to know what is the input impedance of the Arduino.

If it is, for instance, 100k ohms, your limiting resistor will affect the accuracy of the voltage measurement very much.
You can either adjust your resistance for good accuracy, or adjust it for low battery drain and use a buffer amplifier that Ernie described. It seems to me that the Arduino will not use much current on its input pin, so a buffer amplifier will not be necessary.
 
Top