Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital to Analog Converters

Similar presentations


Presentation on theme: "Digital to Analog Converters"— Presentation transcript:

1 Digital to Analog Converters
Tyler Smith Brent Nelson Jerry Jackson

2 Topics Discussed What is a DAC? Choosing a DAC Resistor String DAC
Weighted Resistor DAC R-2R DAC PWM DAC associated errors Applications Conclusion

3 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.

4 Choosing a DAC There are six main parameters that should be considered when choosing a DAC for a particular project. Reference Voltage Resolution Linearity Speed Settling time Error

5 Choosing a DAC 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.

6 Choosing a DAC Resolution
The resolution is the amount of voltage rise created by increasing the LSB of the input by 1. This voltage value is a function of the number of input bits and the reference voltage value. - Increasing the number of bits results in a finer resolution - Most DACs in the bit range

7 Choosing a DAC Linearity
The linearity is the relationship between the output voltage and the digital signal input.

8 Choosing a DAC Speed Usually specified as the conversion rate or sampling rate. It is the rate at which the input register is cycled through in the DAC. High speed DACs are defined as operating at greater than 1 millisecond per sample (1MHz). Some state of the art bit DAC can reach speeds of 1GHz The conversion of the digital input signal is limited by the clock speed of the input signal and the settling time of the DAC.

9 Choosing a DAC Settling Time
Ideally a DAC would instantaneously change its output value when the digital input would change. However, in a real DAC it takes time for the DAC to reach the actual expected output value.

10 Choosing a DAC Error There are multiple sources of error in computing the analog output.

11 Example of a DAC - AD7224 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

12 Example of a DAC - AD7224

13 Types of DAC Circuits 1. Resistor String
2. N-Bit Binary Weighted Resistor 3. R-2R Ladder 4. PWM DAC

14 Resistor String DAC 3 Bit Resistor String DAC
Components of a String DAC Resistor String Selection Switches Opamp

15 Resistor String DAC How many internal components would be needed to create an 8 bit resistor string DAC? Number of Resistors = Number of Switches = Impractical for a DAC with more than a couple bits input.

16 Weighted Resistor DAC 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 R/2 Vout

17 Weighted Resistor Example
Summing op-Amp: Vref = -2V Digital word = 1010 V1 = -2V V2 = 0V V3 = -2V V4 = 0V Rf = R/2 V1 R Rf 2R V2 4R V3 - Vout + V4 8R

18 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

19 R-2R DAC Basic Idea: Use only 2 resistor values
Use equal resistances in parallel to halve the resistance Creates a series of voltage dividers cutting voltages in half Another summing op-amp

20 R-2R Example Digital word = 001
V0 has two 2R resistances in parallel connected to ground Equivalent of R between V0 and ground V1 now has a resistance R to V0 and R to ground V0 = V1/2 V1 has two 2R resistances to ground Equivalent of R between V1 and ground V2 now has a resistance R to V1 and R to ground V1 = V2/2 V2 = Vref V0 = V2/4 V0 = Vref/4 Vout = -V0/2 Vout = -Vref/8

21 R-2R Summary Advantages Summary Only 2 resistor values
Better than weighted resistor DAC

22 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 N-bit digital words updated at rate f DAC clock must run at rate 2n*f Example: Desired output = 7V, supply voltage = 10V Operate 10V at 70% duty cycle to approximate 7V In practice: use counter, comparator, clock, integrator 22

23 PWM Summary Advantages Disadvantages Summary All digital Cheap
High sampling rate required Sensitive to clock variations Summary Best when load is a (relatively) slowly responding system

24 Errors

25 Errors Gain Error Offset Error Full Scale Error Linearity
Non-Monotonic Output Error Settling Time and Overshoot Resolution

26 Gain Error Slope deviation from ideal gain
Low Gain Error: Step Amplitude is less than ideal High Gain Error: Step Amplitude is higher than ideal

27 Offset Error The voltage is offset from zero when all input bits are low

28 Full Scale Error Combination of gain error and offset error

29 Non-Linearity The linearity error is due to the fact that the resolution of the converter is not constant.

30 Non-linearity The largest difference between the actual and theoretical output as a percentage of full-scale output voltage

31 Non-linearity It is the difference of tension obtained during the passage in the next digital code. Should be 1 LSB in theory.

32 Non-monotonic Output Error
A form of non- linearity due to errors in individual bits of the input

33 Settling Time and Overshoot
Changes in input are not reflected immediately in the output Lag times result

34 Resolution Errors Inherent errors associated with the resolution
More Bits = Less Error and Greater Resolution Less Bits = More Error and Less Resolution

35 Applications

36 Programmable gain OpAmps
Voltage controlled Amplifier (digital input, Vref as control) Digitally operated attenuators (Vref as input, digital control)

37 Programmable Filters Integrate DACs in filters
Variable cutoff frequency commanded by a digital signal

38 DAC Applications Used at the end of a digital processing chain when analog signals are required Digital Audio CD Players, digital telephones, etc. Industrial Control Systems Motor speed, valves, etc. Waveform Function Generators Cruise Control

39 References Alciatore, “Introduction to Mechatronics and Measurement Systems,” McGraw-Hill, 2003 Horowitz and Hill, “The Art of Electronics,” Cambridge University Press, 2nd Ed assNotes/DA_fall_01.ppt D7224 Analog Devices AD 7224 DAC General Overview and Specifications 5_Sp-02.pdf D/A Converter  Fundamentals and Definition Of Terms slides.pdf Data Converter  Fundamentals

40 Digital to Analog Converter
Nov. 1, 2005 Fabian Goericke, Keunhan Park, Geoffrey Williams 40 40

