**Digital-to-Analogue Converters**, or **DAC’s** as they are more commonly known, are the opposite of the Analogue-to-Digital Converters we looked at in a previous tutorial. DAC’s convert binary or non-binary numbers and codes into analogue ones with its output voltage (or current) being proportional to the value of its digital input number. For example, we may have a 4-bit digital logic circuit that ranges from 0000 to 1111_{2}, (0 to F_{16}) which a DAC converts to a voltage output ranging from 0 to 10V.

Converting an “n”-bit digital input code into an equivalent analogue output voltage between 0 and some V_{MAX} value can be done in a number of ways, but the most common and easily understood conversion methods uses a weighted resistors and a summing amplifier, or a R-2R resistor ladder network and operational amplifier. Both *digital-to-analogue conversion* methods produce a weighted sum output, with the weights set by the resistive values used in the ladder networks contributing a different “weighted” amount to the signals output.

We saw in our tutorial section about Operational Amplifiers that an inverting amplifier uses negative feedback to reduce its open-loop gain, A_{OL} and does so by feeding back a fraction of its output signal back to the input. We also saw that the input voltage V_{IN} is connected directly to its inverting input via a resistor R_{IN} and that the inverting amplifiers closed-loop voltage gain, A_{V(CL)} is determined by the ratio of these two resistors as shown.

### Inverting Operational Amplifier Circuit

Then we can see that V_{OUT} is given as V_{IN} multiplied by the closed-loop Gain (A_{CL}), which is determined by the ratio of the feedback resistance, R_{F} to the input resistance, R_{IN}. So by altering the values of either R_{F} or R_{IN} we can change the closed-loop gain of the op-amp and therefore the value of V_{OUT} (I_{F}*R_{f}) for a given input signal. Here in this inverting operational amplifier example we have used a single input voltage signal, but what if we added another input resistor to combine two or more analogue signals into a single output, what would be the effect on the circuit and its gain.

## Digital-to-Analogue Converter Summing Amplifier

By connecting multiple inputs to the negative terminal of the operational amplifier, we can convert the single input circuit from above into a *summing amplifier* or to be more precise, a “summing inverting voltage amplifier” circuit.

As the negative feedback created by the feedback resistor, R_{F} biases the inverting input of the op-amp at zero potential, any input signals are effectively electrically isolated from each other with the output being the inverted sum of all the input signals combined. Thus a summing amplifier in the inverting mode produces the negative sum of any number of input voltages, whereas a no-inverting summing amplifier would produce the positive sum of any number of input voltages. Consider the circuit below.

### Inverting Summing Amplifier Circuit

In the summing amplifier circuit above, the output voltage, (V_{OUT}) is proportional to the sum of the four input voltages, V_{IN1}, V_{IN2}, V_{IN3}, and V_{IN4} and we can modify the original equation for the inverting amplifier configuration above to take account of these four new input values as follows:

Then we can see that the output voltage is an inverted, scaled sum of the four input voltages as each input voltage is multiplied by its corresponding gain and added to the next to produce the total output. If all the resistances are the same and of an equal value, that is: R_{F} = R_{1} = R_{2} = R_{3} = R_{4}, then each input channel will have a closed-loop voltage gain of unity (1) so the output voltage is given simply by:

V_{OUT} = –( V_{IN1} + V_{IN2} + V_{IN3} + V_{IN4} )

If we now assume that the four inputs of the summing amplifier are binary inputs with voltage values of either 0 or 5 volts (LOW or HIGH, 0 or 1) and we double the resistive values of each input resistor with regards to the previous one, we can produce an output condition which would be the weighted sum of these four input voltages creating the basic circuit for a 4-bit binary weighted digital-to-analogue converter, or 4-bit weighted D/A converter.

Labelling the four summing inputs as A, B, C, D and making R_{F} = 1kΩ, with the four input resistors ranging from 1kΩ to 8kΩ (or multiples thereof), we can construct a simple 4-bit binary weighted analogue-to-digital converter circuit as shown.

### 4-bit Binary Weighted Digital-to-Analogue Converter

For a 4-bit binary number there are 2^{4} = 16 possible combinations or A, B, C, and D ranging from 0000_{2} to 1111_{2} which corresponds to decimal 0 to 15 respectively. If we make the weight of each input bit double with respect to the other, we end up with an 8-4-2-1 binary code ratio corresponding to 2^{3}, 2^{2}, 2^{1} and 2^{0}.

So if we set the “D” input resistance at 1kΩ, the “C” input resistance at 2kΩ (that is the double of D), the “B” input resistance at 4kΩ (double C), and the “A” input resistance at 8kΩ (double B), with the feedback resistance R_{F} set again at 1kΩ, then the transfer characteristic of the 4-bit binary weighted digital-to-analogue converter would be:

### 4-bit DAC Transfer Characteristic

