I'm working on a project where I want an Arduino Uno to measure the voltage of a 12V lead acid battery.
The Uno's analogue read pins can't handle raw 12V, so I need to use a voltage divider with roughly a 1/3 stepdown ratio to take the max 14.70 (while charging) down to 5V or less so the pin doesn't fry.
I initially built my divider circuit with R2=503K ohms, and R1 = 1M Ohms, which should give a Vout/Vin ratio of 0.334. I built the circuit and in practice I get a ratio of 0.252 or something like that (battery voltage is 12.97 and the divider is outputting 3.28V, all measured with multimeter.) 0.252 would be fine and safe enough for the Arduino, but I want to get as close to 0.334 as possible to get as much resolution of my battery voltages as the 0-5V of the analogue pin can give me.
I chose the biggest resistors I have because I don't want any more current than absolutely necessary to flow through the divider and get wasted as heat (also makes me nervous as a short circuit risk.) I do realize that this will make the current flow through the divider extremely small, something on the order of 10^-6 Amps. However this seems to be affecting the voltage that's produced.
I wonder if there is some sort of minimum current requirement for a multimeter/analogue pin to read a voltage correctly?
I've double checked the resistor values with the multimeter (within what their specs say they should be with 5% tolerance) and I set up an experiment that demonstrated the weird behaviour I'm seeing.
With R2=R1, I built two different voltage dividers, the first one with two 680K resistors, and the second one with 68K resistors.
The 68K divider gave Vout/Vin of 6.33/12.97=0.488, closer to the theoretical number I should be getting of 0.500.
The 680K divider gave Vout/Vin of 4.85/12.96=0.373.
What gives?