AD and DA Converter Principles
AD and DA Converter Principles
AD and DA Converter Principles
Text
The devices which perform the interfacing function between analog and digital worlds are
analog-to-digital (A/D or ADC) and digital-to-analog (D/A or DAC) converters, which
together are known as data converters.
The input to the system is a physical parameter such as temperature, pressure, flow,
acceleration, and position, which are analog quantities. The parameter is first converted into
an electrical signal by means of a transducer, once in electrical form, all further processing is
done by electronic circuits – xIN(t) – Fig.1.
An Analog to Digital converter is an electronic circuit which accepts an analog input signal
(usually a voltage V(t)) and produces a corresponding digital number at the output – see
Fig.1. The resultant digital word goes to a computer data bus or to the input of a digital
circuit.
The analog-to-digital converter requires a small amount of time to perform the quantizing and
coding operations. The time required to make the conversion depends on: the converter
resolution, the conversion technique, and the speed of the components employed in the
converter. The conversion speed required for a particular application depends on the time
variation of the signal to be converted and on the accuracy desired.
Aperture time - refers to the time uncertainty (or time window) in making a measurement and
results in an amplitude uncertainty (or error) in the measurement if the signal is changing
during this time – Fig. 2.
Punčochář, Mohylová: TELO, Chapter 10: A/D and D/A converter principles 2
xIN(t) xLP(t)
Antialiasing
filtr – LP
For the specific case of a sinusoidal input signal, the maximum rate of change occurs at the
zero crossing of the waveform, and the amplitude error is
∆V = T A ⋅
d
(V m sin ω t ) = T A ⋅ (V m ω cos ω t ) = ω = 0 = T AV m ω
dt
The resultant error as a fraction of the peak to peak full scale value is
∆V TAVmω T AVm 2π ⋅ f
ε= = = = π ⋅ f ⋅ TA
2Vm 2Vm 2Vm
From this result the aperture time required to digitize a 1 kHz signal to 10 bits resolution can
be found. The resolution required is one part in 210 or approximately 0.001, thus
Punčochář, Mohylová: TELO, Chapter 10: A/D and D/A converter principles 3
ε 0,001
TA = = ≅ 302 ⋅ 10 −9
π ⋅ f 3,14 ⋅ 10 3
The result is a required aperture time of just 320ns! It is evident that it is hard to find a 10-bit
A/D converter to perform this conversion at any price! Fortunately, there is a simple and
inexpensive way around this dilemma by using a sample-hold circuit – Fig. 4. The aperture
time of the A/D converter is therefore greatly reduced by the much shorter aperture time of
the sample-hold circuit. In turn, the aperture time of the sample-hold is a function of its
bandwidth and switching time. All “signal sampling” we can see in Fig. 3.
SIGNAL
SAMLING
PULSES
SAMLED
SIGNAL
SAMLED AND
HELD SIGNAL
LP filter - a low pass active filter which reduces high frequency signal components,
unwanted electrical interference noise, or electronic noise from the signal; so-called
antialiasing filter; its characteristics frequency must be ½ of sampling frequency fs.
fs ≥ 2·fc
0 T 2T 3T 4T 5T 6T 7T
Fig. 5: Aliasing – in the time domain; f s < fc
Punčochář, Mohylová: TELO, Chapter 10: A/D and D/A converter principles 5
-2fs - fs 0 fc fs 2fs
FREQUENCY FOLDING
(b)
- fs 0 fc fs 2fs
From the figure 6, if the sampling rate is increased such that fS - fC > fC, then the two spectra
are separated and the original signal can be recovered without distortion. This demonstrates
the result of the Sampling Theorem that fS >2fC. Frequency folding (aliasing) can be
eliminated in two ways: first by using a high enough sampling rate, and second by filtering
the signal before sampling to limit its bandwidth to fS/2 – antialiasing filter.
Quantizer, coding
At any part of the input range of the quantizer, there is a small range of analog values within
which the same output code word is produced. This small range is the voltage difference
between any two adjacent decision points and is known as the analog quantization size, or
quantum, q – it is found in general by dividing the full scale analog range (FSR) by the
number of output states. FSR is defined by the applied reference voltage VREF. Q is the
smallest analog difference which can be resolved, or distinguished, by the quantizer (the
quantization step; quantum - analog).
VREF V
q= ≈ REF
2 −1
n
2n
For a given analog input value to the quantizer, the output error will vary anywhere from 0 to
±q/2; the error is zero only at analog values corresponding to the code center points. This
error is also frequently called quantization uncertainty or quantization noise.
The quantizer output can be thought of as the analog input with quantization noise added to it.
The noise has a peak-to-peak value of q but, as with other types of noise, the average value is
zero. Its RMS value, however, is useful in analysis and can be computed from the triangular
waveshape to be q/(2.√3).
The most popular code is natural binary, or straight binary, which is used in its fractional
form to represent a number
Punčochář, Mohylová: TELO, Chapter 10: A/D and D/A converter principles 6
N = a1 ⋅ 2 −1 + a 2 ⋅ 2 −2 + L a n ⋅ 2 − n
where each coefficient “ai” assumes a value of zero or one and N has a value between zero
and one.
The binary code word 110101 therefore represents the decimal fraction
or 82.8125% of full scale for the converter. If full scale (VREF) is +10V, then the code word
represents +8.28125V.
The leftmost bit has the most weight, 0.5 of full scale, and is called the most significant bit,
or MSB; the rightmost bit has the least weight, 2-n of full scale, and is therefore called the
least significant bit, or LSB. The bits in a code word are numbered from left to right from 1
to n.
The LSB has the same analog equivalent value as q discussed previously, namely
VREF V
LSB(analogvalue) = q = ≈ REF
2 −1
n
2n
Table 1 and Table 2 are useful summaries of the resolution, number of states, and LSB
weights.
Table 1:
VREF n LSB (q)
1.00V 8 3.9062 mV
1.00V 12 244.14 µV
2.00V 8 7.8125 mV
2.00V 10 1.9531 mV
2.00V 12 488.28 µV
2.048V 10 2.0000 mV
2.048V 12 500.00 µV
4.00V 8 15.625 mV
4.00V 10 3.9062 mV
4.00V 12 976.56 µV
Punčochář, Mohylová: TELO, Chapter 10: A/D and D/A converter principles 7
Table 2:
A Digital to Analog converter is an electronic circuit which accepts a digital number at its
input and produces a corresponding analog signal (usually a voltage) at the output.
MSB
VREF
LSB
- For example, in a 12-bit converter you would need a range of resistor values of 2000:1, with
corresponding precision of the small resistor values – an elegant solution is R – 2R ladder.
- The switch resistance must be smaller than 1/2n of the smallest resistor.
- This principle is used only in fast, low-precision DACs.
2) R – 2R ladder – Fig. 8
VIRTUAL
GROUND
C B A IVG
LSB
MSB
UREF IREF
RREF
VIRT. GROUND
4AE – for example
TREF T1 T2 T3 T4
OZ
16AE 8AE 4AE 2AE 1AE
IREF I1 I2 I3
R 2R 2R 2R 2R
R R R
- The current sources are ON all the time, and their output current is switched to the output
terminal or to ground (very fast and cheap).
- The transistor areas are scaled (16AE : 8AE : 4AE : 2AE :1AE), thereby ensuring equal current
densities in all the transistors for optimum VBE matching (the emitter areas of the BJT devices
must be proportional to the emitter current).
- OZ + TREF – create current IREF = UREF/RREF (TREF is an inverting structure, thus feedback is
negative, virtual ground).
- I 1 = (( I REF ⋅ R + U BE ) − U BE ) / 2 R = I REF / 2
- I 2 = (( I REF ⋅ R + U BE ) − U BE − R ⋅ I REF / 2 ) / 2 R = I REF / 4
- I 3 = (( I REF ⋅ R + U BE ) − U BE − R ⋅ I REF / 2 − R ⋅ I REF / 4) / 2 R = I REF / 8
- etc.
There are a few ways to generate an output voltage from a current DAC. To generate large
swings, or to buffer into small load resistances, a current to voltage amplifier (with an op-
amp) can be used.
4) Multiplying DACs (MDAC) - can be made from DACs that have no internal reference by
using the reference input for the analog input signal. A DAC with good multiplying properties
(wide analog input range, high speed, etc.) will be called a “multiplying DAC”.
When used like this, MDAC behaves as a digitally controlled audio attenuator because the
output V0 is a fraction of the voltage representing the input digital code and the attenuator
setting can be controlled by digital logic. If followed by an op-amp integrator, the MDAC
provides digitally programmable integration which can be used in the design of digitally
programmable oscillators, filters.
Punčochář, Mohylová: TELO, Chapter 10: A/D and D/A converter principles 10
(
VDAC = ±VREF ⋅ N = ±VREF ⋅ a1 ⋅ 2 −1 + a 2 ⋅ 2 −2 + L a n ⋅ 2 − n )
Sign + means a noninverting DAC.
Sign - means an inverting DAC.
a1 – MSB; an – LSB.
Of all conversion techniques, one of the fastest is direct conversion, better known as
"flash" conversion. ADCs based on this architecture are extremely fast and perform their
multibit conversion directly, but they require intensive analog design to manage the large
resistor network and spaced VREF/2N (~1 least significant bit, or LSB) apart. Input voltage
offset of operational amplifiers must be less than the "LSB / 2".
A change of input voltage usually causes a change of state in more than one comparator
output. These output changes are combined in a decoder-logic unit that produces a parallel N-
bit output from the converter.
The dual-slope ADC architecture was truly a breakthrough in ADCs for high resolution
applications such as digital voltmeters (DVMs), etc. A simplified diagram is shown in Fig. 11,
and the integrator output waveforms are shown in Fig. 12.
The input signal is applied to an integrator; at the same time a counter is started, counting
clock pulses. After a predetermined amount of time (T), a reference voltage having opposite
polarity is applied to the integrator. At that instant, the accumulated charge on the integrating
capacitor is proportional to the average value of the input over the interval T. By choosing
that time interval to be a multiple of the power-line period, the converter becomes insensitive
to 50 Hz “hum” (and its harmonics) – Fig. 13. The integral of the reference is an opposite-
going ramp having a slope of VREF/RC. At the same time, the counter is again counting from
zero. When the integrator output reaches zero, the count is stopped, and the analog circuitry is
reset. Since the charge gained is proportional to VIN · T, and the equal amount of charge lost is
proportional to VREF · tx, then the number of counts relative to the full scale count is
proportional to tx/T, or VIN/VREF. If the output of the counter is a binary number, it will
therefore be a binary representation of the input voltage.
3) SAR ADCs
If VIN is greater than VDAC, the comparator output is a logic high or '1' and the MSB of the
N-bit register remains at '1'. Conversely, if VIN is less than VDAC, the comparator output is a
logic low and the MSB of the register is cleared to logic '0'. The SAR control logic then
moves to the next bit down, forces that bit high, and does another comparison. The sequence
continues all the way down to the LSB. Once this is done, the conversion is complete, and the
N-bit digital word is available in the register.
Fig. 15 shows an example of a 4-bit conversion. The y-axis (and the bold line in the figure)
represents the DAC output voltage. In the example, the first comparison shows that VIN <
VDAC. Thus, bit 3 is set to '0'. The DAC is then set to 01002 and the second comparison is
performed. As VIN > VDAC, bit 2 remains at '1'. The DAC is then set to 01102, and the third
comparison is performed. Bit 1 is set to '0', and the DAC is then set to 01012 for the final
comparison. Finally, bit 0 remains at '1' because VIN > VDAC.
Notice that four comparison periods are required for a 4-bit ADC. Generally speaking, an
N-bit SAR ADC will require N comparison periods and will not be ready for the next
conversion until the current one is complete. This explains why these types of ADCs are
power- and space-efficient, yet are rarely seen in speed-and resolution combinations beyond a
few Msps at 14 to 16 bits. The two critical components are the comparator and the DAC.
Voltage-to-frequency ADCs convert the analog input voltage to a pulse train with the
frequency proportional to the amplitude of the input (see Fig. 16). This can be done simply by
charging a capacitor with a current proportional to the input level and discharging it when the
ramp reaches a preset threshold. The pulses are counted over a fixed period to determine the
frequency, and the pulse counter output, in turn, represents the digital voltage.
The pipelined analog-to-digital converter (ADC) has become the most popular ADC
architecture for sampling rates from a few megasamples per second (Msps) up to 100Msps.
Resolutions range from eight bits at the faster sample rates up to 16 bits at the lower rates.
These resolutions and sampling rates cover a wide range of applications, including CCD
imaging, ultrasonic medical imaging, digital receivers, base stations, digital video, etc.
Fig. 17: Pipelined ADC with four 3-bit stages (each stage resolves two bits)
Fig. 17 shows a block diagram of a 12-bit pipelined ADC. In this schematic, the analog
input, VIN, is first sampled and held steady by a sample-and-hold (S&H), while the flash ADC
in stage one quantizes it to three bits. The 3-bit output is then fed to a 3-bit DAC (accurate to
about 12 bits), and the analog output is subtracted from the input. This "residue" is then
gained up by a factor of four and fed to the next stage (Stage 2). This gained-up residue
continues through the pipeline, providing three bits per stage until it reaches the 4-bit flash
ADC, which resolves the last 4LSB bits. Because the bits from each stage are determined at
different points in time, all the bits corresponding to the same sample are time-aligned with
shift registers before being fed to the digital-error-correction logic. Note when a stage finishes
processing a sample, determining the bits, and passing the residue to the next stage, it can then
start processing the next sample received from the sample-and-hold embedded within each
stage. This pipelining action is the reason for the high throughput.
Although each stage generates three raw bits in the Figure 1 example, because the
interstage gain is only 4, each stage (Stages 1 to 4) effectively resolves only two bits. The
extra bit is simply to reduce the size of the residue by one half, allowing extra range in the
next 3-bit ADC for digital error correction, as mentioned above. This process is called "1-bit
overlap" between adjacent stages. The effective number of bits of the entire ADC is therefore
2 + 2 + 2 + 2 + 4 = 12 bits.
Punčochář, Mohylová: TELO, Chapter 10: A/D and D/A converter principles 16
7) Comparison of ADCs
Basic texts
[1]
[2]
Other text
[3] Horowitz, P-Hill, W.: The art of electronics. Cambridge University press 2001,
str.612 až 636
Questions
Problems
1. Determine the required sampling frequency fs if the maximum signal frequency is 16 kHz.
4. Determine the maximum input voltage offset of comparators in parallel converter according
to problem 3.
Problems key
Ad2) This ADC (Analog-to-Digital Converter) circuit has 256 steps in its output range, each
step representing 19.61 mV.
( )
Ad3) Use the equation VDAC = ±VREF ⋅ N = ±VREF ⋅ a1 ⋅ 2 −1 + a 2 ⋅ 2 −2 + L a n ⋅ 2 − n ; n = 8.
VREF V
Ad4) We know n = 8, LSB(analog value) = q = ≈ REF ; thus comparators input
2 −1
n
2n
voltage offset must be less than q/2.
Recommendation
If you can solve and answer more than circa 60 % of the problems and questions, you
may continue your study.