0 ratings0% found this document useful (0 votes) 49 views20 pages2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, 
claim it here.
Available Formats
Download as PDF or read online on Scribd
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 11119, (Oto
Fg) 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 Viyax value can be done ina 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
tothe signals output.
We saw in our tutorial section about Operational Amplifiers that an inverting amplifier
Uses negative feedback to reduce its open-loop gain, Ao, and does so by feeding back a
fraction of its output signal back to the input. We also saw that the input voltage Vi is
connected directly to its inverting input via a resistor Riy and that the inverting amplifiers
closed-loop voltage gain, Ayici) is determined by the ratio of these two resistors as shown.Inverting Operational Amplifier Circuit
 
 
 
 
 
   
 
Then we can see that Vouris given as Vix mul
 
by the closed-loop Gain (Ac), which
is determined by the ratio of the feedback resistance, Rs to the input resistance, Riy.So by
altering the values of either Rr or Riy we can change the closed-loop gain of the op-amp
and therefore the value of Vout (Ir"Ry) 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.ital-to-Analogue Converter Summing Am
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,
“summing inverting voltage amplifier” circuit.
 
As the negative feedback created by the feedback resistor, Rr 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
summing amplifier in the inverting mode produces the negative sum of any number of
lifter would produce the positive sum
 
 
input voltages, whereas a no-inverting summing am
of any number of input voltages. Consider the circuit below.
Inverting Summing Amplifier Circuit
Ie Re
ov!
 
V
le
tees.Inthe summing amplifier circuit above, the output voltage, (Vout) is proportional to the
sum of the four input voltages, Vina, Vinz, Vina. and Ving and we can modify the original
equation for the inverting amplifier configuration above to take account of these four new
input values as follows:
 
a+ +1+t, = Mis Me
oR
 
 
R. R, R. R, R,
Moar = TE=Vin == REVin EM REM eM
 
Vea =
Be (Mra * Vina Vow Via)
‘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. Ifall the resistances are the same and of an equal value,
that is: Re = Ry = Ro = Rg = Rg, then each input channel will have a closed-loop voltage gain
of unity (1) so the output voltage is given simply by:
 
Vout = ~(Vina + Vinz + Vina + Vina)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
ion 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/Aconverter.
con
 
 
Labelling the four summing inputs as A, B, C, D and making Rr = 1kO, with the four input
resistors ranging from 1kQ to 8kQ (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
(M58) Rg= 1k
ea Re= ko
  
 
 
ead
vo
Digtal =e :
ee ee
0 | tage veo AA
foe
we
(use)
For a 4-bit binary number there are 2* = 16 possible combinations or A, B, C, and D
ranging from 0000, to 1111 which corresponds to decimal O to 15 respectively. If we
an8-4-
 
make the weight of each input bit double with respect to the other, we end up’
2-1 binary code ratio corresponding to 23, 22, 2+ and 2°.So if we set the "D" input resistance at 1kQ, the “C” input resistance at 2kA (that is the
double of D), the “B” input resistance at 4kQ (double C), and the "A’ input resistance at
8kQ (double B), with the feedback resistance Re set again at 1kO, then the transfer
characteristic of the 4-bit binary weighted digital-to-analogue converter would be:
 
4-bit DAC Transfer Characteristic
 
Rote Reve tee Vz +a=
 
1kQ
Uy, eA y | Udy , Ike.
Tk"? 2k CO" 4D FB” BEN
Vet Vat
 
1kQ 1kQ
 
 
= ~[ 10+ 5¥et ¥e* 3% |
Sowe can see that ifa TTL voltage of +5 volts (logic 1) is applied to the summing amplifiers
input, Vp which represents the most significant bit (MSB), the op-amp's gain will be Rp/Rg
= 1kO/1kO = 4 (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 Vc, the op-amp's gain will be Rp/Rg = 1kO/2kO =
4/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 Vp, the op-amp's gain will be
Re/Rp = 1kO/4kA = 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, Va which represents the least significant bit (LSB), the op-amp's gain will therefore
be Re/Ry = 1kO/8k0 = 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Poy a
pic|s DV + YeVet UVa YeVa inVotts
o}ol}o 05 +05 +05 +05 °
o}ol}o OS +05 10'S 4% 0.625
o}o}a OS +05 +5405 1.25
o}o}a OS 4054/25 +S 1.875
o}1}o 05 +4,°5+0°5 40'S -250
o}1}o 054,95 40'S +S -3.125
o}a}a OS 4,954 6540S -375
ofa}a OSHS HUSH N'S 4.375
1}ojo 1°5+0°5 +05 +0°5 -5.00
1}ojo 1540°540°5 +5 5.625
1}o|a 1540541 5+0°S 625
a}ol4 USHOS HUES HAS 6875
1}ajo 154,55 +0°5+0°5 -750
1}ajo 154 U5 4051/95 8.125qa aa lo A545 +425 +05 -875
 