41 Outline What is a DAC? Types of DAC Circuits Specifications of DAC
Resistor-string DAC Binary weighted DAC R-2R Ladder DAC Specifications of DAC Errors Applications 41 41

42 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. DAC 42 42

43 What is a DAC? 1011 1001 1010 0111 1000 0110 0101 0100 0011 0010 0001 0000 Analog Output Signal Digital Input Signal 43 43

44 Types of DAC Circuits 1. Resistor String 2. Binary Weighted Resistor
3. R-2R Ladder 44 44

45 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 45 45

46 Resistor String DAC Resistor String Example 46 46

47 Resistor String DAC Selection Switches 1 1 0  6V 1 1 1  7V
47 47

48 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 48 48

49 Binary Weighted Resistor DAC
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 49 49

50 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) + … 50 50

51 Binary Weighted Resistor DAC
Most significant bit Least significant bit Rf = R / 2 Vn = Vref, if bit is set Vn = 0, if bit is clear Terms have less influence 51 51

52 Binary Weighted Resistor DAC
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 52 52

53 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. 4 bit converter Simplest type of DAC Requires only two precision resistance valuce (R and 2R) 53 53

54 R-2R DAC Example = Convert 0001 to analog V3 V2 V1 V0 Vref V0 V1 V1 V0
54 54

55 R-2R DAC Example Convert 0001 to analog R 2R Vref V0 55 55

56 R-2R DAC Summary Conversion results for each bit
Conversion equation for N-bit DAC Digital bit Analog Conversion 0001 0010 0100 1000 for 56 56

57 R-2R DAC Summary Advantages Disadvantages 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 57 57

58 Specification of DAC Resolution Speed Settling time Linearity
Reference voltage 58 58

59 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 bit Resolution N = Number of bits 59 59

60 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. 60 60

61 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 tring tdelay 61 61

62 Specification – Linearity
The difference between the desired analog output and the actual output over the full range of expected values. 62 62

63 Specification – Linearity
Ideally, a DAC should produce a linear relationship between a digital input and the analog output, this is not always the case. Linearity(Ideal Case) Digital Input Perfect Agreement Desired/Approximate Output Analog Output Voltage NON-Linearity(Real World) Analog Output Voltage Digital Input Desired Output Miss-alignment Approximate output 63 63

64 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 64 64

65 Specification – Reference Voltage
Full Scale Voltage Defined as the output when digital input is all 1’s. 65 65

66 Errors Common DAC Errors: Gain Error Offset Error Full Scale Error
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 66 66

67 Gain Error Gain Error: Deviation in the slope of the ideal curve and with respect to the actual DAC output. Digital Input Desired/Ideal Output Analog Output Voltage Low Gain High Gain High Gain Error: Step amplitude is higher than the desired output Low Gain Error: Step amplitude is lower than the desired output 67 67

68 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 Digital Input Negative Offset 68 68

69 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. 69 69

70 Differential Non-Linearity
Differential Non-Linearity: Voltage step size changes vary with as digital input increases. Ideally each step should be equivalent. Digital Input Ideal Output Analog Output Voltage VLSB 2VLSB Diff. Non-Linearity = 2VLSB 70 70

71 Int. Non-Linearity = 1VLSB
Integral Non-Linearity Integral Non-Linearity: Occurs when the output voltage is non linear. Basically an inability to adhere to the ideal slope. Ideal Output Analog Output Voltage Int. Non-Linearity = 1VLSB 1VLSB Digital Input 71 71

72 Non-Monotonic Output Error
Non-Monotonic Output Error: Occurs when the an increase in digital input results in a lower output voltage. Desired Output Non- Monotonic Analog Output Voltage Monotonic Digital Input 72 72

73 Resolution Errors Poor Resolution(1 bit) Vout Approximate output
Desired Analog signal Approximate output 2 Volt. Levels Digital Input 1 Does not accurately approximate the desired output due large voltage divisions. 73 73

74 Resolution Errors Better Resolution(3 bit) Vout Approximate output
Digital Input Vout Desired Analog signal Approximate output 8 Volt. Levels 00 0 00 1 01 0 01 1 10 0 10 1 11 0 11 1 Better approximation of the of the desired output signal due to the smaller voltage divisions. 74 74

75 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 Expecte d Voltage +VLSB -VLSB Settling time Time 75 75

76 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. 76 76

77 References Alciatore, “Introduction to Mechatronics and Measurement Systems,” McGraw-Hill, 2003 Horowitz and Hill, “The Art of Electronics,” Cambridge University Press, 2nd Ed duct=AD7224 464_Lec5_Sp-02.pdf hap11_slides.pdf Previous students’ lectures on DAC 77 77

78 Questions? 78 78

79 Digital to Analog Converters
Andrew Gardner Muhammad Salman David Fernandes Jevawn Roberts Introduction to Mechatronics Student Lecture – 10/23/06

80 Introduction to Mechatronics
Outline What is a DAC? Different Types of DACs Binary Weighted Resistor R-2R Ladder Specifications Commonly used DACs Application Introduction to Mechatronics Student Lecture – 10/23/06

81 Introduction to Mechatronics
A DAC is a Digital to Analog converter. It converts a binary digital number into an analog representation, most commonly voltage though current is also used sometimes. DAC Introduction to Mechatronics Student Lecture – 10/23/06

82 Introduction to Mechatronics
Each binary number sampled by the DAC corresponds to a different output level. 1011 1001 1010 0111 1000 0110 0101 0100 0011 0010 0001 0000 Digital Input Signal Analog Output Signal Introduction to Mechatronics Student Lecture – 10/23/06

