DIGLAB5 - Control of Analog to Digital Converters Aug 28

download DIGLAB5 - Control of Analog to Digital Converters Aug 28

of 14

Transcript of DIGLAB5 - Control of Analog to Digital Converters Aug 28

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    1/14

    THE UNIVERSITY OF THE WEST INDIES

    ST. AUGUSTINE, TRINIDAD & TOBAGO, WEST INDIES

    FACULTY OF ENGINEERING

    Department of Electrical & Computer Engineering 

    1

    ECNG 2004

    LABORATORY & PROJECT DESIGN IIhttp://myelearning.sta.uwi.edu/course/view.php?id=1678 

    Semester I, 2009/2010 

    1.  GENERAL INFORMATION

    Lab #: DIGLAB5

    Name of the Lab: Control of Analog to Digital Converters

    Lab Weighting: 5 % [TOTAL = 28 marks]  Estimated total

    study hours1:

    5

    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

    Recommendedprior knowledge

    and skills3:

    Course Staff Position/Role E-mail 

    Phone 

    Office Office

    Hours

    Marcus L George Instructor [email protected] ext3164 Electronics

    Lab Office

    Fridays

    10am - 1pm

     

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    2/14

    THE UNIVERSITY OF THE WEST INDIES

    ST. AUGUSTINE, TRINIDAD & TOBAGO, WEST INDIES

    FACULTY OF ENGINEERING

    Department of Electrical & Computer Engineering 

    2

    2.  LAB LEARNING OUTCOMES 

    Upon successful completion of the lab assignment, students will be able to: Cognitive

    Level

    1.  Understand the concept of analog to digital conversion. C

    2.  Perform analog to digital conversion using the ADC08040 A/D Converter

    IC.

    C, Ap

    3.  Analyze the characteristics of the ADC08040 A/D Converter IC. An

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    3/14

    DIGLAB5: Control of Analog to Digital Converters 

    3.  PRE-LAB

     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].

    Due Date: •  Must be submitted with the post-lab report. Make sure it is

     properly attached to the post lab report

    •  The student’s name, ID number and group letter (E,F,G,H) must

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

    Submission

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

     properly attached to the post lab report

    Estimated time to

    completion:

    2 hours

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    4/14

    DIGLAB5: Control of Analog to Digital Converters 

    4

    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 / V8-bit binary representation

    Calculations Answer0.0 00000000

    0.3

    0.6

    0.91.2

    1.5

    1.8

    2.1

    2.4

    2.7

    3 3.0

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    5/14

    DIGLAB5: Control of Analog to Digital Converters 

    5

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

    VREF / V VIN / V8-bit binary representation

    Calculations Answer0.0

    0.40.8

    1.2

    1.6

    2.0

    2.4

    2.8

    3.2

    3.6

    4.0

    4.5 4.5 11111111

    V  REF = reference voltage

    V  IN = input analog voltage

     3.3.   Reading Exercise

    Download the datasheet for the ADC0804(you can also search for ADC0801) analog to digitalconverter. 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

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    6/14

    DIGLAB5: Control of Analog to Digital Converters 

    6

    4.  IN-LAB 

    Allotted Completion

    Time:

    2 hours

    Required lab

    Equipment:

    1 printed copy of the digital lab5 manual (students must bring to the lab)

    1 - DC dual power supply

    1 - Fluke Multimeter

    1 - 1 small breadboard

    1 - ADC08040 A/D Converter IC8 – LEDs(4 yellow LEDs & 4 red LEDs)

    1 - 10k Ω Potentiometer

    1 - 1.2k Ω resistor pack1 - 10k Ω resistor

    2 – 1k Ω resistors

    1 - 10μF capacitor1 – 150pF capacitor2 – 0.1μF capacitors

    Connecting wires

    1 - Pliers/Wire Cutter/Wire Nippers (students must bring to the lab)

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    7/14

    DIGLAB5: Control of Analog to Digital Converters 

    7

     4.1. 

     In-Lab Procedure

     ADC0804

    10kΩ

    10μF

    150μF

    0.1μF

    0.1μF

     A GND

    D GND

    START

    1.2kΩ resistor pack 

    10kΩ

    VREF

    VREF

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    20

    19

    18

    17

    16

    15

    14

    13

    12

    11MSB

    LSB

    VREF / 2

    Location A

    Wire X

    1kΩ 1kΩVREF  

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

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    8/14

    DIGLAB5: Control of Analog to Digital Converters 

    8

    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 inputvoltage 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.

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    9/14

    DIGLAB5: Cont

    For VREF = 3V 

    VIN / VStatus of LEDs( 1 or 0 ) 8-b

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

    0.0

    0.4

    0.81.2

    1.6

    2.0

    2.4

    2.8

    3.0Table 3: In-lab exercise results table(reference voltage = 3V)

    For VREF = 4.5V

    VIN / VStatus of LEDs(ON or OFF) 8-b

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

    0.0

    0.6

    1.2

    1.8

    2.4

    3.0

    3.64.2

    4.5Table 4: In-lab exercise results table(reference voltage = 4.5V)

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    10/14

    DIGLAB5: Control of Analog to Digital Converters 

    10

     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] 

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    11/14

    DIGLAB5: Control of Analog to Digital Converters 

    11

    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] 

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    12/14

    DIGLAB5: Control of Analog to Digital Converters 

    12

    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 don’t 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 V REF =

    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 

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    13/14

    DIGLAB5: Control of Analog to Digital Converters 

    13

    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.

  • 8/18/2019 DIGLAB5 - Control of Analog to Digital Converters Aug 28

    14/14

    DIGLAB5: Control of Analog to Digital Converters 

    14

    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:

    All Groups: Monday 2nd

    November 2009 at 12 noon

    Feedback on Lab 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 thereanything 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