Header Ads

Header ADS

Analog to Digital Conversion For AVR micro-controller






Analog to Digital Conversion for AVR micro-controller 

Most real-world data is analog. Whether it be temperature, pressure, voltage, etc, their variation is always analog in nature

For example, the temperature inside a boiler is around 800°C. During its light-up, the temperature never approaches directly to 800°C. If the ambient temperature is 400°C, it will start increasing gradually to 450°C, 500°C and thus reaches 800°C over a period of time. This is an analog data.

Now, we must process the data that we have received. But analog signal processing is quite inefficient in terms of accuracy, speed and desired output. Hence, we convert them to digital form using an Analog to Digital Converter (ADC).



Signal Acquisition Process

In general, the signal (or data) acquisition process has 3 steps.

>> In the Real World, a sensor senses any physical parameter and converts into an equivalent analog electrical signal.

>> For efficient and ease of signal processing, this analog signal is converted into a digital signal using an Analog to Digital Converter (ADC).

>> This digital signal is then fed to the Microcontroller (MCU) and is processed accordingly.


Right now, we are concerned about the 8 channel 10 bit resolution feature.

ADC Channels
The ADC in ATmega32 has 8 channel implies that there are 8 ADC pins are multiplexed together. You can connect up to 8 different sensors and get their values separately.
Now you can easily see that these pins are located across PORTA (PA0…PA7).

Resolution


Most important specification of ADCs is the resolution. This specifies how accurately the ADC measures the analog input signals. Now 10 bit ADC will break the range in 5/1024 = 4.8mV approx. 


10 bit resolution implies that
There are 2^10 = 1024 steps
(As described below).

Suppose we use a 5V reference. In this case, any analog value in between 0 and 5V is converted into its equivalent ADC value as shown above.
The 0-5V range is divided into 2^10 = 1024 steps.

Thus, a      0V input will give an ADC output of 0,
                  5V input will give an ADC output of 1023,
Whereas a 2.5V input will give an ADC output of around 512.
This is the basic concept of ADC.






No comments

Theme images by enot-poloskun. Powered by Blogger.