Digital to Analog Converter (DAC) Prepared by: Amr Hatem Kirolos Shokry Ibrahim Emad Mina Ashraf Mina Samy Mourad Ghorab Supervised by: Dr. Mohamed Abd El Ghany
Outline Introductions Binary Converter R-2R Circuit IC DAC Filters Specs Applications
Introduction 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 Each binary number sampled by the DAC corresponds to a different output level Digital Input Signal Analog Output Signal
History Of Data Converters The earliest recorded binary DAC known is not electronic at all, but hydraulic. Turkey, in the early 19th century, they had problems with its public water supply systems were built to meter water The metering system used reservoirs (header tank) maintained at a constant depth The water output from the header tank is controlled by gated binary-weighted nozzles The output of the nozzle sizes corresponded to flows of binary multiples and sub-multiples This is functionally an 8-bit DAC with manual input
the single largest driving force behind the development of electronic data converters over the years has been the field of communications. The telegraph led to the invention of the telephone the rapid demand for more capacity, While time division multiplexing (TDM) achieved some measure of popularity, frequency division multiplexing (FDM) using various carrier-based systems widely used. It was pulse code modulation (PCM) History Of Data Converters All of this invention paved the road for the first telephone which also start the revolution conversion between the analog and digital signals.
Applications of DAC Audio Video Other usages Mechanical whiffletree electromechanical digital-to-analog converter linkage in the IBM Selectric typewriter NOT JUST AUDIO ! DACs are found in CD players, digital music players, and PC sound cards. HDMI DVI RAMDAC
the main purpose of the DAC To convert digital values to analog voltages is a function that converts digital data (usually binary) into an analog signal (current, voltage, or electric charge) Performs inverse operation of the Analog-to-Digital Converter (ADC) Unlike analog signals, digital data can be transmitted, manipulated, and stored without degradation DAC Digital ValueAnalog Voltage Reference Voltage
Connecting digital circuitry to sensor devices is simple if the sensor devices are inherently digital themselves. However, when analog devices are involved, interfacing becomes much more complex. An analog-to-digital converter, performs the former task while a digital-to-analog converter, or DAC, performs the latter. An ADC inputs an analog electrical signal such as voltage or current and outputs a binary number. In block diagram form, it can be represented as such: A DAC, on the other hand, inputs a binary number and outputs an analog voltage or current signal. In block diagram form, it looks like this: Together, they are often used in digital systems to provide complete interface with analog sensors and output devices for control systems such as those used in automotive engine controls:
Types Of DACs Types There are several DAC architectures; the suitability of a DAC for a particular application is determined by six main parameters: physical size, power consumption, resolution, speed, accuracy, cost. Due to the complexity and the need for precisely matched components, all but the most specialist DACs are implemented as integrated circuits (ICs). Binary Weighted Resistor R-2R Ladder Characteristics Comprised of switches, op-amps, and resistors Provides resistance inversely proportion to significance of bit
Binary Weighted Resistor R f = R 8R4R2RR VoVo -V REF LSB MSB
11 Binary Weighted Resistor R f = R 8R4R2RR VoVo -V REF LSB MSB Inverting summer circuit used in Binary Weighted Resistor DAC V o is 180° out of phase from V in
12 Binary Weighted Resistor R f = R 8R 4R2RR VoVo -V REF Least Significant Bit Most Significant Bit Transistors are used to switch between V ref and ground (bit high or low) ( ) 2 =(15) 10 CLEARED SET
13 Binary Weighted Resistor “Weighted Resistors” based on bit Reduces current by a factor of 2 for each bit R f = R 8R4R2RR VoVo -V REF LSB MSB ( ) 2 =(15) 10
14 Binary Weighted Resistor Result: B i = Value of Bit i
15 Binary Weighted Resistor More Generally: B i = Value of Bit i n = Number of Bits
16 Advantages and Disadvantages
17 N-bit binary weighted Example Find output voltage, current, and resolution for a binary weighted resistor DAC of 4 bits for given condition : -R = 10 kΩ - R f = 5 kΩ -V Ref = -10V Applied binary word is 1001
18 Example Solutions
19 Example Solutions (Cont.) V LSB
R-2R Ladder
25 Pros & Cons Binary WeightedR-2R Pros Easily understood Only 2 resistor values Easier implementation Easier to manufacture Faster response time Cons Limited to ~ 8 bits Large # of resistors Susceptible to noise Expensive Greater Error More confusing analysis
D/A converters are available commercially as integrated circuits which Can be classified in three categories : Current output DAC provides the current IO as output signal Voltage output D/A converts IO into voltage internally by using an op amp and provides the voltage as output signal In multiplying DAC, the output is product of the input voltage and the reference source VREF.
Digital-to-Analog Converters: A D/A converter takes an input signal in binary form and produces an output voltage or current in an analog (or continuous) form. A block diagram of an n-bit D/A converter consisting of binary digits (b1b2... bn). It is assumed that the converter generates the binary fraction, which is multiplied by the full-scale voltage VFS to give the output voltage, expressed by where the ith binary digit is either bi 0 or bi 1 and b1 is the most significant bit (MSB). For example, for VFS 5 V, n 3, and a binary word b1b2b3 110, Eq. (1.2) gives VO
What will be the analog equivalent of ?
Integrated Circuit D/A Converters Switches in IC D/A converters are made either of BJTs or of MOSFETs. They are generally one of two types: voltage driven current driven
Voltage-driven converters, which use BJTs or MOSFETs as on or off switches, are generally used for relatively low-speed low-resolution applications current-driven converter, switching is accomplished using emitter- coupled logic (ECL) current switches, which do not saturate but are driven from the active region to cutoff
The MC1408 is an example of a D/A converter with current output. It is a low-cost, high-speed converter designed for use in applications where the output current is a linear product of an 8- bit digital word and an analog reference voltage. Its internal block diagram, shown in Fig (a), consists of four parts: current switches, an R-2R ladder, a biasing current network, and a reference current amplifier. The connection diagram is shown in Fig (b)
The NE/SE-5018 is an example of a D/A converter with voltage output. It gives an output voltage that is a linear product of an 8-bit digital word and an analog reference voltage. Its internal block diagram is shown in Fig (a). A typical configuration of the 5018 is shown in Fig (b)
33 Reconstruction Filtering 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 Filter Piece-wise Continuous Output Analog Continuous Output
34 Reconstruction Filtering
35 Reconstruction Filtering In (a) original analog signal is represented in the time domain In (b) original analog signal is represented in frequency domain, where it expends from frequencies 0 to <0.5 of fs (sampling frequency) In (c) the signal is sampled by converting it to impulse train (ideal case). This corresponds to duplication of spectrum into an infinite number of upper and lower sidebands in (d).
36 Reconstruction Filtering Since original frequencies in (b) remain undistorted in (d), this means that proper sampling took place. In (e) the sampling rate is less than fs, violating Nyquist theorem. This results in overlapping spectra in the frequency domain causing aliasing as shown in (f).
37 Reconstruction Filtering
38 Reconstruction Filtering In the real world, it’s difficult to generate the previously shown impulse train. All DAC (digital to analog conversion) operate by holding last value until another sample is received. This produces staircase as shown in figure (c). This is called “zeroth-order hold”. The “zeroth-order hold” could be understood as the convolution in the time domain of the previously shown impulse train and a rectangular pulse of width equal to the sampling period. This convolution is equivalent to the multiplication in the frequency domain between the correct spectrum and the Fourier transform of the rectangular pulse (the sinc function) as shown in figure (d).
39 Reconstruction Filtering
40 Reconstruction Filtering Therefore, the filter needs to: a) Remove all frequencies above one half of fs. b) Boost frequencies by the reciprocal of zeroth order hold effect 1/sinc(x), as shown in figure (e).
Performance Specifications Resolution Settling time Linearity Speed Errors 41
Resolution Resolution Resolution: is the amount of variance in output voltage for every change of the LSB in the digital input. As no. of bits available for digital representation increases, as resolution becomes better. For exact reconstruction of analog signals, there must be infinite number of bit. A common DAC has a bit Resolution 42 N = Number of bits
Resolution Resolution 43 Better Resolution(3 bit) Poor Resolution(1 bit) Vout Desired Analog signal Approximate output 2 Volt. Levels Digital Input Vout Desired Analog signal Approximate output 8 Volt. Levels
Settling Time Settling Time Settling Time: The time required for the input signal voltage to settle to the expected output voltage. Any change in the input state will not be reflected in the output state immediately. There is a time lag, between the two events. 44
Linearity Linearity: is the difference between the desired analog output and the actual output over the full range of expected values. Ideally, a DAC should produce a linear relationship between a digital input and the analog output, this is not always the case. 45
Linearity Linearity 46 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
Speed Speed: Rate of conversion of a single digital input to its analog equivalent Conversion Rate a)Depends on clock speed of input signal b)Depends on settling time of converter 47
Errors Errors Non-linearity a)Differential b)Integral Gain Offset 48
49 Differential Non-Linearity Differential Non-Linearity: Difference in voltage step size from the previous DAC output (Ideally All DLN’s = 1 VLSB) Digital Input Ideal Output Analog Output Voltage V LSB 2V LSB Diff. Non-Linearity = 2V LSB
Integral Non-Linearity Integral Non-Linearity: Deviation of the actual DAC output from the ideal (Ideally all INL’s = 0) 50 Digital Input Ideal Output 1V LSB Int. Non-Linearity = 1V LSB Analog Output Voltage
Gain Gain Gain Error: Difference in slope of the ideal curve and the actual DAC output 51 High Gain Error: Actual slope greater than ideal Low Gain Error: Actual slope less than ideal Digital Input Desired/Ideal Output Analog Output Voltage Low Gain High Gain
Offset Offset Offset Error: A constant voltage difference between the ideal DAC output and the actual. DAC=0, but Vout ≠ 0 52 Digital Input Desired/Ideal Output Output Voltage Positive Offset Negative Offset
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.
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.
Other Applications
References Cogdell, J.R. Foundations of Electrical Engineering. 2 nd ed. Upper Saddle River, NJ: Prentice Hall, “Simplified DAC/ADC Lecture Notes,” ~fmeral/ELECTRONICS II/ElectronicII.html “Digital-Analog Conversion,” Barton, Kim, and Neel. “Digital to Analog Converters.” Lecture, March 21, Chacko, Deliou, Holst, “ME6465 DAC Lecture” Lecture, 10/ 23/2003, Lee, Jeelani, Beckwith, “Digital to Analog Converter” Lecture, Spring 2004, 06/Chapter%201%20Data%20Converter%20History%20F.pdf