Stability of internal analogue reference with varying supply voltage (Vcc)

Im tinkering with a battery powered application, where i want to use the ADC for accurate measurement of a voltage from 0 to 0.85v. Naturally this points me at the 1.1v internal reference, but Im wondering how stable this is if its being powered off a potentially variable supply.

I've been poring over the delightful 448 page atmega datasheet, but I cant seem to find any information about the stability of the internal 1.1v reference. Does anyone have any pointers?

According to page 323 it is typically 1.1V but can range between 1.0V and 1.2V.

I don't know if it states how much it varies over time, however. I assume that the variation is fairly fixed, that is if you determine that it is 1.11V it probably stays at that level, but I have no proof of this.

Yesh i saw that bit, but it didnt indicate the conditions under which it’d vary. Im assuming that its likely to vary as a function of supply voltage, i guess sooner or later the easy answer is to suck it and see.

Thanks Nick.

Im assuming that its likely to vary as a function of supply voltage, ...

I doubt that, otherwise it wouldn't be particularly useful. However you raise an interesting point.

I am currently testing one board to see if it varies over time (whilst connected to USB). This would indicate the stability during the day.

I'll do another test by varying the supply voltage.

The variation of the internal reference is mainly over the temperature range. There is also a fixed element where the voltage is not exactly 1.1V but somewhere between 1.0 and 1.2V. So there is a fixed element and a variable element, supply voltage variations will be a much smaller effect than these two. You can remove the fixed element by calibration.

My measurements of a Atmega328P chip over various supply voltages are below. Test sketch:

// Find internal 1.1 reference voltage on AREF pin
void setup ()
{
  analogReference (INTERNAL);
  analogRead (A0);  // force voltage reference to be turned on
}
void loop () { }

Results:

Vcc     Aref
(V)     (V)

5.0   1.0727
4.5   1.0732
4.0   1.0737
3.5   1.0742
3.0   1.0745
2.5   1.0744
2.0   1.0741
1.7   1.0738

It seems to me that the supply voltage only affects the 4th significant digit, so that is a change of 1 in 1000.

Interesting. So I guess Im heading towards a calibration check/chip (per grumpy mike) and then storing a cal factor in the onboard eeprom.

Yes, exactly. Clearly my chip isn't giving 1.10V, so you would read that and store it, as you said.

After a few hours of measurement at a fixed supply voltage of 5V, and taking 55,490 samples or so, I have found (on a different chip):

Low:  1.0834 V
Mean: 1.0850 V
High: 1.0863 V
Standard deviation: 72.82E-6

So it is varying slightly more than 1/1000th of a volt above and below the mean.

[quote author=Nick Gammon link=topic=193177.msg1427784#msg1427784 date=1381727558]So it is varying slightly more than 1/1000th of a volt above and below the mean. [/quote]

I beg to differ. The Low and High are beyond three standard deviations from the average which means they are very likely outliers. My guess is that noise is the cause.

The "three sigma" range is...

Low:  1.0848
High: 1.0852

...or 0.0004 volts which is significantly smaller than the range from the actual minimum and maximum and less than 1 in 1000.

True, the high and low are very likely to be outliers (outlyers? outliars?)

[quote author=Nick Gammon link=topic=193177.msg1428026#msg1428026 date=1381746541] True, the high and low are very likely to be outliers (outlyers? outliars?)

[/quote]

I suspect statisticians would prefer "outliar"!

Given the chip has an onboard temperature sensor, it would in theory be possible to calibrate for a range of temperatures, at least to first-order.

Without experimenting on a range of different chips its impossible to say what the worst-case behaviour is for the bandgap reference (has someone already done this?)

Actually, thinking about it, it would be great if ATmega chips that came with a preloaded bootloader also had a calibration value(s) written to a standard EEPROM location :)

MarkT: Actually, thinking about it, it would be great if ATmega chips that came with a preloaded bootloader also had a calibration value(s) written to a standard EEPROM location :)

For what it's worth, my preference is a single byte ((reference voltage * 1000) - 1000) at -11 from the end of EEPROM... http://code.google.com/p/arduino-tiny/source/browse/cores/tiny/tc_eeprom_config.h?repo=core2#40

MarkT: Without experimenting on a range of different chips its impossible to say what the worst-case behaviour is for the bandgap reference (has someone already done this?)

That much experimenting is probably not necessary. If the bandgap is anything like the internal oscillator there will be, at most, a handful of designs used by Atmel. Experimenting on each (Arduino compatible chip) design is probably sufficient.