Content deleted Content added
m typos |
m convert special characters found by Wikipedia:Typo Team/moss (via WP:JWB) |
||
(47 intermediate revisions by 13 users not shown) | |||
Line 1:
{{Short description|Type of analog-to-digital
{{No footnotes|date=March 2020}}
[[File:SA ADC block diagram.png|thumb|
A '''successive-approximation ADC''' (or '''SAR ADC''') is a type of [[analog-to-digital converter]] (ADC) that
▲[[File:SA ADC block diagram.png|thumb|300px|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 (''V''<sub>IN</sub>) and reference voltage (''V''<sub>REF</sub>)]]
== History ==
▲A '''successive-approximation ADC''' is a type of [[analog-to-digital converter]] that converts a continuous [[analog waveform]] into a discrete [[Digital data|digital]] representation using a [[binary search]] through all possible [[Quantization (signal processing)|quantization]] levels before finally converging upon a digital output for each conversion.
The SAR ADC was first used for experimental [[pulse-code modulation]] (PCM) by [[Bell Labs]] in the 1940s. In 1954, [[Bernard Marshall Gordon|Bernard Gordon]] introduced the first commercial [[vacuum tube]] SAR ADC, converting 50,000 11-bit [[samples per second]].<ref>{{Cite web |last=Kester |first=Walt |date=June 2005 |title=Which ADC Architecture Is Right for Your Application? |url=https://www.analog.com/en/resources/analog-dialogue/articles/the-right-adc-architecture.html |url-status=live |archive-url=https://web.archive.org/web/20250109032609/https://www.analog.com/en/resources/analog-dialogue/articles/the-right-adc-architecture.html |archive-date=2025-01-09 |access-date=2025-05-30 |website=[[Analog Dialogue]]}}</ref>
== Algorithm ==
The successive-approximation [[analog-to-digital converter]] circuit typically
# A [[sample-and-hold]] circuit
# An analog [[voltage comparator]] that compares {{math|''V''<sub>in</sub>}} to the output of
# A successive-approximation [[Processor register|register]]
#
[[File:4-bit Successive Approximation DAC.gif|thumb|right|Animation of a 4-bit successive-approximation ADC with {{math|1=''V''<sub>ref</sub> = 5 [[volt|V]]}}|320x320px]]
The successive
The algorithm's objective for the {{math|''n''<sup>th</sup>}} iteration is to approximately digitize the input voltage to an accuracy of {{frac|1|2<sup>''n''</sup>}} relative to the reference voltage. To show this mathematically, the normalized input voltage is represented as {{math|''x''}} in {{math|[−1, 1]}} by letting {{math|1=''V''<sub>in</sub> = ''xV''<sub>ref</sub>}}. The algorithm starts with an initial approximation of {{math|1=''x''<sub>0</sub> = 0}} and during each iteration {{math|''i''}} produces the following approximation:<blockquote>{{math|''i''<sup>th</sup>}} approximation: {{math|1=''x''<sub>''i''</sub> = ''x''<sub>''i''−1</sub> − {{sfrac|''sgn''(''x''<sub>''i''−1</sub> − ''x'')|2<sup>''i''</sup>}}}}</blockquote>where the binary [[signum function]] {{math|''sgn''}} mathematically represents the comparison of the previous iteration's approximation {{math|1=''x''<sub>i-1</sub>}} with the normalized input voltage {{math|''x''}}:<math display="block"> sgn(x_{i-1} - x) = \begin{cases}
+1 & \text{if } x_{i-1} \geq x, \\
When implemented as a real analog circuit, circuit inaccuracies and [[Noise (electronics)|noise]] may cause the binary search algorithm to incorrectly remove values it believes {{math|''V''<sub>in</sub>}} cannot be, so a successive-approximation ADC might not output the closest value. It is very important for the DAC to accurately produce all {{math|2<sup>''n''</sup>}} analog values for comparison against the unknown {{math|''V''<sub>in</sub>}} 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 {{math|2<sup>''n''</sup>}} 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.<ref>{{Cite web |date=2001-10-02 |title=Understanding SAR ADCs: Their Architecture and Comparison with Other ADCs |url=https://www.analog.com/en/resources/technical-articles/successive-approximation-registers-sar-and-flash-adcs.html |url-status=live |archive-url=https://web.archive.org/web/20241118075147/https://www.analog.com/en/resources/technical-articles/successive-approximation-registers-sar-and-flash-adcs.html |archive-date=2024-11-18 |access-date=2025-01-03 |website=[[Analog Devices]]}}</ref> And since [[Johnson–Nyquist noise#Thermal noise on capacitors|kT/C noise]] is inversely proportional to capacitance, low noise demands a large input capacitance (which costs chip area and requires a more powerful drive buffer), which has motivated proposals around noise cancellation.<ref>{{Cite journal |last=Keerthy Kumar |first=Shashank |date=2023 |title=Design of a 13-Bit SAR ADC with kT/C noise cancellation technique |url=http://lup.lub.lu.se/student-papers/record/9142088 |journal=Master's Thesis published in [[Lund University]] Student Papers}}</ref> For comparison, for a {{math|1=''V''<sub>ref</sub>}} of 5 V, the least significant bit of a 16-bit converter corresponds to 76 μV, which is around the 64 μ[[Root mean square voltage|Vrms]] noise of a 1 [[Picofarad|pF]] (large for on-chip) capacitor at [[room temperature]]. {{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.<ref>{{Cite web |date=2012-05-07 |title=Understanding Noise, ENOB, and Effective Resolution in Analog-to-Digital Converters |url=https://www.analog.com/en/resources/technical-articles/noise-enob-and-effective-resoluition-in-analog-to-digital-converter-circuits--maxim-integrated.html |url-status=live |archive-url=https://web.archive.org/web/20240422221715/https://www.analog.com/en/resources/technical-articles/noise-enob-and-effective-resoluition-in-analog-to-digital-converter-circuits--maxim-integrated.html |archive-date=2024-04-22 |access-date=2024-12-28 |website=[[Analog Devices]]}}</ref> 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 signal|clock]] and [[signal noise]] from the rest of the microcontroller, so external ADC chips may provide better accuracy.<ref>{{Cite web |last=Giovino |first=Bill |date=2018-11-21 |title=IoT Microcontrollers Have ADCs, but Know When to Choose and Apply an External ADC |url=https://www.digikey.com/en/articles/iot-microcontrollers-have-adcs-know-when-apply-an-external-adc |url-status=live |archive-url=https://web.archive.org/web/20240624010637/https://www.digikey.com/en/articles/iot-microcontrollers-have-adcs-know-when-apply-an-external-adc |archive-date=2024-06-24 |access-date=2025-01-03 |website=[[DigiKey]]}}</ref>
[[File:ADC animation 20.gif|thumb|alt=Successive approximation animation|Operation of successive-approximation ADC as input voltage falls from 5 to 0 V. Iterations on the ''x'' axis. Approximation value on the ''y'' axis.|right]]▼
'''Example:''' The ten steps to converting an analog input to 10 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.▼
▲[[File:ADC animation 20.gif|thumb|alt=Successive approximation animation|Operation of successive-approximation ADC as input voltage falls from 5 to 0 V. Iterations on the ''x'' axis
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, 0.0048828125. All of these add up to 4.9951171875, meaning binary 1111111111, or one LSB less than 5. ▼
===Examples===
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 end result, a binary number representing the analog input, is found.▼
▲'''Example 1:''' The
▲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
▲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
'''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 {{math|1=2<sup>''n''</sup>}} volts range can be expressed as an algorithm:
# Initialize register with MSB set to 1 and all other values set to zero.
# In the n{{Sup|th}} clock cycle, if voltage is higher than digital equivalent voltage of the number in register, the (n+1){{Sup|th}} digit from the left is set to 1. If the voltage were lower than digital equivalent voltage, then n{{Sup|th}} 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.
{{Multiple image|
<!-- Layout parameters -->
| align = center
| direction = horizontal
<!-- Header -->
| header_align = center
| header = Working of successive approximation ADC
<!--image 1-->
| image1 = Successive-approximation ADC example Setup.svg
| width1 = 330
| caption1 = 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.
<!--image 2-->
| image2 = Successive-approximation ADC example working value 1.svg
| width2 = 290
| caption2 = Previously established setup where an input voltage of 10.4V is provided.
<!--image 3-->
| image3 = Successive-approximation ADC example working value 2.svg
| width3 = 290
| caption3 = 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==
[[File:ChargeScalingDAC.png|right|thumb|
One of the most common SAR ADC implementations uses a charge-scaling [[Digital-to-analog converter|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 {{math|''N''+1}} capacitors for {{math|''N''}} bits. Thus if the largest capacitance is {{math|''C''}}, then the array's total capacitance is {{math|2''C''}}. The switched capacitor array acts as both the sample-and-hold element and the DAC. Redistributing their [[Electric charge|charge]] will adjust their net voltage, which is fed into the negative input of a comparator (whose positive input is always grounded) to perform the binary search using the following steps:<ref>{{Cite web |last=Kugelstadt |first=Thomas |date=2000 |title=The operation of the SAR-ADC based on charge redistribution |url=https://www.ti.com.cn/cn/lit/an/slyt176/slyt176.pdf |url-status=live |archive-url=https://web.archive.org/web/20241227083825/https://www.ti.com.cn/cn/lit/an/slyt176/slyt176.pdf |archive-date=2024-12-27 |access-date=2024-12-28 |website=[[Texas Instruments]]}}</ref><ref>{{Cite web |date=2020 |title=Operation of a SAR-ADC Based on Charge Redistribution |url=https://www.renesas.com/en/document/apn/r14an0001-operation-sar-adc-based-charge-redistribution-rev100 |url-status=live |archive-url=https://web.archive.org/web/20241015132842/https://www.renesas.com/en/document/apn/r14an0001-operation-sar-adc-based-charge-redistribution-rev100 |archive-date=2024-10-15 |access-date=2024-12-28 |website=[[Renesas Electronics]]}}</ref>
# All of the capacitors within the array are switched to the input signal ''V''<sub>in</sub>. The capacitors now have a charge equal to their respective capacitance times the input voltage minus the offset voltage upon each of them.▼
# The capacitors are then switched so that this charge is applied across the comparator input, creating a comparator input voltage equal to −''V''<sub>in</sub>.▼
[[File:CAPadc.png|thumb|3 bit capacitive ADC, using {{math|1=''V''<sub>ref</sub> = 5V}}. The bottom left transient simulation uses {{math|''V''<sub>in</sub> ≅ 3.5V}} or about {{math|.7}} of {{math|''V''<sub>ref</sub>}}, resulting in an answer of {{math|{{frac|5|8}}}} (101 in binary), representing {{math|3.125V}} or {{math|0.625}} of {{math|''V''<sub>ref</sub>}}. "PESE" is the voltage on the array, and its remaining final voltage is the conversion's residual error.|320x320px]]
▲=== Use with non-ideal analog circuits ===
# Discharge: The capacitors are discharged. (Note, discharging to comparator's offset voltage will automatically provide offset cancellation.)
▲#
▲# Hold: The capacitors are then switched
# 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:
## Redistribution: The current test capacitor is switched to {{math|''V''<sub>ref</sub>}}. 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 {{math|1:1}}, so the comparator's negative input becomes {{math|−''V''<sub>in</sub> + {{frac|''V''<sub>ref</sub>|2}}}}. On the {{math|''i''<sup>th</sup>}} iteration, the ratio will be {{math|1:2<sup>''i''−1</sup>}}, so the {{math|''i''<sup>th</sup>}} iteration of this redistribution step effectively adds {{math|{{frac|''V''<sub>ref</sub>|2<sup>''i''</sup>}}}} to the voltage.
## Comparison: The comparator's output determines the bit's value for to the current test capacitor. In the first iteration, if {{math|''V''<sub>in</sub>}} is greater than {{frac|''V''<sub>ref</sub>|2}}, then the comparator will output a digital 1 and otherwise output a digital 0.
## Update Switch: A digital 0 result will leave the current test capacitor connected to {{math|''V''<sub>ref</sub>}} for subsequent iterations, while a digital 1 result will switch the capacitor back to ground. Thus, each {{math|''i''<sup>th</sup>}} iteration may or may not add {{math|{{frac|''V''<sub>ref</sub>|2<sup>''i''</sup>}}}} to the comparator's negative input voltage. For instance, the voltage at the end of the first iteration will be {{math|−''V''<sub>in</sub> + MSB·{{frac|''V''<sub>ref</sub>|2}}}}.
# 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 ==
Line 69 ⟶ 100:
{{DEFAULTSORT:Successive Approximation Adc}}
[[Category:Digital signal processing]]
[[Category:Analog circuits]]
|