So we can see that if a TTL voltage of +5 volts (logic 1) is applied to the summing amplifiers input, V_{D} which represents the most significant bit (MSB), the op-amp’s gain will be R_{F}/R_{4} = 1kΩ/1kΩ = 1 (unity). Thus with a 4-bit binary code of 1000 applied, the output of the digital-to-analogue converter circuit will be -5 volts. Likewise, if +5 volts (logic 1) is applied to the summing amplifiers input V_{C}, the op-amp’s gain will be R_{F}/R_{3} = 1kΩ/2kΩ = 1/2 (one half). So the 4-bit binary code of 0100 would produce an analogue output voltage of -2.5 volts.

Again with a logic “1” applied to the summing amplifiers input V_{B}, the op-amp’s gain will be R_{F}/R_{2} = 1kΩ/4kΩ = 1/4 (one quarter) with the 4-bit binary code of 0010 producing an output voltage of -1.25 volts, and finally a logic “1” applied to the summing amplifiers input, V_{A} which represents the least significant bit (LSB), the op-amp’s gain will therefore be R_{F}/R_{1} = 1kΩ/8kΩ = 1/8 (one eighth) with the 4-bit binary code of 0001 producing an output voltage of -0.625 volts, (a 12.5% resolution).

The resolution of this simple 8-4-2-1 binary weighted digital-to-analogue converter will produce an output voltage change of 0.625 volts per 1-bit change in the binary number, and we can express this output voltage change in the following table.

### 4-bit Binary Weighted D/A Converter Output

Digital Inputs | V_{OUT} Expression |
V_{OUT} |
|||

D | C | B | A | 1*V_{D} + ^{1}/_{2}*V_{C} + ^{1}/_{4}*V_{B} + ^{1}/_{8}*V_{A} |
in Volts |

0 | 0 | 0 | 0 | 0*5 + 0*5 + 0*5 + 0*5 | 0 |

0 | 0 | 0 | 1 | 0*5 + 0*5 + 0*5 + ^{1}/_{8}*5 |
–0.625 |

0 | 0 | 1 | 0 | 0*5 + 0*5 + ^{1}/_{4}*5 + 0*5 |
–1.25 |

0 | 0 | 1 | 1 | 0*5 + 0*5 + ^{1}/_{4}*5 + ^{1}/_{8}*5 |
–1.875 |

0 | 1 | 0 | 0 | 0*5 + ^{1}/_{2}*5 + 0*5 + 0*5 |
–2.50 |

0 | 1 | 0 | 1 | 0*5 + ^{1}/_{2}*5 + 0*5 + ^{1}/_{8}*5 |
–3.125 |

0 | 1 | 1 | 0 | 0*5 + ^{1}/_{2}*5 + ^{1}/_{4}*5 + 0*5 |
–3.75 |

0 | 1 | 1 | 1 | 0*5 + ^{1}/_{2}*5 + ^{1}/_{4}*5 + ^{1}/_{8}*5 |
–4.375 |

1 | 0 | 0 | 0 | 1*5 + 0*5 + 0*5 + 0*5 | –5.00 |

1 | 0 | 0 | 1 | 1*5 + 0*5 + 0*5 + ^{1}/_{8}*5 |
–5.625 |

1 | 0 | 1 | 0 | 1*5 + 0*5 + ^{1}/_{4}*5 + 0*5 |
–6.25 |

1 | 0 | 1 | 1 | 1*5 + 0*5 + ^{1}/_{4}*5 + ^{1}/_{8}*5 |
–6.875 |

1 | 1 | 0 | 0 | 1*5 + ^{1}/_{2}*5 + 0*5 + 0*5 |
–7.50 |

1 | 1 | 0 | 1 | 1*5 + ^{1}/_{2}*5 + 0*5 + ^{1}/_{8}*5 |
–8.125 |

1 | 1 | 1 | 0 | 1*5 + ^{1}/_{2}*5 + ^{1}/_{4}*5 + 0*5 |
–8.75 |

1 | 1 | 1 | 1 | 1*5 + ^{1}/_{2}*5 + ^{1}/_{4}*5 + ^{1}/_{8}*5 |
–9.375 |

Where the output voltages are all negative due to the inverting input of the summing amplifier.

By increasing the number of binary digits and the resistive summing network so that each resistor has a different weighting, the resolution of the analogue output voltage for a binary weighted digital-to-analogue converter can be increased. For example, an 8-bit DAC with TTL +5 inputs would produce a resolution of 0.039 (1/128*V) volts, while a 12-bit DAC would be 0.00244 (1/2048*V) volts per step (1 LSB) change of the input binary (or non-binary) code.

Clearly then the disadvantage here is that a binary weighted resistor DAC requires a large range of high precision resistors (one per bit) for an “n”-bit DAC making it impractical (and expensive) for converters with more than a just a few bits of resolution. But we can expand on this idea of a binary weighted digital-to-analogue circuit configuration which uses different value resistors one step further by converting it into a R-2R resistor ladder DAC which requires only two precision resistance values, namely R and 2R.

In the next turoial about **Digital-to-Analogue Converters**, we will look at how the *R-2R Digital-to-Analogue Converter* uses just two resistor values to convert a digital binary number into an analogue voltage output.