Accuracy of Arduino’s ADC

The most common (and the simplest) use of Arduino ADC (analog to digital converter) uses its internal Vcc reference voltage, and that voltage is 5V, right?
Wrong!

The internal reference voltage varies around 5V, and it is rarely exactly 5V. This article explains that in detail:

http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/

A constant described in that article (1100 * 1023) needs to be calibrated for each individual chip using a good DMM. During the calibration, Arduino needs to run on a battery or on a stable external voltage supply to ensure stability (USB voltage is unpredictable and it keeps slightly changing).

In particular, I measured 5.02V on my Arduino Mega when it is connected to a 9V battery. That 5.02 voltage was stable: it was using an internal voltage regulator. In contrast, a classic 7805-type regulator usually has either 2% or 5% accuracy.

The input voltage was quite unpredictable when powered by a USB hub: it shifted anywhere from 4.95V to 5.05V – in one instance even getting down to 4.91V when I plugged a portable HDD into the same hub. As the HDD was spinning up during the first few seconds, it was drawing more power from the USB hub and that was impacting Arduino’s reference voltage.

If you had an Arduino design that was supposed to measure something during that time, the values would be inconsistent and inaccurate.

If you calibrate each individual Arduino and use its 1.1V reference voltage, it might be possible to have its accuracy as good as 0.1% – that’s what I measured in my subsequent tests after I changed the calibration code. That accuracy was not affected by the slight variations of the input voltage – it was self-correcting. Extra calibration code also addressed the problem of +/- 10% uncertainty of the internal 1.1V reference voltage. Once we measure and calibrate it, we can achieve that extra accuracy.

I tried it on Arduino Nano V3.0; I run the code to calibrate its voltage reference. First, measure the input Vcc using a good DMM making sure that the voltage supply is very stable. Then, tweak the constant until you get the same value as measured.

In this example, I had to subtract 6700 to get the same voltage as measured by my Fluke multimeter. For this particular Arduino Nano board, that was its inherent and systematic inaccuracy. (It might still change with a temperature.)

Bookmark the permalink.

Leave a Reply (your email address will not be published):