16 D-A Convertor

Vinay Gupta

epgp books

    Introduction

 

 

An analog system contains devices that manipulate the physical quantities represented in analog form. In an analog system, the quantities vary continuously over a range of values. For example, the amplitude of output signal from the speaker of the radio-receiver can have any value between zero and maximum limit. A digital system is the one which takes only discrete values i.e. it is a combination of devices designed for manipulating physical quantities or information represented in digital form. For eg. Calculators, digital watches etc. Digital systems are much preferred over analog ones as the storage of information is much easier because of the special switching circuits that can latch into information and hold it for longer periods. Also, they provide greater accuracy and precision as the digits of precision can be increased by adding more switching circuits. On the other hand, in analog systems, precision is limited as the values depend on the circuit components. In addition, digital circuits are less affected by noise. Despite numerous advantages of digital systems, the main drawback of using digital techniques is because of the fact that real world is analog i.e most physical quantities are analog in nature. Therefore, in order to take advantages of digital techniques while dealing with analog inputs and outputs, there is a need for digital to analog (D/A) and analog to digital (A/D) conversion. For eg. to process a physical quantity, the following steps are needed:

 

1. Convert the real world analog inputs to digital form.

2. Process the digital information

3. Convert the digital outputs back into analog form

 

Such conversion between analog and digital quantities has become quite common in current technology because of the increasing shift towards digital techniques and is thus discussed in this module.

 

Digital-to-analog and analog-to-digital conversion

 

Digital-to-analog (D/A) and analog-to-digital (A/D) conversion form two very important aspects of digital data processing. Digital-to-analog conversion involves the translation of digital information into equivalent analog information and this is accomplished with the use of digital-to-analog convertor (DAC). DACs are used whenever the output of a digital circuit has to drive an analog device. In this respect, a D/A convertor is sometimes referred to as a decoding device. The process of changing an analog signal into an equivalent digital signal is accomplished with the help of analog-to-digital convertor (ADC). For example, an A/D convertor is used to change the analog output signals from transducers (measuring temperature, pressure etc.) into equivalent digital signals. Since, the function of ADC is to encode signals for entry into a digital system, it is sometimes called an encoding device.

 

Digital to analog conversion is a straightforward process and is considerably easier than A/D conversion. In fact, a D/A convertor is an integral part of A/D convertor. Therefore, we will first consider the D/A conversion process.

 

D/A conversion

 

D/A conversion is the process of taking a value represented in digital code (such as simple binary or BCD) as input and converting it into a voltage or current which is proportional to the digital value. The basic function of a DAC is shown in figure 1.

Figure 1: Basic function of a DAC

 

The circuit of a DAC consists of a resistor ladder network, a reference precision voltage supply, logic inputs and an operational amplifier (op-amp). Depending on the type of ladder network, there are various techniques which can be used to realize a DAC. The most commonly used techniques are discussed as follows:

 

1.   Variable resistor networks

 

In this method, DAC conversion is accomplished by designing a resistive network that will change each digital level into an equivalent binary weighted voltage or current. To understand the meaning of equivalent binary weight, consider a 3-bit binary signal which has eight possible digital signals.

 

Our aim is to convert the eight possible digital signals into equivalent analog voltages. Let us choose the voltage range of analog signal to be developed to lie between 0 and +7 V. Therefore, the smallest digital level of 000 can be thought of to be equal to 0 V and the largest digital level of 111 can be thought of to be equal to +7 V. In between 000 and 111, there are seven discrete levels to be defined, thus, the analog signal is divided into seven levels. The smallest incremental change in digital signal is represented by the least significant bit (LSB), 20. This should introduce a change in analog output equal to (1/7)th of the full scale. Hence, the resitive divider is designed in such a way that a 1 in the 20 position will result in +7×(1/7) = +1 V at the output. Since 21 corresponds to 2 which is twice that of 20 = 1, thus, a change in the 21 bit position must cause a change in analog output that is twice the LSB. The resistive divider must be constructed such that a 1 in the 21 bit position will cause a change of +7×(2/7) = +2 V in the analog output.

 

Similarly, 22 = 4 = 2 × 21 = 4 × 20, which means that 22 bit must cause a change in output voltage equal to four times that of LSB. The resistive divider must be designed such that a 1 in the 22 position will result in a change of +4 V at the output. Thus, each successive bit must have a weight that is twice that of preceding bit. The binary equivalent weights for 3-bit and 4-bit digital signals are tabulated in table 1.

 

 

 

 

 

 

