AVR Anolog to Digital Conversion Errors

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.

Yes, it is standard to put a 100nF cap in series with AREF.

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!

Correct, no need for a series cap on AVCC, just put it to your + supply. Just make sure you have some decoupling caps.

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 https:www.electronify.org

Thank you :clap: :dance: :clap: :dance:

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