83 Typical Output DACs capture and hold a number, convert it to a physical signal, and hold that value for a given sample interval. This is known as a zero-order hold and results in a piecewise constant output. Output typical of a real, practical DAC due to sample & hold Ideally Sampled Signal DAC Introduction to Mechatronics Student Lecture – 10/23/06

84 Introduction to Mechatronics
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) Introduction to Mechatronics Student Lecture – 10/23/06

85 Introduction to Mechatronics
Summing OP-Amps Inverting summer circuit used in Binary Weighted Resistor DAC. V(out) is 180° out of phase from V(in) Introduction to Mechatronics Student Lecture – 10/23/06 85

86 Introduction to Mechatronics
Binary Weighted Input DAC I - + R 2R 4R 2n-1R Rf Vout Vref V1 V2 V3 Vn Ideal Op-amp No current into op-amp Virtual ground at inverting input Vout= -IRf I - + R 2R 4R 2n-1R Rf Vout Vref V1 V2 V3 Vn MSB LSB Introduction to Mechatronics Student Lecture – 10/23/06 86

87 Introduction to Mechatronics
Calculation Introduction to Mechatronics Student Lecture – 10/23/06

88 Introduction to Mechatronics
Cont’d Exampl e: n = totalbits Introduction to Mechatronics Student Lecture – 10/23/06

89 Introduction to Mechatronics
Advantages and Disadvantages Advantage Easy principle/construction Fast conversion Disadvantages 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. Introduction to Mechatronics Student Lecture – 10/23/06

90 Introduction to Mechatronics
R-2R Resistor Ladder DAC Vref MSB LSB Bit: Vout 4-Bit Converter Introduction to Mechatronics Student Lecture – 10/23/06

91 Introduction to Mechatronics
R-2R DAC Example V2 V1 V0 Vref Convert 0001 to analog Introduction to Mechatronics Student Lecture – 10/23/06 91

92 Introduction to Mechatronics
R-2R DAC Example (cont.) V1 V0 V1 V0 = Nodal Analysis Likewise, Voltage Divider Introduction to Mechatronics Student Lecture – 10/23/06

93 Introduction to Mechatronics
Conversion Equation For a 4-Bit R-2R Ladder For general n-Bit R-2R Ladder Binary Weighted Resister DAC Introduction to Mechatronics Student Lecture – 10/23/06

94 Introduction to Mechatronics
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 Introduction to Mechatronics Student Lecture – 10/23/06 94

95 Introduction to Mechatronics
DAC Specification Resolution Reference Voltage Speed Settling Time Linearity Introduction to Mechatronics Student Lecture – 10/23/06

96 Introduction to Mechatronics
Resolution 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 Introduction to Mechatronics Student Lecture – 10/23/06

97 Introduction to Mechatronics
Reference Voltage Multiplier DAC Reference voltage is a constant set by the manufacturer Non-Multiplier DAC Reference voltage is variable Full scale Voltage Slightly less than the reference voltage (Vref-VLSB) Introduction to Mechatronics Student Lecture – 10/23/06

98 Introduction to Mechatronics
Speed Also called the conversion rate or sampling rate rate at which the register value is updated For sampling rates of over 1 MHz a DAC is designated as high speed. Speed is limited by the clock speed of the microcontroller and the settling time of the DAC Introduction to Mechatronics Student Lecture – 10/23/06

99 Introduction to Mechatronics
Settling Time Time in which the DAC output settles at the desired value ± ½ VLSB. Faster DACs decrease the settling time Introduction to Mechatronics Student Lecture – 10/23/06

100 Introduction to Mechatronics
Linearity Represents the relationship between digital values and analog outputs. Should be related by a single proportionality constant. (constant slope) Introduction to Mechatronics Student Lecture – 10/23/06

101 Introduction to Mechatronics
DAC Error Non-Linearity Differential Integral Gain Error Offset Error Monotonicity Resolution Introduction to Mechatronics Student Lecture – 10/23/06

102 Introduction to Mechatronics
Non-linearity Deviation from a linear relationship between digital input and analog output. Analog Output Voltage Digital Input Desired Output Introduction to Mechatronics Student Lecture – 10/23/06

103 Introduction to Mechatronics
Non-Linearity Differential Worst case deviation from the ideal VLSB step for an increment of LSB Integral Worst case deviation from the line between the endpoint (zero and full scale) voltages Digital Input Analog Output Voltage VLSB 2VLSB Digital Input Analog Output Voltage Integral Non-linearity Introduction to Mechatronics Student Lecture – 10/23/06

104 Introduction to Mechatronics
Gain Error Also called Full-Scale Error Deviation from the ideal full scale voltage due to a higher or lower gain than expected. High Gain Desired/Ideal Output Analog Output Voltage Low Gain Introduction to Mechatronics Student Lecture – 10/23/06 Digital Input

105 Introduction to Mechatronics
Offset Error Also called Zero Error Difference between ideal voltage output and actual voltage output for a digital input of zero. Digital Input Ideal Output Output Voltage Introduction to Mechatronics Student Lecture – 10/23/06

106 Introduction to Mechatronics
Monotonicity Increases or decreases of the digital value must correspond to increases or decreases of the voltage output. Analog Output Voltage Digital Input Desired Output Non- monotonic behavior Introduction to Mechatronics Student Lecture – 10/23/06

107 Introduction to Mechatronics
Resolution Error For matching curves over time or simply outputting accurate values a proper resolution must be selected Resolution must be high enough for the desired precision (½ VLSB) Vout Desired Analog signal 11 10 01 00 Introduction to Mechatronics Student Lecture – 10/23/06 Time

