Introduction

Author: Mihai Alexandru Ricanu, Microchip Technology Inc.

The Analog to Digital Converter (ADC) is an indispensable peripheral in analog data collection and processing applications such as sensor nodes, board voltages and currents monitoring, functional safety, layered conditional triggering, and notification. A wide range of applications make use of ADC peripherals. However - if a small signal measurement is required, additional input signal conditioning is necessary, especially in noisy environments. The usage of external filters and amplifiers is usually required to make the sensor output suitable for ADC processing. However, this approach increases the Bill of Materials (BOM) and the total solution cost. The AVR® EB family of microcontrollers (MCUs) has two specific ADC hardware enhancements that intent to solve or alleviate these issues: the internal Programmable Gain Amplifier (PGA) with up to 16x gain and the Burst Accumulation mode with up to 1024 consecutive measurements mean.

The main advantage of the internal PGA over dedicated operational amplifier peripherals on other devices is the input multiplexing. Although these dedicated peripherals feature user-defined feedback and allow for higher gain, they require additional external circuitry, and the limited number of dedicated amplification pins greatly reduces the range of possible applications. The ADC peripheral on the AVR EB features an internal PGA that is available for all ADC channels (24 I/O pins for the AVR16EB32), allowing for a wide range of applications.

By implementing an accumulation and averaging process, the measured signal accuracy improves. This is especially useful if the ADC operates in noisy environments. This method is equivalent to a low-pass filter and has the advantage of attenuating signal fluctuation or noise. The ADC peripheral on the AVR® EB features a Burst Accumulation mode that performs this process in hardware without core interaction.

This document showcases the hardware enhancements of the 12-bit ADC peripheral on the AVR® EB MCU by developing an application where a low-voltage signal is measured. Specific to such applications, the necessary information is provided by slight voltage variations and is usually greatly affected by noise, as the input signal is in the range of a few millivolts. This is a measurement-limiting environment dominated by 24-bit ADCs, where the usage of a simple 12-bit ADC would be unsuitable. The applications taking advantage of the AVR® EB ADC hardware enhancements should consider low dynamic range signals to allow burst accumulations, such as variations of temperature, weight, humidity, and velocity. To demonstrate these features, a strain gauge load cell is used to develop a weight scale application.

The application uses the MPLAB® Code Configurator (MCC) for initial device and peripherals setup. Also, it has a corresponding web page on the Microchip MPLAB Discover website, providing a comprehensive description of the hardware and software requirements.