How Arduino UNO ADC works | applied electronics engineering

Latest

How Arduino UNO ADC works

By Applied Electronics - Sunday, April 16, 2017 No Comments
The Arduino UNO uses ATMega328P microcontroller. In its default it uses 10bit ADC and its sample rate is configured to be 9.6KHz. That means that the analog signal like audio signal bandwidth that can be effectively captured is 4.8KHz. So if you have analog signal and ask the question where is most of the information contained and it is within 4.8KHz then this ADC setting of Arduino UNO can be used. Each analog signal sampled value is stored as 10 bit digital value. The higher the ADC resolution which is 10 bit in Arduino default state, the better the precision of the analog signal. For example, a CD audio signal is stored as 16bit digital values.

The sampling rate of the inside ADC of Arduino is determined by an internal clock that is fed to the ADC. Meaning the ADC clock determines the sampling rate. The clock is programmable via the prescaler. The prescaler is a digital component inside the microcontroller that divides the Arduino 16MHz master clock by 128 to create 125KHz clocking frequency to the Arduino ADC.

Now you might be asking, ok, inside the microcontroller we have a clock of 16MHz, the prescaler due to default dividing factor of 128 gives us 16/128=12KHz clock source but you said the ADC of Arduino works as 9KHz sampling rate? Well yes, the ADC is in fact clock sourced using 125KHz clock pulses but sampling one analog signal takes 13 clock cycle. Each clock cycle is 125KHz and hence the sampling rate is 125KHz/13 which is approximately 9.6KHz.

OK so we have a analog signal at the analog pin of the Arduino and we want to convert it to digital signal by using the Arduino internal ADC. The analog signal is fed into the ADC. The ADC has sampling rate of 9.KHz. Hence we actually are acquiring signal with bandwidth 4.8KHz. The sampling rate of the internal ADC is due to the prescaler and the due to the 13 clock cycle for sampling one time the analog signal.

How can you increase the sampling rate? We if you think for a moment, the sampling rate is determined by prescaler(16MHz/128). If you lower the prescaler value then the sampling rate is increased. See the following block diagram of the Atmega328 microcontroller.

See also Programming ATmega328P microcontroller using Proteus


Tags:

No Comment to " How Arduino UNO ADC works "