Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 39

1

Digital to Analog Converter


Nov. 1, 2005
Fabian Goericke, Keunhan Park,
Geoffrey Williams
2
Outline
What is a DAC?
Types of DAC Circuits
Resistor-string DAC
Binary weighted DAC

R-2R Ladder DAC
Specifications of DAC

Errors
Applications

3
A digital to analog
converter (DAC) is a
device that converts
digital numbers (binary)
into an analog voltage or
current output.


0
1
0
1
0
0
1
1
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
1
DAC
What is a DAC?
4
What is a DAC?


1011 1001 1010 0111 1000 0110 0101 0100 0011 0010 0001 0000
Digital Input Signal
A
n
a
l
o
g

O
u
t
p
u
t

S
i
g
n
a
l

5
Types of DAC Circuits
1. Resistor String
2. Binary Weighted Resistor
3. R-2R Ladder
6
Components of a String DAC
Resistor String supply
discrete voltage levels
Selection Switches
connect the right voltage level
to op-amp according to input
bits
Op-amp amplifies the
discrete voltage levels to
desired range, keeps the
current low

Resistor String DAC
7
8
/ /(8 )
8 8
total
REF total REF
n n
n
n REF
REF
R R
I V R V R
V R I n R I
V n R I n
V V
V R I
=
= =
= =

= =

Resistor String


3
8
3
8 3
8
REF
V V
V V V
=
= =
Example


Resistor String DAC
8
1 1 0 6V 1 1 1 7V
1 0 0 4V
0 0 0 0V
Selection Switches


Resistor String DAC
9
Advantages:
simple
fast for < 8 bits

Disadvantages:
high element count for higher resolutions, reason:
number of resistors:
number of switches:
slow for > 10 bits

2
n
2 1
n

Resistor String DAC


10
Basic Idea:
Use a summing
op-amp circuit
Use transistors to
switch between
high and ground
Use resistors
scaled by two to
divide voltage on
each branch by a
power of two
-
+
R
2R
4R
2
n
R
Rf

V
out
ref
V
Binary Weighted Resistor DAC
11
non-inverting input on ground virtual ground at
inverting input
KIRCHHOFFs current law and no input current into
op-amp I1 + I2 = 0
I1 = V1 / R + V2 / (2R) + V3 / (4R) +
3 1 2 4
2 1
( ) ...
2 4 8
out f f f
V V V V
V R I R I R
R R R R
| |
= = = + + + +
|
\ .
Binary Weighted Resistor DAC
12
Binary Weighted Resistor DAC
3 1 2 4
2 1
( ) ...
2 4 8
out f f f
V V V V
V R I R I R
R R R R
| |
= = = + + + +
|
\ .
Terms have less influence
Most
significant
bit
Least
significant
bit
Vn = Vref, if bit is set
Vn = 0, if bit is clear
Rf = R / 2
13
Advantages
Simple
Fast
Disadvantages
Needs large range of resistor values (2000:1 for 12-
bit) with high precision in low resistor values
Needs very small switch resistances
Binary Weighted Resistor DAC
14
R-2R Resistor Ladder DAC
Simplest type of DAC
Requires only two precision resistance valuce (R and 2R)
Each bit controls a switch between
ground and the inverting input of the
op amp.
The switch is connected to ground if
the corresponding bit is zero.
0 0 0 0
4 bit converter
V
ref
15
R-2R DAC Example
Convert 0001 to analog
V
0
V
1
V
2
V
3
1
1/ 2 1/ 2
eq
R R
R R
= =
+
0 1 1
1
2
R
V V V
R R
= =
+
V
0
V
1
V
0
V
1
=
1 2 2
1
2
R
V V V
R R
= =
+
2 3 3
1
2
R
V V V
R R
= =
+
V
ref
16
R-2R DAC Example
Convert 0001 to analog
0
1
8
ref
V V =
2R
R

V
0
out 0
R 1
V
2R 16
ref
V V = =
V
ref
17
R-2R DAC Summary
Conversion results for each bit





Conversion equation for N-bit DAC
Digital bit Analog Conversion
0001
0010
0100
1000
,0
/16
out ref
V V =
,1
/ 8
out ref
V V =
,2
/ 4
out ref
V V =
,3
/ 2
out ref
V V =
3 ,3 2 ,2
1 ,1 0 ,0

out out out
out out
V b V b V
bV b V
= +
+ +
for
3 2 1 0
( 0 or 1)
i
b b b b b =
( )
1
2
N
ref
out N i
i
i
V
V b

=
=

Resolution
2
ref
N
V
=
18
Advantages
Only two resistor values
Does not need the kind of precision as Binary
weighted DACs
Easy to manufacture
Faster response time

Disadvantages
More confusing analysis
R-2R DAC Summary
19
Specification of DAC
Resolution
Speed
Settling time
Linearity
Reference voltage
20
The amount of variance in output voltage for
every change of the LSB in the digital input.
How closely can we approximate the desired
output signal(Higher Res. = finer detail=smaller
Voltage divisions)
A common DAC has a 8 - 16 bit Resolution
N
LSB
V
V
2
Resolution
Ref
= =
N = Number of bits
Specification - Resolution
21
Rate of conversion of a single digital input to its
analog equivalent
Conversion Rate depends on
clock speed of input signal
settling time of converter
When the input changes rapidly, the DAC
conversion speed must be high.
Specification - Speed
22
The time required for the input signal voltage to settle to the
expected output voltage (within +/- of VLSB).
Ideally, an instantaneous change in analog voltage would occur
when a new binary word enters into DAC
Fast converters reduce slew time, but usually result in longer ring
time.
Specification Settling Time
t
delay
t
slew
t
ring
23
The difference between the desired analog
output and the actual output over the full range
of expected values.
Specification Linearity
24
Specification Linearity
Linearity(Ideal Case)
Digital Input
Perfect Agreement
Desired/Approximate Output
A
n
a
l
o
g