Table 1: Binary equivalent weights for 3-bit and 4-bit digital inputs

 

It should be kept in mind that the sum of binary equivalent weights must equal 1 (Table 1). In general, the binary equivalent weight assigned to the LSB is 2 −1, where n is the number of bits. 1. The change in output voltage due to change in LSB is equal to V/(2n − 1) where V is the digital input voltage level. The remaining weights are found by multiplying the weight of LSB by 2, 4, 8 and so on. By using the binary equivalent weight of the corresponding bits, the analog outputs for 3-bit digital input can be calculated as shown in Table 2.

Table 2: Truth table of 3-bit digital signal along with the corresponding analog output voltages

 

To draw a resistive divider that changes the digital signal into equivalent binary weighted voltage, the network should have 3 inputs and one analog output as shown in figure 2.

 

Figure 2: Resistive divider

 

The following conditions must be met by the resistive divider:

  1. The 20 bit must give +1 V analog output, and 21 bit must give output voltage of +2 V, 22 bit must give an output of +4 V.
  2. The sum of these three voltages representing the digital bits must form the analog output voltage.

    The resistive divider corresponding to 3-bit digital input that satisfies the above conditions is shown in figure 3(a).

Figure 3: (a) Resistive ladder (b) Equivalent circuit for 0001 digital input

 

Resistors R0, R1 and R2 form the divider network. RL is the load resistance to which the divider is connected. RL is taken to be much larger than R0 so that it does not load the divider network. Assume that a digital input signal 001 is applied to the resistive ladder network. The equivalent circuit is shown in figure 3(b). As discussed before, digital 0 = 0V and digital 1 = +7 V. The analog voltage (VA) can be found by the use of Millman’s theorem. Millman’s theorem states that the voltage appearing at any node in a resistive network is equal to the summation of currents entering the node divided by the summation of conductances connected to the node. In equation form,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

where, V0, V1, V2 …………., Vn-1 are the digital input voltage levels and n is the number of bits.

 

In the similar way, we can draw the equivalent circuits for the remaining 7 input combinations and apply Millman’s theorem to obtain the corresponding analog voltages as shown in Table 2.

 

The criteria for drawing a resistive divider network to convert digital data into analog data may be summarized as follows:

 

1. There should be one input resistor for each digital bit.

2. Beginning with the LSB, the value of each following resistor should be one-half the size of the previous resistor.

3. The full scale output voltage should be equal to the positive voltage of the digital input.

    The use of resistive divider network in DACs is limited due to its two main drawbacks:

  1. Each resistor in the network has a different value. There is a large difference in the values of resistors corresponding to LSB and MSB, especially, when the number of bits is large. Using the current IC fabrication technology, it becomes very difficult to produce resistors of values over a wide range that maintains an accurate ratio especially with changes in temperature. Also, being the precision resistors, they add a lot to the expense and are thus not preferred.
  2. The resistor used for the MSB is required to handle much larger current than that used for LSB. For example, in a 10-bit system, the current through the MSB resistor is 500 times that through the LSB resistor.

    Because of these shortcomings, it is preferable to make a circuit which uses fairly close values of resistances. One of the widely used DAC circuits that overcome the drawbacks of variable resistor network is the R-2R ladder network (Binary ladder). In this network, the resistors used have only two values in the ratio of 2 to 1.

 

2.   Binary ladder or R-2R ladder

 

The binary ladder is a resistive network whose output voltage is a properly weighted sum of the digital inputs. The circuit of a binary ladder for 4-bit digital input in shown in figure 4(a). The left end of the ladder terminates in a resistance of 2R and let us assume that the right end (output) is open-circuited.

 

 

Figure 4: (a) Binary ladder and (b-d) equivalent circuits

 

