No Slide Title

Download Report

Transcript No Slide Title

Digital to Analog
Converter
(DAC)
Trayvon Leslie
Orlando Carreon
Zack Sosebee
ME 6405
Intro to Mechatronics
March 14, 2008
 Overview
Outline
 Choosing a DAC
 Specifications
Resolution
Speed
Linearity
Settling Time
Reference Voltages
Errors
• Errors
 Types of DAC
Binary Weighted Resistor
R-2R Ladder
Multiplier DAC
Non-Multiplier DAC
 Applications
 References
Trayvon Leslie
Overview
 Digital to Analog Converter (DAC)
 A digital to analog converter (DAC) is a device
that converts digital numbers (binary) into an
analog voltage, current, or electric charge
output.
Trayvon Leslie
Overview
Digital to Analog Converter (DAC)
• Generate piecewise continuous signals from digital code.
Trayvon Leslie
Overview
Each binary number sampled by the DAC
corresponds to a different output level.
Trayvon Leslie
Overview
What a DAC Looks Like
Trayvon Leslie
Overview
Example of DAC
An example of a DAC would be the Analog Devices
AD 7224 D/A Converter. The AD7224 is a precision
8-bit, voltage-output, digital-to-analog converter with
an output amplifier.
Specifications:
DAC Type – R-2R Voltage Out
Input – Dual 8 Bit
Reference voltage – Non-Multiplier
2v – 12.5v
Settling Time - 7μs
Cost - Under $4.00
Trayvon Leslie
Overview
Examples of DAC
Trayvon Leslie
AD7224
Choosing a DAC
There are six(6) main specifications that should
be considered when choosing a DAC for a
particular project.
Reference Voltage
Resolution
Linearity
Speed
Settling Time
Error
Trayvon Leslie
Specifications
Reference Voltage
To a large extent the output properties of a DAC are
determined by the reference voltage.
 Multiplier DAC – The reference voltage is constant and is set by
the manufacturer.
 Non-Multiplier DAC – The reference voltage can be changed
during operation.
Trayvon Leslie
Specifications
Resolution
The resolution is the amount of voltage rise created by
increasing the LSB (Least Significant Bit) of the input
by 1. This voltage value is a function of the number of
input bits and the reference voltage value.
1 bit DAC is designed to reproduce 2 (21) levels while an 8 bit DAC is
designed for 256 (28) levels.
Increasing the number of bits results in a finer resolution
Most DACs are in the 12-18 bit range
Trayvon Leslie
Reference Voltage
Resolution 
2 # _ of _ bits
Specifications
Linearity
The linearity is the relationship between the output
voltage and the digital signal input.
Trayvon Leslie
Specifications
Speed
Usually specified as the conversion rate or sampling
rate.
It is the rate at which the input register is updated.
 High speed DACs are defined as operating at greater than 1 MHz.
 Some state of the art 12-16 bit DAC can reach speeds of 1GHz
 The conversion of the digital input signal is limited by the clock
speed of the microprocessor and the settling time of the DAC.
Trayvon Leslie
Specifications
Settling Time
Ideally a DAC would instantaneously change its output value
when the digital input would change.
In a real DAC it takes time for the DAC to reach the actual
expected output value.
Ideal Sampled Signal
Trayvon Leslie
Real DAC Output
Specifications
Error
There are multiple sources of error in computing the
analog output.
Gain Error
Offset Error
Full Scale Error
Linearity
Non-Monotonic Output Error
Settling Time and Overshoot
Resolution
Trayvon Leslie
Errors
Gain Error
Deviation in the slope of the ideal curve and with
respect to the actual DAC output
High Gain Error: Step
amplitude is higher than
the desired output
Low Gain Error: Step
amplitude is lower than
the desired output
Orlando Carreon
Errors
Offset Error
Occurs when there is an offset in the output
voltage in reference to the ideal output.
This error may be
detected when all
input bits are low
(i.e. 0).
Orlando Carreon
Errors
Full Scale Error
Occurs when there
is an offset in
voltage form the
ideal output and a
deviation in slope
from the ideal gain.
Orlando Carreon
Errors
Non-Linearity
Differential Non-Linearity: Voltage step size
differences vary as digital input increases. Ideally
each step should be equivalent.
Orlando Carreon
Errors
Non-Linearity
Integral Non-Linearity: Occurs when the
output voltage is non linear. Basically an inability
to adhere to the ideal slope.
Orlando Carreon
Errors
Non-Monotonic Output Error
Occurs when the an increase in digital
input results in a lower output voltage.
Orlando Carreon
Errors
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.
Orlando Carreon
Errors
Settling Time and Overshoot
Orlando Carreon
Errors
Resolution
Inherent errors associated with the
resolution
◦ More Bits = Less Error and Greater Resolution
◦ Less Bits = More Error and Less Resolution
Orlando Carreon
Errors
Resolution
Does not accurately
approximate the
desired output due
large voltage divisions.
Res 
Ref Voltage
2
# of bits
Orlando Carreon
Poor Resolution (1 Bit)
Errors
Resolution
Better
approximation of the
of the desired output
signal due to the
smaller voltage
divisions.
Res 
Ref Voltage
2
# of bits
Orlando Carreon
Better Resolution (3 Bit)
Types of DAC
Binary Weighted Resistor
Basic Ideas:
Assumptions:
• Use a summing op-amp
circuit
• Ideal Op-Amp
• Use transistors to
switch between high and
ground
• Virtual Ground at Inverting
Input
• Use resistors scaled by
two to divide voltage on
each branch by a power
of two
Zack Sosebee
• No Current into Op-Amp
•Vout = -IRf
Types of DAC
Binary Weighted Resistor
Voltages V1 through Vn are either
Vref if corresponding bit is high or
ground if corresponding bit is low
V1 is most significant bit
Vn is least significant bit
MSB
Vout
LSB
Vn 
 V1 V2 V3
  IRf   Rf  

  n -1 
