Anda di halaman 1dari 14

THE UNIVERSITY OF THE WEST INDIES

ST. AUGUSTINE, TRINIDAD & TOBAGO, WEST INDIES


FACULTY OF ENGINEERING
Department of Electrical & Computer Engineering

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

Venue for the Lab:

Electronics Laboratory

Lab Dependencies2

The theoretical background to this lab is provided in ECNG 1014


Theoretical content link: http://myelearning.sta.uwi.edu/
Pre-Requisites None

Estimated total
study hours1:

Recommended
prior knowledge
and skills3:
Course Staff

Position/Role

Marcus L George Instructor

E-mail
Phone
Office


Marcus.George@uwi.sta.edu ext3164 Electronics
Lab Office

Office
Hours
Fridays
10am - 1pm

THE UNIVERSITY OF THE WEST INDIES


ST. AUGUSTINE, TRINIDAD & TOBAGO, WEST INDIES
FACULTY OF ENGINEERING
Department of Electrical & Computer Engineering

2. LAB LEARNING OUTCOMES


Upon successful completion of the lab assignment, students will be able to:
1. Understand the concept of analog to digital conversion.
2. Perform analog to digital conversion using the ADC08040 A/D Converter
IC.
3. Analyze the characteristics of the ADC08040 A/D Converter IC.

Cognitive
Level
C
C, Ap
An

DIGLAB5: Control of Analog to Digital Converters

3. PRE-LAB
Due Date:

Must be submitted with the post-lab report. Make sure it is


properly attached to the post lab report

The students name, ID number and group letter (E,F,G,H) must


be clearly stated on the cover of the pre-lab submission

Submission
Procedure:
Estimated time to
completion:

Must be submitted with the post-lab report. Make sure it is


properly attached to the post lab report

2 hours

3.1. Required Reading Resources


Digital Design Principles and Practices, by John F. Wakerly

3.2. A/D Conversion Calculations


Digital computers and microcomputers are digital information processing systems, but
information quite often is in the analog form (eg. Speech, music and video signals). To process
this information with digital techniques it must first be converted from its analog to digital form.
The device that does this is known as an analog-to-digital-converter.
Analog to digital conversion is the process of converting analog signals to a digital
representation (please research analog to digital conversion to find out more information). In this
process a reference voltage, VREF must be specified. This is used by the analog to digital
converter to determine what binary value between 0 and 2n-1 that should be used to represent the
input analog signal to be converted to digital format. In this case n represents the number of
bits used to represent the analog signal. For example if an analog signal must be represented in 8
bits then n in this case will be 8. Therefore the range of possible values that the incoming
analog signal must be represented by is 0 [28-1].

DIGLAB5: Control of Analog to Digital Converters

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

8-bit binary representation


Calculations
Answer
00000000

DIGLAB5: Control of Analog to Digital Converters


Table 2: Pre-lab table corresponding to a reference voltage of 4.5V

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

8-bit binary representation


Calculations
Answer

11111111

VREF = reference voltage


VIN = input analog voltage

3.3. Reading Exercise


Download the datasheet for the ADC0804(you can also search for ADC0801) analog to digital
converter. Thoroughly examine the datasheet, paying special attention to the following sections:
1. Connection Diagram
2. Absolute Maximum Ratings
3. AC Electrical Characteristics
4. Timing Diagrams
5. Functional Description

DIGLAB5: Control of Analog to Digital Converters

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)

DIGLAB5: Control of Analog to Digital Converters

4.1. In-Lab Procedure

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

1.2k resistor pack

1k

VREF
Figure 1: Schematic for ADC control configuration (based on figure 9 of ADC0804.pdf)

DIGLAB5: Control of Analog to Digital Converters

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.

Have your circuit checked by your instructor/teaching assistant before continuing.

4.1.3.

Set VREF as 3V.

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.

Show the functional system to your instructor/teaching assistant.

4.1.7.

Set VREF as 4.5V and repeat section 4.1.2 to 4.1.6 above using table 4 below.

DIGLAB5: Control of Analog to Digital Converters

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]

For VREF = 4.5V

VIN / V

Status of LEDs(ON or OFF)


LED7(MSB) LED6 LED5 LED4 LED3 LED2 LED1 LED0(LSB)

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]

DIGLAB5: Control of Analog to Digital Converters

4.2.

Assignment:

4.2.1.

Explain the process of analog to digital conversion as done by the ADC0804. [4 marks]

4.2.2.

List all digital control inputs of the ADC0804 ADC. [1 mark]

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

DIGLAB5: Control of Analog to Digital Converters

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]

b. Suggest a solution to the problem encountered. [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

DIGLAB5: Control of Analog to Digital Converters

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

DIGLAB5: Control of Analog to Digital Converters

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]

Proceed to post-lab exercise.

13

DIGLAB5: Control of Analog to Digital Converters

5. POST-LAB
A signed plagiarism declaration form must be submitted with your assignment.
Due Date:

The deadline for submission of report for this laboratory exercise is as


follows:

Feedback on Lab

All Groups: Monday 2nd November 2009 at 12 noon


Feedback for this laboratory exercise will be given by Mr. Marcus
George on Friday 6th November 2009 in the Electronics Laboratory
during office hours. Students lab marks will be made available.

Submission
Procedure:

Submit reports to designated graduate assistant in the Electronics


laboratory. Students must also fill out a report submission receipt and
have it signed or stamped by the graduate assistant.

Deliverables:

Submit an informal report consisting of the responses to the post-lab


exercises in addition to a lab discussion and conclusion.
[1] Discussion of the lab should include: [3 mark]
a. Relate design to the results obtained.
b. If design was successful then explain why it works. If not
successful then explain why design did not work along with and
possible solutions.
c. Include and explain all observations made.
d. Design decisions made and justification for decisions made.
e. Problems faced and how were they dealt with.
[2] Conclusion of the lab should include: [1 mark]
State briefly, but clearly, what you have gained from this laboratory.
Outline aspects that you have noted within the experiment outside of the
questions asked. Make comments on the procedure of the lab - Is there
anything that you could have done differently? How did you split the
work between group members? Did you have a plan of action? What else
would you suggest that should be added to this lab session?

End of Lab #5: Control of Analog to Digital Converters


14

Anda mungkin juga menyukai