Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

[AVR-Chat] Re: ADC accuracy in ATmega8535 - external ref

[AVR-Chat] Re: ADC accuracy in ATmega8535 - external ref

2004-11-03 by David Jones

>>> dave_mucha@yahoo.com 03/11/2004 1:48:24 pm >>>
>I figured the 4.096v was to generate an exact integer for a 12 bit 
>ADC.

Yep. It'll do the same for any number of bits actually.

>Guess that means a 0-5 requires a voltge divider to get to the 4.096 
>value at 5 volts.

Yes, although you are probably better off using a 5V reference if you
want 0-5V range. Otherwise if you use 4.096V you have to use say 0.1%
precision resistors for the divider. Extra components, extra cost,
greater error.
Regardless of whether you use 4.096 with a divider, or 5V without a
divider, you will still have an oddball value per bit. i.e for a 5V
input and 12bit ADC you will have 1.22mV per bit. Can't escape that
fact.

>I assume that 4.096 volts is exactly 12 bits also and not some 80% of

>the range.  If I am not mistaken, the whole idea of the voltage ref 
>is that with that specifc voltage, the input will be exactly 12.000 
>bits so even if it were a 2 volt ref, 2 volts in on an ADC pin would 
>be exactly 12 bits.

Correct.
Use a 5V reference you get a 0-5V range, use a 2.5V ref you get 0-2.5V
range etc. All of them will still give you 12 bits of resolution.
Although the lower the voltage reference gets, the greater impact you'll
have from noise. i.e. a 2.5V ref gives 610uV per bit. So if you have 1mV
of noise in your system, that is almost 2 least significant bits worth
of noise.

Dave :)

Re: [AVR-Chat] Re: ADC accuracy in ATmega8535 - external ref

2004-11-03 by Robert Adsett

At 02:16 PM 11/3/04 +1100, you wrote:

> >>> dave_mucha@yahoo.com 03/11/2004 1:48:24 pm >>>
> >I figured the 4.096v was to generate an exact integer for a 12 bit
> >ADC.
>
>Yep. It'll do the same for any number of bits actually.
>
> >Guess that means a 0-5 requires a voltge divider to get to the 4.096
> >value at 5 volts.
>
>Yes, although you are probably better off using a 5V reference if you
>want 0-5V range. Otherwise if you use 4.096V you have to use say 0.1%
>precision resistors for the divider. Extra components, extra cost,
>greater error.

2 resistors at 0.1%, a 0.1% reference, the ATmega8535 has a 10bit converter 
so that's a best case accuracy of a little under 0.1% (the data sheet 
suggests it's actually probably closer to 0.3% depending on what kind of 
accuracy you are looking for).  That doesn't leave much of an error budget 
for sensor errors layout or other considerations.

I am assuming that it's unlikely for the source signal level range to match 
the A/D input range and that it will either have to be increased or reduced 
(and will thus likely have at least 2 resistors involved in the input).

Some of that can be calibrated out but that will mean some sort of 
precision source (better certainly than 0.1%) and additional care in 
testing/calibration.

If I was presented with a request for any particular accuracy my first 
question would be to ask what the accuracy of the source transducer 
was.  To get 0.5% using the ATmega I would at first blush estimate the 
source would have to 0.1% accurate or better.  A lot of sources don't 
approach that, a fair number have trouble even being 8 bits accurate.


Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Re: ADC accuracy in ATmega8535 - external ref

2004-11-03 by Dave Mucha

--- In AVR-Chat@yahoogroups.com, Robert Adsett <subscriptions@a...> 
wrote:
> At 02:16 PM 11/3/04 +1100, you wrote:
> 
> > >>> dave_mucha@y... 03/11/2004 1:48:24 pm >>>
> > >I figured the 4.096v was to generate an exact integer for a 12 
bit
> > >ADC.
> >
> >Yep. It'll do the same for any number of bits actually.
> >
> > >Guess that means a 0-5 requires a voltge divider to get to the 
4.096
> > >value at 5 volts.
> >
> >Yes, although you are probably better off using a 5V reference if 
you
> >want 0-5V range. Otherwise if you use 4.096V you have to use say 
0.1%
> >precision resistors for the divider. Extra components, extra cost,
> >greater error.
> 
> 2 resistors at 0.1%, a 0.1% reference, the ATmega8535 has a 10bit 
converter 
> so that's a best case accuracy of a little under 0.1% (the data 
sheet 
> suggests it's actually probably closer to 0.3% depending on what 
kind of 
> accuracy you are looking for).  That doesn't leave much of an error 
budget 
> for sensor errors layout or other considerations.
> 
> I am assuming that it's unlikely for the source signal level range 
to match 
> the A/D input range and that it will either have to be increased or 
reduced 
> (and will thus likely have at least 2 resistors involved in the 
input).
> 
> Some of that can be calibrated out but that will mean some sort of 
> precision source (better certainly than 0.1%) and additional care 
in 
> testing/calibration.
> 
> If I was presented with a request for any particular accuracy my 
first 
> question would be to ask what the accuracy of the source transducer 
> was.  To get 0.5% using the ATmega I would at first blush estimate 
the 
> source would have to 0.1% accurate or better.  A lot of sources 
don't 
> approach that, a fair number have trouble even being 8 bits 
accurate.
> 
> 
> Robert

The transducer that will be measured will have a 0-5Vdc output that 
is really about 100mV to 5v and has an accurace of better than 0.001% 
if you correct for the termperature and voltage.

In point of fact, some people use only the first 3% for the entire 
range into a 12 bit ADC.

I know of one guy using a 24bit ADC.

Our application will have the input into two channels.  One for the 
full 0-5V and the other with some range of about 15% of the full 
range.

But our first try with the TLC2543 showed that without doing 
something about the board voltge we were way off.

Dave

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.