ENGR 210 Lab 11: Analog to Digital Conversion

Similar documents
Digital to Analog and Analog to Digital Conversion

Decimal Number (base 10) Binary Number (base 2)

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

The components. E3: Digital electronics. Goals:

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

CHAPTER 11: Flip Flops

ASYNCHRONOUS COUNTERS

Digital Logic Elements, Clock, and Memory Elements

Lecture 8: Synchronous Digital Systems

FORDHAM UNIVERSITY CISC Dept. of Computer and Info. Science Spring, Lab 2. The Full-Adder

Gates, Circuits, and Boolean Algebra

Counters and Decoders

ARRL Morse Code Oscillator, How It Works By: Mark Spencer, WA8SME

Low Cost Pure Sine Wave Solar Inverter Circuit

EXPERIMENT 8. Flip-Flops and Sequential Circuits

Basic Logic Gates Richard E. Haskell

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Chapter 6: From Digital-to-Analog and Back Again

LAB 7 MOSFET CHARACTERISTICS AND APPLICATIONS

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

Upon completion of unit 1.1, students will be able to

OPERATIONAL AMPLIFIERS

Lab 11 Digital Dice. Figure Digital Dice Circuit on NI ELVIS II Workstation

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Electronics Merit Badge Class 3. 1/30/2014 Electronics Merit Badge Class 3 1

Lab 5 Operational Amplifiers

Wiki Lab Book. This week is practice for wiki usage during the project.

3-Digit Counter and Display

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Operating Manual Ver.1.1

A Lesson on Digital Clocks, One Shots and Counters

2 : BISTABLES. In this Chapter, you will find out about bistables which are the fundamental building blocks of electronic counting circuits.

A Lesson on Digital Clocks, One Shots and Counters

Conversion Between Analog and Digital Signals

Interfacing To Alphanumeric Displays

Electronics Technology

Micro-Step Driving for Stepper Motors: A Case Study

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Supply voltage Supervisor TL77xx Series. Author: Eilhard Haseloff

1.1 The 7493 consists of 4 flip-flops with J-K inputs unconnected. In a TTL chip, unconnected inputs

Development of a Simple Sound Activated Burglar Alarm System

MECE 102 Mechatronics Engineering Orientation

High voltage power supply (1 to 20 KV)

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION

Content Map For Career & Technology

Using Op Amps As Comparators

Cornerstone Electronics Technology and Robotics I Week 15 Voltage Comparators Tutorial

Measuring Electric Phenomena: the Ammeter and Voltmeter

ECEN 1400, Introduction to Analog and Digital Electronics

A Digital Timer Implementation using 7 Segment Displays

CS311 Lecture: Sequential Circuits

EGR 278 Digital Logic Lab File: N278L3A Lab # 3 Open-Collector and Driver Gates

PURDUE UNIVERSITY NORTH CENTRAL

Development of a Single Phase Automatic Change-Over Switch

W03 Analysis of DC Circuits. Yrd. Doç. Dr. Aytaç Gören

Chapter 2 Logic Gates and Introduction to Computer Architecture

Transistor Amplifiers

Programming A PLC. Standard Instructions

Controlling a Dot Matrix LED Display with a Microcontroller

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

BINARY CODED DECIMAL: B.C.D.

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

Experiment #5, Series and Parallel Circuits, Kirchhoff s Laws

LAB4: Audio Synthesizer

Objectives: Part 1: Build a simple power supply. CS99S Laboratory 1

Diode Applications. As we have already seen the diode can act as a switch Forward biased or reverse biased - On or Off.

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

RC Circuits and The Oscilloscope Physics Lab X

3.Basic Gate Combinations

Yrd. Doç. Dr. Aytaç Gören

Digital Electronics Detailed Outline

Module 3: Floyd, Digital Fundamental

DEPARTMENT OF INFORMATION TECHNLOGY

Bipolar Transistor Amplifiers

Sequential Logic: Clocks, Registers, etc.

Interfacing Analog to Digital Data Converters

Memory Elements. Combinational logic cannot remember

CMOS, the Ideal Logic Family

GLOLAB Two Wire Stepper Motor Positioner

Rectifier circuits & DC power supplies

Lab 7: Operational Amplifiers Part I

7. Latches and Flip-Flops

Wires & Connections Component Circuit Symbol Function of Component. Power Supplies Component Circuit Symbol Function of Component

PLL frequency synthesizer

Design Project: Power inverter

Electronic WorkBench tutorial

Experiment teaching of digital electronic technology using Multisim 12.0

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

Digital Controller for Pedestrian Crossing and Traffic Lights

EXPERIMENT 7 OHM S LAW, RESISTORS IN SERIES AND PARALLEL

Programming Logic controllers

