2

The definition for Analog Reference is as follows: The reference voltage used for analog input (i.e. the value used as the top of the input range).

By default you have analog reference of 5V. So the precision of analogRead is 5 / 1023 = 0.0048875.

Now what happens if I lower the analog reference to let's say 1V. Does that mean that the precision now is 1 / 1023 (and the arduino can't measure voltages higher than 1V) or it is the same precision as before with the only difference being the fact that the arduino can't measure voltages higher than 1V anymore?

  • "Does that mean that the precision now is 1 / 1023?" - that is correct. – Mikael Patel Feb 5 '16 at 14:47
  • Bear in mind the minimum for Vref is 1V, so don't start planning on dropping it to 0.5V. – Nick Gammon Feb 5 '16 at 22:17
1

The former, i.e precision would now be 1/1023 but the accuracy of the AD converter is 4 / 1024 or 1 part in 256 i.e. 0.25%.

Also be aware that the internal reference voltages themselves are not very accurate :

DEFAULT: depends on your computer power supply USB2 Vbus = 4.4V - 5.25V, Vint 1 = 1.1V actually 1.0 -- 1.2V, Vint 2 = 2.56V actually 2.4 -- 2.8V

  • Thanks for the fast and very helpful response! So the best precision you can get out of arduino analog pins is 4 / 1024 due to the accuracy of the ADC, right? – user3071028 Feb 5 '16 at 14:59
  • Precision and accuracy are related but different. With 1 in 1024 converter, the precision is .000977, but lack of accuracy may make the last few bits meaningless. If we had a rubber ruler marked in millimeters, and we stretch it, the precision wouldn't change but the accuracy would. – JRobert Feb 5 '16 at 15:58
  • You could measure a know voltage, and use that to calibrate the ADC. Or you could measure the 1.1v internal reference, by measuring the voltage at Aref using a multimeter. – Gerben Feb 6 '16 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.