Presentation on theme: "Digital to Analog Conversion"— Presentation transcript:
1Digital to Analog Conversion Heather HumphreysCheng Shu NgooWoongsik HamKen Marek
2Topics Discussed Woongsik Ham What is a DAC? Applications Types of DAC circuitBinary weighted DACR-2R Ladder DACSpecifications of DACResolutionReference VoltageSpeedSettling TimeLinearityDAC associated errors
3Woongsik HamWhat is a DAC?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
4Principal components of DAC Woongsik HamPrincipal components of DACExplain picture in detail. 1 min
5What is a DAC? Digital Analog Woongsik HamWhat is a DAC?Digital AnalogEach binary number sampled by the DAC corresponds to a different output level.Digital Input SignalAnalog Output SignalExplain picture in detail. 1 min
6Ideally Sampled Signal Woongsik HamTypical OutputDACs 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 & holdIdeally Sampled SignalDACExplain graphs in detail min
7Types of DAC Multiplying DAC* Nonmultiplying DAC Woongsik HamTypes of DACMultiplying DAC*Reference source external to DAC packageNonmultiplying DACReference source inside DAC package*Multiplying DAC is advantageous considering the external reference.
8Common Applications Used when a continuous analog signal is required. Woongsik HamCommon ApplicationsUsed when a continuous analog signal is required.Signal from DAC can be smoothed by a Low pass filterPiece-wise Continuous OutputAnalog Continuous OutputDigital Inputn bit DAC0 bitFilternth bit
10Woongsik HamApplications – VideoVideo 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.
11Common Applications Motor Controllers Woongsik HamCommon Applications Motor ControllersCruise ControlValve ControlMotor Control123
12Types of DAC Multiplying DAC* Nonmultiplying DAC Woongsik HamTypes of DACMultiplying DAC*Reference source external to DAC packageNonmultiplying DACReference source inside DAC package*Multiplying DAC is advantageous considering the external reference.
13Types of DAC implementations Ken MarekTypes of DAC implementationsBinary Weighted ResistorR-2R LadderPulse Width Modulator (not covered)Oversampling DAC (used internally in HCS12)
14Binary Weighted Resistor Ken MarekBinary Weighted ResistorStart with summing op-amp circuitInput voltage either high or groundAdjust resistor weighting to achieve desired Vout
15Binary Weighted Resistor Ken MarekBinary Weighted ResistorDetailsUse transistors to switch between high and groundUse resistors scaled by two to divide voltage on each branch by a power of twoV1 is MSB, V4 LSB in this circuitAssumptions:Ideal Op-AmpNo Current into Op-AmpVirtual Ground at Inverting InputVout = -IRf
16Binary Weighted Resistor Ken MarekBinary Weighted ResistorAssume binary inputs B0 (LSB) to Bn-1 (MSB)Each Bi = 1 or 0 and is multiplied by Vref to get input voltageB5B4B3B2B1B0
17Binary Weighted Resistor Ken MarekBinary Weighted ResistorExample: take a 4-bit converter, Rf = aRInput parameters:Input voltage Vref = -2VBinary input = 1011Coefficient a = ½
18Binary Weighted Resistor Ken MarekBinary Weighted ResistorResolution: find minimum nonzero outputIf Rf = R/2 then resolution is and max Vout is
19Binary Weighted Resistor Ken MarekBinary Weighted ResistorAdvantagesSimpleFastDisadvantagesNeed large range of resistor values (2048:1 for 12-bit) with high precision in low resistor valuesNeed very small switch resistancesOp-amp may have trouble producing low currents at the low range of a high precision DAC
20R-2R Ladder Each bit corresponds to a switch: Ken MarekR-2R LadderEach 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.
22Ken MarekR-2R LadderCircuit may be analyzed using Thevenin’s theorem (replace network with equivalent voltage source and resistance)Final result is:B2B1B0RfCompare to binary weighted circuit:
23R-2R Ladder Resolution If Rf = R then resolution is and max Vout is Ken MarekR-2R LadderResolutionIf Rf = R then resolution is and max Vout is
24R-2R Ladder Advantages: Disadvantages Only 2 resistor values Ken MarekR-2R LadderAdvantages:Only 2 resistor valuesLower precision resistors acceptableDisadvantagesSlower conversion rate
25General comments Circuits as shown produce only unipolar output Ken MarekGeneral commentsCircuits as shown produce only unipolar outputReplacing ground with –Vref will allow Vout to be positive or negative
26DAC Specifications: Reference Voltages Resolution Speed Settling Time Cheng Shu NgooDAC Specifications:Reference VoltagesResolutionSpeedSettling TimeLinearity
27Reference Voltage Determines Characteristic of DACs Cheng Shu NgooDetermines Characteristic of DACsSet externally or Generated inside DACVref 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 outputk = ConstantA = Vref analogB = Binary (digital) input27
28Reference Voltage Internal vs. External Vref? Internal External Cheng Shu NgooInternal vs. External Vref?InternalExternalNon-Multiplier DACVref fixed by manufacturerQualified for specified temperature rangeMultiplying DACVary VrefConsider current requiredConsider Voltage rangeConsider dynamic effects of inner structureMultiplying 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.28
29Resolution 1 LSB (digital)=1 step size for DAC output (analog) Cheng Shu Ngoo1 LSB (digital)=1 step size for DAC output (analog)Increasing the number of bits results in a finer resolutionMost DAC - 8 to 16-bits (256 to 65,536 steps)e.g. 5Vref DAC1LSB=5/28 =0.0195V resolution (8-bit)1LSB=5/23 =0.625V resolution (3-bit)1 LSBSmallest output voltage change for change in 1 LSB digital inputDiff between successive values
30Speed (Max. Sampling Frequency) Cheng Shu NgooSpeed (Max. Sampling Frequency)The maximum rate at which DAC is reproducing usable analog output from digital input registerDigital input signal that fluctuates at/ has high frequency require high conversion speedSpeed is limited by the clock speed of the microcontroller (input clock speed) and the settling time of the DACShannon-Nyquist sampling theorem fsampling ≥ 2fmaxEg. To reproduce audio signal up to 20kHz, standard CD samples audio at 44.1kHz with DAC ≥40kHzTypical computer sound cards 48kHz sampling freq>1MHz for High Speed DACsHuman hearing range - ~20Hz – ~20kHz
31Settling TimeCheng Shu NgooThe 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 updateCauses:Slew rate of output amplifierAmount of amplifier ringing and signal overshootFaster DACs have shorter settling timeElectronic switching fastAmplifier settling time dominant effect
33DAC Linearity Cheng Shu Ngoo The difference between the desired analog output and the actual output over the full range of expected valuesDoes the DAC analog output vary linearly with digital input signal?Can the DAC behavior follow a constant Transfer Function relationship?Ideally, proportionality constant – linear slopeIncrease in input increase in output monotonicIntegral non-linearity (INL) & Differential non-linearity (DNL)LinearNon-Linear
34Types of DAC Errors Gain Error Offset Error Full Scale Error Heather HumphreysTypes of DAC ErrorsGain ErrorOffset ErrorFull Scale ErrorNon-Monotonic Output ErrorDifferential Nonlinearity ErrorIntegral Nonlinearity ErrorSettling Time and Overshoot ErrorResolution ErrorSources of Errors
35Gain Error Slope deviation from ideal gain Heather HumphreysGain ErrorSlope deviation from ideal gainLow Gain: Step Amplitude Less than IdealHigh Gain: Step Amplitude Higher than Ideal
36Offset Error The voltage offset from zero when all input bits are low Heather HumphreysOffset ErrorThe voltage offset from zero when all input bits are low*This error may be detected when all input bits are low (i.e. 0).
37Full-Scale Error Includes gain error and offset error Heather HumphreysFull-Scale ErrorIncludes gain error and offset errorOccurs 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
38Non-Monotonic Output Error Heather HumphreysNon-Monotonic Output ErrorA form of non-linearity, due to errors in individual bits of the inputRefers to output that is not monotonic
39Differential Nonlinearity Error Heather HumphreysDifferential Nonlinearity ErrorThe 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).
40Integral Nonlinearity Error Heather HumphreysOccurs 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.'
41Settling Time and Overshoot Error Heather HumphreysSettling Time and Overshoot ErrorSettling 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 DACOne of the principal limiting factors of any commercial DAC is the settling time of the op-ampOvershoot: occurs when the output voltage overshoots the desired analog output voltage.
42Resolution Errors Inherent errors associated with resolution Heather HumphreysInherent errors associated with resolutionMore Bits => Less Error & Greater ResolutionLess Bits => More Error & Less ResolutionQ: 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 currentBetter Resolution (3 Bit)Poor Resolution (1 Bit)
43Sources of Errors Deviation of voltage sources from nominal values Heather HumphreysSources of ErrorsDeviation of voltage sources from nominal valuesVariations and tolerances on resistance valuesNon-ideal operational amplifiersOther non-ideal circuit components, temperature dependence, etc.