Page 1 of 1

AVR Anolog to Digital Conversion Errors

Posted: Thu Nov 06, 2014 5:11 pm
by aknickolai
So I've always put small 100nF caps on AVCC and AREF when I need to do analog to digital conversions on my atmel chips. Everything worked, but I just got an LCD working and I'm getting a ~15% error between what my meter and the A2D are claiming the voltage is. If I remove the cap on either AVCC or AREF (ie hardware the connection) the error goes away.

So, should I only be putting a cap on AREF and not AVCC? I've messed a ton with the code and trouble shooting, I'm sure it is a wiring issue related to the caps as removing them eliminates the error. Of course, it also eliminates any filtering as well, I'd like to keep that.

Re: AVR Anolog to Digital Conversion Errors

Posted: Fri Nov 07, 2014 11:29 am
by Ross Robotics
Yes, it is standard to put a 100nF cap in series with AREF.

Re: AVR Anolog to Digital Conversion Errors

Posted: Fri Nov 07, 2014 9:37 pm
by aknickolai
AREF makes since for sure. I guess I don't need one on AVCC, since eliminating that cap gets rid of my A2d error and I would keep the filtering on AREF. Thanks!

Re: AVR Anolog to Digital Conversion Errors

Posted: Fri Nov 07, 2014 9:44 pm
by Ross Robotics
Correct, no need for a series cap on AVCC, just put it to your + supply. Just make sure you have some decoupling caps.

Re: AVR Anolog to Digital Conversion Errors

Posted: Mon Dec 26, 2016 11:00 am
by AVRexpert
HEllo thanks for your question !
In order to use internal ADC you must give the reference voltage to the microcontroller . Connect your AVCC to reference voltage(5 volt generally ) and AREF pin to Ground . So that internal ADC of microcontroller take suitable reference . I have made a nice tutorial for you related to how to use ADC of microcontroller in Atmega32 microcontroller please visit this reference link [url]https:www.electronify.org[/url]
Thank you :clap: :dance: :clap: :dance:

Re: AVR Anolog to Digital Conversion Errors

Posted: Mon Dec 26, 2016 12:46 pm
by jremington
and AREF pin to Ground
Ignore this extremely bad advice, as the ADC will cease to function and the internal circuitry may be destroyed.

The ADC can be affected by noise in the power supply. If using Vcc as the reference, it is common to decouple Vcc and Vcc with a 10 uH inductor as well as capacitors.

See "noise cancelling techniques", section 24.6 and Figure 24.9 of the ATmega328 data sheet