digital to analog converter
DESCRIPTION
Digital to Analog Converter. Nov. 1, 2005 Fabian Goericke, Keunhan Park, Geoffrey Williams. Outline. What is a DAC? Types of DAC Circuits Resistor-string DAC Binary weighted DAC R-2R Ladder DAC Specifications of DAC Errors Applications. What is a DAC?. - PowerPoint PPT PresentationTRANSCRIPT
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.
0101
0011
0111
1001
1001
1010
1011 DAC
What is a DAC?
4
What is a DAC?
10111001 10100111 10000110010101000011001000010000Digital Input Signal
Ana
log
Out
put
Sig
nal
5
Types of DAC Circuits
1. Resistor String2. Binary Weighted Resistor3. 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
nn REF
REF
R R
I V R V R
V R I n R I
V n R I nV V
V R I
Resistor String
3
8
38 3
8
REFV 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
2n
2 1n
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
2nR
Rf
Vout
refV
Binary Weighted Resistor DAC
11
• non-inverting input on ground virtual ground at inverting input
• KIRCHHOFF’s current law and no input current into op-amp I1 + I2 = 0
•I1 = V1 / R + V2 / (2R) + V3 / (4R) + …
31 2 42 1( ) ...
2 4 8out f f f
VV V VV R I R I R
R R R R
Binary Weighted Resistor DAC
12
Binary Weighted Resistor DAC
31 2 42 1( ) ...
2 4 8out f f f
VV V VV 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 betweenground and the inverting input of theop amp.
The switch is connected to ground ifthe corresponding bit is zero.
0 0 0 0
4 bit converter
Vref
15
R-2R DAC Example Convert 0001 to analog
V0V1V2V3
1
1/ 2 1/ 2eqR RR R
0 1 11
2
RV V V
R R
V0V1V0V1
=
1 2 21
2
RV V V
R R
2 3 31
2
RV V V
R R
Vref
16
R-2R DAC Example
Convert 0001 to analog
01
8 refV V
2R
R
V0
out 0R 1
V2R 16 refV V
Vref
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 /16out refV V
,1 / 8out refV V
,2 / 4out refV V
,3 / 2out refV 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)ib b b b b
( )1 2
Nref
out N i ii
VV b
Resolution
2
refN
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
NLSB
VV
2Resolution 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
tdelay
tslew tring
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
Ana
log
Out
put V
olta
ge
NON-Linearity(Real World)
Ana
log
Out
put V
olta
ge
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: Vref is fixed (specified by the
manufacturer)
Multiplier DAC: Vref is provided via an external source
Specification – Reference Voltage
26
Full Scale Voltage Defined as the output when digital input is all 1’s.
Specification – Reference Voltage
1
10
2 11
2 2
N Nref
fs refi Ni
VV 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 ErrorGain 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 OutputA
nalo
g O
utpu
t Vol
tage
Low Gain
High Gain
29
Offset Error: Occurs when there is an offset in the output
voltage in reference to the ideal output.
Offset ErrorOffset Error
Digital Input
Desired/Ideal OutputOutput Voltage
Positive Offset
Negative Offset
This error may be detected when all input bits are low (i.e. 0).
30
Full Scale ErrorFull 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
Ana
log
Out
put V
olta
ge
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
Ana
log
Out
put V
olta
ge
33
Non-Monotonic Output Error: Occurs when the an increase in digital input results in a lower output
voltage.
Non-Monotonic Output Error
Ana
log
Out
put V
olta
ge
Digital Input
Desired Output
Monotonic
Non-Monotonic
34
Resolution Errors
Poor Resolution(1 bit)
Vout
Desired Analog signal
Approximate output
2 V
olt.
Lev
els
Digital Input0 0
1Does not accurately approximate the desired output due large voltage divisions.
35
Resolution ErrorsBetter Resolution(3 bit)
Digital Input
Vout
Desired Analog signal
Approximate output
8 V
olt.
Lev
els
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
Expected Voltage
+VLSB
-VLSB
Settling time Time
Settling Time: The time required for the voltage to settle within +/- the voltage associated with the VLSB. 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, 2nd Ed. 1995
http://products.analog.com/products/info.asp?product=AD7224 http://courses.washington.edu/jbcallis/lectures/C464_Lec5_Sp-0
2.pdf
http://www.eecg.toronto.edu/~kphang/ece1371/chap11_slides.pdf
Previous students’ lectures on DAC
39
Questions?