We will first study the resistive properties of the network assuming that all inputs are at ground. Considering node A, the total resistance looking back into the terminating resistance is 2R and the resistance looking out towards the 20 input is also 2R. These two resistors can be combined to form an equivalent resistance of R as shown in figure 4(b). Now at node B, again the total resistance looking from node B down the branch towards node A is 2R as is the resistance looking out towards the 21 input (Figure 4(b)). These resistors can be combined to give a simplified circuit as shown in figure 4(c). At node C, the total resistance looking into the branch towards node B is 2R and is equal to that looking out towards the 22 input (Figure 4(c)). On simplification, the circuit in figure 4(c) will reduce to that shown in figure 4(d). In this circuit, the resistance looking back towards node C is 2R and is equal to resistance looking out towards the 23 input. Thus, it is seen that the total resistance looking from any node back towards the terminating resistance or out towards the digital input is 2R. The above statement holds even when the digital inputs are at +V volts. This is because the digital inputs are assumed to be ideal voltage sources and internal impedance of an ideal voltage source is 0 Ω.

 

The resistance characteristics of the ladder can be used to find the output voltages for the various digital inputs. Let us first find the analog output voltage due to MSB. Consider that a signal of 1000 is applied to the inputs. The corresponding binary ladder is shown in figure 5(a).

Figure 5: (a) Binary ladder corresponding to input of 1000 and (b) its equivalent circuit

 

It can be seen that there is no voltage source to the left of node D, therefore as explained earlier, the entire network to the left of this node can be replaced by an equivalent resistance of 2R resulting in the equivalent circuit as shown in figure 5(b). Output voltage VA can be determined using the voltage divider

 

Thus, a 1 in the MSB will produce an analog output of (V/2) volts.

 

To find out the output voltage due to second MSB, assume that a digital input of 0100 is applied as shown in the circuit of figure 6(a). Since, there are no voltage sources to the left of node C, it can be replaced by an equivalent resistance of 2R as shown in figure 6(b). The circuit to the left of node C can be replaced by its thevenin equivalent having a resistance R in series with a voltage source of +V/2 as shown in figure 6(c). From the voltage divider rule, the value of VA is obtained to be

 

Figure 6: (a) Binary ladder with a digital input of 0100, (b-c) equivalents circuits

Continuing in this way, the output voltage due to third MSB and fourth MSB can be derived to be +V/8 and +V/16 respectively. Table 3 shows the binary weights and the analog voltages corresponding to various bit positions.

 

Table 3: Output voltage due to various bits in a binary ladder

 

 

It can be inferred from table 3 that each digital input is transformed into a properly weighted binary output voltage. The total output voltage due to a given input will be equal to the sum of the output levels due to each digital input separately.

 

Thus, net output voltage due to N bits in the input is given by

 

 

 

 

 

where, V0, V1, V2 …………., VN-1 are the digital input voltage levels.

 

Equation (4) can be used to find the output voltage from the ladder for any digital input signal. It is important to note that the expression for output of binary ladder (eqn. (4)) is same as that of resistive divider method (equation (3)) except the term in the denominator. This slight difference in denominator makes this method clearly different from the resistive divider method. The full-scale output voltage for the binary ladder is given by

The terms inside the brackets form a geometric series whose sum will approach 1 only if the number of terms are sufficiently large, however, it will never be equal to 1. Thus, the full-scale output voltage of the ladder approaches V only in the limit. On the other hand, in the resistive divider method, full scale output voltage is always equal to the voltage level of the digital input.

 

Note that in the binary ladder, the output is terminated in a resistance of 2R. Although, this will result in a lowering of output voltage but it is important to keep the ladder in perfect balance. If the load 2R is maintained constant, the output voltage will be weighted sum of the binary input bits else it will not be a properly weighted sum. Also, as already discussed, by terminating the output of ladder in a load of 2R, the input resistance to the ladder seen by each of the digital voltage sources is constant. This will overcome the limitation of resistive divider as the digital voltage sources can be designed for the same load.

 

Figure 7 shows the diagram of operational amplifier connected as a unity-gain non-inverting amplifier. As already discussed in previous modules, the operational amplifier works as voltage follower in which the circuit has a high input impedance and the output voltage is equal to input voltage. It is therefore, a good buffer amplifier for connection to the output of resistive ladder. It will not load down the ladder and thus will not disturb the ladder output voltage. The output voltage of ladder (VA) will appear at the output of operational amplifier.

 

 

Figure 7: Digital to analog convertor using voltage follower

 

