Conversion Between Analog and Digital Signals

advertisement

ELET 3156 DL - Laboratory #6

Conversion Between Analog and Digital Signals

There is no pre-lab work required for this experiment. However, be sure to read through the assignment completely prior to starting the practicum.

Task: To become familiar with the conversion between analog and digital electronic signals and the properties and definitions associated with those conversions.

PART ONE. Analog to Digital Conversion

There are many applications of the process related to the conversion of varying analog voltages to correlated binary values. This process is often referred to as digitization and is accomplished by sampling an analog voltage at repeated intervals and then storing, in binary form, a number that identifies the analog value of each sample. The resulting table of binary numbers can be stored, transmitted without electronic interference, and converted back to analog form if need be.

There are many different methods to convert analog signals to digital values. Some electronic circuits that deserve attention include the dual-slope integrator used in digital meters, flash converters used for high-speed applications, and the successive approximation type converter used for many digital instrumentation applications.

We will be using an ADC0804 8-bit Analog to Digital Converter IC in this experiment. This circuit is a state machine that utilizes a clock to drive an internal counting circuit (successive approximation) and an internal digital-to-analog converter to perform the conversion process. Figure 6.1 illustrates the circuit we will use to perform the conversion.

The analog input to this circuit is generated at Pin 6

(V+) by using a voltage divider created by the 100K potentiometer placed between V ref

(5V) and ground.

The RC pair made up of the 10K resistor and the

150pF capacitor create a digital oscillator that is used to provide clock pulses to the converter chip. The digital output can be connected directly to the trainer

LED displays. The conversion is started with a transition on Pin 3, WR .

Figure 6.1: Analog to Digital Conversion Circuitry.

Step 1: Construct the circuit of Figure 6.1. Apply power, and adjust the potentiometer until the voltage at Pin 6 is equal to 0V. Then, by SLOWLY increasing the voltage at Pin 6, indicate on Table 6.1 the lowest voltage at which the digital output first switches to the indicated binary value.

Page - 1

TABLE 6.1 Analog to Digital Conversion Data

Analog Voltage Binary Value Analog Voltage Binary Value

0.00 Volts 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 1

0 0 0 0 0 0 1 0

0 0 0 0 0 0 1 1

0 0 0 0 0 1 0 0

0 0 0 0 0 1 0 1

0 0 0 0 0 1 1 0

0 0 0 0 0 1 1 1

0 0 0 0 1 0 0 0

0 0 0 0 1 0 0 1

0 0 0 0 1 0 1 0

0 0 0 0 1 0 1 1

0 0 0 0 1 1 0 0

0 0 0 0 1 1 0 1

0 0 0 0 1 1 1 0

0 0 0 0 1 1 1 0

On the graph below (Figure 6.2) plot the analog voltage versus the binary value.

Digital Value

Analog Voltage (Millivolts)

FIGURE 6.2 Transfer Function Segment of 8-Bit Analog to Digital Conversion.

Since this circuit uses an 8-bit conversion, it will divide the voltage between V+ and V- into 256 discrete steps. This full-scale voltage of 5V when divided by 256, produces steps of about 20mv each. Based upon your data, how much of an input voltage swing actually produces a one-bit change on the output?

________________. If this value (voltage resolution per bit) varies from the expected value of 20mV, explain:

__________________________________________________________________________________________

__________________________________________________________________________________________

Based upon the voltage resolution per bit that you obtained, you should be able to predict the expected output binary value for any analog input by dividing the analog input by the resolution per bit. Based upon this calculation, fill in the columns in Table 6.2 that are labeled “Expected Output.”

Page - 2

TABLE 6.2 Analog to Digital Conversion Data

Analog

Voltage

0.50 Volts

1.00 Volts

1.50 Volts

2.00 Volts

2.50 Volts

Expected

Output

Output

Obtained

Vo Analog

Voltage

3.00 Volts

3.50 Volts

4.00 Volts

4.50 Volts

5.00 Volts

Expected

Output

Output

Obtained

Vo

Step 2: Adjust the potentiometer to the indicated analog voltages in Table 6.2 and record in the table the binary output that was actually obtained. Ignore the column labeled “Vo”

