Digital Technologies
Lecturer: Ali Jawad Kadhim Alrubaie
                         E-mail: ali.jawad@mustaqbal-college.edu.iq
                                       TA: Esraa Hussein
                              Experiment No. 5
                        Digital to Analog Conversion
   1. Introduction
       1.1 Objective:
                Study of 4 Bit R-2R Ladder.
                Obtain analog voltage from digital signal.
       1.2 Components:
       1.   ST2611 Digital Circuit Development Platform trainer with power supply cord.
       2.   DB16 – Digital to Analog Converter.
       3.   Multimeter.
       4.   Set of wires.
       1.3 Theory:
       It is often necessary to convert analog signal to an accurate digital number, and vice versa. For
       example, in applications where a microprocessor is controlling an experiment, the analog signal from
       a sensor needs to be converted into digital form so it can be communicated to the microprocessor.
       After the processing takes place in the digital form, the output from the microcontroller needs to be
       converted back to the analog form to communicate with the analog world.
       In this lab session we will consider the case of digital to analog conversion (DAC). A digital to
       analog converter (DAC) converts a digital signal to an analog voltage or current output. Many types
       of DACs are available and usually switches, resistors, and op-amps are used to implement the
       conversion.
       R-2R Ladder is another type of DAC based on the opamp summing amplifier similarly as seen in
       Figure (1). It uses only two values of resistors which makes the fabrication of the circuit easier and
       more accurate. R-2R ladder can scalable to any number of bits desired and its output impedance will
       remain R, regardless the number of bits. Each bit corresponds to a switch:
                                          Figure 1: 4-Bit R-2R Ladder (DAC)
Al-Mustaqbal University College                      1/5                      http://www.mustaqbal-college.edu.iq/
       If the bit is high, the corresponding switch is connected to the inverting input of the op-amp. If the
       bit is low, the corresponding switch is connected to ground.
       bn means Bit n, hence;
       If bit n is set, bn=1
       If bit n is clear, bn=0
       For a 4-Bit R-2R Ladder, output is equal to;
        In order to understand this, let’s solve an example:
       If we have the Vref = 2.4 V, and we need to convert the digital number 7 (which is 0111 in binary
       form) into analog then by applying the following equation, we get:
       Vout = - 2.4 [(0) + (1*1/2) + (1*1/4) + (1*1/8)]
       Vout = -2.4 [0 + 1/2 + 1/4 + 1/8]
       Vout = -2.4 * 7/8
       Vout = -2.1 V
       So, from the above example, we get that the voltage measured by the multimeter will be -2.1 V.
   2. Experiments:
       2.1 Exercise 1 Setup +12V and -12V Voltage Supply:
           In this exercise, you need to set up the +12V and -12 V from the variable voltage supply using
           the multimeter.
       1. Connect a wire from the V pin of the multimeter to the +3.. 15V on the left side of the trainer.
       2. Connect the COM pin of the multimeter to GND pin on the trainer.
       3. Turn the multimeter and the trainer on and start measuring the supplied voltage.
       4. Turn the knob of +V clockwise or counterclockwise until you get +12V then stop moving the
           knob.
       5. Take the wire connected to +3.. 15V and place it to -3.. 15V pin and repeat step no. 4 but this
           time until you get -12V.
       6. Take off all the wires from the trainer and turn it off.
Al-Mustaqbal University College                     2/5                   http://www.mustaqbal-college.edu.iq/
       2.2 Exercise 2 Convert Digital to Analog Signal:
       1. Place the DB16 panel as shown in Figure (2) on the trainer.
       2. To provide power to the panel, connect a wire from +3.. 15V pin on the left side of the trainer
           board to +12V pin on the left side of DB16.
       3. Connect a wire from -3.. 15V pin on the left side of the trainer board to -12V pin on the left side
           of DB16.
       4. Connect GND pin from the trainer on the left side to ground symbol pin on the DB16.
       5. Connect the input switches which are pins no. D0, D1, D2 and D3 on the bottom of the trainer to
           D0, D1, D2, and D3 pins on the bottom of the panel respectively.
       6. Connect a wire from the V pin of the multimeter to the V0 on the right side of DB16.
       7. Connect the COM pin of the multimeter to ground symbol bellow V0 on the DB16.
       8. Make sure all your connections are right then turn on the power supply.
       9. Turn D1 and D2 switches to position 1 while keep D0 and D3 switches at position 0 then observe
           the output on the multimeter and write it in the Table (1).
       10. Observe the output for different input combination as shown in the table of digital to analog
           conversion on Table (1) and write the results you get.
                            Figure 2: DB16 Digital to Analog Converter Panel (4-Bit R-2R Ladder)
Al-Mustaqbal University College                           3/5                            http://www.mustaqbal-college.edu.iq/
                                       Table 1: Digital to Analog Conversion
         Decimal Numerals                 Digital Input                           Analog Output
             Decimal              D3      D2        D1               D0               Vout
                 0                 0       0         0                0
                 1                 0       0         0                1
                 2                 0       0         1                0
                 3                 0       0         1                1
                 4                 0       1         0                0
                 5                 0       1         0                1
                 6                 0       1         1                0
                 7                 0       1         1                1
                 8                 1       0         0                0
                 9                 1       0         0                1
                10                 1       0         1                0
                11                 1       0         1                1
                12                 1       1         0                0
                13                 1       1         0                1
                14                 1       1         1                0
                15                 1       1         1                1
   3. Discussion:
       1. What is the purpose of using digital to analog conversion?
       2. Why do we use the R-2R ladder?
       3. Solve the analog conversion for 4-bit binary numbers in the above Table (1) by hand and write it
          in your report.
       4. Compare the results you obtained by hand with the results from the lab and discuss it in the
          report.
       5. Verify that the output impedance is R for the circuit inside a rectangular in Figure (1).
Al-Mustaqbal University College                     4/5                        http://www.mustaqbal-college.edu.iq/