If a feedback resistor (R) is connected in the operational amplifier as shown in figure 8, the circuit works as an inverting amplifier that acts as current-to-voltage amplifier i.e. the output voltage VA is equal to the negative of the input current I multiplied by R. The input impedance of the circuit is 0 Ω, thus, when it is connected to an R-2R ladder, the connecting point is virtually at ground potential. R-2R ladder will produce a current output, I, that is a binary weighted sum of the digital inputs i.e MSB produces a current of V/2R, second MSB produces a current of V/4R and so on.

 

 

Since, the ladder output is connected to the inverting input of op-amp, the output voltage will be –R times
the current I

 

The expression is same as that obtained for the output of binary ladder (equation (4)) except the negative sign. Thus, digital to analog convertors in figures 7 and 8 will provide the same output with a change of sign. However, the voltage follower based DAC (Figure 7) works in voltage mode whereas, inverting amplifier based DAC (Figure 8) works in current mode.

 

 

Figure 8: Digital to analog convertor using inverting amplifier

 

D/A convertor is available in IC form as the Precision Monolithics DAC-100. It is a 8 or 10-bit D/A convertor available in 16-pin dual in-line package (DIP). It uses transistor as current source switches in addition to a thin-film precision R-2R ladder network. Figure 9 shows the block diagram of DAC-100.

 

 

The IC operates in current mode and is based on the complementary logic i.e. all 0’s at the input will produce the full-scale output at VA while all 1’s at the input will produce zero output.

 

 Performance characteristics of DAC

 

1. Accuracy

 

It is one of the most important aspects of D/A convertor. Accuracy is a measure of the closeness of the actual output voltage to the theoretical output voltage. It depends primarily on the accuracy of the precision resistors used in the ladder and the precision of reference voltage supply used. As an example, consider that a particular digital input should result theoretically in an analog output of +10 V. If the range of actual output voltage lies between 9.9 V to 10.1 V, then the accuracy of D/A convertor is

 

 

 

 

 

 

2. Resolution

 

Resolution is the smallest change in voltage that can be distinguished i.e. it corresponds to the increment in output voltage which is determined by the LSB. Thus, resolution of a D/A convertor depends on the number of bits in the digital input signal. If the numbers of bits are large, then the output voltage due to LSB will be small and hence, the resolution. Example: Consider a 4-bit system with a input voltage of +16 V. Since the LSB has weight of 1/15, therefore a change in LSB will correspond to a change in output voltage by +1V. So, this minimum in output voltage i.e. +1V is the resolution of the D/A convertor. The output will change with digital input in steps of 1V and will be in the form of a staircase as shown in figure 10. If we want to generate an analog voltage of 4.8 V using this DAC, we will obtain the corresponding output of 5 V.

 

Figure 10: Output voltage of a 4-bit D/A convertor

 

It is important to mention that the resolution and accuracy in a D/A convertor system should be compatible. If we design a D/A convertor with an accuracy of 0.1 %, then for 16 V, the accuracy will be 16 mV. However, it has resolution of 1 V which makes the accuracy unjustifiable.

 

A/D convertor

 

A/D conversion involves the conversion of analog voltage into an equivalent digital signal. A number of methods are used for A/D conversion, however, the simplest one is the simultaneous method. It is also known commonly as flash ADC as it has a very fast response and is thus, the fastest method for converting analog into digital. This method is based on the use of number of comparator circuits arranged in parallel. Hence A/D convertor based on this method is also called as parallel ADC. In general, for n-bit digital output, the number of comparators required is equal to 2n-1. The analog signal which is to be converted into digital is applied at the non-inverting input of all comparators using a single line. The second input is a reference voltage and is applied to the inverting inputs of comparators using a divider circuit. The resistive circuit divides the reference voltage into 2n equal parts. The reference voltages are thus equal to +V/4, +V/2 and +3V/4. The corresponding A/D convertor will convert the analog voltages lying in the range of 0 to +V into digital.

 

An A/D convertor drawn using three comparators for a 2-bit digital output is shown in figure 11.

 

 

Figure 11: Simultaneous A/D conversion for 2-bit digital output

 

If the analog input voltage exceeds the reference voltage to any comparator, the output of the comparator goes high whereas, if the analog input voltage is less than the reference voltage, the comparator output goes low. If the input voltage lies between 0 to +V/4, then all C1, C2 and C3 are low. For inputs voltage in the range of +V/4 to +V/2, then C1 goes high and C2, C3 are low. For input voltage lying between +V/2 to +3V/4, then C1, C2 goes high and C3 goes low. For voltages greater than +3V/4, all C1, C2 and C3 are high. Comparator outputs for various ranges of input voltage are summarized in Table 4.

