Download DAC

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Control system wikipedia , lookup

Ground loop (electricity) wikipedia , lookup

Solar micro-inverter wikipedia , lookup

Ohm's law wikipedia , lookup

Flip-flop (electronics) wikipedia , lookup

Islanding wikipedia , lookup

Power inverter wikipedia , lookup

Electrical ballast wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Variable-frequency drive wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Surge protector wikipedia , lookup

Current source wikipedia , lookup

Alternating current wikipedia , lookup

Oscilloscope history wikipedia , lookup

Multimeter wikipedia , lookup

Stray voltage wikipedia , lookup

Rectifier wikipedia , lookup

Voltage optimisation wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Mains electricity wikipedia , lookup

Power electronics wikipedia , lookup

Voltage regulator wikipedia , lookup

Integrating ADC wikipedia , lookup

Metadyne wikipedia , lookup

Buck converter wikipedia , lookup

Current mirror wikipedia , lookup

Schmitt trigger wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Opto-isolator wikipedia , lookup

Transcript
Digital to Analog Converter
Nov. 1, 2005
Fabian Goericke, Keunhan Park,
Geoffrey Williams
1
Outline

What is a DAC?

Types of DAC Circuits

Resistor-string DAC

Binary weighted DAC

R-2R Ladder DAC

Specifications of DAC

Errors

Applications
2
What is a DAC?

A digital to analog
converter (DAC) is a
device that converts
digital numbers (binary)
into an analog voltage or
current output.
1
0
0
1
0
1
0
1
0
0
1
1
0
1
1
1
1
0
0
1
1
0
1
0
1
0
1
1
DAC
3
Analog Output Signal
What is a DAC?
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011
Digital Input Signal
4
Types of DAC Circuits
1. Resistor String
2. Binary Weighted Resistor
3. R-2R Ladder
5
Resistor String DAC
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
6
Resistor String DAC
Resistor String
Rtotal  8  R
I  VREF / Rtotal  VREF /(8  R )
Vn  Rn  I  n  R  I
Vn
nRI
n

 Vn   VREF
VREF
8 R  I
8
Example
VREF  8V
3
V3   8V  3V
8
7
Resistor String DAC
Selection Switches
1 1 0  6V
1 0 0  4V
1 1 1  7V
0 0 0  0V
8
Resistor String DAC
Advantages:
• simple
• fast for < 8 bits
Disadvantages:
• high element count for higher resolutions, reason:
number of resistors: 2 n
number of switches: 2n  1
• slow for > 10 bits
9
Binary Weighted Resistor DAC
Basic Idea:
•Use a summing Vref
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
Rf
2R
4R
-
Vout
+
2nR
10
Binary Weighted Resistor DAC
• 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) + …
 Vout
 V1 V2 V3 V4

 R f  I 2  R f  ( I1 )   R f  


 ... 
 R 2 R 4 R 8R

11
Binary Weighted Resistor DAC
Most
significant
bit
Least
significant
bit
Rf = R / 2
V
V
V V

 Vout  R f  I 2  R f  ( I1 )   R f  1  2  3  4  ... 
 R 2 R 4 R 8R

Vn = Vref, if bit is set
Terms have less influence
Vn = 0, if bit is clear
12
Binary Weighted Resistor DAC

Advantages
 Simple
 Fast

Disadvantages
 Needs
large range of resistor values (2000:1 for 12bit) with high precision in low resistor values
 Needs very small switch resistances
13
R-2R Resistor Ladder DAC
Vref
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

Simplest type of DAC

Requires only two precision resistance valuce (R and 2R)
14
R-2R DAC Example

Convert 0001 to analog
V1
Vref
V3
V2
V1
V0
=
V0
Req 
V1
V0
1
R
1/ 2 R  1/ 2 R
V0 
R
1
V1  V1
RR
2
V1 
R
1
V2  V2
RR
2
V2 
R
1
V3  V3
RR
2
15
R-2R DAC Example

Convert 0001 to analog
R
Vref
2R
V0
1
V0  Vref
8
Vout  
R
1
V0   Vref
2R
16
16
R-2R DAC Summary

