Content deleted Content added
Em3rgent0rdr (talk | contribs) →Algorithm: oops my typo -1 |
m convert special characters found by Wikipedia:Typo Team/moss (via WP:JWB) |
||
(29 intermediate revisions by 5 users not shown) | |||
Line 1:
{{Short description|Type of analog-to-digital converter}}
{{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 [[Digitization|digitizes]] each [[Sampling (signal processing)|sample]] from a continuous [[analog waveform]] using a [[binary search]] through all possible [[Quantization (signal processing)|quantization]] levels.
== History ==
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 ==
Line 10 ⟶ 13:
# An analog [[voltage comparator]] that compares {{math|''V''<sub>in</sub>}} to the output of a [[digital-to-analog converter]] (DAC).
# A successive-approximation [[Processor register|register]] that is updated by results of the comparator to provide the DAC with a digital code whose accuracy increases each successive iteration.
# A DAC that supplies the [[comparator]] with an analog voltage relative to the reference voltage {{math|1=''V''<sub>ref</sub>}} (which corresponds to the full-scale range of the ADC) and proportional to the digital code of the SAR.
[[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-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 {{math|1={{sfrac|1|2}}''V''<sub>ref</sub>}}) to the comparator for comparison with the sampled input voltage. If this analog voltage exceeds {{math|''V''<sub>in</sub>}}, 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 [[
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|''
+1 & \text{if }
-1 & \text{if }
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, starting with the initial state at notch 1. Voltages on the ''y'' axis.|right]]
===Examples===
'''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 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 {{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
{{Multiple image|
Line 57 ⟶ 67:
===Variants===
* ''Counter type ADC'': The D to A converter can be easily turned around to provide the inverse function A to D conversion. The principle is to adjust the DAC's input code until the DAC's output comes within {{math|±{{frac|1|2}}}} LSB to the analog input, which is to be converted to binary digital form.
* ''Servo tracking ADC'': It is an improved version of a counting ADC. The circuit consists of an up-down counter with the comparator controlling the direction of the count. The analog output of the DAC is compared with the analog input. If the input is greater than the DAC output signal, the output of the comparator goes high and the counter is caused to count up. The tracking ADC has the advantage of being simple. The disadvantage, however, is the time needed to stabilize as a new conversion value is directly proportional to the rate at which the analog signal changes.
==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 {{math|''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 {{math|−''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 89 ⟶ 100:
{{DEFAULTSORT:Successive Approximation Adc}}
[[Category:Digital signal processing]]
[[Category:Analog circuits]]
|