Sie sind auf Seite 1von 11

EXPERIMENT 7.

a+
Digital to Analog Conversion

Concept

Digital to analog conversion is a process in which signals having a few (usually two)
defined levels or states (digital) are converted into signals having a theoretically
infinite number of states (analog). A common example is the processing, by a modem,
of computer data into audio-frequency (AF) tones that can be transmitted over a
twisted pair telephone line. The circuit that performs this function is a digital-to-
analog converter (DAC). Basically, digital-to-analog conversion is the opposite of
analog-to-digital conversion. Binary digital impulses, all by themselves, appear as
long strings of ones and zeros, and have no apparent meaning to a human observer.
But when a DAC is used to decode the binary digital signals, meaningful output
appears. This might be a voice, a picture, a musical tune, or mechanical motion. Both
the DAC and the ADC are important in applications of digital signal processing.
The following circuit in Fig.16.1 is the basic approach to making the conversion from
stepwise digital information to an analog voltage. It's called R 2R ladder. The value of
R is not important as long as we maintain the ratio R/2R.

Fig.7.1.The basic circuit configuration for DAC

Applying super position to the above circuit in order to find the output voltage on the
most left resistance, one gets that each voltage source sees 3R resistance, and that:
I1 = I2 = I3 = I4 = V/3R where I1 is the current in branch 1 due to the voltage source
in this branch. At each node, the current is divided in two equal halves. Then the
current in the most left resistance will be:

IT = (I1/2 + I2/22 + I3/23 + I4/24)

IT = (V/3R) (1/24) (23 + 22 + 21 + 20)

Where (23 + 22 + 21 + 20) is the analog equivalent for a given voltage output.

_____________________________________________________________________
+ simulate
The conversion step is equal to the full-scale voltage divided by (2 n –1) where n is the
number of bits.
The main advantage of this type of converters is that the ratio between the largest to
the smallest resistor is only 2, which can be easily implemented.
We will realize DAC here using an op amp 741 and some resistors as shown in
Fig.7.2.

Digital to analog conversion has several sources of error such as:

1) Offset error, due to the offset current of the op amp.


2) Non-linearity error, which may be due to fluctuations in temperature and
power supply of the op amp used.
3) Glitches, which are large switching transients, occur at the output ever when
the binary input code changes by only 1 bit.

Procedure

1) simulate the circuit shown in Fig.7.2.


2) Connect a 9 V to the positive supply input of the op amp, and –9 V to the
negative supply input.
3) Connect a word generator to the digital inputs, adjust it so that you vary the
sequence as shown bellow with 1 kHz:
(0000,0001,0010,0011,0100,0101,0110,0111,1000,1001,1010,1011,1100,110
1,1110,1111)
Where 1 indicate +5 volt and 0 indicate 0 volt.
4) Use an oscilloscope to measure the output voltages, the results are shown in
Fig.7.3.

Fig.7.2. The R/2R ladder DAC circuit configuration.


Results

maximized in
Fig.7.4.

Fig.16.3 the output of the circuit in Fig.7.2 according to the sequence from 0000to1111

The measured voltages will be as shown in table 1

Table 1
Digital input Ideal analog output
0000 -466.660 mV
0001 -716.657 mV
0010 -966.654 mV
0011 -1.217 V
0100 -1.467 V
0101 -1.717 V
0110 -1.967 V
0111 -2.217 V
1000 -2.467 V
1001 -2.717 V
1010 -2.967 V
1011 -3.217 V
1100 -3.467 V
1101 -3.717 V
1110 -3.967 V
1111 -4.217 V

Note that the conversion step equals about –310 mV, which is 5/(2 3 –1) V. Note
also that these values will vary a little bit if the resistors used have some tolerance
(i.e. not ideal)
Using the transient analysis of Multisim, you can measure the settling time * for
the above R-2R ladder. It will be calculated from T2-T1 as shown in Fig.7.4.

T1 T2

Fig 7.4. The transient response of the R-2R ladder for 1kHz

Summary

The digital to analog conversion is the process where we convert a digital input is
converted to an analog output. There are many ways to achieve this goal, one of
them is the R- 2R ladder described above.

