R-2R Ladder Type DAC / R-2R DAC

The R-2R ladder type DAC or Digital-Analog Converter is a data converter that uses two precise resistors to convert a digital binary number into an analog output signal proportional to the value of the digital number.

In the previous tutorial on the dual-weighted digital-analog converter, we saw that the analog output voltage is the weighted sum of individual inputs and requires a wide range of precise resistors within the stair network, making its design expensive. It is impractical for most DACs that require lower resolution levels.

We also found that the dual-weight DAC is based on a closed loop inverting operational amplifier that uses the collection amplifier topology.Although this type of data converter configuration works well for a D/A converter with several bits of resolution, a much simpler approach is to use an R-2R-resistant network of ladders to create an R-2R Digital-Analog Converter that requires the following.

The R-2R resistant ladder network uses only two resistance values; one has a base value of "R" and the other has a value of "2R", twice the initial resistance, no matter how many bits are used to create the ladder.For example, if only 1kΩ resistance was used for base resistance "R", therefore we can use 2kΩ resistance for "2R" (or multiples of this, since the basic value of R is not very critical), so 2R is always twice the R. This means that it is much easier to maintain the necessary accuracy of the resistors along the stair network compared to the previous weighted resistance DAC.But what is still the "R-2R resistant ladder network".

R-2R Ladder Type DAC

As its name suggests, the definition of "ladder" comes from the ladder-like configuration of the resistors used in the mesh.The R-2R resistant stair network provides a simple way to convert digital voltage signals into an equivalent analog output.Entry voltages are applied to the stair network at various points along its length, and the greater the entry points, the better the resolution of the R-2R ladder.As a result of all these input voltage points, the output signal is taken from the end of the ladder used to drive the inverted input of a transactional amplifier.

Then an R-2R-resistant network of ladders is nothing more than long parallel and serially connected resistance arrays that act as interconnected voltage dividers along its length, and the output voltage depends only on the interaction of input voltages with each other.Consider the basic 4-bit R-2R staircase network (4-bit as it has four entry points) below.

This 4-bit resistant stair circuit may seem complicated, but this is all about connecting the resistors in parallel and serial combinations and returning to the input source using simple circuit laws to find the proportional value of the output.Suppose all binary inputs are grounded at 0 volts, that is: V A = V B = V C = V D = 0V (LOW).The binary code corresponding to these four entries will therefore be: 0000.

Starting from the left side and using the simplified equation for two parallel resistances and serial resistance, we can find the equivalent resistance of the stair network as follows:

Resistances R 1 and R 2 are parallel to each other, R3 resistance depends on the series.Then we can use the following equation to find the equivalent resistance of these three resistors. You can say RA to represent equivalent resistance, where RA nomenclature is entirely at your choice.

The calculated equivalent resistance is 2R, this equivalent resistance value is in line with R4, connected serially with R5.

Again we can find the equivalent resistance of this combination and call it RB.

We also calculated the equivalent resistance of RB in 2R, we can see that this equivalent resistance is connected in parallel with R7 series, R6, as shown.

As before, we find equivalent resistance again, and we call it RC .

Again, the resistance combination RC is equivalent to "2R", which is parallel to R8, as shown.

As we have shown above, when the two equal resistance values are parallel to each other, the resulting value is half, so the 2R parallel to 2R is equal to an equivalent resistance of R. Individual resistors connected in parallel and serial combinations have "R" equivalent resistance (R EQ) when the binary code "0000" is applied to the four inputs.

Therefore, with the binary code "0000" applied as input, our basic 4-bit R-2R digital-analog converter circuit looks like this:

R-2R DAC Circuit with Four Zero (LOW) Inputs

The output voltage for an inverted operational amplifier is given as follows: (R F /R IN)*V IN.If we make R F equal to R , that is, R F = R = 1, and R is terminated with soil (0V), then V IN has no voltage value, (V IN = 0) so the output voltage is as follows: (1/1)*0 = 0 volts.Therefore, for 4-bit R-2R DAC with four-earth inputs (LOW), the output voltage becomes "zero" volts, so that a 4-bit digital input produces 0000 0 volt analog output.