O
u
t
p
u
t

V
o
l
t
a
g
e

NON-Linearity(Real World)
A
n
a
l
o
g

O
u
t
p
u
t

V
o
l
t
a
g
e

Digital Input
Desired Output
Miss-alignment
Approximate
output
Ideally, a DAC should produce a linear relationship
between a digital input and the analog output, this is not
always the case.
25
A specified voltage used to determine how each
digital input will be assigned to each voltage
division.
Types:
Non-multiplier DAC: V
ref
is fixed (specified by the
manufacturer)
Multiplier DAC: V
ref
is provided via an external source
Specification Reference Voltage
26
Full Scale Voltage
Defined as the output when digital input is all 1s.
Specification Reference Voltage
1
1
0
2 1
1
2 2
N N
ref
fs ref
i N
i
V
V V

+
=
| |

= = |
|
\ .

27
Errors
Common DAC Errors:
Gain Error
Offset Error
Full Scale Error
Non Linearity
Non-Monotonic
Resolution Errors
Settling Time and Overshoot
There are a multiple sources of error associated with DAC
28
Gain Error: Deviation in the slope of the ideal curve and
with respect to the actual DAC output.
Gain Error
High Gain Error: Step
amplitude is higher than
the desired output
Low Gain Error: Step
amplitude is lower than
the desired output

Digital Input
Desired/Ideal Output
A
n
a
l
o
g

O
u
t
p
u
t

V
o
l
t
a
g
e

Low Gain
High Gain
29
Offset Error: Occurs when there is an offset in the output
voltage in reference to the ideal output.
Offset Error
Digital Input
Desired/Ideal Output
Output Voltage
Positive Offset
Negative Offset
This error may be
detected when all input
bits are low (i.e. 0).

30
Full Scale Error
Full Scale Error: occurs when there is an offset in
voltage form the ideal output and a deviation in
slope from the ideal gain.
31
Differential Non-Linearity: Voltage step size changes
vary with as digital input increases. Ideally each step
should be equivalent.
Differential Non-Linearity
Digital Input
Ideal Output
A
n
a
l
o
g

O
u
t
p
u
t

V
o
l
t
a
g
e

VLSB
2VLSB
Diff. Non-Linearity = 2VLSB
32
Integral Non-Linearity: Occurs when the output voltage is
non linear. Basically an inability to adhere to the ideal
slope.
Integral Non-Linearity
Digital Input
Ideal Output
1VLSB
Int. Non-Linearity = 1VLSB
A
n
a
l
o
g

O
u
t
p
u
t

V
o
l
t
a
g
e

33
Non-Monotonic Output Error: Occurs when the
an increase in digital input results in a lower
output voltage.
Non-Monotonic Output Error
A
n
a
l
o
g

O
u
t
p
u
t

V
o
l
t
a
g
e

Digital Input
Desired Output
Monotonic
Non-Monotonic
34
Resolution Errors
Poor Resolution(1 bit)
Vout
Desired Analog
signal
Approximate
output
2

V
o
l
t
.

L
e
v
e
l
s

Digital Input
0
0
1
Does not accurately
approximate the desired
output due large voltage
divisions.
35
Resolution Errors
Better Resolution(3 bit)
Digital Input
Vout
Desired Analog signal
Approximate
output
8

V
o
l
t
.

L
e
v
e
l
s

000
001
010
011
100
101
110
111
110
101
100
011
010
001
000
Better approximation of
the of the desired output
signal due to the smaller
voltage divisions.
36
Settling Time and Overshoot
Analog Output
Voltage
Expecte
d
Voltage
+VLSB
-VLSB
Settling time
Time
Settling Time: The time required for the voltage to settle within +/-
the voltage associated with the V
LSB
. Any change in the input time
will not be reflected immediately due to the lag time.

Overshoot: occurs when the output voltage overshoots the desired
analog output voltage.
37
Common Applications
Audio: Most modern audio signals are stored in
digital form (for example MP3s and CDs) and in
order to be heard through speakers they must
be converted into an analog signal
Video:Video signals from a digital source, such
as a computer, must be converted to analog
form if they are to be displayed on an analog
monitor.
http://en.wikipedia.org/wiki/Digital-to-analog_converter
38
References
Alciatore, Introduction to Mechatronics and Measurement
Systems, McGraw-Hill, 2003
Horowitz and Hill, The Art of Electronics, Cambridge University
Press, 2
nd
Ed. 1995
http://products.analog.com/products/info.asp?product=AD7224
http://courses.washington.edu/jbcallis/lectures/C464_Lec5_Sp-
02.pdf
http://www.eecg.toronto.edu/~kphang/ece1371/chap11_slides.pd
f
Previous students lectures on DAC

39
Questions?

You might also like