# Accurate analogue input reference

Hello all,

Please correct me if/where I am wrong here. I'm still trying to get my head around it all.

I'm trying to find a way to accurately calculate the exact reference voltage for the analogue inputs. I understand that the default is the 5v supply voltage, but does this drop if the supply voltage drops? I measured the 5v rail on my Arduino + Ethernet Shield and I got 4.80v. Does this mean that the reference voltage becomes 4.8v instead of 5v? This is while being powered from USB.

Assuming that I'm correct on the above, I have an issue where what if the supply voltage was exactly 5v, or dropped down to 4.8v, and I needed to make an accurate reading on the analogue input?

I noticed that when I measured the 3.3v rail that is did indeed return exactly 3.3v, so can we use this as a reference into, say, analogue input 0 and use the following formula to calculate a reference point for the inputs?: referenceVoltage = 1 / ( ( analogRead(0) / 1023 ) / 3.3 );

This gave me a value of 4.71v, which could be about right if my formula is correct.

Thanks.

Yes, if the 5V supply voltage drops, then so does the reference voltage.

The internal 1.1V won't drop, but it's not a particularly accurate reference to begin with (something like +/-9%).

The AVR's are not designed for "accurate" A/D readings. You should use an external A/D for that (with SPI or I2C communication).

Then again, you haven't really specified how "accurate" you need your results to be! You could always use an external precision reference connected to the AREF pin.

I don't think the 3.3V output is guaranteed to be any more accurate (percentage-wise) than the VCC supply or internal reference.

... The internal 1.1V won't drop, but it's not a particularly accurate reference to begin with (something like +/-9%).

The AVR's are not designed for "accurate" A/D readings. ...

Then again, you haven't really specified how "accurate" you need your results to be! ...

I didn't realise the reference spec was as 'loose' as that! 9% or1 in 11 ...

Giving an A/D with 10-bit precision (and likely sensitivity) but less than four bits of accuracy... ouch!

I would hope that the internal reference would be stable on any given chip (not much ripple or variation with the chip's temperature for example). So that one could rely upon it for measuring small changes - although for accuracy of absolute measurement, one ought to be properly calibrating each individual AVR/sensor combination. Hmmm.

The AVR data sheets cover the A/D accuracy questions reasonably well. I think they give an overall +/- 2 LSB spec, which is not instrumentation quality accuracy. Again if you state what your true accuracy requirements are and what you are measuring possibly we can share for ideas and information. There are methods of using multiple sampling and averaging calculations that can help somewhat, but again it depends on your ultimate accuracy and sampling rate requirements are.

Lefty