So what would be the equivalent resistance value of the R-2R stair network and the output voltage from the op-amp if we now bind the VA HIGH input bit to +5 volts?

R-2R DAC with Input VA

Input V A IS HIGH and logic level "1" and all other inputs are grounded at the logic level "0".Since the R/2R stair network is a linear circuit, we can find the equivalent resistance of Thevenin using the same parallel and serial resistance calculations as above to calculate the expected output voltage.The output voltage, V OUT, is therefore calculated at 312.5 milli volts (312.5 mV).

Since we have a network of 4-bit R-2R resistant ladders, this 312.5 mV voltage change is one-sixteenth of the value of the voltage of +5V input (5/0.3125 = 16) and is therefore classified as The Least Important Bit (LSB).The most meaningful bit is a simple 4-bit digital-analog converter, which is input VA, as the smallest voltage change corresponding to analog output to a single digit change.So for our 4-bit DAC, this will be 312.5mV (1/16th) for +5V input.

Now let's see what happens to the output voltage if we connect the V B HIGH input bit to +5 volts .

R-2R DAC with Input VB

Input VB HIGH and logic level "1" and all other inputs are grounded at the logic level "0", the output voltage is calculated at VOUTPUT 625mV and is one-eighth (1/8) of the value. +5V input (5/0.625 = 8) voltage.

Now let's see what happens to the output voltage if we connect the V C HIGH input bit to +5 volts .

R-2R DAC with Input V C

Input V C IS HIGH and logic level "1" and other input bits are calculated at the logic level "0", the output voltage, V OUT is calculated as 1.25 volts and a quarter of this value (1/4). Voltage of +5V input (5/1.25 = 4).Again, we can see that the input bit of this voltage is twice the output of V B,but at the same time the value of bit V Ais 4 times .

Finally, let's see what happens to the output voltage if we connect the V D HIGH input to +5 volts .

R-2R DAC with Input V D

Only input V D IS HIGH and logic level is "1" and other inputs are at the "0" logic level, while the output voltage is calculated as V OUTPUT 2.5 volts.This is half (1/2) of the +5V input (5/2.5 = 2) voltage.Again, we can see that this voltage input is a double output V bit.

Digital to Analog Output Voltage Equation

Where the denominator value of 16 corresponds to the possible input combination of 16 (2 4) for the DAC's 4-bit R-2R stair network.

To obtain a generalized R-2R DAC equation for any number of digital inputs for an R-2R D/A converter, we can further expand this equation, since the weight of each input bit will always be referred to as the least meaningful bit (LSB), which gives us a generalized equation:

Generalized R-2R DAC Equation

Where: "n" represents the number of digital inputs within the DAC's R-2R-resistant stair network and produces the following resolution: V LSB = V IN /2 n .

Clearly, when the input bit VA is HIGH , it will cause the slightest change in the output voltage, while when it is HIGH, the input bit VD will cause the biggest change in the output voltage.The expected output voltage is therefore calculated by collecting the effect of all high-bound individual input bits.

Ideally, since each input will have a step increase equal to LSB, the stair network should produce a linear relationship between input voltages and analog output, we can create a table of expected output voltage values for all 16 combinations of 4 inputs. +5V represents a logic "1" condition, as shown.

4-bit R-2R D/A Converter Output

Digital InputsV OUT ExpressionV OUTPUT
NSCBA(8*V D + 4*V C + 2*V B + 1*V A)/2 4 In volts
0000(0*5 + 0*5 + 0*5 + 0*5)/160
0001(0*5 + 0*5 + 0*5 + 1*5)/160.3125
0010(0*5 + 0*5 + 2*5 + 0*5)/160.6250
0011(0*5 + 0*5 + 2*5 + 1*5)/160.9375
0100(0*5 + 4*5 + 0*5 + 0*5)/161.2500
0101(0*5 + 4*5 + 0*5 + 1*5)/161.5625
0110(0*5 + 4*5 + 2*5 + 0*5)/161.8750
0111(0*5 + 4*5 + 2*5 + 1*5)/162.1875
1000(8*5 + 0*5 + 0*5 + 0*5)/162.5000
1001(8*5 + 0*5 + 0*5 + 1*5)/162.8125
1010(8*5 + 0*5 + 2*5 + 0*5)/163.1250
1011(8*5 + 0*5 + 2*5 + 1*5)/163.4375
1100(8*5 + 4*5 + 0*5 + 0*5)/163.7500
1101(8*5 + 4*5 + 0*5 + 1*5)/164.0625
1110(8*5 + 4*5 + 2*5 + 0*5)/164.3750
1111(8*5 + 4*5 + 2*5 + 1*5)/164.6875