108 Introduction to Mechatronics
Applications – Audio Many audio signals are stored as binary numbers (on media such as CDs and in computer files such as MP3s). Therefore computer sound cards, stereo systems, digital cell phones, and portable music players contain DAC to convert the digital representation to an analog signal. Introduction to Mechatronics Student Lecture – 10/23/06

109 Introduction to Mechatronics
Example DAC AD 7224 – Manufactured by Analog Devices Type: R-2R Voltage Output Reference voltage: Non-Multiplier 2 – 12.5 Volts 8-bit Input Settling Time: 7 μs Cost: about $4.00 Introduction to Mechatronics Student Lecture – 10/23/06

110 Introduction to Mechatronics
Example DAC 18 Pin integrated circuit including output amplifier Introduction to Mechatronics Student Lecture – 10/23/06

111 Introduction to Mechatronics
Applications – Video Video signals from digital sources, such as a computer or DVD must be converted to analog signals before being displayed on an analog monitor. Beginning on February 18th, 2009 all television broadcasts in the United States will be in a digital format, requiring ATSC tuners (either internal or set-top box) to convert the signal to analog. Introduction to Mechatronics Student Lecture – 10/23/06

112 Introduction to Mechatronics
References Previous Student Lectures Introduction to Mechatronics Student Lecture – 10/23/06

113 Introduction to Mechatronics
Questions Introduction to Mechatronics Student Lecture – 10/23/06

114 Digital to Analog Conversion
Heather Humphreys Cheng Shu Ngoo Woongsik Ham Ken Marek

115 Topics Discussed Woongsik Ham What is a DAC? Applications
Types of DAC circuit Binary weighted DAC R-2R Ladder DAC Specifications of DAC Resolution Reference Voltage Speed Settling Time Linearity DAC associated errors

116 What is a DAC? Woongsik Ham A digital to analog converter (DAC) is a device that converts digital numbers (binary) into an analog voltage or current output. Explain picture in detail. 1 min 116

117 Principal components of DAC
Woongsik Ham Explain picture in detail. 1 min 117

118 What is a DAC? Digital  Analog
Woongsik Ham Digital  Analog Each binary number sampled by the DAC corresponds to a different output level. 1011 1001 1010 0111 1000 0110 0101 0100 0011 0010 0001 0000 Digital Input Signal Analog Output Signal Explain picture in detail. 1 min 118

119 Ideally Sampled Signal
Woongsik Ham Typical Output DACs capture and hold a number, convert it to a physical signal, and hold that value for a given sample interval. This is known as a zero-order hold and results in a piecewise constant output. Output typical of a real, practical DAC due to sample & hold Ideally Sampled Signal DAC Explain graphs in detail min 119

120 Types of DAC Multiplying DAC* Nonmultiplying DAC
Woongsik Ham Multiplying DAC* Reference source external to DAC package Nonmultiplying DAC Reference source inside DAC package *Multiplying DAC is advantageous considering the external reference.

121 Common Applications Used when a continuous analog signal is required.
Woongsik Ham Common Applications Used when a continuous analog signal is required. Signal from DAC can be smoothed by a Low pass filter Piece-wise Continuous Output Analog Continuous Output Digital Input n bit DAC 0 bit Filter nth bit

122 Common Applications: Function Generators
Woongsik Ham Digital Oscilloscopes Digital Input Analog Ouput Signal Generators Sine wave generation Square wave generation Triangle wave generation Random noise generation 1 2

123 Woongsik Ham Applications – Video Video signals from digital sources, such as a computer or DVD must be converted to analog signals before being displayed on an analog monitor. Beginning on February 18th, 2009 all television broadcasts in the United States will be in a digital format, requiring ATSC tuners (either internal or set-top box) to convert the signal to analog.

124 Common Applications Motor Controllers
Woongsik Ham Cruise Control Valve Control Motor Control 1 2 3

125 Types of DAC Multiplying DAC* Nonmultiplying DAC
Woongsik Ham Multiplying DAC* Reference source external to DAC package Nonmultiplying DAC Reference source inside DAC package *Multiplying DAC is advantageous considering the external reference.

126 Types of DAC implementations
Ken Marek Binary Weighted Resistor R-2R Ladder Pulse Width Modulator (not covered) Oversampling DAC (used internally in HCS12)

127 Binary Weighted Resistor
Ken Marek Start with summing op-amp circuit Input voltage either high or ground Adjust resistor weighting to achieve desired Vout

128 Binary Weighted Resistor
Ken Marek Details Use transistors to switch between high and ground Use resistors scaled by two to divide voltage on each branch by a power of two V1 is MSB, V4 LSB in this circuit Assumptions: Ideal Op-Amp No Current into Op-Amp Virtual Ground at Inverting Input Vout = -IRf

129 Binary Weighted Resistor
Ken Marek Assume binary inputs B0 (LSB) to Bn-1 (MSB) Each Bi = 1 or 0 and is multiplied by Vref to get input voltage B5 B4 B3 B2 B1 B0

130 Binary Weighted Resistor
Ken Marek Example: take a 4-bit converter, Rf = aR Input parameters: Input voltage Vref = -2V Binary input = 1011 Coefficient a = ½

131 Binary Weighted Resistor
Ken Marek Resolution: find minimum nonzero output If Rf = R/2 then resolution is and max Vout is

132 Binary Weighted Resistor
Ken Marek Advantages Simple Fast Disadvantages Need large range of resistor values (2048:1 for 12-bit) with high precision in low resistor values Need very small switch resistances Op-amp may have trouble producing low currents at the low range of a high precision DAC

