Lecture 9 - AD DA Converters
Lecture 9 - AD DA Converters
LECTURE
AD – DA CONVERTERS
E N G . W I L S O N JAV I E R P E R E Z H O LG U I N
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course - 1st Semester 2013 1
Outline
1. Sampling
2. Anti-Aliasing Filter
3. Analog-to-Digital Conversion
4. Sample-and-Hold and ADC
5. Analog-to-Digital Conversion Methods
a) The flash ADC
b) The dual-slope ADC
c) The successive approximation ADC (SAR)
d) The sigma-delta ADC
6. Digital-to-Analog Conversion Methods
a) Binary-weighted-input DAC
b) R-2R Ladder
7. Resolution and Accuracy of DACs
8. Reconstruction Filter
9. Digital Signal Processing
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course - 1st Semester 2013 2
1. Sampling
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 3
Fourier
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 4
1. Sampling
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 5
1. Sampling
filter.
Sampling
The filter eliminates pulses
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 6
4. Sample-and-Hold and ADC
Samples held
for one clock
pulse
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Many ICs can perform both functions on a single chip and include two or
more channels. For audio applications, the AD1871 is an example of a stereo
audio ADC.
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 7
Aliasing Problem
Unfiltered analog
frequency spectrum
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 8
2. Anti-Aliasing Filter
To understand the need for an anti-aliasing filter, you need to understand the
sampling theorem which essentially states:
If the signal is sampled less than this, the recovery process will produce
frequencies that are entirely different than in the original signal.
These “masquerading” signals are called aliases.
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 9
10
11
2. Anti-Aliasing Filter
Most signals have higher frequency harmonic and noise. For most ADCs, the
sampling and filter cutoff frequencies are selected to be able to reconstruct the
desired signal without including unnecessary harmonics and noise.
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 12
3. Analog-to-Digital Conversion
10 V
A positive half-wave from 0-10 V is
shown in blue. The sample-and-hold
circuit produces the staircase
representation shown in red.
0V
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 13
3. Analog-to-Digital Conversion
The second step is to quantize these staircase levels to binary coded form
using an analog-to-digital converter (ADC).
The digital values can then be processed by a digital signal processor or
computer.
Example What is the maximum unsigned binary value for 0.0000
10.0001
the waveform? 100.0001
101.1110
Solution 10 V = 10102 V. The table lists the quantized 111.0111
1000.1011
binary values for all of the steps. 1001.1001
Peak = 10 V 1010.0000
1010.0000
10 V 1001.1001
1000.1011
111.0111
101.1110
100.0001
10.0001
0V 0.0000
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 14
3. Analog-to-Digital Conversion
1011..01
Input from +
sample- –
and-hold
R + Priority
– encoder
R 7
+
6
–
The flash ADC uses a series high-speed R
5
4
1 D0 Parallel
+
comparators that compare the input – 3
2
4
D1 binary
D2
output
2
with reference voltages. Flash ADCs R + 1
–
are fast but require 2n – 1 comparators R
0 EN
binary number. R
+
Enable
– pulses
Answer 1023
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 16
5. Analog-to-Digital Conversion Methods
+
V
C
Comparator
Counter
t
Clear
Slope Control
Generator Reset Logic
EN Latches
D7 D6 D5 D4 D3 D2 D1 D0
Binary Output
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 17
18
19
20
21
5. Analog-to-Digital Conversion Methods
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 22
23
24
25
26
27
28
29
30
31
5. Analog-to-Digital Conversion Methods
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 32
5. Analog-to-Digital Conversion Methods
(20)
(1) (5)
CS ADC0804 INTR
(2) (19)
RD
(3) ∆ (18) CLK R (out)
WR D0
CLK IN
(4) ∆ (17)
D1
The completion is signaled by the
Analog Vin+
(6) ∆ (16)
D2 INTR line going LOW.
(7) (15) Digital
input Vin–
∆
D3
(9) ∆ (14) data
REF/2 D4 output
∆ (13)
D5
∆ (12)
D6
∆ (11)
D7
(8) (10)
ANLG DGTL
GND GND
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 33
5. Analog-to-Digital Conversion Methods
Summing
point
Analog + ∆ 1-bit Quantized output
input Σ Integrator
quantizer is a single bit
signal – data stream.
DAC
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 34
5. Analog-to-Digital Conversion Methods
One option for the sigma-delta method is to count the one-bit quantized output
for a set interval. The output of the counter is latched with the parallel binary
code.
Summing
point
Analog + ∆ 1-bit n-bit Binary code
input Σ Integrator
quantizer counter
Latch
output
signal – . .
. .
. .
. .
. .
1-bit
DAC
Sigma-delta ADCs can have high resolution and have advantages for rejecting
noise signals (such as 60 Hz power line interference).
They are available in ICs with internal programmable amplifiers. For these
reasons, they are widely used in instrumentation applications.
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 35
5. Analog-to-Digital Conversion Methods
Sigma-Delta Converter
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 36
5. Analog-to-Digital Conversion Methods
If the wave amplitude, accumulated over a given sample period is greater than
the previous sample period, the converter generates “1”.
This generates a type of high density pulse modulation with positive half-waves
represented by many consecutive “1s”, while the negative half-waves produce
many “0s” in the sequence.
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 37
5. Analog-to-Digital Conversion Methods
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 38
6. Digital-to-Analog Conversion Methods
a) Binary-weighted-input DAC:
The binary-weighted-input DAC is a basic DAC in which the input current in
each resistor is proportional to the column weight in the binary numbering
system. It requires very accurate resistors and identical HIGH level voltages
for accuracy.
LSB 8R
D0 Rf
The MSB is represented by + –
I0
the largest current, so it has 4R If
the smallest resistor. To D1
I1 –
simplify analysis, assume all 2R Vou
D2 t
current goes through Rf and I=0
+
I2 Analog
none into the op-amp. R output
D3
MSB I3
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 39
6. Digital-to-Analog Conversion Methods
Solution I out ( I 0 I1 I 2 I 3 )
3.0 V 3.0 V 3.0 V
0 V 0.325 mA
120 kW 30 k W 15 k W
Vout = Iout Rf = (−0.325 mA)(10 kW) = −3.25 V
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 40
6. Digital-to-Analog Conversion Methods
b) R-2R Ladder:
The R-2R ladder requires only two values of resistors. By calculating a
Thevenin equivalent circuit for each input, you can show that the output is
proportional to the binary weight of inputs that are HIGH.
VS
Each input that is HIGH contributes to the output: Vout n i
where VS = input HIGH level voltage
2
n = number of bits Inputs
i = bit number D D1 D2 D3
0
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 41
6. Digital-to-Analog Conversion Methods
R1 R3 R5 R7 Rf
50KW
50KW 50KW 50KW 50KW
R2 R4 R6 R8
–
50KW 25KW 25KW 25KW Vout
+
VS
Solution Apply Vout to all inputs that are HIGH, then sum the results.
2 n i
5V 5V
Vout ( D0 ) 40
0.3125 V Vout ( D1 ) 4 1
0.625 V
2 2
5V
Vout ( D3 ) 43 2.5 V Applying superposition, Vout = −3.43 V
2
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 42
7. Resolution and Accuracy of DACs
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 43
8. Reconstruction Filter
Reconstruction
Filter
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 44
9. Digital Signal Processing
A digital signal processor (DSP) is optimized for speed and working in real time
(as events happen). It is basically a specialized microprocessor with a reduced
instruction set (RISC).
After filtering and converting the analog signal to digital, the DSP takes over.
It may enhance the signal in some predetermined way (reducing noise or
echoes, improving images, encrypting the signal, etc.).
The signal can then be converted back to analog form if desired.
10110 10110
01101 01101
00011 00011
11100 11100 Enhanced
Analog Anti-aliasing Sample-and- Reconstruction
signal filter hold circuit ADC DSP DAC filter analog
signal
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 45
9. Digital Signal Processing
Evaluation
.L1 .S1 .M1 .D1 .D2 .M2 .S2 .L2
Interrupts
Nyquist frequency The highest signal frequency that can be sampled at a specified
sampling frequency; a frequency equal or less than half the
sampling frequency.
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 47
Quiz
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 48
Quiz
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 49
Quiz
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 50
Quiz
b. a DAC
?
c. an ADC D0
Parallel
d. a comparator D1
binary
D2 output
–
Input + D3
signal (MSB) (LSB)
D Serial
binary
C output
CLK
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 51
Quiz
(8) (10)
ANLG DGTL
GND GND
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 52
Quiz
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 53
Quiz
I3
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 54
Quiz
8. For the circuit shown, the input on the far left is for the
a. Analog input
b. Clock
Inputs
c. LSB
d. MSB
R1 R3 R5 R7 Rf = 2R
2R 2R 2R 2R
R2 R4 R6 R8
–
2R R R R Vout
+
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 55
Quiz
9. A reconstruction filter
a. is a low-pass filter
b. can have the same response as an anti-aliasing filter
c. smoothes the output from a DAC
d. all of the above
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 56
Quiz
Electronics Engineering School – Eng. Wilson Javier Perez H. DE II Course – 1st Semester 2013 57