Would VCC variations affect ADC accuracy

Just trying to cover all my bases with AD conversion accuracy.

I'm using a 4.096 volt ref into the AREF pin on an ATMEGA328P. Now looking at the specs on basic 3 terminal 5v regulators, I wouldn't exactly call them precision.

Would some slight variation in VCC affect ADC accuracy at all when I'm using the said voltage reference. Would I be better off with a higher precision voltage regulator like the LT1086CT-5#PBF or should the ADC readings be just fine with a standard regulator like an LM7805.

Cheers,

Keith.

Would some slight variation in VCC affect ADC accuracy at all when I'm using the said voltage reference.

Yes voltages are measured according to the reference voltage.

To make readings more accurate either have an external reference voltage or measure what you have and use that in the calculations.

There's basic accuracy and stability. If the voltage is off but stable, the error can be calibrated-out.

For the best accuracy, the ADC should be calibrated and that's fairly standard practice. You can calibrate in software. (In the old days, or if you don't have software or a programmable microcontroller, it would be calibrated with trim pots.)

3-Terminal regulators are usually quite stable, especially if there is not much variation in applied voltage, load current, or temperature. But of course, it all depends on how much accuracy you need.

Typically, you have two calibration factors, You calibrate the zero-offset and the gain-slope at (or near) the maximum reading.

If you are only building one or two units the offset & gain correction can be hard-coded. If you are going into production, you can put a calibration routine in firmware and store the calibration in EEPROM.

Thanks very much lads,

Keith.

What are you trying to do.
You do know there is an internal reference voltage available that is as good as an external one.
1.1volt though, but you might be able to drop your input voltage to that.
The Mega has a 2.56volt Aref, as well as 1.1volt Aref.
All are stable, but not calibrated.

Leo..

Wawa:
You do know there is an internal reference voltage available that is as good as an external one.
Leo..

Hi Leo,

thanks for the reply.

I know about the internal 1.1 reference but every time it gets talked about, it's said its accuracy is +/- 10%, or varies from 1.0 to 1.2 volt.

In any case the 4.096 voltage reference is very attractive because it gives me whole numbers for each bit of resolution of the AD converter. This way I can use bit shifting to do division instead of floating point division which takes substantially longer. The 0 - 4.096 volts ref will represent 0-256 out in the real world so pretty much every 16mV represents a value of 1.

The Mega is no good to me. I'll actually be using the ATMEGA328 chip on its own (not an Uno board).

Keith.

"Would some slight variation in VCC affect ADC accuracy at all when I'm using the said voltage reference. Would I be better off with a higher precision voltage regulator like the LT1086CT-5#PBF or should the ADC readings be just fine with a standard regulator like an LM7805."

If you have adequate capacitors, then a slight variation in VCC should not affect ADC accuracy any appreciable degree.
You do have several caps, I assume, and most importantly, one on the analog input pin.

Are you looking for accuracy of 1%, or what?

beefy23:
I know about the internal 1.1 reference but every time it gets talked about, it's said its accuracy is +/- 10%, or varies from 1.0 to 1.2 volt.

It does not vary, but the voltage on every board is different, so it should be measured before use.
I measure it once, and write it on the board.

beefy23:
In any case the 4.096 voltage reference is very attractive because it gives me whole numbers for each bit of resolution of the AD converter.

Make sure your 5volt rail stays at 5volt. 0.9volt overhead is not a lot. Check datasheet.

If I want whole numbers, I adjust the input voltage with a trimpot.
e.g. 1volt input gives digital 1000.

beefy23:
The 0 - 4.096 volts ref will represent 0-256

?
An 8-bit A/D is 0-255
Arduino's A/D is 0-1023
Leo..

Hi Jack,

thanks for that. I'm measuring a voltage from 0-256 so I'd like accuracy to be as good as I can get it with a 10 bit ADC. 1% would be 2.56 volts and if possible I'd like to get closer to approx 0.5v accuracy.

Leo,

I'll be using a 2% regulator so Vcc should stay between 4.9 & 5.1 volt. This is a personal project for now but looking to see if I could sell it down the track so I'll stick with a precision reference on the Vref pin. Don't want to be calibrating individual things.

I'm measuring 256 volts. The attenuated signal representing that will be 0-4.096 volts or 4mV per bit of resolution on a 10 bit ADC, or 16mV (4 bits) per real world volt.

Cheers,

Keith

So you're measuring 256volt (AC, DC?).

A 10-bit A/D, if you are able to use the full range, will chop that into 1024 pieces.
Every piece will be 0.25volt.
That is your final resolution.

1/4volt per step, because you have to bring down the 256volt, with a divider, to 0-4.096volt for the A/D.

So it does not make a difference if you use a 4.096volt, a 2.56volt, or a 1.1volt reference.
The input voltage AND the reference voltage AND the resistor divider will set the voltage resolution.
Leo..

Thanks Leo,

that’s the resolution I’m hoping to get. I’ll be pretty happy if all goes well.

Perhaps it comes from being an electrician but I prefer to work with higher voltages to minimise effects of voltage drops anywhere. I play with cnc stuff and industrial signalling is done at 24v instead of 5v to become more immune to noise. If the analogue input worked up to 30 volts I’d probably be doing that LOL.

The voltage is DC.

Keith.

An analogue input, like any other Arduino pin, will only accept voltages 0 to Vcc. For measuring higher voltages you need an voltage divider, or you risk killing the input or entire controller. You can adjust the division ratio so that the 0-1023 values represent something meaningful to you, like 1000 for 30V. You can use a trim pot for the final calibration of the ratio.

All this has been said already, though.

It seems to me that this kind of reading will be hard to attain 1% or better accuracy, without calibrating.

There are just to many different variables (components) involved. If three of them WERE 1%, and all three of the components were only off 1% in the same direction, then seems like you would get a 3% error.

That had crossed my mind Jack, so basically I was going to adjust the attenuation trimpot until I got the AD reading matching the voltage.

As long as the accumulated errors don't change (drift) then I figured it should be OK.

Keith