1.13 Tips for Improving Accuracy
The accuracy of the AVR XMEGA ADC depends on the quality of the input
signals and power supplies. The following items should be taken into
consideration for best possible accuracy of the ADC measurements:
- Understand the ADC, its features and how they are intended used
- Understand the applications requirements
- Make sure the source impedance is not too high compared to the sampling rate that is used. If the source impedance is too high, the internal sampling capacitor will not be charged to the correct level and the result will not be accurate.
- It is important to take great care when designing the analog signal paths like analog reference (VREF) and analog power supply (AVCC). Filtering should be used if the analog power supply is connected to the digital power supply.
- Avoid having the analog signal path close to a digital signal path with high switching noise (i.e. communication lines, clock signals)
- Consider decoupling of the analog signal. Decoupling between signal and ground for single ended inputs and decoupling between the differential signal pair for differential measurements.
- Try toggling as few pins as possible while the ADC is converting to avoid switching noise internally and on power supply. The ADC is most sensitive to switching the I/O pins that are powered by the analog power supply (PORTA/PORTB).
- Switch off unused peripherals by setting PRR registers to eliminate noise from unused peripherals
- Put the XMEGA in the “Idle” sleep mode directly after starting the ADC conversion to reduce noise from the CPU
- Load the calibration values from the signature row into the calibration register in the ADC
- Use the lowest gain possible to avoid amplifying external noise
- Wait until the ADC, reference, or sources are stabilized before sampling as some sources (e.g. bandgap) need time to stabilize after they are enabled
- Apply offset and gain calibration to the measurement
- Use over-sampling to increase resolution and eliminate random noise
- JTAG debugging interface create a lot of noise and should not be used while debugging an ADC application
For randomly distributed noise, using oversampling will help reducing any noise and improve accuracy. Using 8x oversampling will increase resolution by two bits and due to the pipelined design of the ADC it will take only eight additional ADC clock cycles. See the “AVR121: Enhancing ADC resolution by oversampling” application note for more information on oversampling.