Successive-approximation ADC

Last updated
Successive-approximation ADC block diagram showing digital-to-analog converter (DAC), end of conversion indicator (EOC), successive-approximation register (SAR), sample and hold circuit (S/H), input voltage (Vin) and reference voltage (Vref) SA ADC block diagram.png
Successive-approximation ADC block diagram showing digital-to-analog converter (DAC), end of conversion indicator (EOC), successive-approximation register (SAR), sample and hold circuit (S/H), input voltage (Vin) and reference voltage (Vref)

A successive-approximation ADC is a type of analog-to-digital converter (ADC) that digitizes each sample from a continuous analog waveform using a binary search through all possible quantization levels.

Contents

Algorithm

The successive-approximation analog-to-digital converter circuit typically contains four chief subcircuits:

  1. A sample-and-hold circuit that acquires the input voltage Vin.
  2. An analog voltage comparator that compares Vin to the output of a digital-to-analog converter (DAC).
  3. A successive-approximation register that is updated by results of the comparator to provide the DAC with a digital code whose accuracy increases each successive iteration.
  4. A DAC that supplies the comparator with an analog voltage relative to the reference voltage Vref (which corresponds to the full-scale range of the ADC) and proportional to the digital code of the SAR.
Animation of a 4-bit successive-approximation ADC 4-bit Successive Approximation DAC.gif
Animation of a 4-bit successive-approximation ADC

The successive-approximation register is initialized with 1 in the most significant bit (MSB) and zeroes in the lower bits. The register's code is fed into the DAC, which provides an analog equivalent of its digital code (initially 1/2Vref) to the comparator for comparison with the sampled input voltage. If this analog voltage exceeds Vin, then the comparator causes the SAR to reset this bit; otherwise, the bit is left as 1. Then the next bit is set to 1 and the same test is done, continuing this binary search until every bit in the SAR has been tested. The resulting code is the digital approximated output of the sampled input voltage.

The algorithm's objective for the nth iteration is to approximately digitize the input voltage to an accuracy of 12n relative to the reference voltage. To show this mathematically, the normalized input voltage is represented as x in [−1, 1] by letting Vin = xVref. The algorithm starts with an initial approximation of x0 = 0 and during each iteration i produces the following approximation:

ith approximation: xi = xi−1sgn(xi−1x)/2i

where the binary signum function sgn mathematically represents the comparison of the previous iteration's approximation xi-1 with the normalized input voltage x:It follows using mathematical induction that the approximation of the nth iteration theoretically has a bounded accuracy of: |xnx| ≤ 1/2n.

Inaccuracies in non-ideal analog circuits

When implemented as a real analog circuit, circuit inaccuracies and noise may cause the binary search algorithm to incorrectly remove values it believes Vin cannot be, so a successive-approximation ADC might not output the closest value. It is very important for the DAC to accurately produce all 2n analog values for comparison against the unknown Vin in order to produce a best match estimate. The maximal error can easily exceed several LSBs, especially as the error between the actual and ideal 2n becomes large. Manufacturers may characterize the accuracy using an effective number of bits (ENOB) smaller than the actual number of output bits.

As of 2001, the component-matching limitations of the DAC generally limited the linearity to about 12 bits in practical designs and mandated some form of trimming or calibration to achieve the necessary linearity for more than 12 bits. [1] As of 2012, SAR ADCs are limited to 18 bits, while delta-sigma ADCs (which can be 24 bits) are better suited if more than 16 bits are needed. [2] SAR ADCs are commonly found on microcontrollers because they are easy to integrate into a mixed-signal process, but suffer from inaccuracies from the internal reference voltage resistor ladder and clock and signal noise from the rest of the microcontroller, so external ADC chips may provide better accuracy. [3]

Operation of successive-approximation ADC as input voltage falls from 5 to 0 V. Iterations on the x axis, starting with the initial state at notch 1. Voltages on the y axis. ADC animation 20.gif
Operation of successive-approximation ADC as input voltage falls from 5 to 0 V. Iterations on the x axis, starting with the initial state at notch 1. Voltages on the y axis.