aoa als PSH USN ES HES -9375
 
 
 
 
 
 
 
 
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
 
practical (and
expensive) for converters with more than a just a few bits of resolution. But we can
expand on this i
 
lea of a binary weighted di
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 Rand 2R.
 
n which
 
I-to-analogue circuit configuratiR-2R Resistive Ladder Network
As its name implies, the “ladder” description comes from the ladder-like configuration of
the resistors used the network. A R-2R resistive ladder network provides a simple
 
means of converting digital voltage signals into an equivalent analogue output. Input
voltages are applied to the ladder network at various points along its length and the more
input points the better the resolution of the R-2R ladder. The output signal as a result of
all these input voltage points is taken from the end of the ladder which is used to drive the
inverting input of an operational amplifier.
ladder networl
 
Then a R-2R resis nothing more than long strings of parallel and
series connected resistors acting as interconnected voltage dividers along its length, and
whose output voltage depends soley on the interaction of the input voltages with each
other. Consider the basic 4-bit R-2R ladder network (4-bits because ithas four input
points) below.
 
4-bit R-2R Resistive Ladder NetworkThis 4-bit resistive ladder circuit may look complicated, but its all about connecting
resistors together in parallel and series combinations and working back to the input
source using simple circuit laws to find the proportional value of the output. Lets assume
all the binary inputs are grounded at O volts, that is: Vq = Vg = Vc = Vp = OV (LOW). The
binary code corresponding to these four inputs will therefore be: 0000.
Starting from the left hand side and using the simplified equation for two parallel resistors
and series resistors, we can find the equivalent resistance of the ladder network as:
 
Resistors Ry and R2 are in “parallel” with each other but in “series” with resistor R. Then
we can find the equivalent resistance of these three resistors and call it Ra for simplicity
(or any other form of identification you want).
[ OROR ©
——— =R+R=2R
2R+2RThen Ra is equivalent to “2R”. Now we can see that the equivalent resistance "Ra" isin
parallel with R4 with the parallel combination in series with Rs.
 
Parallel Circuit
Again we can find the equivalent resistance of this combination and call it Ra.
 
Ladder Resistor Rb
‘So Rg combination is equivalent to "2R", Hopefully we can see that this equivalent
resistance Rg isin parallel with Rg with the parallel combination in series with Ry as
shown.As before we find the equivalent resistance and call it Rc.
R,xR 2Rx 2R
R,=R,+>2 —6§ =R+ > =R+R=2R
R,+R, 2R+2R
 
Again, resistor combination Rc is equivalent to “2R" which is in parallel with Rg as shown.
Ro
RSA WSR) F-
Parallel Circuit‘As we have shown above, when two equal resistor values are paralled together, the
resulting value is one-half, so 2!
 
parallel with 2R equals an equivalent resistance of R.
So the whole 4-bit R-2R resistive ladder network comprising of individual resistors
connected together in parallel and series combinations has an equivalent resistance (Req)
of *R" when a binary code of *0000" is applied to its four inputs.
 