133 R-2R Ladder Each bit corresponds to a switch:
Ken Marek 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.

134 R-2R Ladder Ken Marek B2 B1 B0

135 R-2R Ladder Ken Marek Circuit may be analyzed using Thevenin’s theorem (replace network with equivalent voltage source and resistance) Final result is: B2 B1 B0 Rf Compare to binary weighted circuit:

136 R-2R Ladder Resolution If Rf = R then resolution is and max Vout is
Ken Marek Resolution If Rf = R then resolution is and max Vout is

137 R-2R Ladder Advantages: Disadvantages Only 2 resistor values
Ken Marek Advantages: Only 2 resistor values Lower precision resistors acceptable Disadvantages Slower conversion rate

138 General comments Circuits as shown produce only unipolar output
Ken Marek Circuits as shown produce only unipolar output Replacing ground with –Vref will allow Vout to be positive or negative

139 DAC Specifications: Reference Voltages Resolution Speed Settling Time
Cheng Shu Ngoo Reference Voltages Resolution Speed Settling Time Linearity

140 Reference Voltage Set externally or Generated inside DAC
Cheng Shu Ngoo Determines Characteristic of DACs Set externally or Generated inside DAC Vref sets maximum DAC output voltage (if not amplified) Full scale output voltage: Vref determines analog output voltage changes to steps taken by 1 LSB of digital input signal (resolution) To a large extent, the characteristics of a DAC are defined by its reference voltage, whether generated within the DAC or applied externally. First, the reference voltage (VREF) sets the DAC's maximum output voltage if the output signal is not amplified by an additional output stage. VREF also defines the voltage step by which the output changes in response to a 1-LSB transition at the input. One step equals VREF/2N, where N is the DAC resolution. When connecting an external reference, you should consider not only the current required and the voltage range of the DAC's reference input, but also any dynamic effects produced by the DAC's inner structure. With variation of the applied digital value, the reference input resistance can also change. Thus, the reference selected must be capable of following each load step within the required time, or you must add a capacitor or an op-amp buffer. X = analog output k = Constant A = Vref analog B = Binary (digital) input 140

141 Reference Voltage Internal vs. External Vref? Internal External
Cheng Shu Ngoo Internal vs. External Vref? Internal External Non-Multiplier DAC Vref fixed by manufacturer Qualified for specified temperature range Multiplying DAC Vary Vref Consider current required Consider Voltage range Consider dynamic effects of inner structure Multiplying mode - The variable voltage is multiplied with the adjusted digital input value and transferred to the output, producing the effect of an accurate digital potentiometer. For this operating mode you should consider the DAC's bandwidth and voltage range, as well as dynamic characteristics of the reference input; such as voltage feedthrough from the reference input to the output at a digital value of zero. *Multiplying DAC is advantageous considering the external reference. 141

142 Resolution 1 LSB (digital)=1 step size for DAC output (analog)
Cheng Shu Ngoo 1 LSB (digital)=1 step size for DAC output (analog) Increasing the number of bits results in a finer resolution Most DAC - 8 to 16-bits (256 to 65,536 steps) e.g. 5Vref DAC 1LSB=5/28 =0.0195V resolution (8-bit) 1LSB=5/23 =0.625V resolution (3-bit) 1 LSB Smallest output voltage change for change in 1 LSB digital input Diff between successive values

143 Speed (Max. Sampling Frequency)
Cheng Shu Ngoo Speed (Max. Sampling Frequency) The maximum rate at which DAC is reproducing usable analog output from digital input register Digital input signal that fluctuates at/ has high frequency require high conversion speed Speed is limited by the clock speed of the microcontroller (input clock speed) and the settling time of the DAC Shannon-Nyquist sampling theorem  fsampling ≥ 2fmax Eg. To reproduce audio signal up to 20kHz, standard CD samples audio at 44.1kHz with DAC ≥40kHz Typical computer sound cards 48kHz sampling freq >1MHz for High Speed DACs Human hearing range - ~20Hz – ~20kHz

144 Settling Time Slew rate of output amplifier
Cheng Shu Ngoo The interval between a command to update (change) its output value and the instant it reaches its final value, within a specified percentage (± ½ LSB) Ideal DAC output would be sequence of impulses  Instantaneous update Causes: Slew rate of output amplifier Amount of amplifier ringing and signal overshoot Faster DACs have shorter settling time Electronic switching  fast Amplifier settling time  dominant effect

145 Settling Time Cheng Shu Ngoo tsettle

146 DAC Linearity Cheng Shu Ngoo
The difference between the desired analog output and the actual output over the full range of expected values Does the DAC analog output vary linearly with digital input signal? Can the DAC behavior follow a constant Transfer Function relationship? Ideally, proportionality constant – linear slope Increase in input  increase in output  monotonic Integral non-linearity (INL) & Differential non-linearity (DNL) Linear Non-Linear

147 Types of DAC Errors Gain Error Offset Error Full Scale Error
Heather Humphreys Gain Error Offset Error Full Scale Error Non-Monotonic Output Error Differential Nonlinearity Error Integral Nonlinearity Error Settling Time and Overshoot Error Resolution Error Sources of Errors

148 Gain Error Slope deviation from ideal gain
Heather Humphreys Slope deviation from ideal gain Low Gain: Step Amplitude Less than Ideal High Gain: Step Amplitude Higher than Ideal

149 Offset Error The voltage offset from zero when all input bits are low
Heather Humphreys The voltage offset from zero when all input bits are low *This error may be detected when all input bits are low (i.e. 0).