Describe any variations in the expected results: ___________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

The resolution obtained for a single bit is also expressed as a percentage of the full-scale voltage that is determined by a single bit. That is,

=

1 x 100

where N is the number of binary bits in the conversion.

% Res

2 N

Based upon this equation, what is the percentage of full-scale resolution obtained with this 8-bit analog to digital converter?

________________________ans.

Instructor’s Signature: _______________________________ Date: ____________ Operative: ____

Inoperative: ____

PART TWO. Digital to Analog Conversion

In order to convert an 8-bit digital value to its respective analog value, we will use a DAC0808 chip. This device utilizes an R-2R ladder network to drive a current summing junction resulting in an appropriate analog value. We will use the circuit of Part One to provide the digital signals for our D/A conversion.

Step 3: Construct the circuit of Figure 6.3.

FIGURE 6.3. Addition of Digital to Analog Conversion Circuit

Page - 3

Note that the DAC0808 D/A converter generates a varying analog current at its output, Io, on Pin-4. The fullscale value of this current is determined by the current input at Vref+, on Pin 14, (2.00 mA.) Consequently, this current must be converted back to a voltage to obtain Vo. To do this, an LM741 operational amplifier is configured as a current to voltage converter using the same size current loop (5.1K resistor.)

Step 4: For each entry in Table 6.2, measure and record the output voltage (V o

) from the Op-Amp (Pin

6). Explain any variation between the input analog value and the output analog value.

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

Instructor’s Signature: _______________________________ Date: ____________ Operative: ___

Inoperative: ___

PART THREE. Ambient Temperature Measurement.

Figure 6.4 illustrates the replacement of the 100K potentiometer with an LM34 temperature sensor and an operational amplifier as the voltage source for the A/D converter. Note that nothing else has changed from

Figure 6.3. The LM34 temperature sensor generates a voltage output equal to 10mV per degree Fahrenheit with an error of less than .1 degrees. Consequently, at room temperature of 72 ° F, the sensor will generate 200.0mV.

In order to measure a voltage that is within the full-scale input of the A/D converter, an LM741 operational amplifier is configured as a non-inverting amplifier with a gain of 2, resulting in a representation of 2.00V for a temperature of 72 ° F. Note that the pin-out shown for the LM34 is the bottom view . Note also that the inputs to the LM741 are configured for non-inverting amplification.

FIGURE 6.4. Temperature Sensing Circuit.

Step 5: Construct the circuit of Figure 6.4, removing the potentiometer of Figure 6.3, and replacing it with the LM34 temperature sensor and the LM741 operational amplifier circuit. Record in the first line of Table 6.3 the (1) voltage at Pin 2 of the LM34, (2) the corresponding ambient temperature it represents, (3) the voltage at Pin 6 of the ADC0804 verifying the gain of the input amplifier, (4) the digital value at the inputs of the DAC0808, and (5) the voltage at Pin 6 of the LM741 at the output of the circuit. You may have to wait a little while for the temperature to stabilize.

Page - 4

TABLE 6.3 Temperature Acquisition Data

(1) LM33 Output

Voltage

(2) Ambient

Temperature, ° F

(3) A/D Input

Voltage

(4) Digital

Equivalent

(5) Output

Voltage, Vo

Step 6: Heat the temperature sensor by grasping it with your fingers. As the temperature indicates higher values, add respective lines of data to Table 6.3.

Record here your comments concerning the circuit operation and reasons for unexpected results. (Why is the temperature seemingly higher than it should be?, etc.)

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

Instructor’s Signature: _______________________________ Date: ____________ Operative: ___

Inoperative: ___

NOTES:

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

Parts List:

1.

Logic Trainer

2.

DC Power Supply

3.

ADC0804 A-to-D

Converter

4.

DAC0808 D-to-A

Converter

5.

LM741 Op-Amp

6.

7.

8.

100k

20K

10K

Potentiometer

Resistor

Resistor

9.

5.1K

Ω Resistor

10.

2.2K

Ω Resistor

11.

150pF Capacitor

12.

0.1

µµµµ F Capacitor

13.

LM34

Page - 5

Download