Note that the full-scale analog output voltage for binary code 1111 never reaches the same value as the digital input voltage (+5V), but is less than the equivalent of an LSB bit (312.5mV in this example).However, the higher the number of digital input bits (resolutions), the closer the analog output voltage is to the full scale when all input bits are HIGH.Similarly, when all input bits are LOW, the resulting low LSB resolution brings V OUTPUT closer to zero volts.

Now that we understand what an R-2R-resistant ladder network is and how it works, we can use it to produce an R-2R Digital-Analog Converter.Again, using our network of 4-bit R-2R resistant ladders from above and adding it to an inverted operational amplifier circuit, we can create a simple R-2R digital-analog converter consisting of:

The digital logic circuit used to drive the D/A converter can be created with combination or sequential logic circuits, data records, counters, or simple switches.The interface of an R-2R D/A converter with bits of "n" will depend on .All-in-one cards such as the Arduino or Raspberry Pi have digital-to-analog converters built in , making interface creation and programming much easier.Many popular DACs are available, such as 8-bit DAC0808.

R-2R D/A Converter Question Example 1

The hexadecimal letter "B", the eleven decimal number, is equal to the binary code "1011" in the binary system.That is: B 16 = 1011 2 .Therefore, for our binary number of 4 bits, 1011 2, the input bit is D = 1, bit C = 0, bit B = 1, and bit A = 1.

Assuming that the feedback resistance equals R Fto "R", our R-2R D/A converter circuit will look like this:

The digital logic circuit uses 10 volt CMOS devices, so the input voltage to the R-2R network will be 10 volts.Also since there is a 4-bit DAC ladder, there will be 2 4 possible input combinations, so using our equation above, the output voltage for binary code 1011 2 is calculated as follows:

Therefore, when the input code is 1011 2, the analog output voltage used to control the DC motor is calculated as -6.875 volts.Note that the output voltage is negative due to the inverted input of the transactional amplifier.

The resolution of the converter will be equal to the value of the least meaningful bit (LSB) given as follows:

Then the smallest step change in the analog output voltage is V OUT : 0.625 volts for the 1-bit LSB change of the digital input of this 4-bit R-2R digital-analog converter sample.This is when the output voltage changes not as a straight linear value, but in steps or increments of 0.625 volts.

4-bit Binary Counter R-2R DAC

Note that to count from 0000 to 1111, the external CLK B input must be connected to the Q A (pin-12) output, and input timing pulses must be applied to the CLK A (pin-14) input.

This simple 4-bit asynchronous up counter is built around the binary surge counter 74LS93, in the same way as the counting sequence given in the table above.Outputs in a clock pulse application: Q A, Q B, Q C, and Q D vary one step.The input of the operational amplifier detects this step change and gives a negative voltage (reversal op-amp) relative to the binary code in the R-2R stair entrances.The output voltage value for each step will correspond to what is given in the table above.

The surge counter counts in order with four outputs producing an output sequence of binary values up to the 15th hour pulse, when the outputs producing the maximum negative output voltage of the digital-analog converter are set to 1111 2 (decimal 15).On pulse 16, the counter output sequence is reset and the count returns to 0000, which resets the op-amp output to zero volts.Implementing the next clock pulse starts a new counting cycle from zero to V OUT(max).

For this simple 4-bit dual asynchronous counting R-2R D/A converter, we can show the output sequence in the schedule chart below.

4-bit R-2R DAC Timing Chart

Clearly then, the output voltage of the transactional amplifier varies from zero volts to the maximum negative voltage, as the surge counter counts from 0000 2 to 1111 2 respectively.This simple circuit can be used to change the brightness of a lamp connected to the op-amp output or to continuously change the speed of a DC motor from slow to fast and again at a speed determined by the clock period.