Designing Gain and Offset in Thirty Seconds

Voltage/current converter opamp circuits

Diode Applications. by Kenneth A. Kuhn Sept. 1, This note illustrates some common applications of diodes.

Experiment 8 : Pulse Width Modulation

Transcription:

ENG 210 Lab 11: Analog to Digital Conversion In this lab you will first investigate the operation and the quantization effects of an A/D converter. A. BACKGOUND 1. Displays We have been using s as indicators in the EWB simulations. There are two ways to use s as indicators as shown in Figure 1. Note that these circuits do not work with all logic families Ñ many times the logic gates cannot supply the current which the needs. In these cases you have to use an external transistor to supply extra current. The technique of using an external transistors can also be used to operate relays and lights from a logic gate. Although only an inverter is shown in Figure 1 you can use any logic gate which has the necessary current output. The actual current is dependent upon the particular used. If we assume a current of 10 ma and a typical voltage across the of about 1.7 volts, we can calculate =(5 1.7)/0.01 ma = 3.3/0.1=330Ω. Using resistors which are much smaller than this can burn out the output of the integrated circuit and larger values are better. 5 volts 5 volts 5 volts (a) Using TTL output as a current sink. (b) Using TTL output as a current source Figure 1. driver circuits 2. Analog to Digital (A/D) and Digital to Analog (D/A) conversion Data that is obtained from a physical system is generally in analog form, i.e., it varies in time and can have any voltage between some maximum and minimum value. 1

In order to do computerbased processing of that data it is necessary to first convert the information from analog to digital form. This is done by quantizing, or subdividing, the voltage range into a number of finitesize steps. The number of steps is usually 2 n ÊÊ1, where n is the number of bits available for the binary word that will represent each level. An example of this quantization is shown in Figure 2, where nê=ê3 has been chosen. As can be seen by comparing the two columns at the right of the figure, there is always some error introduced in the conversion since no matter how many bits are chosen, there is always a step between levels. 111 Digital readout (V) 7 Analog Voltage 6.5 7.5 110 6 5.5 6.5 101 5 4.5 5.5 100 4 3.5 4.5 011 3 2.5 3.5 010 2 1.5 2.5 001 1 0.5 1.5 000 1/8 2/8 3/8 4/8 5/8 6/8 7/8 FS 0 0 Fraction of Full Scale Figure 2. Three bit A/D quantization effect. There are various approaches to the implementation of an A/D converter. One of these makes use of a set of comparators whose inputs are referenced to the quantized voltage levels. This is the fastest type of A/D converter available and is often called a Òflash: converter. To demonstrate the quantization effect we will again use a Electronics Workbench simulation. (ItÕs a bit complicated to build and test in one lab period.) The fabricated circuit consists, in part, of a 3bit, comparatorbased A/D converter, complete with a digital display. The output of the converter is connected to the input of an op ampbased D/A converter whose output can, in turn, be displayed on a scope or a DMM. The complete simulation circuit is shown in Figure 3. 2

5V 2 X3 Z 1 10KΩ 10KΩ X1 Z 0 22KΩ Output X 0 Input Figure 3. A/D, D/A demonstration circuit. There are many other approaches to converting analog numbers to digital representations. 2. You have already seen one other type of A/D converter in the 555 timer lab Ñ this is a V/F converter where an analog voltage can be used to control the frequency of a 555 timer. If a computer counts the number of output pulses over a fixed period of time, this count is a digital representation of the analog input quantity. 3. Another common type of A/D converter uses an input voltage to charge up a capacitor. The time that it takes to discharge this voltage is timed by a computer or a digital counter. This is the type most often found in digital instruments such as a DMM and, depending upon the exact details of the implementation, is called a single or dual slope integrating A/D. 4. Yet another common A/D called the successive approximation A/D uses a computer to generate a digital code which is sent to a D/A converter. This digitally generated voltage is compared to the input voltage with a comparator. If the input voltage is higher than the generated voltage the code number is increased, if the input voltage is less than the generated voltage the code number is decreased. The computer typically uses a binary search technique to rapidly find the largest code number which will generate the largest voltage less than or equal to the input voltage. The difference between these converters lies in the details of how they work. The socalled ÒflashÓ A/D converter is the fastest. The dual slope integrating A/D converter is among the most accurate (especially using inexpensive components) and is among the slowest. The V/F converter is often the cheapest and is found in 3

