Successive-approximation ADC: Difference between revisions

Content deleted Content added
Changing short description from "Type of analog-digital conversion" to "Type of analog-to-digital converter"
m {{math}} and list formatting
Line 4:
{{No footnotes|date=March 2020}}
 
[[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 ({{math|''V''<sub>INin</sub>}}) and reference voltage ({{math|''V''<sub>REFref</sub>}})]]
 
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.
Line 10:
== Algorithm ==
The successive-approximation [[analog-to-digital converter]] circuit typically consists of four chief subcircuits:
# A [[sample-and-hold]] circuit to acquire the input [[voltage]] {{math|''V''<sub>in</sub>}}.
# An analog voltage comparator that compares {{math|''V''<sub>in</sub>}} to the output of the internal [[Digital-to-analog converter|DAC]] and outputs the result of the comparison to the successive-approximation [[Processor register|register]] (SAR).
# A successive-approximation register subcircuit designed to supply an approximate digital code of {{math|''V''<sub>in</sub>}} to the internal DAC.
# An internal reference DAC that, for comparison with {{math|''V''<sub>ref</sub>}}, supplies the [[comparator]] with an analog voltage equal to the digital code output of the {{math|SAR<sub>in</sub>}}.
 
[[File:4-bit Successive Approximation DAC.gif|thumb|right|Animation of a 4-bit successive-approximation ADC]]
The successive approximation register is initialized so that the [[most significant bit]] (MSB) is equal to a [[Digital data|digital]] 1. This code is fed into the DAC, which then supplies the analog equivalent of this digital code {{math|(''V''<sub>ref</sub>/2)}} into the comparator circuit 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 [[Binary search algorithm|binary search]] until every bit in the SAR has been tested. The resulting code is the digital approximation of the sampled input voltage and is finally output by the SAR at the end of the conversion (EOC).
 
Mathematically, let {{math|1=''V''<sub>in</sub> = ''xV''<sub>ref</sub>}}, so {{math|''x''}} in {{math|[−1,&nbsp;1]}} is the normalized input voltage. The objective is to approximately digitize {{math|''x''}} to an accuracy of {{frac|1/|2<sup>''n''</sup>}}. The algorithm proceeds as follows:
# Initial approximation {{math|1=''x''<sub>0</sub> = 0}}.
# {{math|''i''<sup>th</sup>}} approximation {{math|1=''x''<sub>''i''</sub> = ''x''<sub>''i''−1</sub> − ''s''(''x''<sub>''i''−1</sub> − ''x'')/2<sup>''i''</sup>}}, where, {{math|''s''(''x'')}} is the [[signum function]] ({{math|1=sgn(''x'') = +1}} for {{math|''x'' ≥ 0}}, {{math|−1}} for {{math|''x'' < 0}}). It follows using mathematical induction that {{math|{{!}}''x''<sub>''n''</sub> − ''x''|{{!}} ≤ 1/2<sup>''n''</sup>}}.
 
As shown in the above algorithm, a SAR ADC requires:
# An input voltage source {{math|''V''<sub>in</sub>}}.
# A reference voltage source {{math|''V''<sub>ref</sub>}} to normalize the input.
# A DAC to convert the {{math|''i''<sup>th</sup>}} approximation {{math|''x''<sub>''i''</sub>}} to a voltage.
# A comparator to perform the function {{math|''s''(''x''<sub>''i''</sub> − ''x'')}} by comparing the DAC's voltage with the input voltage.
# A register to store the output of the comparator and apply {{math|''x''<sub>''i''−1</sub> − ''s''(''x''<sub>''i''−1</sub> − ''x'')/2<sup>''i''</sup>}}.
 
[[File:ADC animation 20.gif|thumb|alt=Successive approximation animation|Operation of successive-approximation ADC as input voltage falls from 5 to 0&nbsp;V. Iterations on the ''x'' axis. Approximation value on the ''y'' axis.|right]]
Line 37:
 
===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==
Line 45:
 
[[File:CAPadc.png|thumb|3 bits simulation of a capacitive ADC]]
# The capacitor array is completely discharged to the offset voltage of the comparator, {{math|''V''<sub>OS</sub>}}. This step provides automatic offset cancellation (i.e. the offset voltage represents nothing but dead charge, which can't be juggled by the capacitors).
# 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>}}.
# The actual conversion process proceeds. First, the MSB capacitor is switched to {{math|''V''<sub>ref</sub>}}, which corresponds to the full-scale range of the ADC. Due to the binary-weighting of the array, the MSB capacitor forms a 1:1 charge divider with the rest of the array. Thus, the input voltage to the comparator is now {{math|−''V''<sub>in</sub> + {{frac|''V''<sub>ref</sub>/|2}} }}. Subsequently, if {{math|''V''<sub>in</sub>}} is greater than {{frac|''V''<sub>ref</sub>/|2}}, then the comparator outputs a digital 1 as the MSB, otherwise it outputs a digital 0 as the MSB. Each capacitor is tested in the same manner until the comparator input voltage converges to the offset voltage, or at least as close as possible given the resolution of the DAC.
 
=== Use with non-ideal analog circuits ===
When implemented as an analog circuit – where the value of each successive bit is not perfectly {{math|2<sup>''N''</sup>}} (e.g. 1.1, 2.12, 4.05, 8.01, etc.) – a successive-approximation approach might not output the ideal value because the binary search algorithm incorrectly removes what it believes to be half of the values the unknown input cannot be. Depending on the difference between actual and ideal performance, the maximal error can easily exceed several LSBs, especially as the error between the actual and ideal {{math|2<sup>''N''</sup>}} becomes large for one or more bits. Since the actual input is unknown, it is therefore very important that accuracy of the analog circuit used to implement a SAR ADC be very close to the ideal {{math|2<sup>''N''</sup>}} values; otherwise, it cannot guarantee a best match search.
 
== See also ==