‘Therefore with a binary code of “0000” applied as inputs, our basic 4-bit R-2R digital-to-
analogue converter circuit would look something like thi:
 
R-2R DAC Circuit with Four Zero (LOW) Inputs
 
 
 
 
 
 
‘The ouput voltage for an inverting operational amplifier is given as: (Rr/Riy)"Vin. If we
make Rr equal to R, that is Rr= R= 1, and as R is terminated to ground (OV), then there is
no Vin voltage value, (Vix = 0) so the output voltage would be: (1/1)*0 = O volts. So for a4-
bit R-2R DAC with four grounded inputs (LOW), the output voltage will be “zero” volts,
‘thus a 4-bit digital input of 0000 produces an analogue output of 0 volts.
So what happens now if we connect input bit Va HIGH to +5 volts. What would be the
equivalent resistive value of the R-2R ladder network and the output voltage from the op-
amp.R-2R DAC with Input Va,
Vars5v
 
Input Va is HIGH and logic level “1” and all the other inputs grounded at logic level “0”. As
the R/2R ladder network isa linear circuit we can find Thevenin’s equivalent resistance
using the same parallel and series resistance calculations as above to calculate the
 
expected output voltage. The output voltage, Vouris therefore calculated at 312.5 mi
volts (312.5 mV).
‘As we havea 4-bit R-2R resistive ladder network, this 312.5 mV voltage change is one-
sixteenth the value of the +5V input (5/0.3125 = 16) voltage so is classed as the Least
Significant Bit, (LSB). Being the least significant bit, input Va will therefore determine the
it digital-to-analogue converter, as the smallest voltage
inputs.
“resolution’ of our simple 4+
change in the analogue output corresponds toa single step change of the di
Thus for our 4-bit DAC this will be 312.5mV (1/16th) for a +5V input.
 
 
Now lets see what happens to the output voltage if we connect input bit Vs HIGH to +5
volts.R-2R DAC with Input Vg,
 
 
With input Vg HIGH and logic level “1” and all the other inputs grounded at logic level “O"
the output voltage, Vour is calculated at 625m, and which is one-eighth (1/8th) the value
of the +5V input (5/0.625 = 8) voltage. We can also see that itis double the output voltage
when only input bit Vq was applied, and we would expect this asits the 2,, bit (input) so
has double the weighting of the 1, bit.
 
Now lets see what happens to the output voltage if we connect input bit Vc HIGH to +5
volts.
R-2R DAC with Input Vc
 
With input Vc HIGH and logic level “1” and the other input bits at logic level “O’, the
output voltage, Vout is calculated at 1.25 volts, and which is one-quarter (1/4) the value
of the +5V input (5/1.25 = 4) voltage. Again we can see that this voltage is double the
output of input bit Vp but also 4 times the value of bit Va. This is because input Vcis the
3,qbit so has double the weighting of the 2,4 bit and four times the weighting of the 1.
bit.
Finally lets see what happens to the output voltage if we connect input Vp HIGH to +5
volts.R-2R DAC with Input Vp,
 
With only input Vp HIGH and logic level "1” and the other inputs at logic level "0", the
output voltage, Vouris calculated at 2.5 volts. This is on-half (1/2) the value of the +5V
input (5/2.5 = 2) voltage. Again we can see that this voltage is double the output of input
bit Vc,4 times the value of bit Vz and 8 times the value of input bit Va ast is the 4,, bit
and therefore classed as the Most Significant Bit, (MSB).
Then we can see that ifi
 
put V represents the LSB and therefore controls the DAC’s
resolution, and input Vg is double Va, input Vc is four times greater than Va, and input Vp
is eight times greater than Va, we can obtain a relationship for the analogue output
voltage of our 4-bit digital-to-analogue converter with the following equation:Digital-to-Analogue Output Voltage Equation
vy. — Yat 2Vp +4Vo +8Vp
our = 8
Where the denominator value of 16 corresponds to the 16 (24) possible combinations of
inputs to the 4-bit R-2R ladder network of the DAC.
We can expand this equation further to obtain a generalised R-2R DAC equation for any
number of digital inputs for a R-2R D/A converter as the weighting of each input bit will
always be referenced to the least significant bit (LSB), giving us a generalised equation of:
Generalised R-2R DAC Equation
+ en ete
 
