ECE345_Fall_2009 - ECE 345 Electronic Instrumentation...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ECE 345 Electronic Instrumentation & Systems Course e-Notes and Lab Manual Fall 2009 Copyright © 2009 by Gregory M. Wierzba. All rights reserved. Preface Ownership The content of this e-book is the sole property of Gregory M. Wierzba and is copyrighted. You may print a hard copy for your individual use. You may also store the entire content of this e-book on your personal computer. Any other reproduction or distribution, in whole or in part, is strictly prohibited. ECE 345 ECE 345: Electronic Instrumentation and Systems is 3-credit course taught at Michigan State University for non-Electrical and Computer Engineering majors. There are two 50-minute lectures per week and one 3-hour lab per week. The catalog description for this course is: Electrical and electronic components, circuits and instruments. Circuit laws and applications, frequency response, operational amplifiers, semi-conductor devices, digital logic, counting circuits. The prerequisites for this course are current enrollment or completion of fourth semester calculus and a calculus based physics course. The textbook used in this course is : Rizzoni, Principles and Applications of Electrical Engineering, McGraw-Hill, 2007, 5th Edition or later. Why e-Notes These e-Notes are the actual lecture notes used in the ECE 345 course which consists of about thirty 50-minute lectures. The e-Notes contain much more detail that is usually found in most textbooks. This includes derivations, proofs and a strong emphasis on applications. Using e-Notes allows the instructor to go through many more examples in a 50-minute lecture than is possible by using a black board. The benefit of this approach is that students get more experience in problem solving than their counterparts at other universities. The order and sections covered in the textbook are listed in the Table of Contents. Associated with each chapter are a set of Supplemental Problems and Solutions. These are examples not contained in the textbook. For the most part, the Supplemental Problems are applications of the topics discussed in the e-Notes. Normally there is not enough time in class to go over these examples, so it is suggested that you attempt to do these problems outside of class. The suggested pace is listed in the section Index for Supplemental Problems. Please note that each chapter of the e-Notes is numbered starting with page one. The lab lectures consist of e-Notes explaining the ideas and concepts of each lab experiment. The lab experiments are intended to teach measurement techniques as well as reinforce concepts. As you complete each task in lab you will be asked to record, calculate and evaluate your data. You cannot go on to the next step or circuit unless each task is completed as stated in the lab experiment. This method emphasizes accuracy over speed. Cover The ECE 345 cover contains a partial schematic from Lab IX: Light Activated Exhaust Fan Table of Contents Chapter 1: 1.3 1.4 1.5 Introduction to Electrical Engineering Fundamentals of Engineering Exam Review Brief History of Electrical Engineering System of Units Prefixes, Engineering Notation Chapter 1: Supplemental Problems and Solutions Chapter 2: Fundamentals of Electric Circuits 2.2 2.3 2.1 2.4 2.6 2.8 Charge, Current, and Kirchhoff’s Current Law Charge, Current, Nodes, Conservation of Charge, Kirchhoff’s Current Law, Interpretation of Signs Voltage and Kirchhoff’s Voltage Law Voltage, Closed Path, Conservation of Energy, Kirchhoff’s Voltage Law, Interpretation of Signs Ideal Voltage and Current Sources Ideal Voltage Source, V-I Characteristics, Ideal Current Source, V-I Characteristics Electric Power and Sign Convention Power, Energy, Passive Sign Convention Resistance and Ohm’s Law Ohm’s Law, Conductance, Power, Resistor, Open Circuit, Short Circuit, Series Resistances, Voltage Divider, Parallel Resistances, Current Divider Measuring Devices Ohmmeter, Ammeter, Voltmeter, Wheatstone Bridge Chapter 2: Supplemental Problems and Solutions Chapter 9: Semiconductors and Diodes 9.3 9.2 9.5 Chapter 9: Circuit Models for the Semiconductor Diode V-I Characteristics, Piecewise Linear Model, Transition Point, Assumed States for Analysis, Strategy for Guessing States The Semiconductor Diode Non-Ideal Diode, V-I Characteristics, Piecewise Linear Model, LightEmitting-Diodes Zener Diode Piecewise Linear Model, Shunt Regulator Supplemental Problems and Solutions Chapter 8/15: Operational Amplifiers and Comparators 8.2 Chapter 8: The Operational Amplifier (Op-Amp) Ideal Op-Amp, 0V-0A Property, Inverting Amplifier, Power Supply Limitations, Non-Inverting Amplifier Comparator Ideal Comparator, Inverting Crossing Detector, Non-Inverting Crossing Detector Supplemental Problems and Solutions Chapter 3: Resistive Network Analysis 15.5 3.2 3.3 3.5 3.6 3.4 The Node-Voltage Method Node-Voltage Inspection Property, Node-Voltage Analysis with Current Sources, Cramer’s Rule, Node-Voltage Analysis with Voltage Sources The Mesh-Current Method Planar Circuits, Mesh-Current Inspection Property, Mesh-Current Analysis with Voltage Sources, MATLAB, Mesh-Current Analysis with Current Sources The Principle of Superpositon Superpositon, Zero Sources, Proportionality, Linearity One Port Networks and Equivalent Circuits Thevenin’s Theorem, Norton’s Theorem, Source Transformations Dependent Sources Dependent Voltage Sources, Dependent Current Sources, Node-Voltage Analysis with Dependent Sources, Mesh-Current Analysis with Dependent Sources, Op-Amp, Inverting Amplifier - Revisited, Modeling with Dependent Sources, Stereo Pan-Pot / Fader Circuit, Thevenin and Norton Equivalent Circuits with Dependent Sources Chapter 3: Supplemental Problems and Solutions Chapter 10: Transistor Fundamental 10.2 The Bipolar Junction Transistor (BJT) NPN, Active Region, Saturation Region, Cut-Off Region, Edge-of-Saturation, Edge-of-Cut-Off, PNP, Active Region, Saturation Region, Cut-Off Region, Edge-of-Saturation, Edge-of-Cut-Off Chapter 10: Supplemental Problems and Solutions Chapter 5: Transient Analysis 4.1 Energy-Storage Circuit Elements Capacitance, V-I Characteristics, Power and Energy, Capacitor, Insulation Resistance, Parallel Capacitance, Series Capacitance, Inductance, V-I Characteristics, Power and Energy, Inductor, Equivalent Series Resistance, Series Inductance, Parallel Inductance 5.4 Transient Response of First-Order Circuits Step Response of an RC Circuit, RC Circuit Algorithm, Significance of the Time Constant, Step Response of an RL Circuit, RL Circuit Algorithm, Natural and Forced Response, Transient Response with an AC Source Chapter 5: Supplemental Problems and Solutions Chapter 4: AC Network Analysis 4.2 4.4 4.5 Time-Dependent Signal Sources Sinusoids, Cycle, Period, Frequency, Phase Angle, Amplitude, Average and RMS Values Phasors and Impedance Vector Representation of Sinusoids, Phasors, Euler’s Identity, Complex Numbers, Rectangular Form, Polar Form, Phasor Transform, Inverse Phasor Transform, Complex Algebra, Kirchhoff’s Voltage Law with Phasors, Kirchhoff’s Current Law with Phasors, Ohm’s Law in the Frequency Domain, Impedance, Admittance AC Circuit Analysis Methods Series Impedances, Phasor Analysis Algorithm, Series Resonance Chapter 4: Supplemental Problems and Solutions Chapter 6: Frequency Response and Systems Concepts 6.1 6.3 Sinusoidal Frequency Response Fourier Series Filters Low-Pass Filter, Bode Plots, High-Pass Filter, Band-Pass Filter, Band-Stop (Notch) Filter Lab I: Introduction to the Oscilloscope, Function Generator and Digital Multimeter Lab II: Introduction to Prototyping Circuits Lab III: Diode Curve Tracer Lab IV: Introduction to Microcontrollers Lab V: Build Your Own Digital DC Voltmeter Lab VI: Serial Liquid Crystal Display Lab VII: Power Amplifier for a Portable CD Player Lab VIII: DC Power Supply and Regulator Lab IX: Light Activated Exhaust Fan Index for Supplemental Problems Recommended Supplemental Problems after covering the e-Note pages indicated: S1.1 Ch. 1, p.3 S2.1 S2.2 S2.3 S2.4 S2.5 S2.6 S2.7 S2.8 S2.9 S2.10 S2.11 S2.12 S2.13 S2.14 S2.15 S2.16 Ch. 2, p1 Ch. 2, p1 Ch. 2, p3 Ch. 2, p8 Ch. 2, p13 Ch. 2, p14 Ch. 2, p16 Ch. 2, p16 Ch. 2, p24 Ch. 2, p24 Ch. 2, p24 Ch. 2, p24 Ch. 2, p24 Ch. 2, p24 Ch. 2, p26 Ch. 2, p26 S9.1 S9.2 S9.3 S9.4 S9.5 Ch. 9, p5 Ch. 9, p5 Ch. 9, p6 Ch. 9, p8 Ch. 9, p10 S8.1 S8.2 S8.3 S8.4 S8.5 Ch. 8, p3 Ch. 8, p3 Ch. 8, p6 Ch. 8, p6 Ch. 8, p10 S10.1 S10.2 S10.3 S10.4 S10.5 Ch. 10, p6 Ch. 10, p6 Ch. 10, p11 Ch. 10, p12 Ch. 10, p12 S3.1 S3.2 S3.3 S3.4 S3.5 S3.6 S3.7 S3.8 S3.9 S3.10 S3.11 S3.12 S3.13 S3.14 S3.15 S3.16 S3.17 Ch. 3, p6 Ch. 3, p9 Ch. 3, p16 Ch. 3, p17 Ch. 3, p23 Ch. 3, p29 Ch. 3, p34 Ch. 3, p38 Ch. 3, p39 Ch. 3, p39 Ch. 3, p39 Ch. 3, p41 Ch. 3, p43 Ch. 3, p46 Ch. 3, p49 Ch. 3, p49 Ch. 3, p49 S5.1 S5.2 S5.3 S5.4 S5.5 S5.6 S5.7 S5.8 S5.9 S4.1 S4.2 S4.3 S4.4 S4.5 S4.6 S4.7 Ch. 5, p2 Ch. 5, p2 Ch. 5, p2 Ch. 5, p2 Ch. 5, p7 Ch. 5, p12 Ch. 5, p20 Ch. 5, p20 Ch. 5, p24 Ch. 4, p10 Ch. 4, p10 Ch. 4, p23 Ch. 4, p23 Ch. 4, p23 Ch. 4, p23 Ch. 4, p25 ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. Copyright © 2003 by Gregory M. Wierzba. All rights reserved. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ELECTRONIC INSTRUMENTATION AND SYSTEMS LABORATORY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING MICHIGAN STATE UNIVERSITY I. TITLE: Lab I - Introduction to the Oscilloscope, Function Generator and Digital Multimeter II. PURPOSE: The oscilloscope, function generator and digital multimeter are the basic tools in the measurement and testing of circuits. This lab introduces the first time operation of these instruments. The concepts covered are: 1. the resistor color code 2. accuracy of components and instruments. The laboratory techniques covered are: 1. voltage amplitude and time measurement with an oscilloscope; 2. measurement of resistors 3. measurement of resistance using a 4-wire probe III. BACKGROUND MATERIAL: See Lab Lecture Notes. IV. EQUIPMENT REQUIRED: 1 1 1 V. HP Infinium Oscilloscope HP33120A Function Generator / Arbitrary Waveform Generator Fluke 8840A Digital Multimeter PARTS REQUIRED: 1 1 1 10S ± 5% (Brown-Black-Black-Gold) resistor 470 S ± 5% (Yellow-Violet-Brown-Gold) resistor 10 kS ± 5% (Brown-Black-Orange-Gold)) resistor Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 1 VI. LABORATORY PROCEDURE: A) Initial Operation of the Infinium Oscilloscope 1. Press in the power switch button (k) found in the lower left corner of the front panel. It takes a few minutes to boot-up the scope. Wait until a grid appears on the screen before going to the next step. 2. Press the Default Setup button located near the top center of the scope. The display will pause momentarily while the scope is configured to its default settings. This will clear what the last user had set. 3. The scope can also be viewed with the monitor on your lab bench. Hit the scroll key twice to toggle the display between the PC and the scope. B) The HP 33120A Function Generator / Arbitrary Waveform Generator 1. The laboratory function generator is a precision voltage source of sine waves, square waves, triangle waves, cardiac waveforms, random noise, ramping waveforms and exponential waveforms. It can also generate almost any waveform with up to 16,000 data points by using external software. 2. Press the Power switch found on the lower-left side to the On position. The display should light up in green with 1.000,000,0 KHz displayed. C) 1. Waveform Measurement Coaxial cable is the most common method of connecting an oscilloscope to signal sources and equipment having output connectors. The outer conductor of the cable shields the central signal conductor from hum and noise pickup. These cables are usually fitted with a BNC ( BayoNet Connected ) connector on each end. You can find BNC cables hanging on the wall. Connect a BNC cable from the OUTPUT of the function generator found on the lower-right side of the function generator to the channel Ø input terminal of the scope found on the lower-center of the scope. Our first task will be to generate a voltage equal to 0.3 sin (2B 500 t). 2. Press the button on the function generator with the sine wave symbol on it. This is the upper-left button in the set of six buttons under FUNCTION / MODULATION of the function generator. A sine wave symbol should be displayed on the far right of the green display. This indicates that we have selected this particular waveform. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 2 3. We next need to set the frequency of the waveform. This is done with the Freq button. This is the lower-left button in the set of three buttons under MODIFY. A green blinking digit should appear. The value is entered by rotating the knob on the upper right side. Rotate it until 500.000,00 Hz is displayed. The frequency is now selected to be 500 Hz. 4. The amplitude of our waveform is set with the Ampl button. This is located to right of the Freq button. Push this button and the peak-topeak value of the waveform can be set. Rotate the knob until a value of 600.0 mVPP is diplayed. You now have generated a voltage with the expression 0.3 sin (2B 500 t). 5. The function generator is calibrated for a connection to a circuit with a 50 S input resistance. Our scope has one built inside of it. Press the Input button on the scope for channel Ø. This is located in the center of the scope above a small knob with a yellow dot in its center. A red light with 50 S should be on. 6. Press the Auto-Scale button located near the top-center of the scope. The display will pause momentarily while the scope adjusts the x- and y-axes. A waveform should now appear on your scope screen. If not, ask your lab instructor for help. 7. The number found in the top-left of the screen is the value for each of the vertical major divisions. These are the large squares of the screen grid. Counting the number of these divisions from the highest to lowest point of your sine wave and multiplying this times the setting displayed in the top-left of the screen is the peak-to-peak value of your sine wave. This may be difficult to read depending on what the autoscale function selected. You can adjust the value of the vertical volts/div by using the large knob in the group labeled Vertical located in the center of the scope. Note that the channel Ø input has a yellow dot painted on the knob and the channel Ù input has a green dot painted on the knob. The display colors also agree with this color coding, that is, channel Ø traces are displayed in yellow and the channel Ù traces are displayed in green. If your volts/div setting is not 100 mV/div, turn the large knob for channel Ø and adjust the volts/div scale to this value. (If you turned the small knob with a yellow dot painted on it by mistake, press the Auto-Scale button and repeat the above step). Note that there is a ground symbol with a number 1 on the far right of the screen. This indicates where the zero volt reference is located for your displayed waveform. (There may also be a letter T displayed next to the ground symbol. This will be explained in a later lab.) Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 3 8. Detach the Lab Report section of this lab. You will hand this in at the end of lab. A Lab Report is required for each member of your group. Calculate the measured peak-to-peak value of your sine wave using the setting of the scope, that is, the voltage per division times the number of major divisions. Record this, and all data that follows, as indicated in the Lab Report. If your calculated peak-to-peak voltage is not 0.6, ask your instructor for help. 9. The number in the lower-center-left of the scope screen is value of the horizontal divisions per unit of time. This may be set to 500 :sec/div. The large knob in the group labeled Horizontal in the center of the scope allows the user to adjust the seconds/division. Turn this knob to 1.00 msec/div and 200 :sec/div and observe what happens. Now set this to 500 :sec/div. Count the number of major divisions per cycle and calculate the period of your sine wave. The frequency of your sine wave is the reciprocal of the period. Calculate the frequency and record in your Lab Report. If this is not 500 Hz, ask your instructor for help. 10. To obtain a hard copy of the scope's screen we need to put the scope in the graphical interface mode. This is done by moving the mouse pointer to the mouse icon in the upper-right corner and clicking once with the left mouse button. Do this and then move the mouse around and verify that the pointer follows on the screen. Move the mouse pointer to the menu bar on top and find File. Under this find Print in the pull down menu. Click on OK to print. In a few seconds or so your output will appear at the printer with a watermark indicating your lab station number. (Your lab station number is on the top shelf of your lab bench.) Go pickup your output. Looking at the output, you may notice the scope set up information is listed underneath your scope picture. Although sometimes useful information, we generally will not need this information. Again move the mouse pointer to the menu bar on top and find File. Under this find Print in the pull down menu. This time uncheck Include Setup Information and click on OK to print. Make additional copies of your waveform for each member of your lab group by repeating this procedure. Mark this section letter and number on the top right side of your plot and attach it as indicated in the Lab Report. Discard the first printout. Please note: Once you uncheck Include Setup Information, it will remain unchecked until the scope is turned off. So next lab and all of the labs that follow you will need to do this the first time you print. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 4 11. Now that you are familiar with the generation of a sine wave, let’s look at another waveform. Press the button of function generator with the square wave on it. It is to the right of the sine wave button. You should see a 0.6 volt peak-to-peak square wave with a frequency of 500 Hz. You don’t need to print this result. Likewise press the button with the triangle wave on it which is to the right of the square wave button. Observe the screen but do not print. Likewise press the button with the ramp wave on it which is to the right of the triangle wave button. Observe the screen but do not print. 12. Return to the sine wave by pressing the appropriate button. The amplitude of our waveform should still be displayed. Press the Freq button to display the frequency of your sine wave. One digit should be blinking. When you rotate the knob it is this digit that varies. Press the button with the symbol > which is located in the group of five buttons labeled Menu just below the knob. The flashing digit should move to the right. Press it a second time. Rotate the knob and watch what happens. Likewise, press the button with the symbol < which is located in the group of five buttons labeled Menu. Rotate the knob and watch what happens. 13. Using the knob and arrow keys, set the function generator to display 3.25 sin (2B 833 t). [ Remember that the function generator’s amplitude is set as peak-to-peak.] Your waveform should be chopped off at the top and bottom of the screen. Hit the Auto-Scale button on the scope. The scope attempts to place the waveform on the screen. The most accuracy is obtained when the waveform is the largest on the screen. Adjust the Vertical scale of the scope using the large knob to display as large a waveform as possible without clipping of the top or bottom of the waveform. The same is true for the time base accuracy. Adjust the Horizontal scale of the scope using the large knob to display at most one period. 14. Counting minor divisions is difficult if the peaks of waveform are not directly on the center vertical line. The waveform can be moved from left to right using the small knob in the group Horizontal of the scope. Count the number of major and fraction of major vertical divisions by moving the waveform to the left or right and calculate the peak-to-peak amplitude of your waveform. Record. Likewise calculate the period and Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 5 frequency. Record. 15. Print this waveform for each member of your group. Mark this section letter and number on the top right side of your plot and attach it as indicated in the Lab Report. 16. Turn-off the function generator and scope. Disconnect the BNC cable between the function generator and the scope. D) Fluke 8840A Digital Multimeter 1. The Fluke 8840A is a 5½ digit, six function, autoranging precision multimeter. The measurement functions are DC and AC Voltage, 2-Wire and 4-Wire Resistance, and DC and AC current. All six functions have manually selectable ranges. These functions may also be automatically ranged by pressing the AUTO button. You will need two pairs of banana-to-grabber wires. These are on racks on the wall. Connect a pair of banana-to-grabber wires to the HI and LO INPUT terminals. Press the green POWER push button located in the lower right corner. Press the kS 2 Wire white buttons. Press the AUTO range button. 2. Locate the clear plastic parts box supplied with this experiment. The list of needed parts is in Section V. Record the color code of each resistor. Using the color code found in the Lab Lecture, calculate the nominal resistance value, the lower limit of tolerance, the upper limit of tolerance and place in the table found in the Lab Report. Measure the resistors by connecting the grabber clip to each end of the resistor. The last digits may drift due to the “aging” of the resistor. If your values are very unstable it may be due to a high contact resistance between the grabbers and the wire of the resistor. This is caused by oxidation of the metal. One quick way to clean the contact is to hold the resistor firm and rotate each grabber clip. Try not to bend the resistor wire. Record all digits of the reading of the digital multimeter including zeros at one instant of time even if the last digit is still drifting. Assuming that the digital multimeter has no error, are your resistors within the tolerance limits? 3. Assume that the Resistance Accuracy specifications for the digital multimeter are that given in the Lab Lecture. For the largest measured resistor in your table, calculate the instrument lower resistance limit and instrument upper resistance limit. Under what conditions is the assumption made in the last question of 2. reasonable? Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 6 4. In order to understand the function of the AUTO range button, press the other gray range buttons to the left of AUTO to see which range was automatically selected. What conclusions can you draw from these observations? 5. Connect the second pair of banana-to-grabber wires to the HI and LO SENSE terminals. Connect the 10S resistor as shown in the Lab Lecture on page 6. Press AUTO. Record (again) the resistance in the kS 2 Wire mode. Press the kS 4 Wire white button. Record the resistance. From this data, what is the resistance of the wires and grabber clips? E) Clean up Please return all wires to the racks from which they were taken. Turn off all equipment. Assemble your lab report, staple it and hand it in to your instructor. Please read and sign the Code of Ethics Declaration on the cover. VII. ASSIGNMENT FOR NEXT WEEK 1. Your lab report for this experiment is due at the end of the lab period. Your graded report will be returned next week. Purchase a three ring binder. Place this lab and the following experiments in this binder. Also include graded reports when returned. Bring this binder to lab each week. You will need it to look up procedures or methods of measurement. 2. Read the next lab experiment. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 7 Lab Report Lab I - Introduction to the Oscilloscope, Function Generator and Digital Multimeter Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Partner: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lab Section Number .............................................. Code of Ethics Declaration All of the attached work was performed by our lab group as listed above. We did not obtain any information or data from any other group in this lab. Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 8 VI-C-8 Voltage per division = Number of divisions = Measured Voltage Peak-to-Peak = VI-C-9 Seconds per division = Number of divisions = Measured Period = Measured Frequency = VI-C-10 Mark VI-C-10 on the top right side of your plot and attach as the next page. VI-C-14 Voltage per division = Number of divisions = Measured Voltage Peak-to-Peak = Seconds per division = Number of divisions = Measured Period = Measured Frequency = Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 9 VI-C-15 Mark VI-C-15 on the top right side of your plot and attach as the next page. VI-D-2 Color Code Nominal Resistance Lower Limit Upper Limit Measured Resistance Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. Within Limits? 10 VI-D-3 Measured resistance = Calculation of accuracy. (See page 7 of the Lab Lecture Notes.) Record below. Instrument accuracy = Calculation of instrument lower resistance limit. (See page 8 of the Lab Lecture Notes.) Record below. Instrument lower resistance limit = Calculation of instrument upper resistance limit. (See page 8 of the Lab Lecture Notes.) Record below. Instrument upper resistance limit = Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 11 VI-D-4 VI-D-5 2 Wire Method R = 4 Wire Method R = Resistance of the probe wires and grabber clips = Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 12 ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. = Holes shorted together Bus strip for many connections ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ELECTRONIC INSTRUMENTATION AND SYSTEMS LABORATORY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING MICHIGAN STATE UNIVERSITY I. TITLE: Lab II - Introduction to Prototyping Circuits II. PURPOSE: This lab introduces the use of a Proto-Board for the quick assembly of a circuit without the need to solder wires. The concepts covered are: 1. accuracy of the Infinium; 2. measuring source resistance in linear circuits; 3. terminating cables to suppress reflections; 4. poles and throws of switches; 5. battery performance and characterization. The laboratory techniques covered are: 1. using the Infinium’s Toolbar to measure peak to peak voltages; 2. re-programming the function generator’s calibration for High Impedance loads; 3. measuring DC voltage with a digital multimeter. III. BACKGROUND MATERIAL: See Lab Lecture Notes. IV. EQUIPMENT REQUIRED: 1 1 1 V. HP Infinium Oscilloscope HP33120A Function Generator / Arbitrary Waveform Generator Fluke 8840A Digital Multimeter PARTS REQUIRED: 1 1 1 1 1 1 PB-104 Proto-Board Pliers Wire stripper and cutter D-Cell (mounted on a gray block) Double-Pole-Single-Throw Normally-Open push button switch 10S ± 5% (Brown-Black-Black-Gold) resistor Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 1 VI. LABORATORY PROCEDURE: A) Measurement Toolbar 1. Turn on the oscilloscope. Wait until a grid appears on the screen. Press the Default Setup button to clear the settings of the last user. 2. Connect a BNC cable from the OUTPUT of the HP 33120A function generator found on the lower-right side of the function generator to the channel Ø input terminal of the scope found on the lower-center of the scope. Turn on the function generator. Set the function generator to display 0.3 sin (2B 500 t). [ Remember that the function generator’s amplitude is set as peak-to-peak. ] If you have forgotten how to do this refer back to Lab I. 3. The function generator is calibrated for a connection to a circuit with a 50 S input resistance. Our scope has one built inside of it. Press the Input button on the scope for channel Ø. This is located in the center of the scope above a small knob with a yellow dot in its center. A red light with 50 S should be on. 4. Press the Auto-Scale button located near the top-center of the scope. The display will pause momentarily while the scope adjusts the x- and y-axes. A waveform should now appear on your scope screen. If not, ask your lab instructor for help. 5. If your volts/div setting is not 100 mV/div, turn the large knob for channel Ø and adjust the volts/div scale to this value. If your s/div is not 1 ms/div, turn the large knob for the horizontal and adjust to this value. 6. In the past lab, we have measured levels and periods on the scope by counting divisions. This was done to familiarize you with how the scope display is organized. We will now turn to the auto measurement features of the Infinium. Put the scope in the graphical interface mode by moving the mouse pointer to the mouse icon in the upper-right corner and clicking once with the left mouse button. A measurement toolbar should appear along the left side of the screen. The pictures indicate the measurement but if you place the mouse arrow over the icon a short word description will appear. Locate and click on the peak-to-peak voltage (Vp-p) measurement icon. This is the fifth icon from the top. Because the scope is sampling and measuring continuously, the numbers that appear on the bottom of the screen may be constantly changing. You can stop the scope with Stop button on the top-center of the scope. Do so Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 2 at this time. Detach the Lab Report section of this lab. You will hand this in at the end of lab. A Lab Report is required for each member of your group. Record the current value of Vp-p (1) in section VI-A-6 of the Lab Report 7. The vertical accuracy of the scope is approximately ± 1.25% of the full scale. Calculate the accuracy of your expected reading, that is, ±0.0125 @ (100 mV/div) @ (8 div) = ± 10 mV Thus if we accurately generate a 600 mVp-p sine wave then our scope reading should be somewhere between 590 mV and 610 mV. Was this the case in step VI-A-6? If yes proceed to VI-A-8. If not press the Run button on the top-center of the scope to activate the scope again followed by Stop. If your reading is again slightly outside the expected range you may be experiencing noise pick-up. This will be discussed in a later lab. Proceed to VI-A-8. If your reading is way off, ask your instructor for help. 8. Change the vertical scale to 200 mV/div. Press the Run button followed by the Stop button. Record the current value of Vp-p (1) in your Lab Report. This time you calculate the range of the expected reading and record this range in your Lab Report. Does your measurement fall within this range? 9. Change the vertical scale to 500 mV/div. Press the Run button followed by the Stop button. Record the current value of Vp-p (1) in your Lab Report. Calculate the range of the expected reading and record this range in your Lab Report. Does your measurement fall within this range? 10. Given that you did not change the settings of the function generator in sections VI-A-6, VI-A-8 and VI-A-9, what conclusions can you draw from these three measurements? Record your response in the Lab Report. Answer all questions in complete sentences. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 3 B) Function Generator - Amplitude Calibration 1. Change the vertical scale back to 200 mV/div. Press the Run button. 2. The function generator’s settings for amplitude is defaulted to the case where it is assumed that the function generator is connected to a 50 S load. Let’s see what happens if this is not the case. Press the Input button on the scope for channel Ø. The red light with 50 S should now be off and the yellow 1 MS light for channel Ø should now be on. Your waveform will register as approximately 1.2 V peak-to-peak on the bottom of the scope screen. This is very different from what we set our amplitude to be. 3. We will see later in section VI-D of this lab that very high speed digital or pulsed circuits will not work properly if the cables used to send the signals are not terminated in the characteristic impedance of the cable which is typically 50 S load. In most of this course we will need to use the function generator in audio and low frequency applications where the load is typically much larger than 50 S. We can reset the function generator’s default load of 50 S to a high resistance load by entering into the SYStem MENU. To set the calibration of the function generator’s amplitude to the high resistance option, press the Blue Shift button, followed by pressing the Enter button just above the Shift button. A: MOD MENU should appear on the display. Pressing the > button once should cause B: SWP MENU to appear. Pressing the > button again should cause C: EDIT MENU to appear. Pressing the > button again should cause D: SYS MENU to appear. We can go down into this menu by pressing the » button which will cause 1: OUT TERM to appear. Pressing the » again will cause 50 OHM to appear. Pressing > will finally cause HIGH Z to appear. To pick this option all we need to do is to press the Enter button again. This resetting of the high resistance termination option will remain in effect until we turn off the function generator. So please do not turn off the function generator until instructed to do so. You should now see 1.200 VPP displayed on the function generator and likewise on the bottom of the scope screen. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 4 C) 1. Source Resistance of the Function Generator Every real voltage source has some resistance associated with it. This limits the amount of current that can be drawn from it. Because this resistance is in series with a voltage source we cannot use our Ohmmeter to measure it without getting a false reading or perhpas damaging our Ohmmeter. So we will have to collect data and use our circuit analysis techniques to calculate the resistance. Let’s begin by measuring the source resistance of the function generator. Our current set up can be modeled as shown in Fig. 1. RS VS RL Function Gen. Scope Figure 1. Function Generator - Scope Circuit 2. For RL(1) = 1 MS which is our present connection, record the value of VRL(1) displayed on the scope in the Lab Report. Calculate the current IRL(1) = VRL(1) / RL(1) and record in the Lab Report. 3. Change RL(2) to 50 S by pressing the Input button for channel Ø, adjust the vertical scale for maximum accuracy and record the value of VRL(2) displayed on the scope in the Lab Report. Calculate the current IRL(2) = VRL(2) / RL(2) and record in the Lab Report. 4. Calculate the source resistance of the function generator by using the formula found on page 2 of the Lab Lecture Notes. Record the value in the Lab Report. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 5 D) 1. High Speed Digital Circuits with Long Cables At very high frequencies wires respond very differently from what we have previously experienced. When applying voltage at one end of wire it takes some time for the signal to reach the other end of the wire. For the coaxial cables in lab, this is about 1.5 nsec/foot. Since our cables are 3 feet long, it takes about 4.5 nanoseconds for a voltage applied to the cable to reach the other end. Besides the delay there is another serious problem called reflections. When the voltage sent down the wire reaches the other end it can “bounce” back down the wire to the sending end. This same thing also happens at the other end of the wire. This is like looking in a mirror with a mirror. There appears to be an infinite number of mirrors. Although the theory for this is beyond the topics of ECE 345, the technique for stopping the reflections is simple. If the source resistance equals the load resistance equals the characteristic impedance of the cable then when a voltage is sent down a wire there are no reflections. The coaxial cables used in our lab have a characteristic impedance of 50 S and a resistance of about 0.01S per foot. So we roughly can ignore the resistance of the wire in most applications. We saw in the last section that the source resistance of our function generator is about 50 S and so terminating the cable in 50 S will give us just a time delay of about 4.5 nsec with no reflections. 2. Set the function generator to a frequency of 5 MHz. Select a square wave and set the amplitude to 1 VPP. The 50 S red light should still be lit indicating that we have a load resistance for our cable of 50 S. (If this is not the case, please put the scope in this state.) 3. Hit the Auto-Scale button on the scope. The scope’s toolbar should be reading about 500 mVp-p because the 50 S resistance of the scope is forming a one half voltage divider with the 50 S resistance of the function generator. Print this waveform for each member of your group. (Please don’t forget to uncheck Include Setup Information to save paper.) Mark this section letter and number on the top right side of your plot and attach it as indicated in the Lab Report. 4. Change the volts/div setting to 200 mV/div. Press the Input button for channel Ø to change the load resistance to 1 MS. Our voltage divider is now 1 Vp-p times 1 M /(1M + 50) = 0.99995 Vp-p. You should see lumps in your square wave from all the reflections on the cable. If this were a cable TV connection we would see what are call ghosts on the TV screen. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 6 Print this waveform for each member of your group. Mark this section letter and number on the top right side of your plot and attach it as indicated in the Lab Report. E) 1. Source Resistance of a Battery Suppose that we repeat the same procedure for measuring the source resistance of a standard D-Cell battery. In order to do this we will need to build a circuit. A Proto-Board is a product from Global Specialties that allows for the quick assembly of a circuit without the need to solder wires. The layout of the Proto-Board is shown on pages 3 and 4 of the Lab Lecture. The Proto-Board consists of four blocks with sets of 59 rows of holes. The 5 holes to the left of each center groove are shorted together internally by a frame. This frame is formed to make a set of spring contacts inside each hole. The 5 holes to the right of each groove are also shorted together. Lets verify that this is the case. 2. A supply of precut wires is available in a box on your lab bench. (If you need more wires or longer wires ask your instructor.) Locate two wires about one to two inches long. You may need to strip the plastic coating off to expose the wire. To do this you will need a pair of wire strippers. These are located in the blue bins just under the top shelf of your lab bench. Cut the wire to the desired length. Locate a hole in the wire stripper with the same diameter as your wire. Strip off about a quarter of an inch. If it is hard to hold the wire, use the needle nose pliers. If you are having a hard time doing this ask your instructor for help. Insert the wires as shown in Fig. 2. Because the spring contacts in the board are firm, it is best to use the pliers to insert and remove wires so as not to bend them. Using 4 banana-to-grabber wires, measure the resistance between the wires you inserted using the 4-wire option of the Fluke 8840A Digital Multimeter (DMM). This should be a small number. Record the value in your Lab Report. Figure 2. Wire inserts Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 7 3. Move the right wire to any other hole between it and the left wire. The reading should be about the same indicating that this set of holes is shorted together. Move the wire again to any other hole on the board and you should get an infinite resistance which is displayed as 1. OVER. 4. The Proto-Board has seven blocks each with two strips of 50 holes. These 50 holes are shorted together in each long strip. Verify that this is the case for the block along the top of the board. Measure the resistance between the left-most and right-most holes as shown in Fig. 3. Record in your Lab Report. Why is the reading much larger than that found in VIE-2 ? Figure 3. Wire inserts Move the right wire down one hole and you should get an infinite resistance reading. 5. The circuit we are going to build uses a tactile push button switch. Locate the Single-Pole-Single-Throw (SPST) Normally-Open (NO) push button switch that is shown in Fig. 4 in your box of parts. Figure 4. SPST NO push button switch Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 8 The term “Pole” refers to the arm of the switch that is moved to open or close a circuit. The term “Throw” is the number of circuits each switch connects. “Normally Open” refers to the state of switch with no action. So in this case the switch is open or off. 6. Move your resistance measuring wires to the location shown in Fig. 5. Insert the push button switch as shown in Fig. 5. It only fits in one way so look carefully. Also the pins are soft and bend easily, so try to rock the unit back and forth until it fit snugly in place. Figure 5. Push button switch The resistance between the two test points in Fig. 5 should be infinite. Press the button and hold it. The resistance should be very small. Record the value in your Lab Report. Remove the two test wires. 7. In order to measure the resistance of the battery we need to build the circuit shown in Fig. 6. Red RS VS 10 S Black Battery Figure 6. Battery test circuit Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 9 8. It is good practice to build your circuit first and then to make connections for power which in this case is the battery. The top of the Proto-Board has four banana jacks. Unscrewing the plastic connector should reveal a hole where you can insert a wire. Tightening this connector on the wire makes a good electrical contact only when you have stripped off enough of the plastic coating to see the shinny wire exposed. Make the wiring connections as shown in Fig. 7. Figure 7. Battery test circuit wiring Does this set of connections make sense to you relative to Fig. 6 ? If you are not sure about your wiring have your lab instructor inspect it. 9. Locate the D-Cell battery mounted on a gray block. Obtain two black and two red banana-to-banana wires from the racks on the wall. Connect the black (minus) terminal to the black terminal of the Proto-Board with a black banana-to banana wire. Connect the red (positive) terminal to the red terminal marked V1 on the Proto-Board with a red banana-to banana wire. Press the VDC button on the Fluke DMM. Remove the banana-to-grabber wires from the DMM. Connect a red banana wire from the INPUT HI of the DMM to the red terminal of the D-Cell and connect a black wire from the INPUT LO of the DMM to the black terminal of the D-Cell. For the Fluke DMM the resistance between its input terminals in the DC Voltage setting is RL(1) = 10,000 MS which for all practical purposes is Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 10 infinity. Record the value of VRL(1) displayed on the DMM in the Lab Report. Calculate the current IRL(1) = VRL(1) / RL(1) and record in the Lab Report 10. Change RL(2) to 10 S by pressing the push button and holding it in. We are now discharging the battery and the voltage reading may be drifting. Record the digits that are not changing as VRL(2) displayed in the Lab Report. Release the button. 11. Remove the resistor from your circuit and measure it using the 4-Wire probe method. Record the value in your Lab Report. Calculate the current IRL(2) = VRL(2) / RL(2) and record in the Lab Report. 12. Calculate the source resistance of the battery by using the formula found on page 2 of the Lab Lecture Notes. Record the value in the Lab Report. What we just measured was the resistance of the load assuming that all wires and connections had zero resistance. As we have seen this is not the case. However a load resistance of 10 S is much larger than the approximate resistance of 0.01 S for each banana wire that we used so the assumption is reasonable. 13. One last thing to note about batteries. A battery’s energy capacity is usually given in what is called an ampere-hour rating. For a D-Cell Alkaline battery this is about 8 ampere-hours. This means that you can connect this battery to a circuit and draw 0.1 amperes for 8/0.1 = 80 hours. As you approach the 80 hours VS drops by about 40% and RS increases by about a factor of four. F) Clean up Please return all wires to the racks from which they were taken. Turn off all equipment. Remove all parts and wires from the Proto-Bard and put them back into the appropriate clear boxes. Clean up the surface of your lab bench from debris. Assemble your lab report, staple it and hand it in to your instructor. Please read and sign the Code of Ethics Declaration on the cover. Again one report per student. VII. 1. ASSIGNMENT FOR NEXT WEEK Read the next lab experiment. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 11 Lab Report Lab II - Introduction to Prototyping Circuits Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Partner: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lab Section Number .............................................. Code of Ethics Declaration All of the attached work was performed by our lab group as listed above. We did not obtain any information or data from any other group in this lab or any other lab. Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 12 VI-A-6 Measured Voltage Peak-to-Peak = VI-A-8 Measured Voltage Peak-to-Peak = Lower voltage limit = Upper voltage limit = Measurement within limits? VI-A-9 Measured Voltage Peak-to-Peak = Lower voltage limit = Upper voltage limit = Measurement within limits? VI-A-10 Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 13 VI-C-2 VRL(1) = IRL(1) = VI-C-3 VRL(2) = IRL(2) = VI-C-4 RS = (Show work below) VI-D-3 Mark VI-D-3 on the top right side of your plot and attach as the next page. VI-D-4 Mark VI-D-4 on the top right side of your plot and attach behind VI-D-3. VI-E-2 RSHORT ROW = Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 14 VI-E-4 RLONG ROW = VI-E-6 RSWITCH = VI-E-9 VRL(1) = IRL(1) = VI-E-10 VRL(2) = VI-E-11 RL(2) = IRL(2) = VI-E-12 RS = (Show work below) Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 15 ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ELECTRONIC INSTRUMENTATION AND SYSTEMS LABORATORY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING MICHIGAN STATE UNIVERSITY I. TITLE: Lab III - Diode Curve Tracer II. PURPOSE: An instrument that displays the V-I characteristics of a semiconductor is called a curve tracer. Our scope can be used to make such an instrument. The concepts covered are: 1. the properties of the ideal operational amplifier; 2. inverting amplifier; 3. V-I characteristics of various types of diodes ; 4. designing a diode curve tracer; The laboratory techniques covered are: 1. the use of the dual trace feature of an oscilloscope; 2 using the Infinium's math function key to plot voltage transfer curves; 3 using averaging to reduce noise pick-up; 4. using the Infinium's Marker feature to measure points on a curve. III. BACKGROUND MATERIAL: See Lab Lecture Notes. IV. EQUIPMENT REQUIRED: 1 1 1 2 2 HP Infinium Oscilloscope HP33120A Function Generator / Arbitrary Waveform Generator Fluke 8840A Digital Multimeter HP6216C DC Power Supplies Agilent 10073C 10:1 Miniature Passive Probes Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 1 V. PARTS REQUIRED: 1 1 1 1 2 1 1 1 2 2 2 PB-104 Proto-Board Pliers Wire stripper and cutter BNC-to-Banana adapter LM 741 IC operational amplifier 1N4002 Silicon diode Red Light Emitting Diode (LED) Green Light Emitting Diode (LED) 1kS ± 5% (Brown-Black-Red-Gold) resistors 10kS ± 5% (Brown-Black-Orange-Gold) resistors 0.1:F capacitors (glossy green stamped 104K) VI. LABORATORY PROCEDURE: A) HP6216C Power Supplies 1. In using integrated circuits, it is necessary to supply power to operate the chip. For the operational amplifier, we need to supply +15VDC and !15VDC. We will use two power supplies to do this. The HP6216C power supply is adjustable from a magnitude of 0 to 30V as indicated in Fig. 1. Figure 1. Power supply equivalent circuit With no external connections to the three terminals in the lower right, turn on both power supplies by depressing the button in the lower left corner. There are two knobs on each supply. The right knob marked CURRENT controls the maximum magnitude of current, turn this knob fully clockwise. This allows our circuits to draw up 500mA of current. The left knob marked VOLTAGE allows the user to set a desired voltage magnitude. Turn this knob and observe. Set the magnitude of each supply to approximately 15. 2. Since 500mA of current is large enough to melt our Proto-Board, let's set the current limit much smaller. Obtain two black banana wires from the racks on the wall. Connect one of these two black banana wires between Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 2 the % and & terminals of each supply. Notice that the voltage drops to zero on the meter. There is a slide switch on the power supply to convert the meter to measure current instead of voltage. Move this switch to the current setting. Rotate the CURRENT control such that the current is now limited to approximately 25mA for each supply. Move the slide switch back to display voltage on the meter and remove the black banana wires. Note: 5. If your circuit ever tries to draw more than 25mA of current then the voltage will collapse, that is, it will drop to a much lower value in voltage than what is set by the voltage control. Do not try to increase the current control setting because something is seriously wrong. Increasing the current control may melt the Proto-Board. If this occurs, please ask your instructor for help. Turn OFF both supplies at this time. B) Inverting Amplifier 1. If you built the circuit last week on the Proto-Board, you must allow your partner to do it this week no matter how long it takes. Indicate who will be building the circuits this week in your Lab Report. Your lab instructor is keeping a record of this. If you fail to alternate building the circuits with your partner as indicated in the lab, your lab report will not be accepted and you will receive a grade of 0 for that lab. 2. We will build and test the inverting amplifier shown in Fig. 2. Figure 2. Inverting amplifier Fig. 3. Op-amp pin out The top view of the LM741 operational amplifier (op-amp) is shown in Fig. 3. All integrated circuits (ICs) are numbered in a counter-clockwise fashion with some indication which side is the top. It may be a groove at the top or a dot near pin #1. In order build this circuit and avoid wiring errors, we need to label all the IC connections including the power supplies. This is done in Fig. 4. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 3 Figure 4. Inverting amplifier with connections labeled Figure 5. Inverting amplifier layout Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 4 3. 4. The layout for the inverting amplifier on the Proto-Board is shown in Fig. 5. Compare this with the schematic of Fig. 4. When wiring any circuit, noise and interference can be minimized by using the shortest length of wire to make your connections. A supply of precut wires is in a clear box on your lab bench. If you need more wire it is available in a brown box near the door. When making the connections on the board, it is best to use the pliers to insert and remove wires. It is good practice to mark on the schematic a small check or slash when a connection is made. Remember that the banana connectors at the top of the Proto-Board make a good electrical contact only when you have stripped off enough of the plastic coating to see the shiny wire exposed. The following description is shown in Fig. 6. We use color coded wires to help avoid errors. Do not turn on the power supplies or function generator until instructed to do so. Figure 6. Wiring diagram To make the top supply positive connect a black wire from the minus terminal to the ground terminal. To make the bottom supply negative, connect a black wire from the plus terminal to the ground terminal. Then Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 5 to make sure we have a solid ground, connect a black wire from the upper supply’s minus terminal to the lower supply’s plus terminal. To connect the power supply to our circuit, connect a black banana wire from the ground terminal of the -VCC power supply to the black terminal on the Proto-Board. This connects the grounds of our power supply to the grounds our circuit. Connect a black banana wire from the minus terminal of the -VCC power supply to the red terminal marked V1 on the Proto-Board. Connect a red banana wire from the plus terminal of the +VCC power supply to the red terminal marked V2 on the Proto-Board. To connect the function generator to the Proto-Board, we need to convert the BNC connector on the function generator to a banana connector. In the blue box under the top shelf of your lab bench is such a connector. Place the BNC-to-Banana adaptor on the function generator output. Connect a black banana wire from the black terminal on the function generator to the black ground terminal on the Proto-Board. Connect a red banana wire from the red terminal of the function generator to the red terminal marked V3 on the Proto-Board. 5. Once you have assembled the circuit, have your lab partner check your wiring. Ask your lab instructor to also inspect this for you because errors in wiring can permanently damage the Proto-Board. 6. Turn on the oscilloscope. Press the Default Setup button to clear the settings of the last user. If not already present, connect two 10:1 probes to your scope. One for channel Ø and one for channel Ù. For this lab and all of the following labs we will always use the probes. The probes are somewhat fragile, so do not remove these probes from the scope when you are finished with the lab. We would like to display the function generator on channel Ø. To do this take the probe for channel Ø and pull back the holder to expose a metal hook. Connect this hook to the wire of the resistor which is connected to the wire coming from the function generator as shown in Fig. 7. We would like to display the output of the inverting amplifier on channel Ù. To do this take the probe for channel Ù and pull back the holder to expose a metal hook. Connect this hook to the wire of the resistor which is connected to the output which is pin 6 of the op-amp as shown in Fig. 7. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 6 Figure 7. Scope probe connections 7. The black alligator clip on each probe is the ground connection for the scope. We need to connect this to minimize noise pickup. Take a short piece of wire and put it in the ground bus strip (far left) that you are using on the Proto-Board. Connect the ground clips of both channels to this wire or if you have trouble reaching use another such wire. 8. We are about to apply power to our circuit. ALWAYS WATCH THE POWER SUPPLY METER WHEN FIRST TURNING ON THE POWER SUPPLY. If it dips from its preset value, quickly turn off the power supply. Something is seriously wrong. Turn on the power supplies. If the voltage meter dips or drops from our preset value of 15 volts, quickly turn off the supply and ask your instructor for help. If this is not the case continue on. 9. Turn on the function generator. Again watch for any dips in voltage meter. Set the termination to HIGH Z. [Recall from Lab II: Press the Blue Shift button, followed by pressing the Enter button just Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 7 above the Shift button. A: MOD MENU should appear on the display. Pressing the > button once should cause B: SWP MENU to appear. Pressing the > button again should cause C: EDIT MENU to appear. Pressing the > button again should cause D: SYS MENU to appear. We can go down into this menu by pressing the » button which will cause 1: OUT TERM to appear. Pressing the » again will cause 50 OHM to appear. Pressing > will finally cause HIGH Z to appear. To pick this option all we need to do is to press the Enter button again. This resetting of the high resistance termination option will remain in effect until we turn off the function generator. So please do not turn off the function generator until instructed to do so. ] 10. Set the function generator to 2 VP-P at a frequency of 500 Hz. 11. Our scope has a very high bandwidth and can pick up interference signals from WKAR, ethernet cables in the floor and cell phone transmissions. One very simple way to fix this is to limit the bandwidth of the scope. Put the scope in the graphical interface mode by moving the mouse pointer to the mouse icon in the upper-right corner and clicking once with the left mouse button. To activate BW Limit (bandwidth limiting), move the mouse pointer to the menu bar on top and find Setup. Under this find Channel 1... in the pull down menu. Click on this and find BW Limit in the resulting dialog box. Click on the box next to it. Close the dialog box. Repeat the same procedure for Channel 2.... 12. Press the Auto-Scale button on the scope. If necessary adjust the vertical scale for each channel to 500 mV/div using the large knob for each channel and the horizontal scale to 500 :s/div. What you are seeing is the input voltage of the function generator (the yellow trace) and the output voltage of the inverting amplifier (the green trace). 13. To better see this, set the vertical scale for each channel to 1 V/div. The ground reference for each channel is probably in the center of the screen. Move the ground reference for channel Ø to 2 major divisions from the top of the screen by using the small knob with a yellow dot painted in the center. Move the ground reference for channel Ù to 2 major divisions from the bottom of the screen by using the small knob with a green dot painted in the center. The inverting amplifier that we just built has a gain of minus one. That is, the peak to peak value of both waveforms is about the same but the phase angle of the waveforms differs by 180°. If this is not the case ask Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 8 your instructor for help. Print this waveform for each member of your group. Mark which waveform is the function generator and which waveform is the output of the op-amp. Mark this section letter and number on the top right side of your plot and attach it as indicated in the Lab Report. C) 1. Curve Tracer We don’t want to turn off the function generator because of the HIGH Z setting, but we can effectively turn it off by disconnecting the red banana wire that goes from the red terminal of the function generator to the red terminal marked V3 on our Proto-Board. Disconnect both ends now. Turn off the power supplies. We are doing this because we are about to build another circuit. For our safety and the protection of our circuit components, we never want to work on a circuit with power applied. 2. Our next circuit will require that the function generator be connected to a different location. Remove the wire from the red terminal V3 to the 10 kS resistor. Unhook your scope probes from your circuit. 3. Our next circuit is shown in Fig. 8. The 1N4002 diode we are about to test is small and has a black body. The side with a white strip painted on it is the n-side and corresponds to the bar used in the schematic drawing. The layout for this is shown in Fig. 9. Again compare Figs. 8 and 9. Do the connections make sense to you? If not, ask your instructor to explain because in future labs layouts will generally not be given. 4. Noise pickup due to long wires is a serious problem with many electronic circuits. In our case the long wires from the power supply act like antennas picking up unwanted voltages. (You may have seen this problem as a squiggly line on your first plot.) The causes are very complicated but the fix up is quite simple. By putting capacitors across power connections we can hold the voltage between two points and squelch most noise pick up. Fig. 10 shows two 0.1:F bypass capacitors across the +15 V and -15 V bus strips. To make the wiring of this capacitor easier, a second ground bus was created by bringing a wire from ground to the strip next to the +15 V. This is the lowest wire in Fig. 10. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 9 Figure 8. Curve tracer Figure 9. Curve tracer layout Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 10 Figure 10. Adding bypass capacitors 5. Reconnect the probes for channel Ø and channel Ù by hooking onto the wires shown in Fig. 8. Reconnect the ground clips. 6. We are about to turn on the power supplies. If your power supply voltages drop from their initial settings, there is something seriously wrong and we want to turn off our power supply quickly before any damage is done. Turn on the power supplies. If you had to quickly turn off the power supplies, look for a wiring error or ask you instructor for help. 7. Set the function generator for 16 Vpp and reconnect the red banana wire from the red terminal of the function generator to the red terminal on the Proto-Board marked V3. 8. Press the Auto-Scale key on the scope What you are seeing may look very strange but it is the plot of vD on Channel Ù and iD @ 1kS on Channel Ø. Thus the volts/div for Channel Ø correspond to mA/div of current through the diode. To plot vD on the x-axis and iD @ 1kS on the yCopyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 11 axis we need to use the math functions of the scope. To activate this feature, move the mouse pointer to the menu bar on top and find Analyze. Then find Math/FFT in the pull down menu and click on it. Next click on the box next to Display On. Find Operator in the dialog box. Click on the arrow and select Versus. The y-axis is Source 1 and select Channel Ø if it is not already selected. The x-axis is Source 2 and select Channel Ù if it is not already selected. To set the origin at the center of the screen, we need to check the box next to Scaling. We are going to manually select the scales and the origin. Click on Manual for Vertical. Put the mouse pointer on the Scale box and left click. A key pad will appear. You can use your mouse or the keyboard to enter 1 for 1V/div. When done click OK. Likewise, put the mouse pointer on the Offset box and left click. A key pad will again appear. You can use your mouse or the keyboard to enter 0 for 0 Volts. When done click OK. Repeat the same procedure and values for Horizontal Close the dialog box. You are now displaying vD on the x-axis with a scale of 1 V/div and iD on the y-axis with a scale of 1 mA/div where 0V, 0mA is at the center of the screen. You are also displaying Channels Ø and Ù. Since we are only interested in the V-I characteristics, turn off the display for Channels Ø and Ù by pressing the Ø and Ù buttons above the BNC connectors. Your trace may appear somewhat “thick.” This is because multiple traces of the same curve are being plotted on top of each other. Decreasing the time axis to 100 :sec/div will display one half of a cycle of our 500 Hz sine wave. This will correspond to fewer traces. You may still have what appears to be a thick trace. This is due to noise pick in our set up. Since noise is random, its average value is approximately zero. Our scope has an averaging feature to help reduce noise pick-up. To activate averaging, move the mouse pointer to the menu bar on top and find Setup. Under this find Acquisition in the pull down menu. Click on this and find Averaging in the resulting dialog box. Click on the box next to Enable. Set the # of Averages to 16. Close the dialog box. Your waveform should now appear to be smoother than before. 10. Print this V-I characteristic for each member of your group. Label the xand y-axis scales on your plot. Mark this section letter and number on the plot and attach it as indicated in the Lab Report. 11. Press the Stop button to freeze the screen. Press the Marker A button. You should see a set of cross hairs on your input waveform on your V-I characteristic. Press and hold the arrow key < until the cross hairs move Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 12 to around 1 mA for the y-axis (if you overshoot you can go back with the = arrow key). Record the value of VD(ON) and iD in section VI-C-11 of the Lab Report. Press the Run button to un-freeze the screen. Turn off the marker by pressing the Marker A button again. Disconnect the function generator’s red banana wire and turn off the power supplies. 12. Replace the 1N4002 diode with a red LED. The n-side or barred side for all LEDs is the shorter wire. (Do not cut the LED wires so that you can find the n-side when using this LED in future experiments.) Turn on the power supplies and reconnect the function generator. Print the V-I characteristic, label this section number and attach as indicated in the Lab Report. Measure iD around 1 mA. Record the value of VD(ON) and iD in section VI-C-12 of the Lab Report. Disconnect the function generator’s red banana wire and turn off the power supplies. 13. Repeat step C-12 for a green LED. 14. Turn off the marker if it is still on. To see the actual plotted points, disable the averaging feature and lower the frequency of the function generator to 1 Hz. Notice how the curve is swept across the screen. You can now see the diode turning off and on. 15. Turn off your power supplies and function generator. Measure your resistors (see Fig. 8) as you disassemble your circuit and record their values in section VI-C-15 of the Lab Report. We assumed nominal values in building this curve tracer. What type of error do we have due to the actual value of the resistors? 16. Disassemble the remainder of your circuit. Leave the probes attached to the scope and return all cables (but not your probes) to the appropriate racks and submit your Lab Report. Put your remaining parts back into the clear box. Return wires to the other clear box. Brush the surface of your lab bench clean. Turn off the DMM and scope. VII. ASSIGNMENT FOR NEXT LAB 1. Read the next lab experiment. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 13 Lab Report Lab III - Diode Curve Tracer Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Partner: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lab Section Number .............................................. Code of Ethics Declaration All of the attached work was performed by our lab group as listed above. We did not obtain any information or data from any other group in this lab or any other lab group. Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 14 VI-B-1 ______________________________ is constructing this week’s circuits. VI-B-13 Mark VI-B-13 on the top right side of your plot and attach as the next page. VI-C-10 Mark VI-C-10 on the top right side of your plot and attach behind VI-B13. VI-C-11 For the 1N4002 diode: iD = __________ VI-C-12 and VD(ON) = __________ For the Red LED: Mark VI-C-12 on the top right side of your plot and attach behind VI-C10. iD = __________ VI-C-13 and VD(ON) = __________ For the Green LED: Mark VI-C-13 on the top right side of your plot and attach behind VI-C12. iD = __________ and VD(ON) = __________ Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 15 VI-C-15 Color Code Nominal Resistance Measured Resistance R1 R2 R3 R4 Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 16 ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ELECTRONIC INSTRUMENTATION AND SYSTEMS LABORATORY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING MICHIGAN STATE UNIVERSITY I. TITLE: Lab IV - Introduction to Microcontrollers II. PURPOSE: Microcontrollers are devices that contain much of the same items as a computer such as a CPU (Central Processing Unit) and memory but don’t use a monitor, keyboard or mouse to operate, in general. Microcontrollers are usually used for controlling machines through circuitry called hardware and a set of instructions called software programs. The concepts covered are: 1. Programming in PBASIC; 2. Commands: OUTPUT, PAUSE, GOTO and OUT; 3. Commands: INPUT, IN, and IF_THEN; 4 Boolean operator: OR; 5. Commands: VAR. The laboratory techniques covered are: 1. the layout of the Basic Stamp microcontroller and the Board of Education manufactured by Parallax, Inc.; 2. writing, editing and downloading programs in PBASIC; 3. using push-button switches as input sensors and LEDs as ouput sensors. III. BACKGROUND MATERIAL: See Lab Lecture Notes. IV. EQUIPMENT REQUIRED: 1 PC Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 1 V. PARTS REQUIRED: 1 1 1 1 1 1 1 2 2 2 Pliers Wire stripper and cutter Board of Education with BS2sx microcontroller Serial Cable Wall transformer with output plug Red LED Green LED 10kS ± 5% (Brown-Black-Orange-Gold) resistor 470S ± 5% (Yellow-Violet-Brown-Gold) resistor Single-Pole-Single-Throw Normally-Open push button switches VI. LABORATORY PROCEDURE: A) What is a Microcontroller? 1. The Board of Education from Parallax Inc. consists of a small protoboard, the Basic Stamp 2sx module, a power supply with regulator and a serial port for downloading programs or uploading data. The Basic Stamp 2sx module consists of several integrated circuits. The largest one is a PIC (Peripheral Interface Controller) microcontroller which contains Parallax’s BASIC interpreter. The two next largest integrated circuits are an EEPROM and RESET CIRCUIT. The EEPROM can store 2048 bytes or about 500 PBASIC instructions. The RESET CIRCUIT monitors the power supply to make sure there is enough voltage to properly operate the module. With this set up, we can build electronic circuits that can be controlled by a program that we will write or our circuits can interact with our program to make decisions. Examples are robots, traffic lights, watches, microwave ovens, VCRs, alarm systems and fuel injectors. 2. If you built the circuits last week, you must allow your partner to do it this week no matter how long it takes. Indicate who will be building the circuits this week in section VI-A-2 of your Lab Report. The other person will type the programs. Your lab instructor is keeping a record of this. If you fail to alternate building the circuits with your partner as indicated in the lab, your lab report will not be accepted and you will receive a grade of 0 for that lab. 3. Our first exercise will be to type a program in PBASIC which will cause an LED to turn on for 1 second and off for 2 seconds. To do this we first need to build the circuit. Whenever we build a circuit on the Board of Education, we need to make sure all connections to power are off. This is for our protection and the protection of the microcontroller. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 2 We will do this for the Board of Education by disconnecting the power supply plug which is located at the top-left of the Board of Education, if necessary. The green LED in the lower-center of the board is on when the power supply is connected and off when it is not. The green LED should be off. The circuit you are going to build on the small white proto-board of the Board of Education is shown in Fig. 1 with the layout shown in Fig. 2. The barred side of the LED is also the flat side or notch on the plastic case. The layout of the white proto-board is like the PB-104 except that there are no bus strips. Figure 1. Output sensor Figure 2. Layout What is new here is the following few things. Vdd is the output of the onboard power supply which is +5 V. The connection to this is in the black row at the top of the white proto-board. We will connect it to our circuit instead of using our lab power supply. P0 is a connection to one of the pins of the microcontroller. It is in the black column along the left side of the white proto-board. Wire Fig.1 at this time. Because the microcontroller is fairly expensive (around $50), please ask your lab instructor to verify that Fig. 1 is wired correctly and to sign off in Section VI-A-3 before you proceed. If you fail to do this, you will receive a grade of 0 for this lab and be asked to leave. 4. Our next task is to type a PBASIC program, which is a special version of BASIC which has been installed on the lab PC. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 3 ZERO TOLERANCE WARNING: You are about to use the lab PC. Do not use the floppy drive. Do not install any software. Do not save, erase or modify any files unless instructed to do so. You are not allowed to surf the internet, read email or print any materials off the web. Violating any of the above will result in a failing grade for the entire course. The reason is that the maintenance costs of lab must be covered by your lab fee. Increasing these fees is in no one’s best interest. Thanks for your cooperation. Move the mouse and see if the PC monitor responds. You may have to wait about ½ a minute or so. A dialog box should appear on your monitor. If the monitor is still black, hit the Scroll Lock key twice. Again wait around ½ minute for a response. Try again, if necessary. If no response ask your instructor for help. Follow the instructions and log into your EGR account. Be patient this may take a few minutes. The basic stamp editor is on the desktop. Double click on this and an editor should appear on the screen. 5. Because there are several different models of the Basic Stamp with different PBASIC commands, we need to insert a directive that this is a Basic Stamp 2sx program. This is done by selecting Directive in the menu bar and then by selecting Stamp, BS2sx in the pull down menu. The following line of code will appear: '{$STAMP BS2sx} Type the following on the next lines using tabs to indent. Notice how the editor changes colors and case if you use a reserved syntax. This helps in finding program errors: output 0 blink out0=0 pause 1000 out0=1 pause 2000 goto blink See the lab lecture notes for an explanation of the program. 6. To run the program we need to connect the serial cable from our PC to the Board of Education. As you do the next step please take care not to touch the Basic Stamp because it is vulnerable to static electricity. In fact it is a good idea to discharge yourself by touching the ground (outer) terminal of one of the BNC connectors on the scope anytime you are about to handle the Board of Education. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 4 Locate the serial cable on your lab bench. One end is connected to the back of the PC for you. Connect the other end of the serial cable to the serial connector on the left side of the Board of Education. You don’t need to tighten the screws. The Board of Education has its own power supply which is plugged into the power strip towards the back of your lab bench. It has a long black wire with a unit plug similar to what you might find for a battery eliminator for a portable CD player. Locate this plug and connect the power supply plug to the Board of Education. The green LED in the lower center of the board should light. To run the program, select Run from the menu bar and then select Run from the pull down menu. If you get an error message, check the items indicated or check your typing. Is the red LED blinking on for one second and off for two seconds? If not ask your lab instructor for help. 7. Modify the program such that the red LED is blinking on for two seconds and off for one second. Run the program as you did in VI-A-6. PRINT your file with the BASIC Stamp Editor. One copy for each member of your group. Write this section number (VI-A-7) on the topright of the page. Attach as indicated in the Lab Report. Do not save your file on the PC’s hard disk. Explain what you did in section VI-A-7 of the Lab Report. 8. Modify the program such that the red LED is blinking on for 0.1 seconds and off for 0.1 seconds. Run the program as you did in VI-A-6. PRINT your file with the BASIC Stamp Editor. One copy for each member of your group. Write this section number (VI-A-8) on the topright of the page. Attach as indicated in the Lab Report. Do not save your file on the PC’s hard disk. Explain what you did in section VI-A-8 the Lab Report. 9. The program that you just downloaded to the microcontroller is stored in EEPROM which is called nonvolatile memory. To show you what this means, discharge yourself by touching ground on the scope, unplug the power supply cable and unplug the serial cable from the Board of Education. The green LED should be off. Now plug the power supply plug back into the Board of Education. The green LED should be lit and your red LED should be blinking just like before. The program you download is permanently stored in the Basic Stamp’s memory. We can easily re-program it just like we did in steps Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 5 VI-A-7 and VI-A-8. It is worth noting that there is a rough limit on the number of times you can re-program the EEPROM before it wears out. This is around 10 million. Although large it is not infinite. B) Detecting the Outside World 1. In VI-A, we used a microcontroller to produce a set of outputs indefinitely. We will next build a circuit where the response of the circuit depends on the sequence of inputs it receives from you much like a vending machine. 2. Remove the power supply plug from the Board of Education. The green LED should be off. Remove your previous circuit and the wires. 3. The next circuit you are going to build on the small proto-board of the Board of Education is shown in Fig. 3 with the layout shown in Fig. 4. Recall from the lab lecture that Vss is actually the ground connection. Do the layout connections make sense to you? If not ask your instructor to explain them to you. Because the microcontroller is fairly expensive (around $50), please ask your lab instructor to verify that Fig. 3 is wired correctly and to sign off in Section VI-B-3 before you proceed. If you fail to do this, you will receive a grade of 0 for this lab and be asked to leave. 4. Close your previous program. Please do not save it. Insert a directive that this is a Basic Stamp 2sx program. This is done by selecting Directive in the menu bar and then by selecting Stamp, BS2sx in the pull down menu. The following line of code will appear: '{$STAMP BS2sx} Type the following on the next lines using tabs to indent: output 0 out0=1 input 7 check if in7=0 then blink goto check blink out0=0 pause 200 out0=1 pause 200 goto check See the lab lecture notes for an explanation of the program. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 6 Figure 3. Input and output sensors Figure 4. Layout Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 7 5. To run the program we need to connect the serial cable from our PC to the Board of Education. You don’t need to tighten the screws. We also need to connect the power supply plug to the Board of Education. The green LED in the lower center of the board should light. The green LED that you just wired on the proto-board should be blinking like the red LED of part VI-A because your previous program is still saved in the Basic Stamp’s nonvolatile memory. To run our new program, select Run from the menu bar and then select Run from the pull down menu. The green LED on the proto-board should have stopped blinking. If not ask your lab instructor for help. Press push-button switch number 7 which is connected to pin P7 and release. Does the green LED now blink for as long as you hold the switch down? If not ask your lab instructor for help. Press push-button switch number 8 which is connected to pin P8 and release. Nothing should happen because we have not programmed any instructions for this pin. 6. Modify your program to now look like the following: '{$STAMP BS2sx} output 0 output 1 out0=1 out1=1 input 7 input 8 check if in7=0 then blink if in8=0 then double_blink goto check blink out0=0 pause 200 out0=1 pause 200 goto check double_blink out0=0 out1=0 pause 200 out0=1 out1=1 pause 200 goto check Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 8 To run this modified program, select Run from the menu bar and then select Run from the pull down menu. Press push-button switch number 7 which is connected to pin P7 and release. Does the green LED now blink for as long as you hold the switch down? If not ask your lab instructor for help. Press push-button switch number 8 which is connected to pin P8 and release. Do both LEDs blink for as long as you hold the switch down? If not ask your lab instructor for help. 7. To recap what has happened, the program has made a decision based on which button is pressed. Once either button is pressed, the program selects the routine blink or double_blink. The microcontroller is sensing an input, making a decision and creating an appropriate output. 8. Modify the program for double_blink such that the red LED and green LED is blinking on for 0.1 seconds and off for 0.1 seconds, that is, to blink twice as fast as the one button case. Run the program. PRINT your file with the BASIC Stamp Editor. One copy for each member of your group. Write this section number (VI-B-8) on the topright of the page. Attach as indicated in the Lab Report. Do not save your file on the PC’s hard disk. Explain what you did in section VI-B-8 of the Lab Report. 9. We are going to modify the program such that the double_blink case will now occur only when both switches are pressed. Modify your program as follows: '{$STAMP BS2sx} x var bit y var bit output 0 output 1 out0=1 out1=1 input 7 input 8 check x=in7 y=in8 if x+y=0 then double_blink if x=0 then blink goto check Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 9 blink out0=0 pause 200 out0=1 pause 200 goto check double_blink out0=0 out1=0 pause 200 out0=1 out1=1 pause 200 goto check See the lab lecture notes for an explanation of the program. 10. Run the program. Press push-button switch number 7 which is connected to pin P7 and release. Does the green LED now blink for as long as you hold the switch down? If not ask your lab instructor for help. Press push-button switch number 8 which is connected to pin P8 and release. Nothing should happen because we have not programmed any instructions for this pin. Press both push-buttons simultaneously. Do both LEDs blink? If not ask your lab instructor for help. 11. Can you modify the program such that we keep the functionality above and add that when push-button switch number 8 is pressed that the red LED blinks. This may take some thought. Run the program. Press push-button switch number 7 which is connected to pin P7 and release. Does the green LED now blink for as long as you hold the switch down? Press push-button switch number 8 which is connected to pin P8 and release. Does the red LED now blink for as long as you hold the switch down? Press both push-buttons simultaneously. Do both LEDs blink? Show this to your lab instructor and have your lab instructor sign off that it works. PRINT your file with the BASIC Stamp Editor. One copy for each member of your group. Write this section number (VI-B-11) on the topright of the page. Attach as indicated in the Lab Report. Do not save Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 10 your file on the PC’s hard disk. Explain what you did on the print out in section VI-B-11 of the Lab Report. C) Un-programming and Clean-up 1. The next lab section is going to use the microcontroller and we really don’t want our program executed on a very different circuit. So we need to re-program our microcontroller with a null program. 2. Erase the last program leaving only the following: '{$STAMP BS2sx} output 0 out0=1 Run this program. Nothing should happen when you now press any of the push buttons. 3. Remove the power supply plug from the Board of Education. Leave the transformer plugged into the power strip on the back of your lab bench. The green LED in the lower-center of the board should be off. Remove the serial cable from your Board of Education. Leave the other end connected to the back of the PC. Log off of the EGR network by hitting the Ctrl-Alt-Del keys simultaneously and follow the instructions. Please do not save your programs. Remove all parts and wires from the Proto-Bard and put them back into the appropriate clear boxes. Please use one box for wire and one box for parts. Clean up the surface of your lab bench from debris. Assemble your lab report, staple it and hand it in to your instructor. Please read and sign the Code of Ethics Declaration on the cover. Again one report per student. VII. 1. ASSIGNMENT FOR NEXT LAB Do you want to learn more about microcontrollers? The experiment we just did is a shorten version of the first two experiments of an on-line lab manual called What is a Microcontroller? at http://www.parallax.com/dl/docs/books/edu/wamv2_1.pdf The Pallalax web site at www.parallax.com is rich in hobbyist applications and has a lot of input from users. 2. Read the next lab experiment. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 11 Lab Report Lab IV - Introduction to Microcontrollers Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Partner: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lab Section Number .............................................. Code of Ethics Declaration All of the attached work was performed by our lab group as listed above. We did not obtain any information or data from any other group in this lab or any other lab section. Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 12 VI-A-2 is constructing this week’s circuits. is typing this week’s programs. VI-A-3 I correctly. (Lab instructor’s initials) verify that Fig. 1 is wired VI-A-7 Mark VI-A-7 on the top-right side of your print out and attach as the next page. VI-A-8 Mark VI-B-8 on the top-right side of your print out and attach behind VIA-7. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 13 VI-B-3 I correctly. (Lab instructor’s initials) verify that Fig. 3 is wired VI-B-8 Mark VI-B-8 on the top-right side of your print out and attach as the next page. VI-B-11 (Lab instructor’s initials) verify that the circuit of this I section is functioning correctly. Mark VI-B-11 on the top right-side of your print out and attach behind VI-B-8. Write your explanation on your print out. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 14 ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ELECTRONIC INSTRUMENTATION AND SYSTEMS LABORATORY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING MICHIGAN STATE UNIVERSITY I. TITLE: Lab V - Build Your Own Digital DC Voltmeter II. PURPOSE: Analog voltages and currents are continuous with every possible value between two points. Digital voltages and currents have only two possible. A bit is one binary digit that has a value of 0 or 1. It takes many bits to represent a decimal number. In this lab, we will convert an analog voltage into a binary number. This voltage will be converted to a decimal equivalent and displayed. The concepts covered are: 1. counting in binary; 2. serial data transmission; 3. analog-to-digital conversion; 4 subroutines; 5. commands: PULSOUT, SHIFTIN and DEBUG; 6. fixed and floating point numbers. The laboratory techniques covered are: 1. using an off the shelf integrated circuit for performing serial analog-to-digital conversion; 2. accuracy and resolution. III. BACKGROUND MATERIAL: See Lab Lecture Notes. IV. EQUIPMENT REQUIRED: 1 1 PC Fluke 8840A Digital Multimeter Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 1 V. PARTS REQUIRED: 1 1 1 1 1 1 1 Pliers Wire stripper and cutter Board of Education with BS2sx microcontroller Serial Cable Wall transformer with output plug 100 kS Potentiometer ADC0831 Analog-to-Digital Converter VI. LABORATORY PROCEDURE: A) Analog-to-Digital Conversion 1. In this experiment we are going to convert our analog voltages into 8-bit binary digital numbers. With 8-bits we can subdivide our voltages into one of 256 pieces. 2. If you built the circuits last week, you must allow your partner to do it this week no matter how long it takes. Indicate who will be building the circuits this week in section VI-A-2 of your Lab Report. The other person will type the programs. Your lab instructor is keeping a record of this. If you fail to alternate building the circuits with your partner as indicated in the lab, your lab report will not be accepted and you will receive a grade of 0 for that lab. 3. Our first exercise will be to type a program in PBASIC which will convert an analog voltage to a 8-bit binary number. To do this we first need to build a circuit. Whenever we build a circuit on the Board of Education, we need to make sure all connections to power are off. This is for our protection and the protection of the microcontroller. We will do this for the Board of Education by disconnecting the power supply plug which is located at the top-left of the Board of Education, if necessary. The green LED in the lower-center of the board is on when the power supply is connected and off when it is not. The green LED should be off. The circuit you are going to build on the small white proto-board of the Board of Education is shown in Fig. 1. The pin out of the ADC0831 analog-to-digital converter is given in Fig. 2. Before you start to wire recall the following few things. Vdd is the output of the on-board power supply which is +5 V. The connection to this is in the black row at the top of the white proto-board. We will connect it to our circuit instead of using our lab power supply. P0, P1 and P2 are the connection to the pins of the microcontroller. It is in the black column along the left side of the white proto-board. Wire Fig.1 at this time. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 2 Figure 1. Digital DC voltmeter Because the microcontroller is fairly expensive (around $50), please ask your lab instructor to verify that Fig. 1 is wired correctly and to sign off in Section VI-A-3 before you proceed. If you fail to do this, you will receive a grade of 0 for this lab and be asked to leave. Fig. 2. ADC0831 pin out Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 3 4. Our next task is to type a PBASIC program, which is a special version of BASIC which has been installed on the lab PC. ZERO TOLERANCE WARNING: You are about to use the lab PC. Do not use the floppy drive. Do not install any software. Do not save, erase or modify any files unless instructed to do so. You are not allowed to surf the internet, read email or print any materials off the web. Violating any of the above will result in a failing grade for the entire course. The reason is that the maintenance costs of lab must be covered by your lab fee. Increasing these fees is in no one’s best interest. Thanks for your cooperation. Move the mouse and see if the PC monitor responds. You may have to wait about ½ a minute or so. A dialog box should appear on your monitor. If the monitor is still black, hit the Scroll Lock key twice. Again wait around ½ minute for a response. Try again, if necessary. If no response ask your instructor for help. Follow the instructions and log into your EGR account. Be patient this may take a few minutes. The basic stamp editor is on the desktop. Double click on this and an editor should appear on the screen. 5. We first need to insert a directive that this is a Basic Stamp 2sx program. This is done by selecting Directive in the menu bar and then by selecting BS2sx in the pull down menu. The following line of code will appear: '{$STAMP BS2sx} Type the following on the next lines using tabs to indent: 'ADC0831 Binary output display. 'Declarations. adcbits var byte output 0 output 1 input 2 'Start display. debug cls 'Main routine. main: gosub ADCDATA gosub DISPLAY goto main Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 4 ADCDATA: out0=1 out0=0 out1=0 pulsout 1,1250 shiftin 2,1,msbpost,[adcbits\8] return DISPLAY: debug home debug "8-bit binary value: ", bin8 adcbits return 6. About the Code After the declaration line, the first line is a comment that begins with an apostrophe. It has no effect on the program. 'ADC0831 Binary output display. The next section is the variable declaration section of the program. It starts with a comment line and then declares adcbits as a variable of 8-bits which is also called a byte. 'Declarations. adcbits var byte The next section of code makes pins P0 and P1 outputs and P2 as an input. output 0 output 1 input 2 The next section of code starts a display window on our PC. The first line is a comment. The debug command can be used to display output in what is called the debug window. Before we use the display, it is a good idea to clear the display using the command cls. 'Start display. debug cls The next section of code contains two subroutines which are short programs that do specific tasks within a larger program. The main: ... goto main routine runs the two different subroutines over and over again. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 5 'Main routine. main: gosub ADCDATA gosub DISPLAY goto main The gosub ADCDATA means go to the subroutine labeled ADCDATA: and to come back when finished which is labeled return. Likewise the next instruction is to go to the subroutine DISPLAY and to come back when finished. The subroutine ADCDATA: shown below sets P0 high and then low. P0 is connected to the ADC0831's CS (chip select) complement pin. This sequence of high and then low is a signal to get ready to do the conversion from analog-to-digital (binary). The CS complement pin must remain low during the conversion. P1 is connected to the ADC0831's CLK (clock) pin. We need to set it initially to a low state. This will allow the next command pulsout to generate the opposite state (high). The command pulsout 1,1250 means that P1 will start with the opposite state (high) of its last value and continue to generate pulses with a period of 1250 times 0.8 :seconds (which is the BS2sx unit for a period based on its own internal clock). Thus we have a clock with a period which is equal to 1 millisecond. The next line of code shiftin 2,1,msbpost,[adcbits\8] collects serial data for us. The BASIC Stamp collects data on P2 using the pulses on P1 as a reference. The mode msbpost is one of four possible modes. Here it indicates that the ADC0831's output bits are ready after the clock pulse’s negative edge, which is the transition from high to low. It also indicates that the bits are transmitted in a descending order, starting with the most significant bit (MSB). The term [adcbits\8] means that the data is shifted into the variable adcbits and that 8-bits are expected. ADCDATA: out0=1 out0=0 out1=0 pulsout 1,1250 shiftin 2,1,msbpost,[adcbits\8] return The next section of code starts by sending the cursor to the top-left or “home” position of the debug window. Then we print the message in quotes which is 8-bit binary value: . A comma is need before the next parameter which is bin8. This makes the value of the variable adcbits an 8-bit binary number. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 6 DISPLAY: debug home debug "8-bit binary value: ", bin8 adcbits return 7. To run the program we need to connect the serial cable from our PC to the Board of Education. As you do the next step please take care not to touch the Basic Stamp because it is vulnerable to static electricity. In fact it is a good idea to discharge yourself by touching the ground (outer) terminal of one of the BNC connectors on the scope anytime you are about to handle the Board of Education. Locate the serial cable on your lab bench. One end is connected to the back of the PC for you. Connect the other end of the serial cable to the serial connector on the left side of the Board of Education. You don’t need to tighten the screws. We also need to connect the power supply plug to the Board of Education. The green LED in the lower center of the board should light. To run the program, select Run from the menu bar and then select Run from the pull down menu. If you get an error message, check the items indicated or check your typing. Is the debug window showing you an 8-bit binary number? If not ask your lab instructor for help. 8. Rotate the thumb wheel of the potentiometer with your fingers or using the screw driver like tuning tool in one of your blue bins. Do the binary numbers change from 00000000 to 11111111? If not ask your lab instructor for help. Demonstrate this to your lab instructor and have your instructor sign off on this is Section VI-A-8. Set your pot to somewhere in the center position. Record the 8-bit binary number. Calculate and record the decimal equivalent of your displayed result. See the Lab Lecture for the formula. Show your work, that is, 1 or 0 multiplied by 2 n-1. 9. Close the debug window. 10. Next let’s convert the binary value to a decimal equivalent using PBASIC. All we need to do is to add the following line to our file. It is highlighted below. You do not need to bold your commands. DISPLAY: debug home debug "8-bit binary value: ", bin8 adcbits debug cr, cr, "Decimal value: ", dec3 adcbits return Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 7 The command debug cr, cr, "Decimal value: ", dec3 adcbits tells the debug window to display two carriage returns (or two blank lines) followed by the message in quotes. A three decimal value of the variable adcbits is then displayed. 11. Type the above into your existing program and Run your new program. Does this decimal value agree with your calculation of Section VI-A-8? If not go back, find your error and correct. 12. Close the debug window. B) Calculating Fixed Point Numbers 1. Our next task is to display the value of voltage that our decimal number indicates. From the Lab Lecture notes we showed that the measured voltage was v = Vref * [Decimal value measured / 255] where Vref = Vdd = 5 for our circuit. We need to declare another variable, calculate the voltage and display the results in the debug window. The following is shown below where the added code is highlighted. '{$STAMP BS2sx} 'ADC0831 Binary output display. 'Declarations. adcbits var byte v var byte output 0 output 1 input 2 'Start display. debug cls 'Main routine. main: gosub ADCDATA gosub CALC_VOLTS gosub DISPLAY goto main ADCDATA: out0=1 out0=0 out1=0 pulsout 1,1250 shiftin 2,1,msbpost,[adcbits\8] return Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 8 CALC_VOLTS: v=5*adcbits/255 return DISPLAY: debug debug debug debug return home "8-bit binary value: ", bin8 adcbits cr, cr, "Decimal value: ", dec3 adcbits cr, cr, "DVM Reading: ", dec3 v, " Volts" 2. Type the above into your existing program and Run your new program. Set the pot so that the decimal equivalent is 165. This yields a voltage of 3.23529. Your display should read 003. As you vary the pot you will only get readings like 000, 001, 002, 003, 004 and 005. Do so at this time. 3. Close the debug window. C) 1. Calculating Floating Point Answers What you are seeing is due to the fact that the Basic Stamp is a fixed point processor which does integer math, that is, counting numbers like ..-3, -2, -1, 0, 1, 2, 3, ... . In fact the largest number that the Basic Stamp can process is 65,535 = 216 -1 because the Basic Stamp has a 16-bit processor. When doing integer math, the fractional part of any answer is just discarded or what is called truncated. Fortunately there is a command in PBASIC that can allow us to find the fractional part and display it. To illustrate the problem, suppose that we find 5*165/255. As shown in Fig. 3, we can multiply 5 time 165 first and get an integer result of 825 which is less than the maximum number of 65,535. Dividing 825 by 255 we get 3 with an remainder of 60 which is also an integer. Although not a standard way, we could get the next digit to the right of the decimal point by multiplying the remainder by 10 and then dividing by 255. As shown in Fig. 3, we have a remainder of 90. We can repeat this process and to get as many digits as we want. But we only have an 8-bit binary number to start with and this only yields 3 decimal digits of accuracy so we will stop with two places to the right of the decimal point. In PBASIC there is a remainder command //. Since we can only use two more places of accuracy we could multiply the remainder by 100 and then divide by 255. This will give us two more places in one step but remember that the remaining digits are truncated. Also, the largest remainder is 254 and this times 100 will not exceed 65,535. To modify the code we need to add another variable, modify our voltage calculation and update the display. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 9 Figure 3. Long division Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 10 '{$STAMP BS2sx} 'ADC0831 Binary output display. 'Declarations. adcbits var byte v var byte R var byte v2 var byte output 0 output 1 input 2 'Start display. debug cls 'Main routine. main: gosub ADCDATA gosub CALC_VOLTS gosub DISPLAY goto main ADCDATA: out0=1 out0=0 out1=0 pulsout 1,1250 shiftin 2,1,msbpost,[adcbits\8] return CALC_VOLTS: v=5*adcbits/255 R=5*adcbits//255 v2=100*R/255 return DISPLAY: debug debug debug debug debug home "8-bit binary value: ", bin8 adcbits cr, cr, "Decimal value: ", dec3 adcbits cr, cr, "DVM Reading: " dec1 v, ".", dec2 v2, " Volts" return 2. Type the above into your existing program and Run your new program. Set the pot so that the decimal equivalent is 165. This yields a voltage of 3.23. If not, ask you instructor for help. Explain in your own words in Section VI-C-2 of the Lab Report what the new debug commands are doing. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 11 D) 1. Checking the Accuracy of the Digital Voltmeter To check the accuracy of our digital voltmeter, suppose that we compare our voltmeter to the Fluke 8840A. Obtain a black and red banana-tograbber cable from the racks along the wall. Plug the red banana plug into the HI input and the black banana plug into the LO input. Turn on the Fluke 8840A. It should be on the V DC scale if not press V DC. Insert a piece of wire stripped on both ends into the hole associated with the wiper (terminal B in Fig. 1) of the 100 kS pot and connect the red grabber to the exposed end. Likewise, insert a piece of wire stripped on both ends into the hole associated with ground (Vss) and connect the black grabber to the exposed end. You are now measuring the analog voltage of the potentiometer voltage divider. 2. Fill-in the Table in Section VI-D-2 of the Lab Report. The error calculation is based on assuming that the Fluke 8840A has no error. Although this is not correct the error is very small as we had seen in Lab I. 3. Lastly using the Fluke 8840A measure the actual value of the voltage Vdd. Record in Section VI-D-3. 4. Assuming that the Fluke 8840A has no error, what are the sources of error in our digital voltmeter? Record your answers in Section VI-D-4. E) Un-programming and Clean-up 1. The next lab section is going to use the microcontroller and we really don’t want our program executed on a very different circuit. So we need to re-program our microcontroller with a null program. 2. Erase the last program leaving only the following: '{$STAMP BS2sx} output 0 out0=1 Run this program. 3. Remove the power supply plug from the Board of Education. Leave the transformer plugged into the power strip on the back of your lab bench. The green LED in the lower-center of the board should be off. Remove the serial cable from your Board of Education. Leave the other end connected to the back of the scope. Turn off the scope. Please do not save your programs. Remove all parts Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 12 and wires from the Proto-Bard and put them back into the appropriate clear boxes. Please use one box for wire and one box for parts. Clean up the surface of your lab bench from debris. Assemble your lab report, staple it and hand it in to your instructor. Please read and sign the Code of Ethics Declaration on the cover. Again one report per student. VII. 1. ASSIGNMENT FOR NEXT LAB Do you want to learn more? The experiment we just did is a shorten version of the first three experiments of an on-line lab manual called Basic Analog and Digital at http://www.parallax.com/dl/docs/books/edu/baad.pdf You can also find a complete manual (around 350 pages) for PBASIC at http://www.parallax.com/dl/docs/prod/stamps/basicstampman.pdf 2. Read the next lab experiment. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 13 Lab Report Lab V - Build Your Own Digital DC Voltmeter Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Partner: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lab Section Number .............................................. Code of Ethics Declaration All of the attached work was performed by our lab group as listed above. We did not obtain any information or data from any other group in this lab or any other lab section. Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 14 VI-A-2 is constructing this week’s circuits. is typing this week’s programs. VI-A-3 I correctly. (Lab instructor’s initials) verify that Fig. 1 is wired VI-A-8 I (Lab instructor’s initials) verify that the circuit of this section is functioning correctly. The 8-bit binary number = The decimal equivalent = Show work below: Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 15 VI-C-2 VI-D-2 Debug Window Fluke 8840A % Error 0.50 1.00 1.50 2.00 2.50 3.00 3.50 4.00 4.50 5.00 where % Error = {(Debug - Fluke) / (Fluke) } x 100% Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 16 VI-D-3 Vdd = VI-D-4 Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 17 This lab does not have a set of lecture notes ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ELECTRONIC INSTRUMENTATION AND SYSTEMS LABORATORY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING MICHIGAN STATE UNIVERSITY I. TITLE: Lab VI - Serial Liquid Crystal Display II. PURPOSE: Displaying text and data can also be done with a display module. This module has its own microcontroller to manage the display. In this experiment we will use a 2 x 16 display which means 2 lines with 16 characters per line. The concepts covered are: 1. displaying text and data; 2. command: CON; 3. asynchronous serial data transmission; 4 command: SEROUT; 5. command: FOR_NEXT. The laboratory techniques covered are: 1. using an off the shelf liquid crystal display to display text and data. III. BACKGROUND MATERIAL: This lab does not have Lab Lecture Notes. The ideas are integrated into the experiment. IV. EQUIPMENT REQUIRED: 1 V. PC PARTS REQUIRED: 1 1 1 1 1 1 Pliers Wire stripper and cutter Board of Education with BS2sx microcontroller Serial Cable Wall transformer with output plug BPI-216 2 Line by 16 Character LCD Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 1 VI. LABORATORY PROCEDURE: A) Liquid Crystal Display (LCD) Module 1. In this experiment we are going to connect an LCD module to the Basic Stamp so that we can have a display without using a PC (Debug window). The display has two lines with 16 characters per line. 2. If you built the circuits last week, you must allow your partner to do it this week no matter how long it takes. Indicate who will be building the circuits this week in section VI-A-2 of your Lab Report. The other person will type the programs. Your lab instructor is keeping a record of this. If you fail to alternate building the circuits with your partner as indicated in the lab, your lab report will not be accepted and you will receive a grade of 0 for that lab. 3. Our first exercise will be to type a program in PBASIC which will display text. To do this we first need to connect the LCD module to the Board of Education. Whenever we work on the Board of Education, we need to make sure all connections to power are off. This is for our protection and the protection of the microcontroller. We will do this for the Board of Education by disconnecting the power supply plug which is located at the top-left of the Board of Education, if necessary. The green LED in the lower-center of the board is on when the power supply is connected and off when it is not. The green LED should be off. Locate the LCD display module. A picture of this display is shown in Fig. 1. The module has 3 wires connected to it. The red wire is connected to Vdd. The connection to this is in the black row at the top of the white proto-board on the left hand side. The black wire of the LCD display module is connected to the Vss (which is ground). This is in the black row at the top of the white proto-board on the right hand side. Serial data is sent on the white wire which will connect to pin P5. Make these connections at this time. Because the microcontroller is fairly expensive (around $50), please ask your lab instructor to verify that the LCD module is wired correctly and to sign off in Section VI-A-3 before you proceed. If you fail to do this, you will receive a grade of 0 for this lab and be asked to leave. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 2 Figure 1. Liquid Crystal Display (LCD) module 4. Our next task is to type a PBASIC program, which is a special version of BASIC which has been installed on the lab PC. ZERO TOLERANCE WARNING: You are about to use the lab PC. Do not use the floppy drive. Do not install any software. Do not save, erase or modify any files unless instructed to do so. You are not allowed to surf the internet, read email or print any materials off the web. Violating any of the above will result in a failing grade for the entire course. The reason is that the maintenance costs of lab must be covered by your lab fee. Increasing these fees is in no one’s best interest. Thanks for your cooperation. Move the mouse and see if the PC monitor responds. You may have to wait about ½ a minute or so. A dialog box should appear on your monitor. If the monitor is still black, hit the Scroll Lock key twice. Again wait around ½ minute for a response. Try again, if necessary. If no response ask your instructor for help. Follow the instructions and log into your EGR account. Be patient this may take a few minutes. The basic stamp editor is on the desktop. Double click on this and an editor should appear on the screen. 5. We first need to insert a directive that this is a Basic Stamp 2sx program. This is done by selecting Directive in the menu bar and then by selecting BS2sx in the pull down menu. The following line of code will appear: '{$STAMP BS2sx} Type the following on the next lines using tabs to indent: ' Start by defining some useful constants N9600 con $40F1 I con 254 CLR con 1 LINE2 con 192 Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 3 pause 1000 serout 5,n9600,[I,CLR] pause 1 serout 5,n9600,["Hello, My Name "] serout 5,n9600,[I,LINE2,"is Fred Electronics "] 6. About the Code After the declaration line, the first line is a comment that begins with an apostrophe. It has no effect on the program. ' Start by defining some useful constants The LCD module uses decimal numbers for instructions and locations on the display. These can be hard to remember especially when trying to correct errors in the coding. There is a constant command (CON) in PBASIC that allows a symbol to be equated to another symbol. As in our previous programs, PBASIC is not case sensitve except for displaying text. N9600 con $40F1 I con 254 CLR con 1 LINE2 con 192 In the first line above, N9600 is substituted for $40F1 which is the command of the BASIC Stamp for sending data at 9600 baud (9600 bits per second). The next line is substituting I for the number 254 which is the command of the LCD module for an instruction prefix. This must be sent before an instruction is sent so that the microcontroller in the LCD module knows that the next command is an instruction. The next line substitutes CLR for the number 1 which is the instruction to clear the display and place the cursor at the upper left corner. The final line is substituting LINE2 for the number 192 which is the position of the start of the 2nd row of the display. The next section of code displays a typed message. pause 1000 serout 5,n9600,[I,CLR] pause 1 serout 5,n9600,["Hello, My Name "] serout 5,n9600,[I,LINE2,"is Fred Electronics "] The command PAUSE 1000 is needed to give the display 1 second after power up to initialize the LCD. The SEROUT is a PBASIC command to send serial asynchronous data. The 5 refers to pin 5 of the BASIC Stamp. The constant n9600 is the command to send data at 9600 baud. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 4 The terms in square brackets are an instruction prefix value (I ) followed by the instruction to clear the screen. We then need to pause 1 millisecond to allow time for the LCD to execute this special instruction. Next we send data again but this time text that says: Hello, My Name. We don’t need to pause here. This is followed by a new instruction to go to line 2 and print some more text. 7. To run the program we need to connect the serial cable from our PC to the Board of Education. As you do the next step please take care not to touch the Basic Stamp because it is vulnerable to static electricity. In fact it is a good idea to discharge yourself by touching the ground (outer) terminal of one of the BNC connectors on the scope anytime you are about to handle the Board of Education. Locate the serial cable on your lab bench. One end is connected to the back of the PC for you. If necessary, connect the other end of the serial cable to the serial connector on the left side of the Board of Education. You don’t need to tighten the screws. We also need to connect the power supply plug to the Board of Education. The green LED in the lower center of the board should light. To run the program, select Run from the menu bar and then select Run from the pull down menu. If you get an error message, check the items indicated or check your typing. Can you explain why all of the text you typed for line 2 is not displayed? Record your response in Section VI-A-7 of the Lab Report. 8. To show the need for the PAUSE command, comment out the PAUSE 1 with 'PAUSE 1 so that your program looks like the following (you don’t need to bold the command it was done so that you could see it better) : '{$STAMP BS2sx} ' Start by defining some useful constants N9600 con $40F1 I con 254 CLR con 1 LINE2 con 192 pause 1000 serout 5,n9600,[I,CLR] 'pause 1 serout 5,n9600,["Hello, My Name "] serout 5,n9600,[I,LINE2,"is Fred Electronics "] Run this modified program. The H in Hello was sent too soon and won’t be displayed. Go back and undo the 'PAUSE 1 to PAUSE 1. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 5 9. Modify your program in the following way: '{$STAMP BS2sx} ' Start by defining some useful constants N9600 con $40F1 I con 254 CLR con 1 LINE2 con 192 pause 1000 serout 5,n9600,[I,CLR] pause 1 serout 5,n9600,["Hello, My Name "] pause 6000 serout 5,n9600,[I,LINE2,"is Fred Electronics "] Run this modified program and explain what has happened in Section VI-A-9 of the Lab Report? 10. Can you modify the code to flash the display using a goto command to clear the display for 1 second, display Hello, My Name for 2 seconds, followed by is BASIC Stamp for 5 seconds and repeat this forever. Demonstrate this to your lab instructor and have your instructor sign off on this is Section VI-A-10. PRINT your file with the BASIC Stamp Editor. One copy for each member of your group. Write this section number (VI-A-10) on the topright of the page. Attach as indicated in the Lab Report. Do not save your file on the PC’s hard disk. Explain what you did on the print out of the program in section VI-A-10 of the Lab Report. 11. As we showed in Lab IV, once a program is downloaded we no longer need to be connected to our PC. If you want to see this again, remove the serial cable from the Board of Education, your display should still be flashing like before. Re-connect it for the next section. B) Printing a Label and Updating Information 1. Our next task is to display a message and then display some data. Type or modify your program to be the following: '{$STAMP BS2sx} 'Start by defining some useful constants N9600 con $40F1 I con 254 Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 6 CLR con 1 LINE2 con 192 L2_C13 con 205 j var word pause 1000 serout 5,n9600,[I,CLR] pause 1 serout 5,n9600,["Hello, My Name "] serout 5,n9600,[I,LINE2,"is BASIC Stamp "] pause 3000 serout 5, n9600, [I, clr] pause 1 serout 5, n9600, ["Watch me, I"] serout 5, n9600, [I, LINE2,"can count:"] Again: for j = 0 to 999 serout 5, n9600,[I, L2_C13, DEC3 j," "] pause 100 next goto Again 2. About the Code The following is the character location of our display: Char: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Line 1: 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 Line 2: 192 193 194 195 196 197 198 199 200 201 201 203 204 205 206 207 So L2_C13 con 205 is substituting L2_C13 for the number indicating character 13 in line 2. We are going to place some data at this location. The next set of code records a value of a number that is updated in a loop. Again: for j = 0 to 999 serout 5, n9600,[I, L2_C13, DEC3 j," pause 100 next goto Again "] The For .. Next function creates a repeating loop between For and Next. The counter here is j which was defined as a word (16-bits). This is needed because we are going to count from 0 to 999 and 8-bits only goes up to 255. On the next line, the cursor is sent to character space 13 of line 2. The decimal value of j is printed with 3 spaces. The pause of 100 milliseconds is to slow down the count. The goto repeats the count over. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 7 Run this program. 3. Modify the code to count from 0 to 9999. To make it count quicker, change the pause 100 in the For ... Next function to pause 10. Type and run. Demonstrate this to your lab instructor and have your instructor sign off on this is Section VI-B-3. Print your file. Label the section number and attach as explained in the Lab Report. Explain what you did on the print out of the program in section VI-B-3 of the Lab Report. C) Un-programming and Clean-up 1. The next lab section is going to use the microcontroller and we really don’t want our program executed on a very different circuit. So we need to re-program our microcontroller with a null program. 2. Erase the last program leaving only the following: '{$STAMP BS2sx} output 0 out0=1 Run this program. 3. Remove the power supply plug from the Board of Education. Leave the transformer plugged into the power strip on the back of your lab bench. The green LED in the lower-center of the board should be off. Remove the serial cable from your Board of Education. Leave the other end connected to the back of the scope. Please do not save your programs. Remove the display connections from the Board of Education. Clean up the surface of your lab bench from debris. Assemble your lab report, staple it and hand it in to your instructor. Please read and sign the Code of Ethics Declaration on the cover. Again one report per student. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 8 VII. 1. ASSIGNMENT FOR NEXT LAB Do you want to learn more? The experiment we just did is a shorten version of the some of the examples at the maker of the LCD module at: http://www.seetron.com/lcd_andex.htm 2. Read the next lab experiment. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 9 Lab Report Lab VI - Serial Liquid Crystal Display Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Partner: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lab Section Number .............................................. Code of Ethics Declaration All of the attached work was performed by our lab group as listed above. We did not obtain any information or data from any other group in this lab or any other lab section. Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 10 VI-A-2 is constructing this week’s circuits. is typing this week’s programs. VI-A-3 I correctly. (Lab instructor’s initials) verify that Fig. 1 is wired VI-A-7 VI-A-9 Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 11 VI-A-10 (Lab instructor’s initials) verify that the circuit of this I section is functioning correctly. Do not save your file. Mark VI-A-10 on the top right side of your print out and attach as the next page. Explain what you did on the print out of your program. VI-B-3 (Lab instructor’s initials) verify that the circuit of this I section is functioning correctly. Do not save your file. Mark VI-B-3 on the top right side of your print out and attach as the page after VI-A-10. Explain what you did on the print out of your program. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 12 ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009.. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009.. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009.. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009.. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009.. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009.. ELECTRONIC INSTRUMENTATION AND SYSTEMS LABORATORY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING MICHIGAN STATE UNIVERSITY I. TITLE: Lab VII - Power Amplifier for a Portable CD Player II. PURPOSE: Most students have a portable CD, MP3 or tape player. These devices are designed to work with headphones. In this lab, we will be building a power amplifier that can be used to drive a speaker so that you can listen to your player without using headphones. The concepts covered are: 1. current limit of an op-amp; 2. non-inverting amplifier; 3. V-I characteristics of an NPN and PNP bipolar transistor ; 4. stereo-to-monaural conversion. III. BACKGROUND MATERIAL: See Lab Lecture Notes. IV. EQUIPMENT REQUIRED: 1 1 2 2 V. HP Infinium Oscilloscope HP33120A Function Generator / Arbitrary Waveform Generator HP6216C DC Power Supplies Agilent 10073C 10:1 Miniature Passive Probes PARTS REQUIRED: 1 1 1 2 1 1 1 1 1 3 1 PB-104 Proto-Board Pliers Wire stripper and cutter BNC-to-Banana adapter 8 S Speaker CD (MP3 or tape) player. Bring your own if you have one. LM741 IC operational amplifier TIP31A NPN power transistor TIP32A PNP power transistor 1 kS ± 5% (Brown-Black-Red-Gold) resistors 2.2 kS ± 5% (Red-Red-Red-Gold) resistors Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 1 1 1 2 1 10 kS ± 5% (Brown-Black-Orange-Gold) resistors 10 kS potentiometer 0.1 :F capacitors (glossy green stamped 104K) 0.22 :F capacitor (glossy green stamped 224K) VI. LABORATORY PROCEDURE: A) HP6216C Power Supplies 1. In using integrated circuits, it is necessary to supply power to operate the chip. For the operational amplifier in this experiment, we need to supply +6VDC and !6VDC. We will use two power supplies to do this. The HP6216C power supply is adjustable from a magnitude of 0 to 30V as indicated in Fig. 1. Figure 1. Power supply equivalent circuit With no external connections to the three terminals in the lower right, turn on both power supplies by depressing the button in the lower left corner. There are two knobs on each supply. The right knob marked CURRENT controls the maximum magnitude of current, turn this knob fully clockwise. This allows our circuits to draw up 500mA of current. The left knob marked VOLTAGE allows the user to set a desired voltage magnitude. Turn this knob and observe. Set the magnitude of each supply to approximately 6. 2. Since 500mA of current is large enough to melt our Proto-Board, let's set the current limit much smaller. Obtain two black banana wires from the racks on the wall. Connect one of these two black banana wires between the % and & terminals of each supply. Notice that the voltage drops to zero on the meter. There is a slide switch on the power supply to convert the meter to measure current instead of voltage. Move this switch to the current setting. Rotate the CURRENT control such that the current is now limited to approximately 50mA for each supply. Move the slide switch back to display voltage on the meter and remove the black banana wires. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 2 Note: 5. B) If your circuit ever tries to draw more than 50mA of current then the voltage will collapse, that is, it will drop to a much lower value in voltage than what is set by the voltage control. Do not try to increase the current control setting because something is seriously wrong. Increasing the current control may melt the Proto-Board. If this occurs, please ask your instructor for help. Turn OFF both supplies at this time. Non-inverting Amplifier with a Power Booster 1. If you built the circuit last week on the Proto-Board, you must allow your partner to do it this week no matter how long it takes. Indicate who will be building the circuits this week in your Lab Report. Your lab instructor is keeping a record of this. If you fail to alternate building the circuits with your partner as indicated in the lab, your lab report will not be accepted and you will receive a grade of 0 for that lab. 2. We will build and test the non-inverting amplifier shown in Fig. 2. All pins are labeled with a circle. The capacitor is there to block any DC levels that may come from the circuit we are going to build in section VID. Figure 2. Non-inverting amplifier with a power booster Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 3 The top view of the LM741 operational amplifier (op-amp) is shown in Fig. 3. All integrated circuits (ICs) are numbered in a counter-clockwise fashion with some indication which side is the top. It may be a groove at the top or a dot near pin #1. Fig. 4 has a front view of the bipolar transistors. The pin locations are the same for both NPN and PNP. Fig. 5 shows the front view of a potentiometer. Figure. 3. LM741 pinout Fig. 4. Bipolar transistor pinout 3. Fig. 5. Potentiometer pinout The layout for the non-inverting amplifier on the Proto-Board is shown in Fig. 6. Compare this with the schematic of Fig. 2. When wiring any circuit, noise and interference can be minimized by using the shortest length of wire to make your connections. A supply of precut wires is in a clear box on your lab bench. If you need more wire it is available in a brown box near the door. When making the connections on the board, it is best to use the pliers to insert and remove wires. The transistors may be difficult to push into the Proto-Board. If this is the case gently rock the transistor side-to-side and back-and-forth until the pins slip in. If you are having trouble ask you lab instructor for help. Please note that the large metal tab of the transistor is also connected to the collector. It is very important that no wire touch this because it will short out your circuit. This metal tab serves as a heat sink which carries away the power that is dissipated in the transistor. It is good practice to mark on the schematic a small check or slash when a connection is made. Remember that the banana connectors at the top of the Proto-Board make a good electrical contact only when you have stripped off enough of the plastic coating to see the shinny wire exposed. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 4 Figure 6. Non-inverting amplifier with a power booster circuit layout Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 5 Noise pickup due to long wires is a serious problem with many electronic circuits. In our case the long wires from the power supply act like antennas picking up unwanted voltages. The causes are very complicated but the fix up is quite simple. By putting capacitors across power connections we can hold the voltage between two points and squelch most noise pickup. Fig. 6 shows two 0.1 :F bypass capacitors across the +6 V and -6 V bus strips. To make the wiring of this capacitor easier, a second ground bus was created by bringing a wire from ground to the strip next to the +6 V. This is the lowest wire in Fig. 6. 4. The following description is shown in Fig. 7. We use color coded wires to help avoid errors. Do not turn on the power supplies or function generator until instructed to do so. Figure 7. Wiring diagram To make the top supply positive connect a black wire from the minus terminal to the ground terminal. To make the bottom supply negative, connect a black wire from the plus terminal to the ground terminal. Then to make sure we have a solid ground, connect a black wire from the upper supply’s minus terminal to the lower supply’s plus terminal. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 6 To connect the power supply to our circuit, connect a black banana wire from the ground terminal of the -VCC power supply to the black terminal on the Proto-Board. This connects the grounds of our power supply to the grounds our circuit. Connect a black banana wire from the minus terminal of the -VCC power supply to the red terminal marked V1 on the Proto-Board. Connect a red banana wire from the plus terminal of the +VCC power supply to the red terminal marked V2 on the Proto-Board. To connect the function generator to the Proto-Board, we need to convert the BNC connector on the function generator to a banana connector. In the blue box under the top shelf of your lab bench is such a connector. Place the BNC-to-Banana adaptor on the function generator output. Connect a black banana wire from the black terminal on the function generator to the black ground terminal on the Proto-Board. Connect a red banana wire from the red terminal of the function generator to the red terminal marked V3 on the Proto-Board. 5. Once you have assembled the circuit, have your lab partner check your wiring. Ask your lab instructor to also inspect this for you because errors in wiring can permanently damage the Proto-Board. 6. Turn on the oscilloscope. Press the Default Setup button to clear the settings of the last user. If not already present, connect two 10:1 probes to your scope. One for channel Ø and one for channel Ù. We would like to display the function generator on channel Ø. To do this take the probe for channel Ø and pull back the holder to expose a metal hook. Connect this hook to the wire of the capacitor which is connected to the wire coming from the function generator. We would like to display the output of the non-inverting amplifier on channel Ù. To do this take the probe for channel Ù and pull back the holder to expose a metal hook. Connect this hook to the wire of the resistor which is connected to the output of your amplifier and is also connected to the two emitters of our transistors. 7. The black alligator clip on each probe is the ground connection for the scope. We need to connect this to minimize noise pickup. Take a short piece of wire and put it in the ground bus strip (far left) that you are using on the Proto-Board. Connect the ground clips of both channels to this wire or if you have trouble reaching use another such wire. 8. We are about to apply power to our circuit. ALWAYS WATCH THE POWER SUPPLY METER WHEN FIRST TURNING ON THE POWER Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 7 SUPPLY. If it dips from its preset value, quickly turn off the power supplies. Something is seriously wrong. Turn on both power supplies simultaneously. If the voltage meter dips or drops from our preset value of 6 volts, quickly turn off both supplies and ask your instructor for help. If this is not the case continue on. 9. Turn on the function generator. Again watch for any dips in the voltage meter. Set the termination to HIGH Z. [Recall from Lab II: Press the Blue Shift button, followed by pressing the Enter button just above the Shift button. A: MOD MENU should appear on the display. Pressing the > button once should cause B: SWP MENU to appear. Pressing the > button again should cause C: EDIT MENU to appear. Pressing the > button again should cause D: SYS MENU to appear. We can go down into this menu by pressing the » button which will cause 1: OUT TERM to appear. Pressing the » again will cause 50 OHM to appear. Pressing > will finally cause HIGH Z to appear. To pick this option all we need to do is to press the Enter button again. This resetting of the high resistance termination option will remain in effect until we turn off the function generator. So please do not turn off the function generator until instructed to do so. ] 10. Set the function generator to 100 mVP-P at a frequency of 500 Hz. Using the tuning tool in the blue box, set the 10k S pot to its center position. This is where the arrow is pointing to the top of the pot. 11. Put the scope in the graphical interface mode by moving the mouse pointer to the mouse icon in the upper-right corner and clicking once with the left mouse button. To reduce noise pickup, activate averaging. To do this, move the mouse pointer to the menu bar on top and find Setup. Under this find Acquisition in the pull down menu. Click on this and find Averaging in the resulting dialog box. Click on the box next to Enable. Set the # of Averages to 16. Close the dialog box. 12. Press the Auto-Scale button on the scope. If necessary adjust the vertical scale for channel Ø to 50 mV/div and for channel Ù to 200 mV/div using the large knob for each channel and the horizontal scale to 500 :s/div. What you are seeing is the input voltage of the function generator (the yellow trace) and the output voltage of the non-inverting amplifier (the green trace). It is still possible that your waveform is still “jumpy.” This can be due to high frequency pulses picked up by the trigger circuitry of our scope. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 8 These pulses can come from transmitters, like WKAR, which is located across the street, or even someone using a cell phone. These pulses can cause a false or erratic triggering of our desired waveform. Press the Trigger Coupling button until HF Reject is lit. This will reject any high frequency noise. 13. The ground reference for each channel is probably in the center of the screen. To better see the waveforms, move the ground reference for channel Ø 1 major division up from the center of the screen by using the small knob with a yellow dot painted in the center. Leave (or move by using the small knob with a green dot painted in the center) the ground reference for channel Ù in the center of the screen. You may notice a small kink in the output waveform around zero. This is where there is not enough voltage to keep either transistor out of cutoff. The non-inverting amplifier that we just built has a gain of at most 11. Rotate the pot until the gain is maximum. This should be counterclockwise. Roughly counting the divisions on the screen and multiplying by the scale for each channel in volts/div, channel Ù should be about 11 times bigger than channel Ø. If this is not the case ask your instructor for help. Print this waveform for each member of your group. Mark which waveform is the function generator and which waveform is the output of the op-amp. Mark this section letter and number on the top right side of your plot and attach it as indicated in the Lab Report. 14. Using the measurement tool bar (fifth icon from the top), measure the peak-to-peak value of each waveform and record in your Lab Report. Calculate the gain by taking the ratio of these two readings. Record. 15. Rotate the pot until the gain is minimum. Your scope traces may be drifting on the screen because the triggering is done on the output of the op-amp which is now zero. C) Adding a Speaker 1. We don’t want to turn off the function generator because of the HIGH Z setting, but we can effectively turn it off by disconnecting the red banana wire that goes from the red terminal of the function generator to the red terminal marked V3 on our Proto-Board. Remove both ends of the wire at this time. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 9 Turn off the power supplies. We are doing this because we are about to modify our circuit. For our safety and the protection of our circuit components, we never want to work on a circuit with power applied. 2. There is a BNC connector attached to the lab bench. This is connected to a studio JBL speaker on your lab bench. Use a second BNC-to-Banana adapter to convert this to a connection we can use to our proto-board. Connect the black terminal of the speaker to your ground bus and the red terminal of the speaker to the output of the amplifier which is also connected to the two emitters of our transistors. Our speaker is now in parallel with the 2.2 kS resistor. The speaker’s resistance actually varies from about 8 S to 16 S with frequency. The parallel combination is approximately that of the speaker. We could remove the 2.2 kS resistor with no effect but we are currently using its wire for the scope probe grabber hook. So leave it in place. 3. Turn on the power supplies. If the voltage dips on either power supply quickly turn off both supplies and ask your instructor for help. If this is not the case continue on. Re-connect the red banana wire from the red terminal on the function generator to the red terminal on the Proto-Board marked V3. Again watch for any dips in the power supplies. 4. The speaker wires go to a coil which is loosely wrapped around a permanent magnet at the base of the cone of the speaker. This coil is also called a voice coil. Audio frequency currents which pass through this voice coil set up a time varying magnetic field which interacts with the stationary field established by the magnet. This causes the voice coil to be attracted to and repelled from the permanent magnet at a rate matched to the audio frequency current. The coil is physically connected to the cone and so any movement of the coil causes the cone to move. This displaces air and thus causes audible sounds. 5. Op-amps can have serious problems when connected to inductive loads. We are about to increase the volume of our circuit. The 0.1 :F capacitors we added can resonant with the inductance of the speaker voice coil causing serious distortion and possibly damage to our transistors. All of this is very dependent on how you have exactly wired your amplifier. If serious distortion occurs where the power supply voltage dips, you may have to remove one but not both of the 0.1 :F capacitors. You may also have to lower the volume. Rotate the pot to listen to your 500 Hz sine wave. Stop if the power supply voltages start to dip. If this occurs you are probably drawing all Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 10 of the available 50 mA of current. Adjust the pot for a comfortable level. Select Freq on the function generator and rotate the knob to quickly change the frequency. This is what an alarm uses to catch your attention. Please limit yourself to no more than a minute of playing with this! Return the frequency to 500 Hz. Print this waveform for each member of your group. Before you go get the output, return the volume control to zero. Mark which waveform is the function generator and which waveform is the output of the opamp. Mark this section letter and number on the top right side of your plot and attach it as indicated in the Lab Report. D) Stereo-to-Monaural Converter 1. Turn off the function generator and remove the banana wires from the function generator to the Proto-Board. Turn off the power supplies. We are doing this because we are about to modify our circuit. For our safety and the protection of our circuit components, we never want to work on a circuit with power applied. 2. Your CD or tape player has two outputs. One is for your left ear and one is for your right ear. The total music we hear is the sum of these two channels. Since we have only one speaker we could listen to each channel separately but this isn’t very enjoyable. Our other option would be to add the two channels together to get the total sound. This makes our stereo into what is called monaural. A voltage divider can be used to add the two channels together. Locate the phono plug and wires. If this is not on your lab bench ask your lab instructor for this unit. Add the two resistors shown in Fig. 8 to your non-inverting amplifier with power booster and make the connections to the phono plug. Since we don’t want to damage your CD, MP3 or tape player. please ask your lab instructor to verify your wiring and to sign off in Section VI-D-2 before you proceed. If you fail to do this, you will receive a grade of 0 for this lab and be asked to leave. Place the phono plug into your CD, MP3 or tape player where your headphones are connected. 3. Turn on the power supplies. If the voltage dips on either power supply quickly turn off both supplies and ask your instructor for help. If this is not the case continue on. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 11 Figure 8. Adding a stereo-to-monaural converter Turn your CD, MP3 or tape player on with the volume control of the player set very low. Adjust the volume control of the non-inverting amplifier to the mid-point. Slowly increase the volume of your player while closely watching the power supply voltages. Please be considerate of others as you play your music and limit yourself to no more than a minute of playing time. If you see the voltages dip, you are hitting the 50mA limit on that supply, and your sound will also distort. If you want to fix this, slowly turn the current limiting knob until the dipping or the sound distortion stops. What you are seeing on the screen of the scope are speech waveforms. Print this waveform for each member of your group. Before you go get the output, return the volume control of non-inverting amplifier to zero. Mark this section letter and number on the top right side of your plot and attach it as indicated in the Lab Report. 4. Turn off your power supplies. Disconnect your CD, MP3 or tape player. Disassemble the remainder of your circuit. Leave the probes attached to the scope and return all cables (but not your probes or the phono plug) to the appropriate racks and submit your Lab Report. Put your remaining parts back into the clear box. Return wires to the other clear box. Brush the surface of your lab bench clean. Turn off the scope. VII. ASSIGNMENT FOR NEXT LAB 1. Read the next lab experiment. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 12 Lab Report Lab VII - Power Amplifier for a Portable CD Player Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Partner: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lab Section Number .............................................. Code of Ethics Declaration All of the attached work was performed by our lab group as listed above. We did not obtain any information or data from any other group in this lab or any other lab group. Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 13 VI-B-1 ______________________________ is constructing this week’s circuits. VI-B-13 Mark VI-B-13 on the top right side of your plot and attach as the next page. VI-B-14 Output voltage = VP-P Input voltage (Function generator) = VP-P Output voltage / Input voltage = Gain = VI-C-5 Mark VI-C-5 on the top right side of your plot and attach behind VI-B-13. VI-D-2 (Lab instructor’s initials) verify that the CD or tape I player is connected correctly. VI-D-3 Mark VI-D-3 on the top right side of your plot and attach behind VI-C-5. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 14 ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ELECTRONIC INSTRUMENTATION AND SYSTEMS LABORATORY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING MICHIGAN STATE UNIVERSITY I. TITLE: Lab VIII - DC Power Supply and Regulator II. PURPOSE: Rectifiers are used to turn an ac voltage with an average voltage of zero into a voltage with a non-zero average value. Adding a large capacitor results in a fairly constant voltage with a small ac ripple voltage. The ripple can be greatly reduced with a Zener diode shunt regulator. The concepts covered are: 1. transformer turns ratio relationships 2. half-wave rectification; 3. half-wave rectification with capacitive smoothing; 4. Zener diode shunt regulator. The laboratory techniques covered are: 1. using the Infinium's Toolbar to measure average voltages, peak voltages, peak-to-peak voltages and frequency; 2. using the Infinium's Math Functions to differentiate a capacitor voltage to estimate maximum repetitive diode current. III. BACKGROUND MATERIAL: See Lab Lecture Notes. IV. EQUIPMENT REQUIRED: 1 1 2 HP Infinium Oscilloscope Fluke 8840A Digital Multimeter Agilent 10073C 10:1 Miniature Passive Probes Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 1 V. PARTS REQUIRED: 1 1 1 1 1 1 1 1 1 1 PB-104 Proto-Board Pliers Wire stripper and cutter 9:1 Step-down transformer 1N4002 Silicon rectifier 1N759A 12V Zener Diode 2.2kS ± 5% (Red-Red-Red-Gold) resistor 1.8kS ± 5% (Brown-Gray-Red-Gold) resistor 330S ± 5% (Orange-Orange-Brown-Gold) resistor 47:F 35V Electrolytic capacitor VI. LABORATORY PROCEDURE: A) Transformer 1. We will see later in ECE 345 that AC voltage is measured in a unit call RMS (root-mean-square). This is a unit that compares AC voltage and DC voltage in terms of producing the same heating effects. The transformer (gray) box on your lab bench contains a 12.6 VRMS centertapped transformer. This means that for a typical US wall outlet voltage of 115 VRMS on the primary side of transformer you could expect to measure 12.6 VRMS on the secondary side of the transformer. This gives a turns ratio of 115:12.6 or 9.12:1. The center-tap means that half of this voltage at the secondary is between the red terminal and the black terminal. A fuse was added on the primary side to provide protection from excessive currents if a fault were to occur on the secondary side. This is common practice whenever a circuit is connected to line voltage. A schematic of the transformer box is shown in Fig. 1. Due to losses in the transformer the secondary voltage will not be exactly 12.6 VRMS for a typical 115 VRMS input. Figure 1. Transformer Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 2 Make sure that the switch on the right side of the transformer box is in the OFF position. Check that the power cord is plugged in. Using the Fluke DMM, connect a banana wire from the HI INPUT to one of the red terminals of the transformer box. Connect another banana wire from the LO INPUT to the other red terminal. Turn ON the DMM and select V AC. This scale reads voltage in RMS units. Turn ON the transformer box switch. 2. Detach the Lab Report section of this lab. Record the value of the secondary voltage. Using the typical value for our lab’s wall outlet as 120.6 VRMS which is the primary voltage, VP , calculate the turns ratio. 3. Turn OFF the transformer box and remove the banana wires. Turn OFF the DMM. B) Half-Wave Rectifier 1. If you built the circuit last week on the Proto-Board, you must allow your partner to do it this week no matter how long it takes. Indicate who will be building the circuits this week in your Lab Report. Your lab instructor is keeping a record of this. If you fail to alternate building the circuits with your partner as indicated in the lab, your lab report will not be accepted and you will receive a grade of 0 for that lab. Locate the 2.2 kS and the 1N4002 diode from your parts’ box. The 1N4002 diode has a black body and white stripe (n-side or bar side).Make sure that the transformer box is turned OFF. Construct the half-wave rectifier shown in Figs. 2, 3 and 4. Figure 2. Half-wave rectifier schematic Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 3 Figure 3. Half-wave rectifier layout Figure 4. Wiring diagram Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 4 Compare Figs. 2 and 3. Do the connections make sense to you? If not ask your instructor to explain because in future labs layouts will generally not be given. 2. Turn on the oscilloscope. Press the Default Setup button to clear the settings of the last user. If not already present, connect two 10:1 probes to your scope. For this lab and all of the following labs we will always use the probes. The probes are somewhat fragile, so do not remove these probes from the scope when you are finished with the lab. 3. Connect the probe for channel Ø and channel Ù as shown in Fig. 2. Connect the black alligator ground clips of the probes to a wire placed in the ground bus (far left-side) of the Proto-Board. Turn ON the transformer. Press the Auto-Scale button on the scope. You may be noticing some jitter of the waveforms. Again this is due to the very high bandwidth of our scope. Besides bandwidth limiting that we looked at in Lab III, there is another technique which may also help stop this jumping of the waveforms. This is called trigger high frequency rejection. The internal circuitry which triggers the capturing of a waveform is fooled by noise and interference. We can filter this out with one of the buttons on the scope. On the upper right side of the scope under the label Trigger, there is a button labeled Coupling press it until HF Reject is lit. What you are seeing on channel Ø is the step down of the wall outlet voltage by about a factor of 9. It might appear to be a distorted sine wave. Some of this is due to the non-ideal transformer. Channel Ù is displaying the half-wave rectification of this stepped down sine wave. Adjust the vertical scale for each channel to 10 V/div. Move the ground reference for channel Ø one major division down from the center of the screen. Move the ground reference for channel Ù one major division up from the center of the screen. 4. Put the scope in the graphical interface mode by moving the mouse pointer to the mouse icon in the upper-right corner and clicking once with the left mouse button. Print these waveforms for each member of your group. Mark which waveform is channel Ø and channel Ù. Mark this section letter and number on the plot. Attach this as indicated in the Lab Report. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 5 5. To better see the half-wave rectification, move the ground reference for each channel to the center of the screen. Notice how the two waveforms overlap. 6. We will now turn to the auto measurement features of the Infinium. When the scope is in the graphical interface mode, a measurement toolbar is along the left side of the screen. The pictures indicate the measurement but if you place the mouse arrow over the icon a short word description will appear. Locate (fifth icon from the top) and click on the peak-to-peak voltage ( Vp-p ) measurement icon. Select Channel 1 as the Source if necessary. Likewise locate and click on the frequency measurement icon (Frequency). This is the fourth icon from the top. Select Channel 1 as the Source if necessary. Because the scope is sampling and measuring continuously, the numbers that appear on the bottom of the screen may be constantly changing. You can stop the scope with Stop button on the top-center of the scope. Do so at this time. Record in VI-B-6 the current values of Vp-p (1) and Frequency (1). The conversion from peak-to-peak voltage to RMS voltage for a sine wave, as we will later see in the course, is done by dividing by 2r2 = 2.8284. Calculate the RMS value of your transformer output and record in VI-B-6 of the Lab Report. This should be close to what you measured in VI-A-2. If this isn’t close to what you measured, ask your instructor for help. Locate (eighth icon from the top) and click on the average voltage (V avg) measurement icon. Select Channel 1 as the Source and Single Cycle if necessary. This is the average value of our waveform over a period. This should be zero but may be small number. Record in VI-B-6 the current value of V avg cycle (1) in your Lab Report. Press the Run button on the top-center of the scope to activate the scope again. Also click on the Clear All icon on the bottom of the toolbar to remove the measurement cursor. 7. Measure the max (seventh icon from the top) value of the channel Ù display using the maximum voltage (Vmax) measurement icon. Select Channel 2 as the Source if necessary. Use the Stop button and record the current value in VI-B-7 of the Lab Report. Measure the max value of the channel Ø display using the maximum voltage (Vmax) measurement icon. Select Channel 1 as the Source if necessary. Record the current value in VI-B-7 of the Lab Report. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 6 The difference of these two previous readings is the value of the voltage drop across the non-ideal diode. Calculate this and record in VI-B-7 of the Lab Report. Measure the average value of one cycle of channel Ù. Record the current value in VI-B-7 of the Lab Report. Notice how the average value has changed from approximately zero to around 6 or 7 volts. We will later see in the course that the average value of a half-wave rectified signal is approximately the max divided by B. Calculate this and record in VI-B-7. If this isn’t close to what you just measured, ask your instructor for help. 8. Press the Run button to activate the scope again. Click on the Clear All icon on the toolbar to remove the measurement cursor. 9. Turn OFF the transformer box switch. C) Half-Wave Rectifier with Smoothing Capacitor Danger: In this lab we are going to use a polarized electrolytic capacitor. Locate the 47:F capacitor in your parts’ box and note that along its side is a minus sign. This lead must be connected to ground in this experiment to insure that the voltage across it is always positive. A negative voltage across this type of capacitor results in it acting like a short circuit. This will cause the capacitor to overheat and could cause a burn if touched by you. In schematic drawings of polarized capacitors, only the positive terminal of the capacitor is usually shown. Please note that this implies that the other terminal is the negative as shown in Fig. 5. Figure 5. Polarized capacitor Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 7 1. Make sure that the switch on the gray box containing the transformer is in the OFF position (down). Put the polarized electrolytic capacitor across 2.2 kS resistor as shown in Fig. 6 with the minus terminal connected to the ground bus. Figure 6. Half-wave rectifier with smooth capacitor 2. For safety considerations, ask your lab instructor to verify that the capacitor is connected correctly. Your instructor must sign off in VI-C-2 of your Lab Report that this was inspected. Turn ON the transformer box switch. Your waveforms may be appearing to march across the screen of the scope. What has happened is that channel Ù is the default triggering reference signal that the scope uses to synchronize the displayed waveforms with. The waveform on channel Ù is much smaller in variation because of adding the capacitor and now the scope can’t synchronize itself. We can adjust the trigger level of channel Ù or we can pick a signal with bigger variations, like channel Ø. On the upper right side of the scope under the label Trigger, there is a button labeled Source press it until 1 is lit. If you still do not have a stable waveform on the screen, ask your instructor for help. Print these waveforms for each member of your group. Mark which waveform is channel Ø and channel Ù. Mark this section letter and number on the plot. Attach this as indicated in the Lab Report. 3. Measure the average value (Vavg) of the channel Ù display using the measurement toolbar. Hit the Stop button and record the current value in VI-C-3 of the Lab Report. 4. Press the Run button to activate the scope again. Click on the Clear All icon on the toolbar to remove the measurement cursor. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 8 5. Record the value of CL printed on the side of the capacitor in VI-C-5. 6. The capacitor in the circuit supplies load current for most of each cycle by dumping it stored charge into the load. The capacitor is re-charged in a very short interval when the diode is conducting. This large change in charge in a very short amount of time results in a spike of current through the diode. Since large changes in current cause small changes in diode voltage, it is hard to determine this value of surge current by measuring diode voltage. However the Infinium has a math function that will allow us to differentiate the capacitor voltage. Locate the math functions under the title bar Analyze, Math/FFT. Click on Display on, Operator - Differentiate, Source 1 - Channel 2. Close this dialog box. Is the resulting plot very noisy? Since derivatives “amplify” noise, we need to use averaging. Under Setup, Acquistion, select Enable for averaging. You may have to increase the # of Averages to as high as 256 to significantly lower your noise. Wait for the averaging to reach 256 before proceeding. This is displayed in the upper-left side of the scope’s display. You are now displaying the transformer’s secondary voltage, the capacitor voltage and its derivative. Turn off the display for channel Ø by pressing the Ø button above the probe connector. You now see the capacitor voltage and its derivative. The derivative of the capacitor voltage is proportional to the current flowing through the capacitor. Notice that the largest current flows through the capacitor when the output voltage has a positive slope. Print these waveforms for each member of your group. Mark which waveform is the capacitor voltage and which is the derivative of the capacitor voltage. Mark this section letter and number on the plot. Attach this as indicated in the Lab Report. 7. Hit Stop to freeze your screen. Measure the max derivative value using the toolbar and selecting under Source - Function 1. Record the current value of this in VI-C-7 of the Lab Report. 8. Calculate the approximate maximum repetitive current of the diode by finding the max current in the capacitor. This is the maximum derivative times the capacitance value. Record the value in VI-C-8. Press the Run button to activate the scope again. Click on the Clear All icon on the toolbar to remove the measurement cursor. Locate the math functions under the title bar Analyze, Math/FFT. Click the Display off. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 9 9. If you increased the # of Averages in VI-C-6 go back and lower it to a value of 16 under Setup, Acquistion. A high value of averages slows down the display of the scope. We will leave the averaging on to minimize high frequency noise pick-up. Turn OFF the transformer switch and remove the 2.2 kS resistor. D) 1. Zener Diode Shunt Regulator The filtered full-wave rectifier with a Zener diode regulator is shown in Fig.7. The 1N759A -12 volt Zener diode has a small gray body with the part number written as: 1N 75 9A It is also marked like any diode with the bar on the body corresponding to the bar on the symbol. Check that your transformer is OFF. Modify your existing circuit to look like Fig. 7 by adding the regulator circuit. Connect the scope probes as indicated in Fig. 7. Also make sure that the black alligator clips are connected to ground as we had done previously. Please ask your lab instructor to verify that the circuit is wired correctly and to sign off in Section VI-D-1 before you proceed. If you fail to do this, you will receive a grade of 0 for this lab and be asked to leave. Figure 7. Filtered half-wave rectifier with shunt regulator Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 10 2. Turn ON the switch on the gray transformer box. Turn on the display for channel Ø by pressing again the Ø button above the probe connector on the scope. You are now displaying the transformer’s secondary voltage and the voltage across the Zener diode and 2.2 kS load. Print these waveforms for each member of your group. Mark which waveform is transformer’s secondary voltage and which waveform is the voltage across the Zener diode and 2.2 kS load. Mark this section letter and number on the plot. Attach this as indicated in the Lab Report. 3. Measure the max voltage across the Zener diode and 2.2 kS load using the measurement toolbar. (The measurement toolbar has a hard time measuring the average value because the variations are so small.) Record the value in the Lab Report. 4. Turn OFF the switch on the gray transformer box. Replace the 2.2 kS load with a 1.8 kS load. 5. Turn ON the switch on the gray transformer box. Measure the max voltage across the Zener diode and 1.8 kS load using the measurement toolbar. Record the value in the Lab Report. 6. Move the channel Ù probe to the + terminal of the capacitor in Fig. 7. Measure the peak-to-peak value of the capacitor ripple voltage vr (channel Ù) using the measurement toolbar and record in the Lab Report. 7. Measure the average value of the capacitor voltage VCL (channel Ù) using the measurement toolbar and record in the Lab Report. 8. In summary, as shown in the Lab Lecture notes on page 5, we have a DC value of the voltage across the capacitor (VCL ) plus an AC ripple vr . The Zener diode regulates the current to hold the voltage fairly constant across the load as the load changes. 9. Turn OFF the transformer box. Completely disassemble your circuit. Leave the probes attached to the scope and return all cables (but not your probes) to the appropriate racks and submit your Lab Report. Put your remaining parts back into the clear box. Return wires to the other clear box. Brush the surface of your lab bench clean. Turn off the scope. VII. ASSIGNMENT FOR NEXT LAB 1. Read the next lab experiment. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 11 Lab Report Lab VIII - DC Power Supply and Regulator Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Partner: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lab Section Number .............................................. Code of Ethics Declaration All of the attached work was performed by our lab group as listed above. We did not obtain any information or data from any other group in this lab or any other lab section. Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 12 VI-A-2 VRMS Secondary voltage = Primary voltage for our lab = 120.6 VRMS Turns ratio = 120.6 VRMS / Secondary voltage = n:1 = :1 VI-B-1 is constructing this week’s circuits. VI-B-4 Mark VI-B-4 on the top right side of your plot and attach as the next page. VI-B-6 Secondary voltage = VSM (P-P) = Frequency = f = VP-P Hz. RMS value of the secondary voltage = VSM (P-P) / 2.8284 = VRMS Average value of the secondary = VDC Output voltage maximum = VOM = V VI-B-7 Secondary voltage maximum = VSM = V Non-ideal diode drop = VSM !VOM = Output average voltage = VO DC = V V Calculated Output average voltage = VSM / B = Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. V 13 VI-C-2 (Lab instructor’s initials) verify that the electrolytic I capacitor is connected correctly. Mark VI-C-2 on the top right side of your plot and attach as the next page. VI-C-3 Average output voltage = VO = V VI-C-5 CL = F VI-C-6 Mark VI-C-6 on the top right side of your plot and attach behind VI-C-2. VI-C-7 d VC / dt |MAX = VI-C-8 ID(MAX) . CL [d VC / dt |MAX] = A VI-D-1 I correctly. (Lab instructor’s initials) verify that Fig. 7 is wired VI-D-2 Mark VI-D-2 on the top right side of your plot and attach behind VI-C-6. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 14 VI-D-3 For RL = 2.2 kS Output voltage maximum = VI-D-5 V For RL = 1.8 kS Output voltage maximum = V VI-D-6 Capacitor ripple voltage = vr = VP-P VI-D-7 Average capacitor voltage = VCL = V Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 15 ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ECE 345 e-Notes.......Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. ELECTRONIC INSTRUMENTATION AND SYSTEMS LABORATORY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING MICHIGAN STATE UNIVERSITY I. TITLE: Lab IX - Light Activated Exhaust Fan II. PURPOSE: One use of bipolar junction transistors (BJTs) is to switch circuits on and off. Switching various loads on or off can cause problems especially when the load is inductive. Sometimes the load contains a large amount of energy and isolating this from the control circuitry is very important especially in the case of a component failure. Sensors play a role in many electronic circuits. In this lab we will use a light sensitive resistor to sense a smoke filled room and turn on an exhaust fan. When the room is again clear of smoke it will turn off the fan. This type of photo-resistor is also used in auto-focus cameras, street lamp switches and contrast controls for TVs. The concepts covered are: 1. the bipolar logic inverter; 2. switching resistive and inductive loads; 3. using a damping diode to discharge a coil; 4. using a relay for load isolation; 5. using a photo-resistor as a sensor; 6. using a magnet to activate a circuit. The laboratory techniques covered are: 1. Using a x10 probe to measure a BJT’s breakdown voltage; III. BACKGROUND MATERIAL: See Lab Lecture Notes. IV. EQUIPMENT REQUIRED: 1 1 1 1 1 2 HP Infinium Oscilloscope Fluke 8840A Digital Multimeter HP33120A Function Generator / Arbitrary Waveform Generator HP6216C DC Power Supply BK 1680 Precision DC Power Supply (13.8 V) Agilent 10073C 10:1 Miniature Passive Probes Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 1 V. PARTS REQUIRED: 1 1 1 1 1 1 1 1 1 2 2 1 1 1 2 PB-104 Proto-Board BNC-to-Banana adapter Exhaust fan Reed relay Magnet CdS (Cadmium Sulfide) photocell mounted on a gray block Green LED Red LED 470 S ± 5% (Yellow-Violet-Brown-Gold) resistor 1 kS ± 5% (Brown-Black-Red-Gold) resistor 10 kS ± 5% (Brown-Black-Orange-Gold) resistor 10 kS potentiometer .1 :F ± 10% polyester (glossy green stamped 104K) capacitor 1N4002 diode 2N3904 NPN transistors VI. LABORATORY PROCEDURE A) Inverter 1. Set one of your power HP power supplies to a 50 mA limit and a voltage value of 10 V. Please make sure that the negative terminal of the power supply is shorted to the ground terminal. Measure the voltage with the DMM and re-adjust the voltage as close to 10 V as possible. Turn OFF the supply. If you built the circuit last week on the Proto-Board, you must allow your partner to do it this week no matter how long it takes. Indicate who will be building the circuits this week in your Lab Report. Your lab instructor is keeping a record of this. If you fail to alternate building the circuits with your partner as indicated in the lab, your lab report will not be accepted and you will receive a grade of 0 for that lab. 2. This week we are going to have you and your partner layout the test circuits. 3. Using the 2N3904 pinout of Fig. 1, construct the logic inverter also shown in Fig. 1 in about the center of the Proto-Board so that we can leave room for the next sections’ circuits. Follow the general layout procedure where the +Power Supply is connected to a bus strip of the Proto-Board and likewise for the ground. Put a 0.1:F bypass capacitor from the +10 V bus strip to ground on the Proto-Board to prevent oscillations due to long wires. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 2 4. Have your lab partner check the wiring on the Proto-Board. 5. If you are unsure about any connections, ask your lab instructor to also inspect this for you because errors in wiring can permanently damage the Proto-Board. Figure 1. 2N3904 pinout and logic inverter. 6. Turn on the oscilloscope. Press the Default Setup button to clear the settings of the last user. If not already present, connect two 10:1 probes to your scope. One for channel Ø and one for channel Ù. 7. We are about to apply power to our circuit. ALWAYS WATCH THE VOLTAGE WHEN FIRST TURNING ON THE POWER SUPPLY. If it dips from it prescribed setting of 10 V, quickly turn off the power supply. Something is seriously wrong. Turn on the power supply. If the voltage dips quickly turn off the supply and ask your instructor for help. If this is not the case continue on. 8. Turn on the function generator. Again watch for any dips in voltage of the power supply. Set the termination to HIGH Z. [Recall from Lab II: Press the Blue Shift button, followed by pressing the Enter button just above the Shift button. A: MOD MENU should appear on the display. Pressing the > button once should cause B: SWP MENU to appear. Pressing the > button again should cause C: EDIT MENU to appear. Pressing the > button again should cause D: SYS MENU to appear. We can go down into this menu by pressing the » button which will cause 1: OUT TERM to appear. Pressing the » again will cause 50 OHM to appear. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 3 Pressing > will finally cause HIGH Z to appear. To pick this option all we need to do is to press the Enter button again. This resetting of the high resistance termination option will remain in effect until we turn off the function generator. So please do not turn off the function generator until instructed to do so. ] 9. Set the function generator to a 10 Vp-p squarewave at a frequency to 1.00 kHz. Next press the Offset button and set the value to 5 V. Again watch for any dips in the the power supply. 10. Display VFG and VO1 on the scope. Press the Auto-Scale button on the scope and then press the Trigger Coupling button until HF Reject is lit. Enable averaging if not already done so. This is under the title bar Setup, Acquisition, Averaging, Enabled, # of Averages - 16 (or 64 if needed). Readjust the scope settings if necessary so that VO1 is displayed in the lower half of the screen with its ground reference one division from the bottom of the screen and so that VFG is displayed in the upper half of the screen with its ground reference one division from the center of the screen. Set the time base to 200 :s/div if necessary. Measure VO1(MAX) and VO1(MIN) and record. Measure VFG(MAX) and record. Print a copy of these waveforms for each member of the lab group. Label the section number on top, label which waveform is which and attach as indicated the Lab Report. 11. Repeat VI-A-10 for VBE and VO1 12. Turn off the power supply and disconnect the wires from the function generator. B) Switching an Inductive Load 1. Make sure that the power supply is off and function generator is disconnected. CAUTION: You are about to use the BK Precision DC Power Supply (Model 1680). This black box has a fixed voltage of 13.8 V and can supply a current up to 3 Amps. The supply is turned ON by pressing the red dot on the rocker switch. The green LED will then light. Follow the directions below carefully. With the BK Precision DC Power Supply (Model 1680) OFF, use a banana wires to connect this supply to the proto-board. Please check that the ground of the proto-board is connected to the black terminal of the BK Precision power supply. Double check that all power supplies are OFF and build the circuit as shown in Fig. 3 using the remaining parts still assembled from your inverter. The pinout for the reed relay and Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 4 LEDs is shown in Fig. 2. Figure 2. Pinout of the reed relay and the LEDs Figure 3. Two inverters and relay circuit 2. Turn ON both power supplies and reconnect the function generator. Watch for dips in the HP power supply meter. (If the BK Precision supply’s green light does not come on, there is something seriously wrong. Turn OFF the supply and ask your instructor for help.) You should hear a “whining” from the relay since you are opening and closing it 1000 times per second. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 5 Display VFG and VO1 on the scope using your scope probes. Press the Auto-Scale button on the scope and then press the Trigger Coupling button until HF Reject is lit. Readjust the scope settings if necessary so that VO1 is displayed in the lower half of the screen with its ground reference one division from the bottom of the screen and so that VFG is displayed in the upper half of the screen with its ground reference one division from the center of the screen. Set the time base to 200 :s/div if necessary. Disable the averaging function (You can do this with a right mouse click and select averaging in the dialog box). Using the tool bar, measure VO1(MAX). You may see the maximum jumping all over the screen. The tool bar measurement will record the range of values it captures. Record the maximum value measured in all of the sampling. This is the breakdown voltage of your BJT and is referred to as BVCEO in transistor data sheets. Try to play with the Stop feature to display the largest spike at VO1 that you can capture. Print a copy of these waveforms for each member of the lab group. Label the section number on top, label which waveform is which and attach as indicated in your Lab Report. 3. Disconnect the function generator to stop the switching of the relay coil. Add a 1N4002 diode across the relay coil as shown in Fig. 4. Your lab instructor should verify that this is done correctly and sign off in Section VI-B-3 before you proceed. If you fail to do this, you will receive a grade of 0 for this lab and be asked to leave. Figure 4. Adding a damping diode Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 6 4. Reconnect the function generator again to start the switching of the relay coil. Again watch for any voltage dips. Display VFG in the upper half of the screen and VO1 in the lower half of the screen. Readjust the scope settings if necessary to 5 V/div for both channels as well as 200 :s/div for the time base. Measure and record VO1(MAX). Print a copy of these waveforms for each member of the lab group. Label the section number on top, label which waveform is which and attach as indicated in your report. 5. Explain what has happened. 6. Lower the frequency of the function generator to 1 Hz. Explain what is happening with the LEDs. C) Adding a Light Sensor Activation 1. Obtain a CdS (Cadmium Sulfide) photocell mounted on a gray block. Using the DMM, measure and record the resistance with the device pointing at the room lights and with your hand blocking the light. 2. Turn OFF both the power supply and disconnect the function generator. Replace the function generator shown in Fig. 3 with a voltage divider formed with a resistor / pot and the CdS photocell as shown in Fig. 5. Figure 5. CdS photocell sensor Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 7 3. Turn ON the power supply. Again watch for any dips in voltage. Adjust the pot so that only the Green LED is on when you expose the CdS photocell to room light and only the Red LED is on when you cover (but do not touch) the CdS photocell with your hand. Measure and record the value of the voltage across the CdS photocell under these two conditions using the Fluke digital voltmeter 4. Explain in your own words what is happening. D) 1. 2. Adding an Exhaust Fan Turn OFF the power supply CAUTION: You are about to connect a very powerful fan. Keep your fingers out of the blades at all times. Follow the directions below carefully. Locate the exhaust fan on your lab bench. Double check that your power supply is OFF. Connect the terminals of the fan as shown in Fig. 6. DO NOT TURN ON YOUR POWER SUPPLY UNTIL YOUR LAB INSTRUCTOR HAS VERIFIED THE CONNECTIONS AND SIGNED OFF IN YOUR LAB REPORTS. Figure 6. Adding an exhaust fan Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 8 3. With your instructor still present, turn ON the power supplies. The fan should be not be running. (If anything goes wrong turn off the supply.) Cover the CdS photocell with your hand simulating a smoke filled room. What has happened to the exhaust fan? Remove your hand and allow light to reach the CdS photocell. 4. Ask your lab instructor for a magnet, if one is not on your lab bench. Pass the magnet near but do not touch the relay. Your fan should at some point come on. Can you explain what has happened? 5. Turn OFF the power supply and disconnect the wires / connectors to your Proto-Board. Leave the probes attached to the scope and return all cables (but not your probes) to the appropriate racks and submit your Lab Report. Disassemble your circuit. Put your remaining parts back into the parts box. Return wires to the other clear box. Brush the surface of your lab bench clean. Turn OFF the DMM and scope. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 9 Lab Report Lab IX - Light Activated Exhaust Fan Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Partner: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lab Section Number .............................................. Code of Ethics Declaration All of the attached work was performed by our lab group as listed above. We did not obtain any information or data from any other group in this lab or any other lab section. Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 10 VI-A-1 ______________________________ is constructing this week’s circuits. VI-A-10 VO1(MAX) = ____________= VCC VO1(MIN) = ____________= vCE(SAT) VFG(MAX) = ____________ Mark VI-A-10 on the top right side of your plot and attach as the next page. VI-A-11 VBE(MAX) = ____________= vBE(ON) Mark VI-A-11 on the top right side of your plot and attach behind VI-A10. VI-B-2 VO1(MAX) = ____________ = BVCEO Mark VI-B-2 on the top right side of your plot and attach behind VI-A-11. VI-B-3 I correctly. (Lab instructor’s initials) verify that Fig. 5 is wired VI-B-4 VO1(MAX) = ____________ Mark VI-B-4 on the top right side of your plot and attach behind VI-B-2. Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 11 VI-B-5 VI-B-6 VI-C-1 RCdS (LIGHT) = ____________ RCdS (DARK) = ____________ VI-C-3 VCdS (LIGHT) = ____________ VCdS (DARK) = ____________ Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 12 VI-C-4 VI-D-2 I, _____________________________(lab instructor’s signature), verify that the exhaust fan is correctly connected. VI-D-3 VI-D-4 Copyright © 2009 by Gregory M. Wierzba. All rights reserved.......Fall 2009. 13 ...
View Full Document

This note was uploaded on 10/24/2010 for the course ECE ECE 345 taught by Professor Shanblatt during the Fall '09 term at Michigan State University.

Page1 / 474

ECE345_Fall_2009 - ECE 345 Electronic Instrumentation...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online