ECNG 2004
LABORATORY & PROJECT DESIGN II
http://myelearning.sta.uwi.edu/course/view.php?id=1678
Semester I, 2009/2010
1. GENERAL INFORMATION
Lab #:
Name of the Lab:
DIGLAB5
Control of Analog to Digital Converters
Lab Weighting:
5 % [TOTAL = 28 marks]
Delivery mode:
Lecture
Online
; Lab
Other
Electronics Laboratory
Lab Dependencies2
Estimated total
study hours1:
Recommended
prior knowledge
and skills3:
Course Staff
Position/Role
E-mail
Phone
Office
Marcus.George@uwi.sta.edu ext3164 Electronics
Lab Office
Office
Hours
Fridays
10am - 1pm
Cognitive
Level
C
C, Ap
An
3. PRE-LAB
Due Date:
Submission
Procedure:
Estimated time to
completion:
2 hours
If we are required to calculate the 8-bit representation for an analog value, we are first required
to calculate the smallest change of the analog signal that corresponds to a bit-change in the
digital representation. For example, if the reference voltage is 5V and the input analog value
must be represented in 8-bits then the smallest change in the voltage is given as follows:
Smallest change, V = 5 / 2n = 0.0195 (to 4 decimal places)
Therefore we can use this approach to calculate the 8-bit binary representation of any analog
value. Hence the 8-bit binary representation of 2.4V is found as follows:
8-bit representation of 2.4 := [(2.4 / 5) 2n] - 1= 122
= 122 corresponds to the 8-bit binary value 01111010
Therefore the 8-bit representation of 2.4 is 01111010
Exercise: Using the information obtained above and information obtained from other reading
material, fill out the tables below for VREF = 3V and VREF = 4.5V.
Table 1: Pre-lab table corresponding to a reference voltage of 3V
VREF / V
VIN / V
0.0
0.3
0.6
0.9
1.2
1.5
1.8
2.1
2.4
2.7
3.0
VREF / V
VIN / V
4.5
0.0
0.4
0.8
1.2
1.6
2.0
2.4
2.8
3.2
3.6
4.0
4.5
11111111
4. IN-LAB
Allotted Completion 2 hours
Time:
1 printed copy of the digital lab5 manual (students must bring to the lab)
Required lab
Equipment:
1 - DC dual power supply
1 - Fluke Multimeter
1 - 1 small breadboard
1 - ADC08040 A/D Converter IC
8 LEDs(4 yellow LEDs & 4 red LEDs)
1 - 10k Potentiometer
1 - 1.2k resistor pack
1 - 10k resistor
2 1k resistors
1 - 10F capacitor
1 150pF capacitor
2 0.1F capacitors
Connecting wires
1 - Pliers/Wire Cutter/Wire Nippers (students must bring to the lab)
10k
150F
20
19
18
17
16
VREF
10F
Location A
Wire X
START
VREF
LSB
ADC0804
10k
15
14
13
12
10
11
0.1F
A GND
VREF / 2
0.1F
MSB
D GND
1k
1k
VREF
Figure 1: Schematic for ADC control configuration (based on figure 9 of ADC0804.pdf)
4.1.1.
Using the equipment provided for the lab, implement the system given in figure 1
above. Set up the circuit as shown figure 1 above. All analog and digital grounds must
be tied together. The four yellow LEDs will be connected to pin 11 - 14 of the AD0804,
while four red LEDs will be connected to pins 15 - 18.
4.1.2.
4.1.3.
4.1.4.
Connect wire X to ground for approximately 1 second and then disconnect and leave
unconnected.
4.1.5.
By varying the resistance of the 10k POT we vary the input voltage to the A/D
converter. Hence a new value is represented by the LEDs. You need to supply the input
voltage to the A/D converter and observe the 8-bit value of the voltage displayed. Fill
out the table 3 below. ( Remember to use the Fluke Multimeter to obtain the actual
value of the voltage to the A/D converter). Record all observations made in the
discussion.
4.1.6.
4.1.7.
Set VREF as 4.5V and repeat section 4.1.2 to 4.1.6 above using table 4 below.
For VREF = 3V
VIN / V
Status of LEDs( 1 or 0 )
LED7(MSB) LED6 LED5 LED4 LED3 LED2 LED1 LED0(LSB)
8-bit representation
corresponding to status of LEDs
0.0
0.4
0.8
1.2
1.6
2.0
2.4
2.8
3.0
Table 3: In-lab exercise results table(reference voltage = 3V)
----------[3 marks]
VIN / V
8-bit representation
corresponding to status of LEDs
0.0
0.6
1.2
1.8
2.4
3.0
3.6
4.2
4.5
Table 4: In-lab exercise results table(reference voltage = 4.5V)
----------[3 marks]
4.2.
Assignment:
4.2.1.
Explain the process of analog to digital conversion as done by the ADC0804. [4 marks]
4.2.2.
4.2.3.
How can we restart the A/D conversion process if currently in a cycle of A/D conversion?
[1 mark]
4.2.4.
Calculate the 8-bit digital representation of the voltage 6.2V. In this case assume the
reference voltage(VREF) is equal to 8V. Show all calculations. [2 marks]
10
4.2.5.
After pre-lab calculations, a student discovered that a 4.3V is represented by the 8-bit
binary value 10011101 when a VREF is equal to 7V. After testing the same scenario in the
lab, he obtained an 8-bit binary value of 10011111.
a. What is the most likely reason for the difference in the calculated and actual values
obtained? [1 mark]
4.2.6.
Compare the results of the post lab exercise with pre-lab exercise.
a. Is there any difference between the 8-bit binary representation obtained in both the post
lab exercise and the pre-lab exercise? ______(Yes or No)
b. If any difference is found, then state the difference and explain possible reasons for this
difference.
4.2.7.
Examine the schematic of figure 1 above. What is the significance of connecting pin 3 to
pin 5? [1 mark]
4.2.8.
How can the accuracy of the 8-bit digital representation of analog inputs for this laboratory
exercise be improved using the same ADC pin assignments as used in this lab exercise?
Explain. [2 mark]
11
4.2.9.
As seen in the schematic of figure 1 above, the system consists of both analog and digital
grounds. Ideally we should not directly connect both analog and digital grounds together.
a. Why? [1 mark]
b. Explain with the aid of a well labeled diagram how we should set up the circuit of
figure 1, ensuring that all grounds(analog and digital) are correctly tied
together.(you dont need to draw the entire schematic of figure 1) [2 marks]
4.2.10. Measure the voltage at location A stated on the schematic of figure 1 below, for VREF =
4.5V.
a. What is the value of this voltage? _______ [1 mark]
b. Sometimes the voltage of part(a) may be too small to register a logic 1 on a pin of
the FPGA development board. Suggest and explain a solution to this problem. [2
marks
12
c. Using the blank space below, draw the modified circuit corresponding to the solution
suggested in part(c). Remember to attach this sheet of paper to the lab script. [3
mark]
13
5. POST-LAB
A signed plagiarism declaration form must be submitted with your assignment.
Due Date:
Feedback on Lab
Submission
Procedure:
Deliverables: