DIGITAL TO ANALOG CONVERTOR
A quick presentation to introduce our peers on the techniques, specifications and applications of the DAC
03/16/2007
Compiled by Rafael, Ravikanth and Hrishi
Table Of Contents
Introduction Types
Of DAC Specifications Applications Conclusion
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
INTRODUCTION
The
DAC fundamentally converts finiteprecision numbers (usually fixed-point binary numbers) into a physical quantity, usually an electrical voltage. Normally the output voltage is a linear function of the input number. Usually these numbers are updated at uniform sampling intervals and can be thought of as numbers obtained from a sampling process
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Analog Output Signal
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 Digital Input Signal
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Output is a sequence of piecewise constant values or rectangular pulses, means that there is an inherent effect of the zero-order hold on the effective frequency response of the DAC resulting in a mild roll-off of gain at the higher frequencies
Ideally Sampled Signal
Output typical of a real, practical DAC due to sample & hold
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Types of DACs
Many
types of DACs available. Usually switches, resistors, and op-amps used to implement conversion Three Types:
Resistor String Binary Weighted Resistor R-2R Ladder PWM (Pulse Width Modulation)
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
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
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Resistor String DAC
Resistor String
Example
VREF = 8V
Rtotal = 8R I = REF R total V REF /(8 ) V / = R Vn =Rn I= n R I Vn n R I n = =V n VREF 8R I 8 VREF
3 V3 = 8V = 3V 8
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
SELECTION SWITCHES
1 0 0 4V
1 1 0 6V
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
0 0 0 0V 1 1 1 7V
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Resistor String DAC
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 2n 1
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Binary Weighted Resistor DAC
Utilizes
a summing op-amp circuit Weighted resistors are used to distinguish each bit from the most significant to the least significant Transistors are used to switch between Vref and ground (bit high or low)
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Summing OP-Amps
Inverting
summer circuit used in Binary Weighted Resistor DAC. V(out) is 180 out of phase from V(in)
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Binary Weighted Resistor
Vref
Assume Ideal OpAmp No Current into OP-Amp Virtual ground at inverting input
R 2R 4R + 2nR
Rf
Vou t
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Calculation
bn 1 bn 2 b0 VOUT = Vref R( + + ... + n 2R 4R 2 R
VOUT =
Vref 2
n
(2 n 1 bn 1 + 2 n 2 bn 2 + ... + 2 b1 + b0
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Example:
n=4
Vout = Vref (2 n 1 bn 1 + 2 n 2 bn 2 + ... + 2b1 + b0 )
Contd
Vout =
Vref 16
(8b3 + 4b2 + 2b1 + b0 )
Vout =
V fs
Vref
16 = ref RE V S
(8(0) + 4(0) + 2(1) +1(1)) =
3 Vref 16
RE = / 2 n 1 S V fs = ref V 2 4 1 35 2 4 =0.9 7
03/16/2007
n = totalbits
Vref
Compiled by Rafael, Ravikanth and Hrish
Advantages and Disadvantages
Advantages
Easy principle/construction Fast conversion Requirement of several different precise input resistor values: Requires large range of resistors (2048:1 for 12-bit DAC) with necessary high precision for low resistors one unique value per binary input bit. (High bit DACs) Larger resistors ~ more error. Precise large resistors expensive.
Disadvantages
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
R-2R ladder DAC Example
Vref V2 V1 V0
MSB
LSB
Convert 0001 to analog
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
R-2R DAC Example (cont.)
V1 V0 V1 V0
=
1 Req = =R 1 1 ( 2R ) + ( 2R)
V1 V0 V0 = R R
V1 = 2 V0
Nodal Analysis Likewise,
V1 = R 1 R 1 V2 = V2 V2 = V3 = V3 R+R 2 R+R 2
Voltage Divider
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Conversion Equation
For a 4-Bit R-2R Ladder
Vout
1 1 1 1 = Vref b3 + b2 + b1 + b0 4 8 16 2
For general n-Bit R-2R Ladder Binary Weighted Resister DAC
1 Vout = Vref bn i i 2 i =1
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
R-2R DAC Summary
Advantages
Only two resistor values Does not need as precision resistors as Binary weighted DACs Cheap and Easy to manufacture
Disadvantages
Slower conversion rate
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Pulse Width Modulation
Approximate analog signal by switching on/off at high frequency Integral of output voltage from PWM ideally is the same as integral of desired output voltage Example: Desired output = 7V, supply voltage = 10V Operate 10V at 70% duty cycle to approximate 7V In practice: use counter, comparator, clock, integrator
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
SPECIFICATIONS
Resolution Speed Linearity Settling
Time Reference Voltage Errors
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
RESOLUTION
Defined by the change in output voltage for a change of the LSB. Related to the size of the binary representation of the voltage. (8-bit) Higher resolution results in smaller steps between voltage values
Resolution=
Vref 2
n
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
SPEED
Defined
by the rate at which the register value is updated. Also called the conversion rate or sampling rate Speed is limited by the clock speed of the microcontroller and the settling time of the DAC
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
LINEARITY
Analog Output Voltage
Represents the relationship between digital values and analog outputs Should be related by a single proportionality constant. (constant slope)
Desired Output
Digital Input
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
SETTLING TIME
Time in which the DAC output settles at the desired value VLSB . Ideally, an instantaneous change in analog volatage would occur when a new binary word enters into the DAC
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
REFERENCE VOLTAGE
Used
to determine how each digital input will be assigned to each voltage division Types:
Non Multiplier DAC: Vref is fixed Multiplier DAC: Vref provided by external source
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
ERRORS
Gain Offset Full
scale Non-Monocity
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
GAIN ERROR
Analog Output .
Occurs when the slope of the actual output deviates from the ideal output
D ig it a l In p u t
I d e a l O u tp u tP o s itiv e O f f s e t E r rNo e rg a tiv e O f f s e t E r r o r
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
OFFSET ERROR
Analog Output .
Occurs when there is a constant offset between the actual output and the ideal output
D ig it a l In p u t
I d e a l O u tp u tP o s itiv e O f f s e t E r rN rerg a tiv e O f f s e t E r r o r o
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
FULL SCALE ERROR
Analog Output
Occurs when the actual signal has both gain and offset errors
D ig ita l In p u t
Ideal O utput F ull S cale E rror E rror
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Non-Monotonic Error
Occurs when an increase in digital input results in a decrease in the analog output
03/16/2007
Compiled by Rafael, Ravikanth and Hrish
Common Applications
Electronic Cruise Control Computer Printers Sound Equipment (e.g. CD/MP3 Players)
Project applications Motor speed controller Solenoid valves (pneumatics)
03/16/2007
Compiled by Rafael, Ravikanth and Hrishi