Examples

Example 1: The steps to converting an analog input to 9-bit digital, using successive-approximation, are shown here for all voltages from 5 V to 0 V in 0.1 V iterations. Since the reference voltage is 5 V, when the input voltage is also 5 V, all bits are set. As the voltage is decreased to 4.9 V, only some of the least significant bits are cleared. The MSB will remain set until the input is one half the reference voltage, 2.5 V.

The binary weights assigned to each bit, starting with the MSB, are 2.5, 1.25, 0.625, 0.3125, 0.15625, 0.078125, 0.0390625, 0.01953125, 0.009765625. All of these add up to 4.990234375, meaning binary 111111111, or one LSB less than 5.

When the analog input is being compared to the internal DAC output, it effectively is being compared to each of these binary weights, starting with the 2.5 V and either keeping it or clearing it as a result. Then by adding the next weight to the previous result, comparing again, and repeating until all the bits and their weights have been compared to the input, the result, a binary number representing the analog input, is found.

Example 2: The working of a 4-bit successive-approximation ADC is illustrated below. The MSB is initially set to 1 whereas the remaining digits are set to zero. If the input voltage is lower than the value stored in the register, on the next clock cycle, the register changes its value to that illustrated in the figure by following the green line. If the input voltage is higher, then on the next clock cycle, the register changes its value to that illustrated in the figure by following the red line. The simplified structure of this type of ADC that acts on 2n volts range can be expressed as an algorithm:

  1. Initialize register with MSB set to 1 and all other values set to zero.
  2. In the nth clock cycle, if voltage is higher than digital equivalent voltage of the number in register, the (n+1)th digit from the left is set to 1. If the voltage were lower than digital equivalent voltage, then nth digit from left is set to zero and the next digit is set to 1. To perform a conversion, an N-bit ADC requires N such clock cycles excluding the initial state.
Working of successive approximation ADC
Successive-approximation ADC example Setup.svg
Setup where output values of the ADC are arranged in a grid, vertical axis corresponding to voltage. It is a 4-bit ADC that measures input voltages from 0V to 15V.
Successive-approximation ADC example working value 1.svg
Previously established setup where an input voltage of 10.4V is provided.
Successive-approximation ADC example working value 2.svg
Previously established setup where an input voltage of 9.4V is provided.

The successive-approximation ADC can be alternatively explained by first uniformly assigning each digital output to corresponding ranges as shown. It can be seen that the algorithm essentially divides the voltage range into two regions and checks which of the two regions the input voltage belongs to. Successive steps involve taking the identified region from before and further dividing the region into two and continuing identification. This occurs until all possible choices of digital representations are exhausted, leaving behind an identified region that corresponds to only one of the digital representations.

Variants

Charge-redistribution successive-approximation ADC

Switched capacitor array acting as the DAC for an N-bit charge-redistribution SAR ADC, fed into a ground-referenced comparator. ChargeScalingDAC.png
Switched capacitor array acting as the DAC for an N-bit charge-redistribution SAR ADC, fed into a ground-referenced comparator.

One of the most common SAR ADC implementations uses a charge-scaling DAC consisting of an array of individually-switched capacitors sized in powers of two and an additional duplicate of the smallest capacitor, for a total of N+1 capacitors for N bits. Thus if the largest capacitance is C, then the array's total capacitance is 2C. The switched capacitor array acts as both the sample-and-hold element and the DAC. Redistributing their charge will adjust their net voltage, which is feed into the negative input of a comparator (whose positive input is always grounded) to perform the binary search using the following steps: [4] [5]