2 R
 R 2R 4R
Zack Sosebee
Types of DAC
Binary Weighted Resistor
If Rf=R/2
V
V
V 
V
Vout   IRf   1  2  3   nn 
4
8
2 
 2
For example, a 4-Bit converter yields
Vout
1
1
1
 1
 Vref  b3  b2  b1  b0 
4
8
16 
 2
Where b3 corresponds to Bit-3, b2 to Bit-2, etc.
Zack Sosebee
Types of DAC
Binary Weighted Resistor
V
V
V V

Summing op-Amp: Vout   R f  1  2  3  4  ...
 R 2 R 4 R 8R

Example
•
•
•
•
•
•
•
Vout 
Vref = -2V
Digital Word = 1010
V1 = -2V
V2 = 0V
V3 = -2V
V4 = 0V
Rf = R/2
1   2 0  2 0 
 
   1.25V

2  1
2
4
8
Zack Sosebee
Types of DAC
Limitations of Binary Weighted Resistor
1. If R = 10 kΩ, 8 bits DAC, and VRef = 10 V
R8 = 2(8-1)*(10 kΩ) = 1280 kΩ
I8 = VRef/R8 =10V/1280 kΩ = 7.8 μA
Op-amps that can handle those currents are rare and expensive.
2. If R = 10 Ω and VRef = 10 V
R1 = 2(1-1)*(10 Ω) = 10 Ω
I1 = VRef/R1 = 10V/10 Ω = 1 A
This current is more than a typical op-amp can handle.
Zack Sosebee
Types of DAC
Binary Weighted Resistor Summary
 Advantages
◦ Simple
◦ Fast
 Disadvantages
◦ Need large range of resistor values (2000:1 for 12-bit)
with high precision in low resistor values
◦ Need very small switch resistances
 Summary
◦ Use in fast, low-precision converter
Zack Sosebee
Types of DAC
R-2R Ladder
Each bit corresponds
to a switch:
If the bit is high,
the corresponding
switch is connected to
the inverting input of
the op-amp.
If the bit is low, the
corresponding switch
is connected to ground.
Zack Sosebee
Types of DAC
V3
R-2R Ladder
Vref
V1
V2
V3
Ideal Op-amp
2R
2R

2 R 2 R 
Req 
R
2R  2R 
Zack Sosebee
Types of DAC
R-2R Ladder
Vref
V1
V2
V2
V3
V3
R
R
1
 R 
V3  
V2  V2
2
 RR
I
Likewise,
Vout
Zack Sosebee
1
V1
2
1
V1  Vref
2
Vout   IR
V2 
Types of DAC
R-2R Ladder
Vref
V1 V2
V3
Results:
1
1
1
V3  Vref , V2  Vref , V1  Vref
8
4
2
Vref
Vref
Vref 
 Vref
Vout   R b3
 b2
 b1
 b0

4R
8R
16R 
 2R
Where b3 corresponds to bit 3,
b2 to bit 2, etc.
If bit n is set, bn=1
If bit n is clear, bn=0
Zack Sosebee
Types of DAC
R-2R Ladder
For a 4-Bit R-2R Ladder
1
1
1
 1
Vout  Vref  b3  b2  b1  b0 
4
8
16 
 2
For general n-Bit R-2R Ladder or Binary Weighted Resister DAC
n
Vout  Vref  bni
i 1
Zack Sosebee
1
i
2
Types of DAC
R-2R Ladder Summary
 Advantages
◦ Only 2 resistor values
 Summary
◦ Better than weighted resistor DAC
Zack Sosebee
Types of DAC
Binary Weighted Resistor vs. R-2R Ladder
Zack Sosebee
Applications
• Generic Use
• Circuit Components
• Audio and Video
• Oscilloscopes/Generators
• Motor Controllers
Orlando Carreon
Applications
Generic Use
•Used when a continuous analog signal is required.
•Signal from DAC can be smoothed by a Low pass
filter
Orlando Carreon
Applications
Circuit Components
• Voltage controlled Amplifier
Digital input, External Reference Voltage as Control
• Digitally operated attenuator
External Reference Voltage as Input, Digital Control
• Programmable Filters
Digitally Controlled Cutoff Frequencies
Orlando Carreon
Applications

Audio
Most modern audio signals are stored in digital form and in
order to be heard through speakers they must be
converted into an analog signal.
- CD Players
- MP3 Player

- Digital Telephones
- Hi-Fi Systems
Video
Video signals from a digital source must be converted to
analog form if they are to be displayed on an analog
monitor
- Computers
Orlando Carreon
- Digital Video Player
Applications
Oscilloscopes/Generators

Digital Oscilloscopes
◦ Digital Input
◦ Analog Output
Orlando Carreon

Signal Generators
◦
◦
◦
◦
Sine wave generation
Square wave generation
Triangle wave generation
Random noise generation
Applications
Motor Controllers

Cruise Control

Valve Control

Motor Control
Orlando Carreon
References

http://en.wikipedia.org/wiki/Digital-to-analog_converter

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.p
df

Past student lectures
Questions