Analog to Digital

Table of Contents


Introduction

Analog data is considered 'continuous', and attempts to register all instances of information passed.  Digital data, on the other hand, takes samples of data.  An analog to digital converter (ADC) must take the constant stream of data received from an analog sensor, and allow it to be stored in a finite, digital way.  Digital data is stored as a collection of 1's and 0's.  A digital input registers only these two types of values.  In a system running on 5V, an input of 5V would correlate to a 1, and 0V is a 0.  You can hopefully see how one might run into an issue when trying to gain more accuracy.  What would a value of 3.72V mean in this scenario?  This is where ADC converters are useful.

Dynamic Range, Accuracy, and Resolution

The dynamic range of an ADC converter is the range between the smallest and largest values that can be registered and measured by the system.  Digitally, these values are stored as an array of bits.  Since each bit can hold the value of 0 or 1, 2^n, with n being the number of bits available, represents the resolution allotted to each value.  If an ADC converter has 8 bits to store information, then its accuracy would be 2^8=256.  Thus there are 256 possible values that can be registered.  If there are 16 bits available, this number jumps to 65 536 possible values.  The level of resolution depends on the converter being used, and can vary widely.  Accuracy, on the other hand, is how close the digital output is to the analog input after the conversion is completed.  There are a variety of factors that can adjust the accuracy of a sensor, and sometimes a sensor can be more poorly calibrated than its resolution allots for, meaning that the last few bits are nothing more than random noise.  On the other hand, the resolution may be low, with a high accuracy, and as a result every bit stored in the digital output is accurate, but it could be more accurate if allocated more bits.

Conversion

The information is received through voltage.  The analog to digital converter uses a ratio of the voltage received and the voltage passed into the circuit to determine what value should be stored.  Here you will be taken through an example of a circuit that is running 5V, with a 10 bit memory storage giving 2^10=1024 possible values.  The first of these is 0, making the highest value 1023.  Here receiving an input of 5V would result in the storage of the value 1023, and an input of 0V would be 0.  All intermediate values are determined through the ratio seen below:

We can fill in the resolution as the aforementioned 1023, and system voltage (or max value that can be registered by ADC if the two are different) as 5V.

Now that we have our equation set up, we can begin to see how the system makes its conversion.  Lets say our ADC receives an input of 2.12V.

Now it is just a matter of solving for x:

Hopefully this example makes it much clearer how this conversion works.  The value will always be stored in a ratio to the total amount of possible values.  If there were 16 bits available, the stored value would be 65 535 / 5.00V * 2.12V = 27 786.  This is obviously much more accurate, but is highly unnecessary in most basic projects, thus 10 bits are often used.

Types

Successive Approximation ADCs (SAR)

     These are the most common ADCs.  Here a single converter can be shared by multiple inputs, and the process of conversion is quite simple.  The analog input and a signal from the SAR are sent to a comparator n times, with n being the number of bits that the ADC can register.  The closest value to the input is then stored.   The largest issue with these ADCs is that they do not have any anti-aliasing filtering and thus false signals can be stored if the sample rate is too low.

Delta-sigma ADCs (ΔΣ)

     These are more complex and powerful than SARs.  The precision they bring allows them to be used in many video and audio applications.  They include a low-pass filter, which allows them to have excellent signal-to-noise performance.  They work through a massive over-sampling of data, which can be hundreds of times greater than the sample rate selected.  This makes it nearly impossible to to digitize false signals, and can increase the output resolution to 24 bits.  It does, however, impose a limit to how fast they can work.

Dual Slope ADCs

     These work on the principle of allowing the input voltage to 'run up' an integrator, and then using a known voltage to ramp it down.  The time it takes to complete this process is registered and used to determine the voltage coming in, thus allowing it to be stored as digital data.  Although this is very reliable, the process takes a lot of time, and speeding it up decreases the accuracy.

Flash ADCs

     These are the fastest analog to digital converters available, and they work by mapping the input to known values.  So in an 8 bit converter, there needs to be 256 pre-stored known values in the converter to compare the input to.  In a 10 bit, this jumps to 1024.  This makes them extremely power and memory hungry as the accuracy grows, and thus 8 bits is the common sweet spot seen in these converters.