Practical work

1) Repeat the measurements of the analog output voltages with tolerance of 5%


in each resistor. Record your results in table 2

Table 2
Digital input Ideal analog output
0000 -466.660 mV
0001 -716.657 mV
0010 -966.654 mV
0011 -1.217 V
0100 -1.467 V
0101 -1.717 V
0110 -1.967 V
0111 -2.217 V
1000 -2.467 V
1001 -2.717 V
1010 -2.967 V
1011 -3.217 V
1100 -3.467 V
1101 -3.717 V
1110 -3.967 V
1111 -4.217 V

2) Plot the relationship between the digital input and the analog output according
to the values measured in question 1.

3) Change the input from 0000 to 1111 in 16 steps with a frequency 1 kHz, plot
the input-output graph.
4) Change the input from 0000 to 1111 in 16 steps with a frequency 1 MHz, plot
the input-output graph.
5) Calculate the minimum and the maximum error for the results obtained in
question 4.then calculate the mean square error of the ladder, given that the
error is the difference between the theoretical voltage and the measured
voltage and that the mean square error is given by: (1/n) Σ |Vt-Vm|2 where Vt is
the theoretical voltage and Vm is the measured voltage.

____________________________________________________________________
* Settling time is the time needed for the output to change its state due to a change in the input.

EXPERIMENT 7.b+
DAC 0808*
Introduction to the chip

The DAC0808 is an 8-bit monolithic digital-to-analog converter (DAC) featuring a


full scale output current settling time of 150 ns while dissipating only 33 mW with
±5V supplies. It provides relative accuracies of better than ±0.19% error maximum.
No reference current (IREF) trimming is required for most applications since the full-
scale output current is typically within ±1 LSB of 255 I REF/256. It has Power supply
voltage range from ±4.5V to ±18V

Fig.16.6 shows a pin out diagram of the DAC 0808.

Fig.7.6. Pin out diagram of the DAC 0808

Procedure

1) Insert the chip in the breadboard.


2) Connect the Vcc pin #13 to 5 V Dc supply, and pin # 2 to the ground of the
breadboard.
3) Connect the VREF (-ve) pin # 15 to the ground through 5kOhm resistor.
4) Connect the VREF (+ve) pin # 14 to 10 V DC supply through a 5kOhm resistor.
5) Connect VEE pin # 3 to –5 V DC supply.
6) Connect pin # 16 to –5 V DC supply through a 10 uF capacitor.
7) Connect the digital input to pins # 12,11,10,9,8,7,6,5 from LSB to MSB
respectively, through the switches of the breadboard.
8) Connect the output pin, pin # 4 to ground through a 1-kOhm resistor.
9) Connect the oscilloscope to pin #4.
________________________________________________________________
* Refer to the attached data sheet
+ Build
10) Connect the digital input to pins # 12,11,10,9,8,7,6,5 from LSB to MSB
respectively, through the switches of the breadboard.
11) Connect the output pin, pin # 4 to ground through a 1-kOhm resistor.
12) Connect the oscilloscope to pin #4.
13) Turn on the power of the oscilloscope and the breadboard and begin to change
the digital input through the switches, and notice the change in the voltage
level on the oscilloscope.
The circuit configuration is shown in Fig.7.7

Fig.7.7. Circuit configuration for the free running of the DAC 0808

Practical work

1) Record the output voltage to the following digital input shown in table 3.

Table 3

Digital input Analog output (mV)


00000000 0
00000001 -7.460
00000010 -15.203
00000100 -30.791
00001000 -61.40
00010000 -122.76
00100000 -245.84
01000000 -493.19
10000000 -984.8
11111111 -1957.8
2) Draw the input output relationship curve.

3) Calculate the maximum and the minimum error in your measurements, given
that the error is calculated from: |Vt –Vm| where Vt is the theoretical (ideal)
voltage output and Vm is the measured value.
4) Use the attached data sheet to specify the maximum input frequency that
guarantees a proper output.

1/ 150 ns

Das könnte Ihnen auch gefallen