Digital to analog converters: weighted resistor/converter,
R-2R Ladder D/A converter, specifications for D/A converters, examples of D/A converter lCs Analog & Digital Signals Analog Data • Analog data refers to information which is continuous. • For Example, an Analog clock which is having hour, minute, and second hands that gives information in a continuous form; the movement of the hands are continuous. Digital Data • Digital data refers to information which has discrete states. • For Example, a digital clock which reports the hours and minutes that will change suddenly from 10:05 to 10:06. Analog Signal • Analog signals have infinitely so many levels of intensity over a period of time. • When the wave moves from value A to value B, it passes through and it includes an infinite number of values along its path. Digital Signal • Digital signals can have only a limited number of defined values. • Although each value can be any number, it is often as simple as 0 or 1. • The easiest way to show signals is by plotting them on a pair of perpendicular axes. • The vertical axis represents the value or strength of a signal. • The horizontal axis represents time. Waveform Explanation • The above figure shows the Analog signal and a digital signal. • The curve represents the Analog signal through an infinite number of points. • The vertical lines of the digital signal, however, demonstrate the sudden jump that the signal makes from value to value. Digital to analog converters • A Digital to Analog Converter (DAC) converts a digital input signal into an analog output signal. The digital signal is represented with a binary code, which is a combination of bits 0 and 1. • The block diagram of DAC is shown in the following figure Where do we need DACs? • A computer is a binary machine operating in an analog world, so to be able to produce an output that is understandable by other devices a DAC is used. • For example, a computer stores audio in the form of binary values of the sound wave. • In order to play these back as sound on a speaker we need analog signals, because as we know the speaker’s diaphragm vibrates based on the intensity of the analog signal to produce sound/music. • So here, we will a DAC to convert the digital audio file to analog signal in order to play it on a speaker. Block Diagram
Digital to Analog Digital to Analog Converter Converter
Digital to Analog Converter
Working of DAC • The digital binary data exists in the form of bits. Each bit is either 1 or 0 & they represent its weight corresponding to its position. • The weight is 2n where the n is the position of the bit from right hand side & it start from 0. • Bit Weight = 2n • Bit weight of 4th bit from left= 2n = 23 = 8 • The bit weight is multiplied by the bit value. Since the bit could be either 0 or 1, it means; Working of DAC-2 • Bit value of 1 x bit weight = 1 x 2n = 2n • Bit value of 0 x bit weight = 0 x 2(n-1) = 0 • Now adding the weights of all the bits with its value in a binary number 10011; • 1 00112 = (1 x 24) + (0 x 23) + (0 x 22) + (1 x 21) + (1 x 20 ) • 100112 = 16 + 0 + 0 + 2 + 1 & 100112 = 19 • This is how the digital to analog converter DAC works by adding the weights of all corresponding bits with its value to generate the analog value at its output. Types of DACs • There are two types of DACs • Weighted Resistor DAC • R-2R Ladder DAC Weighted Resistor DAC • A weighted resistor DAC produces an analog output, which is almost equal to the digital (binary) input by using binary weighted resistors in the inverting adder circuit. • In short, a binary weighted resistor DAC is called as weighted resistor DAC. Circuit diagram of a 3-bit binary weighted resistor DAC • The circuit diagram of a 3-bit binary weighted resistor DAC is shown in the following figure. Explanation • Recall that the bits of a binary number can have only one of the two values. i.e., either 0 or 1. • Let the 3-bit binary input is b2b1b0. • Here, the bits b2 and b0 denote the Most Significant Bit (MSB) and Least Significant Bit (LSB) respectively. • The digital switches shown in the above figure will be connected to ground, when the corresponding input bits are equal to ‘0’. • Similarly, the digital switches shown in the above figure will be connected to the negative reference voltage, −VR when the corresponding input bits are equal to ‘1’. Explanation-2 • In the above circuit, the non-inverting input terminal of an op-amp is connected to ground. • That means zero volts is applied at the non- inverting input terminal of op-amp. • According to the virtual short concept, the voltage at the inverting input terminal of op-amp is same as that of the voltage present at its non- inverting input terminal. • So, the voltage at the inverting input terminal’s node will be zero volts. • The nodal equation at the inverting input terminal’s node is: Nodal Equation Explanation • The above equation represents the output voltage equation of a 3-bit binary weighted resistor DAC. • Since the number of bits are three in the binary (digital) input, we will get seven possible values of output voltage by varying the binary input from 000 to 111 for a fixed reference voltage, VR. • We can write the generalized output voltage equation of an N-bit binary weighted resistor DAC as shown below based on the output voltage equation of a 3-bit binary weighted resistor DAC. Example-1 • 4-bit Binary Weighted Digital-to-Analogue Converter Solution: Nodal Equation • 4-bit DAC Example 4-bit Weighted D/A Converter Output Disadvantages • The disadvantages of a binary weighted resistor DAC are as follows − • The difference between the resistance values corresponding to LSB & MSB will increase as the number of bits present in the digital input increases. • It is difficult to design more accurate resistors as the number of bits present in the digital input increases. R-2R Ladder DAC • The R-2R Ladder DAC overcomes the disadvantages of a binary weighted resistor DAC. • As the name suggests, R-2R Ladder DAC produces an analog output. • which is almost equal to the digital (binary) input by using a R-2R ladder network in the inverting adder circuit. Circuit Diagram • The circuit diagram of a 3-bit R-2R Ladder DAC is shown in the following figure. Explanation • Recall that the bits of a binary number can have only one of the two values. i.e., either 0 or 1. • Let the 3-bit binary input is b2b1b0. • Here, the bits b2 and b0 denote the Most Significant Bit (MSB) and Least Significant Bit (LSB) respectively. • The digital switches shown in the above figure will be connected to ground, when the corresponding input bits are equal to ‘0’. • Similarly, the digital switches shown in above figure will be connected to the negative reference voltage, −VR when the corresponding input bits are equal to ‘1’. • It is difficult to get the generalized output voltage equation of a R- 2R Ladder DAC. • But, we can find the analog output voltage values of R-2R Ladder DAC for individual binary input combinations easily. Example Q1. A 4-bit R-2R digital-to-analogue converter is constructed to control the speed of a small DC motor using the output from a digital logic circuit. If the logic circuit uses 10 volt CMOS devices, calculate the analogue output voltage from the DAC when the input code is hexadecimal number. Solution
the output voltage for a binary code of 1011 is calculated as:
Table Advantages • The advantages of a R-2R Ladder DAC are as follows − • R-2R Ladder DAC contains only two values of resistor: R and 2R. So, it is easy to select and design more accurate resistors. • If more number of bits are present in the digital input, then we have to include required number of R-2R sections additionally. • Due to the above advantages, R-2R Ladder DAC is preferable over binary weighted resistor DAC Applications of DAC • Digital to analog converters are used in various applications to convert a digitally processed signal into an analog signal. • Some of the various applications of a DAC are given below; Audio: • The audio signal is analog in nature but it is converted using ADC (analog to digital converter) into digital format to edit & store in storage devices in various digital formats such as mp3, wav etc. • The audio amplifier or the sound card in a system contains DAC that converts the audio signal stored in digital device into an analog signal. • The signal can be modified by the amplifier by varying its gain (volume), bass, treble etc. & then converted into analog signal because the speaker cannot support a digital signal. Applications of DAC Video: • Digital video players utilize DAC to play any digital video using an analog monitor. • These video players convert the digital signal from the digital source file into an analog signal. • A digital video player has digital video ports such as DVI or HDMI. • But if it has any analog output ports (composite port of yellow color), it contains a DAC whose job is to convert the video file into analog signal. Applications of DAC Motor Control • One of the most important components in controlling a motor using a digital device such as a microcontroller is a DAC. • In various electronics projects, motor is embedded with a microcontroller. • The microcontroller generates a digital signal to vary the speed of the motor which is converted into an analog signal using a DAC (Digital to Analog Converter) Unit-4 (A/D Convertor) analog to digital converters: quantization and encoding, Flash A/D converter, successive approximation A/D converter, counting A/D converter, dual slope A/D converter, Specifications of A/D converters, example of A/D converter ICs Analog to Digital Converter (ADC) • An Analog to Digital Converter (ADC) converts an analog signal into a digital signal. • The digital signal is represented with a binary code, which is a combination of bits 0 and 1. • Observe that in the figure shown above, an Analog to Digital Converter (ADC) consists of a single analog input and many binary outputs. • In general, the number of binary outputs of ADC will be a power of two. Block Diagram Waveform What is A/D converter? • From the name itself it is clear that it is a converter which converts the analog (continuously variable) signal to digital signal. • This is really an electronic integrated circuit which directly converts the continuous form of signal to discrete form. • It can be expressed as A/D or A-to-D or A-D or ADC. • The input (analog) to this system can have any value in a range and are directly measured. • But for output (digital) of an N-bit A/D converter, it should have only 2N discrete values. • This A/D converter is a linkage between the analog (linear) world of transducers and discreet world of processing the signal and handling the data. • The digital to analog converter (DAC) carry out the inverse function of the ADC. The schematic representation of ADC is shown below. ADC Process • There are mainly two steps involves in the process of conversion. They are • Sampling and Holding • Quantizing and Encoding Sampling and Holding Sampling and Holding • In the process of Sample and hold (S/H), the continuous signal will gets sampled and freeze (hold) the value at a steady level for a particular least period of time. • It is done to remove variations in input signal which can alter the conversion process and thereby increases the accuracy. • The minimum sampling rate has to be two times the maximum data frequency of the input signal. Quantizing and Encoding Quantizing and Encoding • For understanding quantizing, we can first go through the term Resolution used in ADC. • It is the smallest variation in analog signal that will result in a variation in the digital output. • This actually represents the quantization error.
V → Reference voltage range
2N → Number of states N → Number of bits in digital output Explanation-1 • Quantizing: It is the process in which the reference signal is partitioned into several discrete quanta and then the input signal is matched with the correct quantum. • Encoding: Here; for each quantum, a unique digital code will be assigned and after that the input signal is allocated with this digital code. • The process of quantizing and encoding is demonstrated in the table below. Explanation-2 • From the above table we can observe that only one digital value is used to represent the whole range of voltage in an interval. • Thus, an error will occur and it is called quantization error. • This is the noise introduced by the process of quantization. • Here the maximum quantization error is: Application of ADC • Used together with the transducer. • Used in computer to convert the analog signal to digital signal. • Used in cell phones. • Used in microcontrollers. • Used in digital signal processing. • Used in digital storage oscilloscopes. • Used in scientific instruments. • Used in music reproduction technology etc. Types of ADCs • There are two types of ADCs: Direct type ADCs and Indirect type ADC. • If the ADC performs the analog to digital conversion directly by utilizing the internally generated equivalent digital (binary) code for comparing with the analog input, then it is called as Direct type ADC. The following are the examples of Direct type ADCs − • Counter type ADC • Successive Approximation ADC • Flash type ADC Counter type ADC • A counter type ADC produces a digital output, which is approximately equal to the analog input by using counter operation internally. • The block diagram of a counter type ADC is shown in the following figure. Working of a counter type ADC • The counter type ADC mainly consists of 5 blocks: Clock signal generator, Counter, DAC, Comparator and Control logic. The working of a counter type ADC is as follows: • The control logic resets the counter and enables the clock signal generator in order to send the clock pulses to the counter, when it received the start commanding signal. • The counter gets incremented by one for every clock pulse and its value will be in binary (digital) format. • This output of the counter is applied as an input of DAC. • DAC converts the received binary (digital) input, which is the output of counter, into an analog output. Working of a counter type ADC-2 • Comparator compares this analog value, Va with the external analog input value Vi. • The output of comparator will be ‘1’ as long as 𝑉𝑖 is greater than. • The operations mentioned in above two steps will be continued as long as the control logic receives ‘1’ from the output of comparator. • The output of comparator will be ‘0’ when Vi is less than or equal to Va. • So, the control logic receives ‘0’ from the output of comparator. Then, the control logic disables the clock signal generator so that it doesn’t send any clock pulse to the counter. • At this instant, the output of the counter will be displayed as the digital output. • It is almost equivalent to the corresponding external analog input value Vi. Successive Approximation ADC • A successive approximation type ADC produces a digital output, which is approximately equal to the analog input by using successive approximation technique internally. Working of a successive approximation ADC • The successive approximation ADC mainly consists of 5 blocks− Clock signal generator, Successive Approximation Register (SAR), DAC, comparator and Control logic. The working of a successive approximation ADC is as follows − • The control logic resets all the bits of SAR and enables the clock signal generator in order to send the clock pulses to SAR, when it received the start commanding signal. • The binary (digital) data present in SAR will be updated for every clock pulse based on the output of comparator. • The output of SAR is applied as an input of DAC. Working of a successive approximation ADC-2 • DAC converts the received digital input, which is the output of SAR, into an analog output. • The comparator compares this analog value Va with the external analog input value Vi. • The output of a comparator will be ‘1’ as long as Vi is greater than Va. • Similarly, the output of comparator will be ‘0’, when Vi is less than or equal to Va. • The operations mentioned in above steps will be continued until the digital output is a valid one. • The digital output will be a valid one, when it is almost equivalent to the corresponding external analog input value Vi. Flash type ADC • A flash type ADC produces an equivalent digital output for a corresponding analog input in no time. • Hence, flash type ADC is the fastest ADC. Diagram Diagram Working of a 3-bit flash type ADC • The 3-bit flash type ADC consists of a voltage divider network, 7 comparators and a priority encoder. The working of a 3-bit flash type ADC is as follows. • The voltage divider network contains 8 equal resistors. A reference voltage VR is applied across that entire network with respect to the ground. • The voltage drop across each resistor from bottom to top with respect to ground will be the integer multiples (from 1 to 8) of VR/8. • The external input voltage Vi is applied to the non-inverting terminal of all comparators. • The voltage drop across each resistor from bottom to top with respect to ground is applied to the inverting terminal of comparators from bottom to top. • At a time, all the comparators compare the external input voltage with the voltage drops present at the respective other input terminal. • That means, the comparison operations take place by each comparator parallelly. Working of a 3-bit flash type ADC-2 • The output of the comparator will be ‘1’ as long as Vi is greater than the voltage drop present at the respective other input terminal. • Similarly, the output of comparator will be ‘0’, when, Vi is less than or equal to the voltage drop present at the respective other input terminal. • All the outputs of comparators are connected as the inputs of priority encoder. • This priority encoder produces a binary code (digital output), which is corresponding to the high priority input that has ‘1’. • Therefore, the output of priority encoder is nothing but the binary equivalent (digital output) of external analog input voltage, Vi. • The flash type ADC is used in the applications where the conversion speed of analog input into digital data should be very high 3-bit A/D converter Output Indirect type ADC • If an ADC performs the analog to digital conversion by an indirect method, then it is called an Indirect type ADC. • In general, first it converts the analog input into a linear function of time (or frequency) and then it will produce the digital (binary) output. • Dual slope ADC is the best example of an Indirect type ADC. This chapter discusses about it in detail. Dual Slope ADC • As the name suggests, a dual slope ADC produces an equivalent digital output for a corresponding analog input by using two (dual) slope technique. The block diagram of a dual slope ADC Working of a dual slope ADC • The dual slope ADC mainly consists of 5 blocks: Integrator, Comparator, Clock signal generator, Control logic and Counter. The working of a dual slope ADC is as follows − • The control logic resets the counter and enables the clock signal generator in order to send the clock pulses to the counter, when it is received the start commanding signal. • Control logic pushes the switch sw to connect to the external analog input voltage Vi, when it is received the start commanding signal. • This input voltage is applied to an integrator. • The output of the integrator is connected to one of the two inputs of the comparator and the other input of comparator is connected to ground. Working of a dual slope ADC-2 • Comparator compares the output of the integrator with zero volts (ground) and produces an output, which is applied to the control logic. • The counter gets incremented by one for every clock pulse and its value will be in binary (digital) format. • It produces an overflow signal to the control logic, when it is incremented after reaching the maximum count value. • At this instant, all the bits of counter will be having zeros only. • Now, the control logic pushes the switch sw to connect to the negative reference voltage −Vref. • This negative reference voltage is applied to an integrator. • It removes the charge stored in the capacitor until it becomes zero. Working of a dual slope ADC-3 • At this instant, both the inputs of a comparator are having zero volts. • So, comparator sends a signal to the control logic. • Now, the control logic disables the clock signal generator and retains (holds) the counter value. • The counter value is proportional to the external analog input voltage. • At this instant, the output of the counter will be displayed as the digital output. • It is almost equivalent to the corresponding external analog input value ViVi. • The dual slope ADC is used in the applications, where accuracy is more important while converting analog input into its equivalent digital (binary) data Thanks