Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations

Presentation on theme: "Heather Humphreys Cheng Shu Ngoo Woongsik Ham Ken Marek Digital to Analog Conversion."— Presentation transcript:

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

2 Topics Discussed 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 Woongsik Ham

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. Woongsik Ham

4 Principal components of DAC Woongsik Ham

5 What is a DAC? Digital  Analog Each binary number sampled by the DAC corresponds to a different output level Digital Input Signal Analog Output Signal Woongsik Ham

6 Ideally Sampled Signal Output typical of a real, practical DAC due to sample & hold 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. DAC Woongsik Ham

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

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

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

10 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 18 th, 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. Woongsik Ham

11 Motor Controllers Common Applications Motor Controllers Cruise Control Valve Control Motor Control 123 Woongsik Ham

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

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

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

15 Binary Weighted Resistor 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 – V 1 is MSB, V 4 LSB in this circuit Assumptions: – Ideal Op-Amp – No Current into Op-Amp – Virtual Ground at Inverting Input – V out = -IR f Ken Marek

16 Binary Weighted Resistor Assume binary inputs B 0 (LSB) to B n-1 (MSB) Each B i = 1 or 0 and is multiplied by V ref to get input voltage B0B0 B5B5 B4B4 B3B3 B2B2 B1B1 Ken Marek

17 Example: take a 4-bit converter, R f = aR Input parameters: Input voltage V ref = -2V Binary input = 1011 Coefficient a = ½ Binary Weighted Resistor Ken Marek

18 Binary Weighted Resistor Resolution: find minimum nonzero output If R f = R/2 then resolution is and max V out is Ken Marek

19 Binary Weighted Resistor 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 Ken Marek

20 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. Ken Marek

21 R-2R Ladder B2B2 B1B1 B0B0 Ken Marek

22 R-2R Ladder Circuit may be analyzed using Thevenin’s theorem (replace network with equivalent voltage source and resistance) Final result is: Ken Marek B2B2 B1B1 B0B0 RfRf Compare to binary weighted circuit:

23 R-2R Ladder Resolution If R f = R then resolution is and max V out is Ken Marek

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

25 General comments Circuits as shown produce only unipolar output Replacing ground with –V ref will allow V out to be positive or negative Ken Marek

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

27 Reference Voltage Determines Characteristic of DACs Set externally or Generated inside DAC V ref sets maximum DAC output voltage (if not amplified) Full scale output voltage: V ref determines analog output voltage changes to steps taken by 1 LSB of digital input signal (resolution) Cheng Shu Ngoo X = analog output k = Constant A = V ref analog B = Binary (digital) input

28 Reference Voltage Internal vs. External V ref ? InternalExternal Non-Multiplier DAC V ref fixed by manufacturer Qualified for specified temperature range Multiplying DAC Vary V ref Consider current required Consider Voltage range Consider dynamic effects of inner structure Cheng Shu Ngoo *Multiplying DAC is advantageous considering the external reference.

29 Resolution 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. 5V ref DAC 1LSB=5/2 8 =0.0195V resolution (8-bit) 1LSB=5/2 3 =0.625V resolution (3-bit) 1 LSB Cheng Shu Ngoo

30 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  f sampling ≥ 2f max 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 Cheng Shu Ngoo

31 Settling Time 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 Cheng Shu Ngoo

32 Settling Time Cheng Shu Ngoo t settle

33 DAC Linearity 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) Cheng Shu Ngoo LinearNon-Linear

34 Types of DAC Errors 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 Heather Humphreys

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

36 Offset Error 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). Heather Humphreys

37 Full-Scale Error 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 Heather Humphreys

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

39 Differential Nonlinearity Error 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). Heather Humphreys

40 Integral Nonlinearity Error 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.' Heather Humphreys

41 Settling Time and Overshoot Error Settling Time: The time required for the voltage to settle within +/- the voltage associated with the V LSB. 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. Heather Humphreys

42 Resolution Errors 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 Poor Resolution (1 Bit) Better Resolution (3 Bit) Heather Humphreys

43 Sources of Errors 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. Heather Humphreys

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

45 References Previous student presentations and… Alicatore, David G. and Michael B Histand. Introduction to Mechatronics and Measurement Systems, 2 nd ed. McGraw-Hill, Maxim AN641 Glossary es.html es.html

Download ppt "Heather Humphreys Cheng Shu Ngoo Woongsik Ham Ken Marek Digital to Analog Conversion."

Similar presentations

Ads by Google