Pipelined ADCs

     These ADC's are faster than SARs but slower than Flash ADCs.  Unlike Flash ADC's they do not have all of their comparators latched simultaneously, which slows them down slightly but also allows for a much smaller energy consumption.  There is a trade off between immediate speed which gives one a large increase in resolution when using Pipelined ADC's.

Errors

There are a variety of errors that come along with ADC converters, and it is important to have an understanding of them in order to diagnose issues as one works with them.




Offset Error

     This occurs when the slope of analog input to digital output is correct, but the values all differ from what they should be by a set amount.  In this scenario, a converter may release a signal that always indicates that the voltage is 0.2V higher than it actually is, for example.  This can be easily solves by setting another offset to oppose and cancel out the flaw.






Gain Error

     This occurs when the magnitude of error increases as voltage changes (can be when voltage increases or decreases).  An example of this would be an ADC that is perfectly calibrated to the input of 0V, but as the voltage increases, the ADC registers a much greater increase and thus provides an output relative to 3.5V when only 3V are input.  To effectively determine the difference between the real slope of the input and the slope of the output, one must first eliminate all offset error.







Full Scale Error 

     The sum of the offset and gain error.  Through proper calibration this can be fully eliminated.








Non-Linearity Error

     This error can not be so easily solved for.  Once one calibrates and ADC to have the input and output's start and end points line up, and discrepancies along the way are not due to a constant offset or gain, but instead the non-linearity of the converters signal.  This error is generally described in one of two ways; Integral Non-Linearity Error (INL) and Differential Non-Linearity Error (DNL).  The INL describes the largest difference between the input and output seen along all values the ADC can receive. DNL, on the other hand, is the individual error at each point of input and output.








Non-Monotonicity Error

     Here, code is missing in the ADC that prevents certain outputs from ever being sent.  This causes the output to be greatly skewed, and must be closely watched for.




Specifications

When choosing an ADC, these specifications must be taken into consideration.

Resolution

     The number of possible values that an input can be turned into.  If an ADC has 10 bits of storage, the resolution is 1024

Range

     The difference between the maximum and minimum values that can be received.

Precision

     The change in input value that will alter the output of an ADC.  An ADC with high resolution and small range will have a better precision than one with lower resolution or a greater range.

Least Significant Bit

     LSB is determined by the accuracy.  The tenth bit of a 10 bit ADC is the least significant bit.

Accuracy

     How similar the output value (digital) is to what is sent into the ADC (analog).  The error types listed above will alter the accuracy of an ADC.  Furthermore, the accuracy of an ADC may not be the same as the resolution.  An ADC with an 8 bit resolution may have an accuracy of 6 bits if poorly calibrated, meaning the 2 least significant bits (7 and 8) are nothing but noise.

Applications

There are many uses of ADCs seen in everyday life.  For example, converting what you say (analog) into stored audio in a phone call.  Furthermore, all images captured on digital devices must convert the light coming into the lens into a digital image.  Temperature sensors in air conditioners and other climate control devices air constantly recording their analog surroundings and turning them into understandable digital data.  There are digital devices everywhere, and they are constantly converting the analog data around them.

References

[1] iMooX at. "Analog-to-Digital Converters (ADC) - Basics," YouTube, Nov. 10, 2019 [Video File]. Available:   [Accessed: May, 2021].

[2] N. Seidle, “Analog to Digital Conversion,” Analog to digital conversion, 07-Feb-2013. [Online]. Available: https://learn.sparkfun.com/tutorials/analog-to-digital-conversion/all. [Accessed: 22-Nov-2021].

[3] E. Technology, “Analog to digital converter (ADC) - block diagram, Factors & Applications,” ELECTRICAL TECHNOLOGY, 02-May-2020. [Online]. Available: https://www.electricaltechnology.org/2019/02/analog-to-digital-converter-adc.html. [Accessed: 22-Nov-2021].

[4] E. Technology, “Analog to digital converter (ADC) - block diagram, Factors & Applications,” ELECTRICAL TECHNOLOGY, 02-May-2020. [Online]. Available: https://www.electricaltechnology.org/2019/02/analog-to-digital-converter-adc.html. [Accessed: 22-Nov-2021].

[5]