+ 4V, + 8Vp + 16V, + 32!
F
 
Where: “n’ represents the number of digital inputs within the R-2R resistive ladder
network of the DAC producing a resolution of: Vise = Vin/2".
Clearly then input bit Va when HIGH will cause the smallest change in the output voltage,
while input bit Vp when HIGH will cause the greatest change in the output voltage. The
expected output voltage is therefore calculated by summing the effect of all the in
input bits which are connected HIGH.
 
ualIdeally, the ladder network should produce linear relationship between the input
voltages and the analogue output as each input will have a step increase equal to the LSB,
we can create a table of expected output voltage values for all 16 combinations of the 4
inputs with +5V representing a logic"1” condition as shown.
4-bit R-2R D/A Converter Output
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pi[clela (8Vp+4°Ve+2°Va+ 1°Va)/24 inVolts
Gilotlo lo (05 +0'5 +0°5 +0°5)/16 °
o}o}o|1 (05 +05 +0" + 1°5)/16 0.125
o}o}ajo (05 +05 +2°5+0°5/16 0.6250
ojo}als (os+orse2's+ 15/16 0.9375
o}1a}oljo (05+ 4°5+0°5+0°5/16 1.2500
ofa}o|. (sas 405+ 15/16 15625
Ota | 0 (05 +45 +2°5+0°5/16 1.8750
Oat a |e (ossarseasersyi6 2.1875
1}olojo (eS +05+0'5+0°5)/16 25000
afojo}s (e5+05+0r5+1°5/16 2.8125
1folajo (e5 +05 +2°5+0°5)/16 3.1250
afoja}a (505425 41°5/16 3.4975
1fajojo (85 +4°5 +0°5+0°5)/16 3.7500
afajo}a (85 +4°5 +0"5 + 1°5)/16 4.0625afajofa (erssarssorsersyi6 4.0625
 
afalafo (er544r5+2°5+0°5/16 43750
 
afajafa (ers +ar5 42541516 46875
 
 
 
 
 
 
Notice that the full-scale analogue output voltage for a binary code of 1111 never reaches
the same value as the digital input voltage (+5V) but is less by the equivalent of one LSB
bit, (312.5mV in this example). However, the higher the number of digital input bits
(resolution) the nearer the analogue output voltage reaches full-scale when all the input
bits are HIGH. Likewise when all the input bits are LOW, the resulting lower resolution of
LSB makes Vout closer to zero volts.
R-2R Digital-to-Analogue Converter
Now that we understand what a R-2R resistive ladder network is and how it works, we can
use it to produce a R-2R Digital-to-Analogue Converter. Again using our 4-bit R-2R
ive ladder network from above and adding it to an inverting operational amplifier
circuit, we can create a simple R-2R digital-to-analogue converter of:R-2R Digital-to-Analogue Converter
Now that we understand what a R-2R resistive ladder network is and how it works, we can
it R-2R
resistive ladder network from above and adding it to an inverting operational amplifier
circuit, we can create a simple R-2R digital-to-analogue converter of:
use it to produce a R-2R Digital-to-Analogue Converter. Again using our 4-
 
R-2R Digital-to-Analogue Converter
   
(158) Va Ve Ve Vo (MSB)
The digital logic circuit used to drive the D/A converter can be generated by
combinational or sequential logic circuits, data registers, counters or simply switches. The
interfacing of a R-2R D/A converter of “n’-bits will depend upon its application. Al
boards such as the Arduino or Raspberry Pi have digital-to-analogue converters bui
make interfacing and programming much easier. There are many popular DAC’s available
such as the 8-bit DACO808.
 
-one
  
so