Conversion results for each bit
Digital bit Analog Conversion
Vout ,0  Vref /16
0001
Vout ,1  Vref / 8
0010
Vout ,2  Vref / 4
0100
Vout ,3  Vref / 2
1000

Vout  b3Vout ,3  b2Vout ,2
 b1Vout ,1  b0Vout ,0
for
b3b2b1b0
(bi  0 or 1)
Conversion equation for N-bit DAC
N
Vout   b( N i )
i 1
Vref
i
2
Resolution 
Vref
2N
17
R-2R DAC Summary

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
18
Specification of DAC

Resolution

Speed

Settling time

Linearity

Reference voltage
19
Specification - Resolution

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
Resolution  VLSB
VRef
 N
2
N = Number of bits
20
Specification - Speed

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.
21
Specification – Settling Time

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.
tslew
tdelay
tring
22
Specification – Linearity

The difference between the desired analog
output and the actual output over the full range
of expected values.
23
Specification – Linearity

Ideally, a DAC should produce a linear relationship
between a digital input and the analog output, this is not
always the case.
Desired/Approximate Output
Digital Input
Perfect Agreement
NON-Linearity(Real World)
Analog Output Voltage
Analog Output Voltage
Linearity(Ideal Case)
Desired Output
Approximate
output
Digital Input
Miss-alignment
24
Specification – Reference Voltage

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
25
Specification – Reference Voltage

Full Scale Voltage
 Defined
as the output when digital input is all 1’s.
N 1
 2N 1 
V fs   1
 Vref 

i 1
N 

i 0 2
 2

Vref
26
Errors
There are a multiple sources of error associated with DAC
Common DAC Errors:
 Gain Error
 Offset Error
 Full Scale Error
 Non Linearity
 Non-Monotonic
 Resolution Errors
 Settling Time and Overshoot
27
Gain Error
Gain Error: Deviation in the slope of the ideal curve and
with respect to the actual DAC output.
High Gain
High Gain Error: Step
Low Gain Error: Step
amplitude is lower than
the desired output
Analog Output Voltage
amplitude is higher than
the desired output
Desired/Ideal Output
Low Gain
Digital Input
28
Offset Error
Offset Error: Occurs when there is an offset in the output
voltage in reference to the ideal output.
Output Voltage
Desired/Ideal Output
This error may be
detected when all input
bits are low (i.e. 0).
Positive Offset
Negative Offset
Digital Input
29
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.
30
Differential Non-Linearity
Analog Output Voltage
Differential Non-Linearity: Voltage step size changes
vary with as digital input increases. Ideally each step
should be equivalent.
Ideal Output
2VLSB
Diff. Non-Linearity = 2VLSB
VLSB
Digital Input
31
Integral Non-Linearity
Analog Output Voltage
Integral Non-Linearity: Occurs when the output voltage is
non linear. Basically an inability to adhere to the ideal
slope.
Ideal Output
1VLSB
Int. Non-Linearity = 1VLSB
Digital Input
32
Non-Monotonic Output Error
Analog Output Voltage
Non-Monotonic Output Error: Occurs when the
an increase in digital input results in a lower
output voltage.
Desired Output
Non-Monotonic
Monotonic
Digital Input
33
Resolution Errors
Poor Resolution(1 bit)
Vout
Does not accurately
approximate the desired
output due large voltage
divisions.
2 Volt. Levels
Desired Analog
signal
1
0
Approximate
output
0
Digital Input
34
Resolution Errors
Better Resolution(3 bit)
Vout
Desired Analog signal
111
8 Volt. Levels
Better approximation of
the of the desired output
signal due to the smaller
voltage divisions.
110
101
100
011
010
001
110
101
100
011
010
001
000
000
Approximate
output
Digital Input
35
Settling Time and Overshoot
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.
Analog Output
Voltage
+VLSB
Expecte
d
-VLSB
Voltage
Settling time
Time
36
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
37
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_Sp02.pdf
http://www.eecg.toronto.edu/~kphang/ece1371/chap11_slides.pdf
Previous students’ lectures on DAC
38
Questions?
39