EECE_0000_Lab_00
EECE_0000_Lab_00
Lab 00
Version: EECE_0000_2016_Rev_-
Objective:
o 1 Breadboard
o 1 Dual Power Supply (+/12 V minimum)
o 1 DMM Bench-top
o 1 DMM Hand-held
o 1 Function Generator (bench top)
o 1 Oscilloscope (bench top)
o 1 Analog Discovery or Analog Discovery 2
o 1 Bench “Shoebox” containing cables and other test components
o Personal USB Drive (Student supplied)
Materials (Components)
Background Information
Digital-to-Analog converters (DACs) and Analog-to-Digital converters (ADC) are important building
blocks which interface sensors (e.g. temperature, pressure, light, sound, cruising speed of a car) to
digital systems such as microcontrollers or PCs. An ADC takes an analog signal and converts it into a
binary one, while a DAC converts a binary signal into an analog value. Figure 1 gives a block
diagram of such a system. An example of such a system is a PC sound card.
Page 1 of 7
Circuits I, Circuits II, Electronics I, and Electronics II (EECE 0000)
Lab 00
Version: EECE_0000_2016_Rev_-
Figure 1: System with an ADC at the input and a DAC at the output
Sensor signals vary continuously ("analog") between a specified voltage range. As an example, the
output of a microphone gives a voltage between 0 (no speech) to 100mV (for loud speech). Any value
between these two extremes is possible. The "analog" signal needs to be converted into a "digital" word
of n-bits in order to be read into and processed by a computer (or digital signal processor - DSP). The
"analog" and "digital" signals are shown in Figure 1.
Analog-to-Digital Converter
An ADC takes an analog input and generates a digital output as shown in Figure 2a. The more bits
the output word has the better the resolution. For a 3-bit ADC, the number of steps will be 8 while a
10-bit ADC will divide the analog signal up into 1024 (=210) steps.
The input-output relationship of an ADC is shown in Figure 2b for a 3-bit converter. Notice that when
the analog input signal (on the horizontal axis) reaches a certain level, a new digital code will be
generated (see vertical axis in Figure 2b) which represents the digital output of the ADC as a function
of the analog input. The maximum analog signal the ADC can accommodate is called the Full Scale
(FS) as is shown in Fig. 2b. As an example, if the analog input is equal to 4/8xFS (Full Scale), the
output code for the example of Figure 2b will be (100). However, if one increases the magnitude of the
input signal above 4.5/8xFS, the new digital output code will be (101).
Page 2 of 7
Circuits I, Circuits II, Electronics I, and Electronics II (EECE 0000)
Lab 00
Version: EECE_0000_2016_Rev_-
Pre-Lab Preparation
Procedure
IMPORTANT: To gain proficiency with the bench top lab equipment, the Analog Discovery, and the DMM
Hand-held, you must perform this lab twice once with the bench top equipment and the second time using
the Analog Discovery and the DMM Hand-held. Your lab notebook and lab report must identify the
test equipment is used.
NOTE 1: When the Analog Discovery is used outside of the lab (prior approval required by the TA or
Instructor) in performance of any portion of this lab, take photographs of your setup and include them in
your lab report.
NOTE 2: Throughout this procedure, use MATLAB to perform any required calculations, producing plots,
and graphs.
NOTE: If the Analog Discovery and/or hand held meter are used to perform this section outside
of the lab (prior approval required by the TA or Instructor), take photographs of your setup
and include them in your lab report.
Page 3 of 7
Circuits I, Circuits II, Electronics I, and Electronics II (EECE 0000)
Lab 00
Version: EECE_0000_2016_Rev_-
a. Using the National Semiconductor Analog to Digital Converter in a 20 – pin dual in line
package in the stand-alone mode with a 5-volt DC power supply and a 0 to 5-volt input.
b. Go to pages 23-24 section 3.0 “Testing the A/D Converter” of the ADC0804 Datasheet.
c. Assemble the test circuit shown in Figure 3 of this lab (Datasheet Figure 9).
Question: What signal from the A/D converter will turn on the LEDs?
Question: If you want the LEDs to turn on with the opposite output of the A/D converter,
how would you change the circuit? Would this be a good idea in this case? Why?
d. Connect the test circuit VCC to the fixed +5 volt DC supply. Vref/2, pin 9, is an output pin;
do not apply a voltage to this pin.
e. Connect the input pin to the variable plus DC supply and measure the voltage with the
multimeter.
Start with 0 volts. Increase the voltage in 0.5 volt steps up to 5 volts. Observe the output
display. Make a table like the one on page 25 of the data sheet … decoding the Digital
Output LEDs.
Vmax − Vmin
Vstep =
256
Using a stepable voltage standard DC supply, check your Vstep and the table decoding the
LEDs Output.
g. Calculate the frequency of the A/D Clock using the R – C values in the test circuit (see
page 23 of the data sheet).
h. Measure this frequency with the oscilloscope. Capture the oscilloscope output.
i. Change the value of C and note the changes. Capture the oscilloscope output.
j. Input a slow AC signal (less than 1 Hz) between 0 and 5 volts and note the results.
Now increase the frequency and note the results. At what frequency will the A/D not be
able to process the data?
i. What is the conversion time with the test circuit Clock frequency?
iv. Are the resistors selected for the LEDs in the test circuit the correct value? What
would be an ideal value for these resistors? Now defend the value you selected.
v. What device would you add to the test circuit to make a better A/D converter (list
at least two)?
NOTE: If the Analog Discovery and/or hand held meter are used to perform this section outside
of the lab (prior approval required by the TA or Instructor), take photographs of your setup
and include them in your lab report.
Page 5 of 7
Circuits I, Circuits II, Electronics I, and Electronics II (EECE 0000)
Lab 00
Version: EECE_0000_2016_Rev_-
a. Build the circuit “Sampling an AC Input Signal” shown in Figure 4 (see also page 16 of
the datasheet). You will keep the A/D Basic Tester circuit and add the LF398 Sample and
Hold integrated circuit. The DS005671 IC is not needed; just tie the input to the proper
signal level.
CH = 100pF
b. Apply a low frequency sine wave keeping in mind the voltage restrictions on the input
when using a single +5 volt Vcc on the S/H and A/D chips. The TTL control signal is 0 to
+5 volts. The active low pass filter is not needed for this experiment but is a good idea on
a true design. Note output.
c. Change the frequency and note changes. NOTE: This will require the use of an
oscilloscope.
Page 6 of 7
Circuits I, Circuits II, Electronics I, and Electronics II (EECE 0000)
Lab 00
Version: EECE_0000_2016_Rev_-
SUMMARY:
1) Ensure that you have recorded all the data requested during the lab in your lab notebook as well
as your lab report.
Lab Report:
Lab Questions:
References:
1) Recitation textbook
2) http://www.seas.upenn.edu/~ese206/labs/adc206/adc206.html
3) This lab was developed from:
Bowdena, D. A. (2015). Analog to Digital Converter – Lab #5. ETEC 3680
Page 7 of 7