Table 4: Comparator outputs for various input voltage ranges for 2-bit output

 

 

Thus, it can be observed that there are four voltage ranges that can be distinguished by this convertor. Four voltage ranges can be represented by two binary bits. The three comparator outputs are fed into a coding network to provide 2 bits which are equivalent to input analog voltage, The bits obtained from the output of coding network can be entered into a flip-flop register for storage. The complete block diagram is shown in figure 12.

 

 

In order to develop a clear understanding of the simultaneous conversion process, let us investigate the 3- bit converter. For a digital signal having three bits, seven comparators are required. This will divide the analog input voltage into eight ranges. The circuit diagram for a 3-bit simultaneous A/D converter is shown in figure 13.

 

Figure 13: 3-bit simultaneous A/D converter

 

It may be noted that some of the comparators have inverters at their outputs sine both C and ?̅ are needed for the encoding matrix. The function of the encoder is to take the seven output levels of comparator as inputs and encode them into a 3-bit binary number. Table 5 represents the outputs of comparators of 3-bit A/D converter along with the encoder output.

 

Table 5: Outputs of 3-bit simultaneous conversion along with encoder outputs

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

In order to transfer the data from the encoding matrix into register, two steps are required. First, a positive
reset pulse must appear on the RESET line to reset all the flip-flops low. Then, a positive READ pulseallows the proper READ gates to go high and thus, transfer the digital information into flip-flops.

 

Alternately, the digital logic for conversion of A/D converter comparators into digital output can be replaced by a priority encoder (9318) as shown in figure 14. Here, priority encoder is used to transform the comparator outputs to the correct digital binary output. The inputs to the priority encoder i.e. C1, C2, ……., C7 must be TTL compatible. The 9318 encoder gives an output on the basis of highest-order active input, ignoring all other inputs.

 

 

Figure 14: A/D converter using priority encoder

 

The A/D converter is advantageous due to the fact its construction is quite straightforward and is relatively easy to understand. Also, is the most efficient of the ADC technologies in terms of speed, beinglimited only in comparator and gate propagation delays. However, it suffers from a limitation that as the number of digital bits expected in the output increases or the resolution increases, more and more comparators (2n -1, for n-bits) are required to perform the desired conversion. For example, 1 3-bit digital output requires 7 comparators. A 4-bit digital output requires 15 comparators. In general, for a 8-bit digital output which is preferred for most applications, 255 comparators are required. The circuit in this case becomes bulky, complicated and expensive.

 

Another important point to mention is that for equal values of resistors in the resistive divider network of comparators, each successive binary output corresponds to the same increase in analog voltage giving a linear response. However, the values of resistors can be easily varied to introduce the non-linear property in the output. So a custom non-linear response can be obtained with respect to an analog signal. This ability of flash ADC to provide signal conditioning behavior by simply changing the value of few components makes it unique amongst other ADC’s.

 

Flash ADCs are ideal for applications requiring very large bandwidth, but they consume more power and are much bigger in size than other ADC architectures.

 

Motorola MC10319 is an example of 8-bit flash A/D converter. It has 256 parallel comparators which are connected to a precision voltage divider network. The comparator outputs are then fed to latches and subsequently, an encoder network that captures the digital signal in Gray code. The use of Gary code ensures that any small fluctuation in the analog signal is not reflected in the digital output. The Gray code is finally decoded into binary outputs. A/D converters are frequently used in applications such as radar signal processing, video displays, high-speed instrumentation and television broadcasting.

you can view video on D-A Convertor

References:

  • Op-Amps and Linear Integrated Circuit, R. A. Gayakwad, 4th edition, 2000, Prentice Hall. Operational Amplifiers, 5th Edition by George Clayton, Steve Winder, Elsevier India, 2012,
  • Operational Amplifiers & Linear ICs, David A. Bell, Oxford University press, 3rd Edition, (2011).
  • Operational  Amplifiers  and  Linear  Integrated  Circuits,  Robert  F.  Coughlin,  Frederick  F. Driscoll, 6th Edition, Pearson.
  • Digital Principles and Applications by Donald P. Leach, A.P. Malvino and G. Saha, Tata Mc. Graw Hill, 8th edition (2014).