Arduino uno analogread accuracy and precision

Hi Guys,

I want to measure the battery volatge (12V), the arduino uno has been supplied power with this batteery.

battery ----> Dc to Dc Converter ----> tpl5110 (nano power timer) ----> arduino Uno

I am stepping down the power from 12 to 5 Volt, as tpl5110 takes max 5.5V. Then tpl5110 is providing power to (vin) of arduino. After regulating, the volatge that appear on vcc is 4.25.

I have a voltage divider circuit, and i am using pin A0 to read the voltage signal. I have read the various post about the accuracy and precison, but i could not understand.

I think i cant use the Aref by default, which is supposed to be 5V, but in my case it is variable. Now i am left with the two option.

  1. Either i should take the Aref (internal = 1.2V)
  2. Or I should use the external Aref( for example i can short the 3.3V pin to Aref of arduino).

I am in favour of using Aref internal. Do i need to consider something special to us Aref internal ??????

If any body has some better solution, please share with me. I am verry sorry if i was not able to convey my problem, as it was complex.
Thank you

Well, the Uno has a 10 bit ADC which means a precision of 1 part in 1024.
Using the internal 1.1 volt reference would be my choice. You have to balance the voltage divider network accordingly.

You also want to consider the load the voltage divider puts across the battery. OK if you are running a boost converter the whole time, then the voltage divider load may not make a significant difference to the overall power consumption if the resistor values are reasonably high.

Vin is the wrong pin if you can supply 5 volts to the Uno because Vin goes through the Uno's voltage regulator. Use the 5V pin instead.

Great. I am going to use it.

I appreciate your point. I had not this in mind.

I want to measure the battery voltage. My dc to dc converter and tpl5110 is not in the middle of my battery and voltage divider circuit. I am taking a separate connection from battery to voltage divider and then to arduino. Basically i have two connections

  1. battery ---> dc to dc ---> tpl5110 --> arduino
  2. battery ---> voltage divider circtuit ---> arduino ( to measure the battery voltage)

I hope i conveyed you my case. Thank you very much @6v6gt .

That was clear enough. I was only pointing out that a "heavy" voltage divider could put an unnecessary additional load across the battery. However, since you are using both a buck converter and an Arduino Uno, you are probably not that sensitive to a few wasted microamps.

exactly. Im using 12AH ledacid battery

Remember that the internal '1.1V' reference is "stable" but not "precise". It is designed to be somewhere between 1.0V and 1.2V. You should measure it on the Aref pin and use the measured value, rather than assuming it is 1.1V which may be up to 10% off.

Could you please list the procedure, how can i measure it on Aref? Simply should i use the multimeter and use the pin (Aref and grnd) ?? after introducing the line in code

Yes. I think you also have to do one analogRead(). The full sketch is below:

void setup()
void loop() {}

See also:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.