150 Full-Scale Error Includes gain error and offset error
Heather Humphreys Includes gain error and offset error Occurs when there is an offset in voltage form the ideal output and a deviation in slope from the ideal gain. Error at full scale – contrast with offset error at zero

151 Non-Monotonic Output Error
Heather Humphreys A form of non-linearity, due to errors in individual bits of the input Refers to output that is not monotonic

152 Differential Nonlinearity Error
Heather Humphreys The largest difference between the actual and theoretical output as a percentage of full-scale output voltage. Voltage step size differences vary as digital input increases. Ideally each step should be equivalent. In other words, DNL error is the difference between the ideal and the measured output responses for successive steps. An ideal DAC response would have analog output values exactly one code (LSB) apart (DNL = 0).

153 Integral Nonlinearity Error
Heather Humphreys Occurs when the output voltage is non linear; an inability to adhere to the ideal slope. INL is the deviation of an actual transfer function from a straight line. After nullifying offset and gain errors, the straight line is either a best-fit straight line or a line drawn between the end points of the transfer function. INL is often called 'relative accuracy.'

154 Settling Time and Overshoot Error
Heather Humphreys 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. Settling time generally determines maximum operating frequency of the DAC One of the principal limiting factors of any commercial DAC is the settling time of the op- amp Overshoot: occurs when the output voltage overshoots the desired analog output voltage.

155 Resolution Errors Inherent errors associated with resolution
Heather Humphreys Inherent errors associated with resolution More Bits => Less Error & Greater Resolution Less Bits => More Error & Less Resolution Q: How does very high resolution affect measurements? A: LSB may be in noise range and not produce an output; it may be difficult to find an op-amp to amplify such small current Better Resolution (3 Bit) Poor Resolution (1 Bit)

156 Sources of Errors Deviation of voltage sources from nominal values
Heather Humphreys Deviation of voltage sources from nominal values Variations and tolerances on resistance values Non-ideal operational amplifiers Other non-ideal circuit components, temperature dependence, etc.

157 Project Applications Motor speed controller
Woongsik Ham Motor speed controller Solenoid valves (pneumatics) Digital Motor Control Computer Printers Sound Equipment (e.g. CD/MP3 Players, etc.) Electronic Cruise Control Digital Thermostat

158 References Previous student presentations and… x.html Alicatore, David G. and Michael B Histand. Introduction to Mechatronics and Measurement Systems, 2nd ed. McGraw-Hill, 2003. ldvue/dvc/ Maxim AN641 Glossary l_Purpose_Oscilloscopes.html _generators.htm astr.gsu.edu/hbase/electronic/dac.html#c4

159 ME 6405 – Intro to Mechatronics
DAC, Diodes, Triacs ME 6405 – Intro to Mechatronics Student Lecture Kevin Johnson Minh Vo Lam Duong Wye-Chi Chok 159

160 Outline DAC Diodes Triacs What is a DAC? Types of DAC Specifications
Kevin Johnson Outline DAC What is a DAC? Types of DAC Specifications Diodes What are diodes? P-N Junction Diode Real vs. Ideal Types of Diodes & Applications Triacs What are thyristors? What are triacs? Applications

161 Principal components of DAC
Kevin Johnson Explain picture in detail. 1 min 161

162 What is a DAC? Kevin Johnson Convert digital signal (number) to analog signal (voltage or current) Either multiplying or non- multiplying Non-multiplying contains its own reference Multiplying takes external reference. Two main types: ladder and delta- sigma

163 DAC ideal output. Kevin Johnson Each binary number sampled by the DAC corresponds to a different output level. 1011 1001 1010 0111 1000 0110 0101 0100 0011 0010 0001 0000 Digital Input Signal Analog Output Signal Explain picture in detail. 1 min 163

164 Ideally Sampled Signal
Kevin Johnson DAC real output. DACs capture a number and hold that value for a given sample interval. This is known as a zero-order hold and results in a piecewise constant output. Output typical of a real, practical DAC due to sample & hold Ideally Sampled Signal DAC Explain graphs in detail min 164

165 Smoothing Used when a continuous analog signal is required.
Kevin Johnson Smoothing Used when a continuous analog signal is required. Signal from DAC can be smoothed by a Low pass filter Piece-wise Continuous Output Analog Continuous Output Digital Input n bit DAC 0 bit Filter nth bit

166 Applications. Motor, valve, actuator Audio/Video Signal Generators
Kevin Johnson Applications. Audio/Video MP3 players Cellphones Television (well, old ones) Signal Generators Sine wave generation Square wave generation Triangle wave generation Random noise generation Motor, valve, actuator Rarely; usually PWM.

167 Types of DAC implementations
Kevin Johnson Binary Weighted Resistor R-2R Ladder Pulse Width Modulator (not covered) Oversampling DAC, aka Delta Sigma (used internally in HCS12)

168 Binary Weighted Resistor
Kevin Johnson Binary Weighted Resistor Assume binary inputs B0 (LSB) to Bn- 1 (MSB) Each Bi is 1 or 0 and is multiplied by Vref to get input voltage B5 B4 B3 B2 B1 B0

169 Binary weight theory Kevin Johnson Need to fill jars to a specific level using set of measuring cups. Cups are ½, ¼, 1/8, 1/16, etc. ork.php

170 BWR Pros and Cons Advantages Disadvantages Simple Fast
Kevin Johnson Advantages Simple Fast Disadvantages Need large range of resistor values (2048:1 for 12-bit) with high precision in low resistor values Need very small switch resistances Op-amp may have trouble producing low currents at the low range of a high precision DAC

171 R-2R ladder basic circuit
Kevin Johnson Equivalent resistance to ground at each top node is R. At each node, current gets split in two. Since nodes are cascaded, currents are ½, ¼, 1/8, etc.