systems which already have a microprocessor, such as a computer controlled appliance. B. LAB PEPAATION 1. Complete the truth table for the A/D section of the circuit in Figure 3. You can use the supplied Electronics Workbench simulation for this Ñ you do not need to build the circuit. ecord your results in Data Table 1. C. LAB INSTUCTIONS Part 1: More logic circuits 1. You will use a single 7400 logic gate to determine the actual LOW and HIGH logic levels of a logic gate. Select a single gate from the 7400. Tie its two inputs together. Connect these inputs to the positive adjustable power supply output using a 10k resistor. Make sure the adjustable power supply is set to zero volts. Measure the output of your selected gate with a DMM. It should be near 5 volts if the input is zero. emember that you have it connected essentially as an inverter. Now slowly increase the power supply voltage while monitoring the Q output with a DMM. ecord the voltage at which the output goes high in Data Table 2. 2. epeat Step 1 except now start the input voltage at 5 volts and decrease the input voltage. Since the input is initially HIGH the output should be LOW. At some value of the input voltage, the output will change. ecord this voltage in Data Table 2. 3. Add the circuit of Figure 1(a) to the output of your 7400 gate. Use the variable power supply to vary the input voltage to the 7400 gate between 0 and 5 volts. Does the function to indicate the output state of the gate? Measure the voltage drop across the and the resistor. Compute the current through the diode. ecord these measurements in Data Table 3. 4. Using the gates on a 7400, build the circuit shown in Figure 4. Q S Q* Figure 4. S Flipflop Determine the truth table for this circuit and record your measurements in Data Table 4. This is actually a S flip flop and can have very perplexing behavior. Unlike the combinational logic discussed in class it works based upon the two inputs ( and S) AND the current output. To help you understand this circuit the theoretical behavior of an S flipflop is shown in Figure 5. Notice that the new 4

output (Q n1 ) is described in terms of, S and the previous value of Q (called Q n ). DO NOT CONFUSE Qn1 with the Q* shown in Figure 4 Ñ Q n1 is the NEXT state (value) of the Q output of Figure 4. The actual operation of the S flipflop can be more easily understood by a simple explanation. The (also called the ESET) will always reset the Q output to zero (LOW) irregardless of the previous state of the output. The S (also called the SET) will always set the Q output to one (HIGH) irregardless of the previous state of the output. There will be no change in the Q output if both and S inputs are zero (LOW). However, there is a problem if both and S inputs are one (HIGH). Technically, you are trying to SET and ESET the output at the same time. As a result the output will be random and, consequently, undefined. During all of this time we are not concerned with the Q* output of Figure 4 and, in fact, it does not really behave as the NOT of Q. S Q n (previous state) Q n1 (new state) 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 undefined 1 1 1 undefined Figure 5. Theoretical operation of S Flipflop Your final objective is to use the EWB simulation to observe and understand the operation of the A/D and D/A converters and the quantization effect that is produced by the A/D converter. The circuit diagram of the simulated circuit is shown in Figure 3. Note that the EWB simulation may take a long time to converge for some of the input values. 1. A voltage divider which can go from 5 volts to 5 volts is used to generate an input for the A/D converter. It can be made to increase the input voltage 1% by typing a ÒÓ on the keyboard; it can decrease 1% by typing ÒrÓ on the keyboard. Using the EWB simulation verify the truth table you constructed in Data Table 1. 2. There is also a D/A converter connected to the outputs of the A/D converter, i.e., the s. This is only a two bit converter. Determine the truth table for the D/A converter, i.e. what combination of input bits produces what output voltage? ecord your results in Data Table 5. 5

DATA AND EPOT SHEETS FO LAB 11 Student Name (Print): Student Signature: Student Name (Print): Student Signature: Student ID: Date: Student ID: Date: Lab Group: Data Table 1. Truth table for A/D converter X 3 X 1 X 0 Z 1 Z 0 V in < 0V x x 0 < V in < 0.5 0.5 < V in < 1.5 1.5 < V in < 2.5 2.5 < V in < 3.5 V in > 4V Data Table 2. Voltage at which digital logic switches Input voltage at which output switches Initial Measured V out Measured V out after switch Increasing V in from 0 volts Decreasing V in from 5 6

volts Data Table 3. indicator characteristics (for illuminated) Measured Calculated Voltage across Voltage across Current through Data Table 4. Truth table for S flipflop S Q n Q n1 0 0 0 1 1 0 1 1 Data Table 5. D/A Converter Characteristics X 3 X 1 X 0 V out 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 1 1 1 1 1 7

Questions 2. Why does Data Table 5 only show five input codes? HINT: Can the A/D converter generate a an output code X 0 X 1 X 3 =00010? 3. Using Data Table 1 and Data Table 5 explain how the digital logic converts the A/D converter outs X 0 X 1 X 3 into the twobit code Z 0 Z 1 used by the D/A converter? 4. What are the voltage levels at the output of the D/A converter? What range of voltage does each level of the input code Z 0 Z 1 represent? 5. If we were to have a 3bit A/D converter operating over the same voltage range as the 2bit, what would be the new voltage levels? 8