3 bit capacitive ADC, using Vref = 5V. The bottom left transient simulation uses Vin [?] 3.5V or about .7 of Vref, resulting in an answer of
5/8 (101 in binary), representing 3.125V or 0.625 of Vref. "PESE" is the voltage on the array, and its remaining final voltage is the conversion's residual error. CAPadc.png
3 bit capacitive ADC, using Vref = 5V. The bottom left transient simulation uses Vin ≅ 3.5V or about .7 of Vref, resulting in an answer of 58 (101 in binary), representing 3.125V or 0.625 of Vref. "PESE" is the voltage on the array, and its remaining final voltage is the conversion's residual error.
  1. Discharge: The capacitors are discharged. (Note, discharging to comparator's offset voltage will automatically provide offset cancellation.)
  2. Sampling: The capacitors are switched to the input signal Vin. After a brief sampling period, the capacitors will hold a charge equal to their respective capacitance times Vin (and minus the offset voltage upon each of them), so the array holds a total charge of 2C·Vin.
  3. Hold: The capacitors are then switched to ground. This provides the comparator's negative input with a voltage of Vin.
  4. Conversion: the actual conversion process proceeds with the following steps in each iteration, starting with the largest capacitor as the test capacitor for the MSB, and then testing each next smaller capacitor in order for each bit of lower significance:
    1. Redistribution: The current test capacitor is switched to Vref. The test capacitor forms a charge divider with the remainder of the array whose ratio depends on the capacitor's relative size. In the first iteration, the ratio is 1:1, so the comparator's negative input becomes Vin + Vref2. On the ith iteration, the ratio will be 1:2i−1, so the ith iteration of this redistribution step effectively adds Vref2i to the voltage.
    2. Comparison: The comparator's output determines the bit's value for to the current test capacitor. In the first iteration, if Vin is greater than Vref2, then the comparator will output a digital 1 and otherwise output a digital 0.
    3. Update Switch: A digital 0 result will leave the current test capacitor connected to Vref for subsequent iterations, while a digital 1 result will switch the capacitor back to ground. Thus, each ith iteration may or may not add Vref2i to the comparator's negative input voltage. For instance, the voltage at the end of the first iteration will be Vin + MSB·Vref2.
  5. End Of Conversion: After all capacitors are tested in the same manner, the comparator's negative input voltage will have converged as close as possible (given the resolution of the DAC) to the comparator's offset voltage.

See also

Related Research Articles

<span class="mw-page-title-main">Analog-to-digital converter</span> System that converts an analog signal into a digital signal

In electronics, an analog-to-digital converter is a system that converts an analog signal, such as a sound picked up by a microphone or light entering a digital camera, into a digital signal. An ADC may also provide an isolated measurement such as an electronic device that converts an analog input voltage or current to a digital number representing the magnitude of the voltage or current. Typically the digital output is a two's complement binary number that is proportional to the input, but there are other possibilities.

<span class="mw-page-title-main">Companding</span> Method of mitigating the detrimental effects of a channel with limited dynamic range

In telecommunications and signal processing, companding is a method of mitigating the detrimental effects of a channel with limited dynamic range. The name is a portmanteau of the words compressing and expanding, which are the functions of a compander at the transmitting and receiving ends, respectively. The use of companding allows signals with a large dynamic range to be transmitted over facilities that have a smaller dynamic range capability. Companding is employed in telephony and other audio applications such as professional wireless microphones and analog recording.

<span class="mw-page-title-main">Comparator</span> Device that compares two voltages or currents

In electronics, a comparator is a device that compares two voltages or currents and outputs a digital signal indicating which is larger. It has two analog input terminals and and one binary digital output . The output is ideally

<span class="mw-page-title-main">Delta modulation</span> Signal conversion technique

Delta modulation is an analog-to-digital and digital-to-analog signal conversion technique used for transmission of voice information where quality is not of primary importance. DM is the simplest form of differential pulse-code modulation (DPCM) where the difference between successive samples is encoded into n-bit data streams. In delta modulation, the transmitted data are reduced to a 1-bit data stream representing either up (↗) or down (↘). Its main features are:

<span class="mw-page-title-main">Digital-to-analog converter</span> Device that converts a digital signal into an analog signal

In electronics, a digital-to-analog converter is a system that converts a digital signal into an analog signal. An analog-to-digital converter (ADC) performs the reverse function.

<span class="mw-page-title-main">TI MSP430</span> Mixed-signal microcontroller family

The MSP430 is a mixed-signal microcontroller family from Texas Instruments, first introduced on 14 February 1992. Built around a 16-bit CPU, the MSP430 was designed for low power consumption, embedded applications and low cost.

<span class="mw-page-title-main">Sample and hold</span> Type of voltage sampling device

In electronics, a sample and hold circuit is an analog device that samples the voltage of a continuously varying analog signal and holds its value at a constant level for a specified minimum period of time. Sample and hold circuits and related peak detectors are the elementary analog memory devices. They are typically used in analog-to-digital converters to eliminate variations in input signal that can corrupt the conversion process. They are also used in electronic music, for instance to impart a random quality to successively-played notes.

In signal processing, oversampling is the process of sampling a signal at a sampling frequency significantly higher than the Nyquist rate. Theoretically, a bandwidth-limited signal can be perfectly reconstructed if sampled at the Nyquist rate or above it. The Nyquist rate is defined as twice the bandwidth of the signal. Oversampling is capable of improving resolution and signal-to-noise ratio, and can be helpful in avoiding aliasing and phase distortion by relaxing anti-aliasing filter performance requirements.

<span class="mw-page-title-main">Delta-sigma modulation</span> Method for converting signals between digital and analog

Delta-sigma modulation is an oversampling method for encoding signals into low bit depth digital signals at a very high sample-frequency as part of the process of delta-sigma analog-to-digital converters (ADCs) and digital-to-analog converters (DACs). Delta-sigma modulation achieves high quality by utilizing a negative feedback loop during quantization to the lower bit depth that continuously corrects quantization errors and moves quantization noise to higher frequencies well above the original signal's bandwidth. Subsequent low-pass filtering for demodulation easily removes this high frequency noise and time averages to achieve high accuracy in amplitude which can be ultimately encoded as pulse-code modulation (PCM).

<span class="mw-page-title-main">Charge-transfer amplifier</span>

The charge-transfer amplifier (CTA) is an electronic amplifier circuit. Also known as transconveyance amplifiers, CTAs amplify electronic signals by dynamically conveying charge between capacitive nodes in proportion to the size of a differential input voltage. By appropriately selecting the relative node capacitances, voltage amplification occurs by the charge-voltage relationship of capacitors. CTAs are clocked, or sampling, amplifiers. They consume zero static power and can be designed to consume (theoretically) arbitrarily low dynamic power, proportional to the size of input signals being sampled. CMOS technology is most commonly used for implementation. CTAs were introduced in memory circuits in the 1970s, and more recently have been applied in multi-bit analog-to-digital converters (ADCs). They are also used in dynamic voltage comparator circuits.

A resistor ladder is an electrical circuit made from repeating units of resistors, in specific configurations.

A flash ADC is a type of analog-to-digital converter that uses a linear voltage ladder with a comparator at each "rung" of the ladder to compare the input voltage to successive reference voltages. Often these reference ladders are constructed of many resistors; however, modern implementations show that capacitive voltage division is also possible. The output of these comparators is generally fed into a digital encoder, which converts the inputs into a binary value.

A switched capacitor (SC) is an electronic circuit that implements a function by moving charges into and out of capacitors when electronic switches are opened and closed. Usually, non-overlapping clock signals are used to control the switches, so that not all switches are closed simultaneously. Filters implemented with these elements are termed switched-capacitor filters, which depend only on the ratios between capacitances and the switching frequency, and not on precise resistors. This makes them much more suitable for use within integrated circuits, where accurately specified resistors and capacitors are not economical to construct, but accurate clocks and accurate relative ratios of capacitances are economical.

Verilog-AMS is a derivative of the Verilog hardware description language that includes Analog and Mixed-Signal extensions (AMS) in order to define the behavior of analog and mixed-signal systems. It extends the event-based simulator loops of Verilog/SystemVerilog/VHDL, by a continuous-time simulator, which solves the differential equations in analog-domain. Both domains are coupled: analog events can trigger digital actions and vice versa.

Effective number of bits (ENOB) is a measure of the real dynamic range of an analog-to-digital converter (ADC), digital-to-analog converter (DAC), or associated circuitry. Although the resolution of a converter may be specified by the number of bits used to represent the analog value, real circuits however are imperfect and introduce additional noise and distortion. Those imperfections reduce the number of bits of accuracy. The ENOB describes the effective resolution of a real converter in terms of the number of bits an ideal converter with the same resolution would have.

<span class="mw-page-title-main">Differential nonlinearity</span>

Differential nonlinearity is a commonly used measure of performance in digital-to-analog (DAC) and analog-to-digital (ADC) converters. It is a term describing the deviation between two analog values corresponding to adjacent input digital values. It is an important specification for measuring error in a digital-to-analog converter (DAC); the accuracy of a DAC is mainly determined by this specification. Ideally, any two adjacent digital codes correspond to output analog voltages that are exactly one Least Significant Bit (LSB) apart. Differential non-linearity is a measure of the worst-case deviation from the ideal 1 LSB step. For example, a DAC with a 1.5 LSB output change for a 1 LSB digital code change exhibits 1⁄2 LSB differential non-linearity. Differential non-linearity may be expressed in fractional bits or as a percentage of full scale. A differential non-linearity greater than 1 LSB may lead to a non-monotonic transfer function in a DAC. It is also known as a missing code.

Integral nonlinearity is a commonly used measure of performance in digital-to-analog (DAC) and analog-to-digital (ADC) converters. In DACs, it is a measure of the deviation between the ideal output value and the actual measured output value for a certain input code. In ADCs, it is the deviation between the ideal input threshold value and the measured threshold level of a certain output code. This measurement is performed after offset and gain errors have been compensated.

An integrating ADC is a type of analog-to-digital converter that converts an unknown input voltage into a digital representation through the use of an integrator. In its basic implementation, the dual-slope converter, the unknown input voltage is applied to the input of the integrator and allowed to ramp for a fixed time period. Then a known reference voltage of opposite polarity is applied to the integrator and is allowed to ramp until the integrator output returns to zero. The input voltage is computed as a function of the reference voltage, the constant run-up time period, and the measured run-down time period. The run-down time measurement is usually made in units of the converter's clock, so longer integration times allow for higher resolutions. Likewise, the speed of the converter can be improved by sacrificing resolution.

A logarithmic resistor ladder is an electronic circuit, composed of a series of resistors and switches, designed to create an attenuation from an input to an output signal, where the logarithm of the attenuation ratio is proportional to a binary number that represents the state of the switches.

The following outline is provided as an overview of and topical guide to electronics:

References

  1. "Understanding SAR ADCs: Their Architecture and Comparison with Other ADCs". Analog Devices . 2001-10-02. Archived from the original on 2024-11-18. Retrieved 2025-01-03.
  2. "Understanding Noise, ENOB, and Effective Resolution in Analog-to-Digital Converters". Analog Devices . 2012-05-07. Archived from the original on 2024-04-22. Retrieved 2024-12-28.
  3. Giovino, Bill (2018-11-21). "IoT Microcontrollers Have ADCs, but Know When to Choose and Apply an External ADC". DigiKey . Archived from the original on 2024-06-24. Retrieved 2025-01-03.
  4. Kugelstadt, Thomas (2000). "The operation of the SAR-ADC based on charge redistribution" (PDF). Texas Instruments . Archived (PDF) from the original on 2024-12-27. Retrieved 2024-12-28.
  5. "Operation of a SAR-ADC Based on Charge Redistribution". Renesas Electronics . 2020. Archived from the original on 2024-10-15. Retrieved 2024-12-28.

Further reading