172 R-2R Ladder results Final result is:
Kevin Johnson Final result is: Assuming Rf = R (and ignoring negative) Resolution is smallest step: i.e. B=1 in above equation.

173 R-2R Ladder Advantages: Disadvantages Only 2 resistor values
Kevin Johnson R-2R Ladder Advantages: Only 2 resistor values Lower precision resistors acceptable Disadvantages Slightly slower conversion rate Op-amp must still handle very small currents at high bit numbers.

174 Delta-sigma DAC Kevin Johnson Now all cups are the same size (or more precisely, he uses the same cup over and over). Cup size is 1/(2^n). He must add this amount the proper number of times (pulse-count modulation). ork.php

175 Delta-sigma Pros and Cons
Kevin Johnson Pros: Very accurate High bit-depth possible Reduced aliasing Cons: Requires very fast oversampling clock. At least 2^n times faster than sampling rate Complicated Sensitive to clock jitter

176 General comments Circuits as shown produce only unipolar output
Kevin Johnson General comments Circuits as shown produce only unipolar output Replacing ground with –Vref will allow Vout to be positive or negative

177 Specifications of a DAC
Minh Vo Specifications of a DAC Reference Voltage Resolution Sampling Rate Settling Time Linearity Errors Important in selecting a DAC 177

178 Reference Voltage Vref
Minh Vo Reference Voltage Vref Determines the output voltage range Non-multiplying DAC Fixed Vref set internally by manufacturer Multiplying DAC Vref is set externally and can be vary during operation Full-scale voltage Vfs Voltage when all digital inputs are 1’s Max voltage if not amplified VREF also defines the voltage step by which the output changes in response to a 1-LSB transition at the input. Multiplying DAC voltage can be changed during operation Full-scale voltage – slightly smaller than the reference voltage 178

179 Minh Vo Resolution The resolution is the amount of output voltage change in response to a least significant bit (LSB) transition. Smaller resolution results in a smoother output A common DAC has a bit resolution Resolution corresponds to the voltage of the LSB Finer resolution = smoother voltage change 179

180 Sampling Rate fsampling
Minh Vo Sampling Rate fsampling Rate of conversion of a single digital input to its analog equivalent When the input changes rapidly, fmax, the DAC conversion speed must be high Nyquist Criterion: Limited by the clock speed of the input signal and the settling time of the DAC Typical computer sound cards 48kHz sampling freq 180

181 Minh Vo Settling Time DAC needs time to reach the actual expected analog output voltage The time required for the output voltage to settle within +/- ½ of VLSB of the expected voltage Ideally a DAC would instantaneously change its output value when the digital input would change. However, in a real DAC it takes time for the DAC to reach the actual expected output value. 181

182 Minh Vo Linearity The difference between the desired analog output and the actual output over the full range of expected values Linear (Ideal) Non-Linear The linearity is the relationship between the output voltage and the digital signal input. 182

183 Errors Gain Error Offset Error Full Scale Error Non Linearity
Minh Vo Errors Gain Error Offset Error Full Scale Error Non Linearity Non-Monotonic Resolution Errors Settling Time and Overshoot 183

184 Minh Vo 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 Gain Error is adjustable to zero using an external potentiometer 184

185 Minh Vo 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). 185

186 Minh Vo Full Scale Error Combination of gain and offset error 186

187 Differential Non-Linearity
Minh Vo Differential Non-Linearity Voltage step size changes vary with as digital input increases. Ideally each step should be equivalent. 187

188 Integral Non-Linearity
Minh Vo Integral Non-Linearity Occurs when the output voltage is non linear. Basically an inability to adhere to the ideal slope. 188

189 Minh Vo Non-Monotonic Occurs when the an increase in digital input results in a lower output voltage. 189

190 Minh Vo Resolution Errors Does not accurately approximate the desired output due large voltage divisions. 190

191 Settling Time and Overshoot
Minh Vo Settling Time and Overshoot 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. Settling time generally determines maximum operating frequency of the DAC 191

192 What is a Diode? Lam Duong A diode is a two terminal electric component which conducts current more easily in one direction than in the opposite direction. The most common usage of a diode is as an electronic valve which allows current to flow in one direction but not the opposite direction.

193 A bit of history Lam Duong Diodes were known as rectifiers until 1919, when a physicist by the name of William Eccles coined the term diode, which from its Greek roots means “through-path.” In 1873 Fredrick Guthrie discovered thermionic diodes (vacuum tube diodes) . Heating the cathode in forward bias permitted electrons to be transmitted into the vacuum, but in reverse bias the electrons were not easily release from the unheated anode. 193

194 A bit of history Lam Duong In 1874 Karl Braun discovered the first solid state diode (crystal diode). It consists of using Galena crystals as the semiconducting material. In 1939 Russell Ohl discovered the first P-N junction at Bell Labs. Today, the majority of diodes are made of semiconductor silicon P-N junctions. 194

195 P-N Junction Diode Lam Duong A P-N junction diode consists of a p-type semiconductor (silicon) joined with an n-type semiconductor. P-type – A semiconductor doped with impurities to create positive charge carriers (holes). N-type – A semiconductor doped with impurities to create negative charged carriers. A depletion region is created when negative charge carriers from the N-type region diffuse into the P-type region, and vice versa. n p Depletion Region Majority carriers 195

196 P-N Junction Diode Lam Duong Forward Biased n p if Depletion Region The behavior of a diode depends upon the polarity of the supply voltage. Under forward bias the depletion region is reduced in size and less energy is required for the charged majority carriers to cross the depletion region. This decrease in energy requirement results in more charged majority carriers to cross the depletion region which induces a current.

