• No results found

Conversion Between Analog and Digital Signals

N/A
N/A
Protected

Academic year: 2021

Share "Conversion Between Analog and Digital Signals"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

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 Vref (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.

(2)

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 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 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.”

(3)

TABLE 6.2 Analog to Digital Conversion Data

Analog

Voltage Expected Output Obtained Output Vo Voltage Analog Expected Output Obtained Output Vo

0.50 Volts 3.00 Volts

1.00 Volts 3.50 Volts

1.50 Volts 4.00 Volts

2.00 Volts 4.50 Volts

2.50 Volts 5.00 Volts

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,

100

2

1

Res

%

=

N

x

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

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.

(4)

Note that the DAC0808 D/A converter generates a varying analog current at its output, Io, on Pin-4. The full-scale 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 (Vo) 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.

(5)

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. 100kΩΩΩΩ Potentiometer 7. 20KΩΩΩΩ Resistor 8. 10KΩΩΩΩ Resistor 9. 5.1KΩΩΩΩ Resistor 10. 2.2KΩΩΩΩ Resistor 11. 150pF Capacitor 12. 0.1µµµµF Capacitor 13. LM34

References

Related documents

A number of perceived biases were identified by subjects, sub-grouped into cultural factors, personality factors, perception of prior preparation, concerns with

The small premature infant who has undergone a sur gical procedure and would have to be fed by gavage is much more easily and safely fed through a gastrostomy tube (Fig. 2)..

In the present study, we developed a simple and rapid method for the simultaneous measurement of plasma concentrations of four first-line drugs (pyrazinamide,

There are infinitely many principles of justice (conclusion). 24 “These, Socrates, said Parmenides, are a few, and only a few of the difficulties in which we are involved if

This study includes two different stages; the first one is about the effect of commercial feeding protocol on protease enzyme alteration and the second one is

Standardization of herbal raw drugs include passport data of raw plant drugs, botanical authentification, microscopic & molecular examination, identification of

In vitro host-free seed culture, callus development and organogenesis of an obligatory root-parasite Striga hermonthica (Del.) Benth: the witch weed and medicinal

The Nominating Committee suggests for Chairman of District IV, the name of