Analog to Digital Converter
(Redirected from ADC)

From bildr

Jump to: navigation, search

Analog to Digital Converter (ADC) , often found on Microcontrollers, the ADC allows a digital device to read an analog signal. Anytime a microcontroller has an "analog in" that is an ADC.

Resolution (AKA bits)

Bits of resolution - the readings double with each bit of resolution

The resolution of an ADC, measured in bits, determines how small a change the ADC can detect.

If your microcontroller runs at 5V, and has a 10-bit ADC, it will read 0 at 0 volts, and 1023 at 5V. (1023 because 2^10(bits) = 1024, and 0 is a valid choice, so 0-1023.)

Note that a digital device can only read whole numbers, so if a reading falls between 255 and 256, it will be rounded to the nearest integer value.

So if your connected analog sensor outputs 2.5V, the ADC will see 511 (512 - 1).

It seems, then, that 10 bits would sense very small changes, down to 0.005 V. However, if the analog sensor connected to the ADC only output between 2.5 and 3 V depending on what it sensed, then even though a 10-bit ADC can sense 1024 states, it could under these circumstances only report 102 different states.

If the sensor in question was a digital compass, you could only see changes greater than 3.6 degrees — not very good at all.

In this case, a higher-bit ADC would be hugely beneficial. A 12-bit ADC (4096 states) on the same setup would sense changes as small as 0.88 degrees.

However, if you replaced that digital compass with one that output between 0-5V, for 0-360 degrees, and used the smaller 10-bit ADC, you could sense changes as small as 0.35 degrees.

So the rule of thumb for using an ADC is that if you want the most out of it, try to use sensors that output the largest voltage range. If you are limited by the sensor, but need to sense smaller changes, you need a higher-bit ADC.

An analog-to-digital converter is a device that takes an analog signal and converts it to a digital one. Typical A/D converters have 8 or 10 bits of resolution, meaning that they are able to distinguish between 2^8 (~256), or 2^10 (~1024) different voltages over the range of the A/D converter.

For example, on an analog signal being received by a 10 bit A/D converter that reads between +5 volts and 0 volts, the relationship will be as follows:

Input Voltage Digital Output Value
< 0 Volts 0
0 Volts 0
1 Volt 204
2 Volts 409
3 Volts 613
4 Volts 818
5 Volts 1023
> 5 Volts 1023

Note that for this example, the digital value for the 10 bit A/D converter never reaches 1024 (2^10 = 1024), this is because we started counting at 0.