197 P-N Junction Diode Lam Duong Under reverse bias the depletion region is greatly increased in size and requires significantly more energy from the majority carriers in order to cross. Most majority carriers won’t be able to cross the depletion region and thus are unable to induce a current. n p Reverse Biased Depletion Region ir V

198 Real vs. Ideal Lam Duong Ideal P-N Diode – no resistance to current in forward bias and infinite resistance in reverse bias. (Similar to a switch) In reality there is resistance to current flow in forward bias. It requires a certain voltage to be reached before the depletion region is eliminated and full current flow is permitted. Likewise, in reverse bias there is a small reverse (leakage) current induced by the flow of minority carriers. At a certain voltage (break down voltage) the reverse current will increase significantly. This is called the Avalanche current. V I conduction region non-conduction Ideal Curve

199 Schottky Diode Lam Duong Unlike P-N junction diodes, Schottky diodes are based on a metal and semiconductor junction. An advantage of Schottky diodes over P-N junction diodes is that Schottky diodes have no recovery time when switching from conducting to non- conducting state and vice versa. The main disadvantage of Schottky diodes are that they operate in low voltage compare to P-N junction diodes (up to 50V). Another significant difference is that the “on-voltage” for a Schottky diode is around .3V while it is .7V for a P-N junction diode. Metal N-Type

200 Flyback Diode Lam Duong Schottky diodes are often used as Flyback diodes due to their quick recovery and low forward voltage drop. A Flyback diode is a diode used to eliminate the sudden voltage spike that occurs across an indicutive load when voltage is abruptly reduced or removed. Lenz’s law - if the current through an inductance changes, this inductance induces a voltage so the current will go on flowing as long as there is energy in the magnetic field. Flyback diodes are important in mechatronics applications where one may want to vary the voltage of an inductive load to control its operation.

201 Lam Duong Other Types of Diodes Light Emitting Diodes (LEDs) - A diode formed from a semiconductor such as gallium arsenide, carriers that cross the junction emit photons when they recombine with the majority carrier on the other side. Photodiode – Exploits the fact that all semiconductors are subject to charged carrier generation when they are exposed to light. Photodiodes are often used to sense light such as in an Opto-isolator. Zener Diode – Allows current in forward bias like a regular diode, but also in reverse bias if the voltage is larger than designed voltage, called the Breakdown voltage. 10/31/ ME 6405: Introduction to Mechatronics201 201

202 What are TRIACS? In order to know, we must first look at thyristors…
Wye-Chi Chok In order to know, we must first look at thyristors… 202

203 What are Thyristors? Wye-Chi Chok Class of semiconductor components that can only go in 1 direction. Wide range of devices, SCR (silicon controlled rectifier), SCS (silicon controlled switch), Diacs, Triacs, and Shockley diodes Used in high power switching applications i.e. hundreds of amps / thousands of watts 203

204 How do Thyristors work? PNPN (4-layer) device:
Wye-Chi Chok PNPN (4-layer) device: PNP and NPN transistor back-to-back. With forward voltage, small gate current pulse turns on device. once on, each transistor supplies gate current for the other, so no need for gate input only way to turn it off is to stop current (i.e. bring voltage to zero)

205 Thyristors cont’d. Wye-Chi Chok 205

206 …now then, what are TRIACS?
Wye-Chi Chok …now then, what are TRIACS? A TRIAC (TRIode for Alternating Current) is a 3-terminal AC semiconductor switch. Composed of 2 thyristors facing opposite directions such that it can conduct current in either direction. MT1 and MT2 are current carrying terminals while the Gate terminal is used for triggering by applying a small voltage signal. Once triggered, it continues to conduct current until the current falls below a threshold value.

207 Triac Operation Wye-Chi Chok 5 layer device
Region between MT1 and MT2 are parallel switches (PNPN and NPNP) Allows for positive or negative gate triggering

208 Triac Characteristic Curve
Wye-Chi Chok

209 Triac Characteristic Curve
Wye-Chi Chok 1st quadrant - MT2 is (+) with respect to MT1 VDRM is the break-over voltage of the Triac and the highest voltage that can be blocked IRDM is the leakage current of the Triac when VDRM is applied to MT1 and MT2 IRDM is several orders of magnitude smaller than the “on” rating

210 Triacs Wye-Chi Chok Pros: Better than a transistor as it has much better current surge rating – it can handle more current as it simply turns on more Inexpensive compared to relays Cons: Can't manually control turn-off with the gate; must turn off by stopping current through the device via the terminals. Specs to buy one: Gate signal requirements Voltage drop Steady-state/holding current (continuously handle) Peak current (maximum amount to handle surge)

211 Triac Applications High Power TRIACS
Wye-Chi Chok High Power TRIACS • Switching for AC circuits, allowing the control of very large power flows with milliampere-scale control currents • Can eliminate mechanical wear in a relay Low Power TRIACS • Light bulb dimmers (done by applying power later in the AC cycle aka PWM of AC wave) • Motor speed controls for electric fans and other AC motors, and heaters • Modern computerized control circuits in household appliances 211

212 Triac Applications Simple Triac Switch Small control current/voltage
Wye-Chi Chok Simple Triac Switch Small control current/voltage Eliminates Mechanical wear in a Relay Much Cheaper

213 Real World Triacs Come in various shapes and sizes
Wye-Chi Chok Real World Triacs Come in various shapes and sizes Essentially all the same operationally Different mounting schemes


Download ppt "Digital to Analog Converters"

Similar presentations


Ads by Google