Вы находитесь на странице: 1из 463

ECE 345

Electronic
Instrumentation & Systems
Course e-Notes and Lab Manual
Fall 2016

Copyright 2016 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 & Kearns, Principles and Applications of Electrical Engineering, McGraw-Hill, 2016, 6th
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 Kirchhoffs Current Law


Charge, Current, Nodes, Conservation of Charge, Kirchhoffs Current Law,
Interpretation of Signs
Voltage and Kirchhoffs Voltage Law
Voltage, Closed Path, Conservation of Energy, Kirchhoffs 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 Ohms Law
Ohms 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, Cramers 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
Thevenins Theorem, Nortons 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, Eulers Identity, Complex
Numbers, Rectangular Form, Polar Form, Phasor Transform, Inverse
Phasor Transform, Complex Algebra, Kirchhoffs Voltage Law with Phasors,
Kirchhoffs Current Law with Phasors, Ohms 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

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

S4.1
S4.2
S4.3
S4.4
S4.5
S4.6
S4.7

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 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345L: 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 the digital multimeter.
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.

Agilent InfiniiVision DSO-X 3012A Oscilloscope


HP 33120A Function Generator / Arbitrary Waveform Generator
Fluke 8840A Digital Multimeter

PARTS REQUIRED:
1
1
1

10 S 5% (Brown-Black-Black-Gold) resistor
270 S 5% (Red-Violet-Brown-Gold) resistor
6.8 kS 5% (Blue-Gray-Red-Gold) resistor

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

VI.

LABORATORY PROCEDURE:

A)

Initial Operation of the InfiniiVision DSO-X 3012A Oscilloscope

Figure 1. InfiniiVision Oscilloscope


1.

If the 10:1 probes are connected to the scope, carefully disconnect them
by rotating the collar counter-clockwise and gently pulling. If you have
ANY difficulty please ask your lab instructor for help. These probe are
very delicate. Place them to the side for now.

2.

Press in the power switch button (k) found in the lower-left corner of the
front panel (See Fig. 1). It takes a few minutes to boot-up the scope. Wait
until a grid appears on the screen before going to the next step.

3.

Press the Default Setup button located near the top-right 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. The scope can
also be viewed with the PC monitor on your lab bench. Hit the left most
button on the bottom of the PC monitor until the scope screen appears.

B)

The HP 33120A Function Generator / Arbitrary Waveform Generator

Figure 2. Function Generator


ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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)

Waveform Measurement

1.

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, as shown in Fig. 3, are usually fitted with a
BNC connector on each end. (BNC is short for Bayonet Neill Concelman
and is named after Paul Neill of Bell Labs and Amphenol engineer Carl
Concelman. BNC connectors are generally designed to operate reliably up
to at least 4 GHz.) You can find BNC cables hanging on the wall.

Figure 3. Coaxial cable with BNC connectors


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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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 displayed. 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
button with the number on it. This is located in the grouping Vertical
in the lower-right of the scope. On the bottom of the screen is a picture
of a button with Imped 1M Ohm written on it. Press the actual button
below this twice or until the picture of the button reads Imped 50 Ohm.

6.

Press the Auto-Scale button located near the top-right 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 of the vertical
major divisions for each channel. 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 is painted yellow and the channel input is
painted green. 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 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 left 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.)
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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 upper-right of the scope screen (and to the left of the
word Auto) 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 top-right 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. Record your observations in a complete sentence on the lines
provided in the Lab Report. 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.

Move the mouse and see if the PC monitor responds to this movement.
If not, check to see if your PC is on. A blue light around the on/off button
on the face of the PC indicates that the PC is on. If not, press and wait.
You may have to wait about a minute or so. If no response, ask your
instructor for help.
Printing is done with a screen capture program on your PC. Under Start
/ Programs / Oscilloscope Image Printer. Clicking on this launches a
program that captures the current screen image. At the top of the
window is a print button and a refresh button. Click on Print opens the
standard PC print menu and options. Click on Refresh and it refreshes
the image to the current display on the scope.
Capture and print your scope image for you and your lab partner. In a
few seconds or so your output will appear at the printer with your PC ID
printed at the very top of the page. Your PC ID is located on the bottom
of your lab PC. For example, if your PC ID is eb3239p07 then you are
using the PC in Room 3239 at lab bench number 7. Your lab bench
number is on the edge of the upper shelf.
Go pickup your output.

11.

Now that you are familiar with the generation of a sine wave, lets 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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

see a 0.6 volt peak-to-peak square wave with a frequency of 500 Hz. You
dont 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 generators 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.
You may want to make the grid brighter so that you can better see the
divisions. To do this press Display in the grouping Waveform in the
center-right of the scope. Press the far right button under the screen
labeled Intensity. Increase the intensity to around 50% or whatever
seems best to you by rotating the knob with the illuminated yellow arrow
in the center of the scope.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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
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 (DMM)

Figure 4. Digital Multimeter


1.

The Fluke 8840A is a 5 digit, six function, autoranging precision


multimeter and is usually referred to as a DMM (Digital 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 red and black banana-to-grabber wires. These
are shown in Fig. 5 and are on racks on the wall. Connect a red bananato-grabber wire to the HI INPUT and a black banana-to-grabber wire to
the LO INPUT terminals. (It is common in electronics to use red wires for
positive and black wires for negative.)

Figure 5.
Banana-to-grabber wire
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Press the green POWER push button located in the lower right corner.
Press the kS 2 Wire white 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 the results in the table found in the Lab Report.
Measure all 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 grabbers. 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.
Before you record any data, check to see that the word AUTO is showing
on the top of the green display. (If it is not showing, press the gray AUTO
button. Each time you press this, it toggles the meter from AUTO-ranging
to manual ranging.)
Record all digits of the reading of the DMM including zeros at one
instant of time even if the last digit is still drifting. Assuming that the
DMM has no error, are your resistors within the tolerance limits?

3.

Assume that the resistance accuracy specifications for the DMM 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?

4.

The default mode of the DMM is auto-ranging. This is indicated as AUTO


on the top to the green display. You can also change to the manual
ranging feature by pressing any of the gray buttons to the left of the
AUTO button.
In order to understand the function of the AUTO button, re-connect your
2nd largest resistor to the grabber probes. Press the other gray range
buttons to the left of the AUTO button to see which range was selected.
Record in the Lab Report all the digits displayed for each gray button.
What is the meaning of the multiples of 2 on these buttons?

5.

What conclusions can you draw about the AUTO feature?

6.

Connect the second pair of banana-to-grabber wires to the HI and LO


ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

SENSE terminals. Connect the 10 S resistor as shown in the Lab Lecture


on page 6. (Put the DMM into the AUTO-ranging mode if necessary.)
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 THE NEXT LAB PERIOD

1.

Your lab report for this experiment is due at the end of the lab period.
Your graded report will be returned at your next lab meeting. 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.

Listen to the next recorded lab lecture and read the Lab Procedure
portion of that experiment. A short quiz will be given at the beginning of
the next lab period covering this material.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Lab Report
Lab I - Introduction to the Oscilloscope, Function Generator
and Digital Multimeter

Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Partner: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Date: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Section Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Station 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

10

VI-C-8
Voltage per division =
Number of divisions from Max. to Min. =
Measured Voltage Peak-to-Peak =
VI-C-9

Seconds per division =


Number of divisions per cycle =
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 =
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

11

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

Within
Limits?

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

12

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 =

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

13

VI-D-4
20MS Button

R=

2000 Button

R=

200 Button

R=

20 Button

R=

2 Button

R=

200 S/mV Button

R=

VI-D-5

VI-D-6
2 Wire Method R =
4 Wire Method R =
Resistance of the probe wires and grabber clips =
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

14

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345L: 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 looks at techniques for measuring source resistance.


It also 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 InfiniiVision;
2.
measuring source resistance in linear circuits;
3.
terminating cables to suppress reflections;
4.
poles and throws of switches;
5.
battery performance and characterization;
6.
microphone characterization.
The laboratory techniques covered are:
1.
using the InfiniiVisions Automatic Parametric Measurement
feature to measure peak-to-peak voltages;
2.
re-programming the function generators 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.

Agilent InfiniiVision Oscilloscope


HP 33120A Function Generator / Arbitrary Waveform Generator
Fluke 8840A Digital Multimeter

PARTS REQUIRED:
1
1
1
1
1

Proto-Board with BNC connectors


D-Cell (mounted on a gray block)
Single-Pole-Single-Throw momentary ON tactile switch
RLOAD = 22 S 5% (Red-Red-Black-Gold) resistor
Dynamic microphone

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

VI.

LABORATORY PROCEDURE:

A)

Automatic Parametric Measurement

1.

If the 10:1 probes as shown in Fig. 1 are connected to the scope, carefully
disconnect them by rotating the collar counter-clockwise and gently
pulling. If you have ANY difficulty please ask your lab instructor for
help. These probe are very delicate. Place them to the side for now.

Figure 1. InfiniiVision Oscilloscope


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 bottom-right of the
scope. Turn on the function generator.
Set the function generator to display 0.3 sin (2B 500 t). [ Remember that
the function generators 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
button with the number on it. This is located in the grouping Vertical
in the lower-right of the scope. On the bottom of the screen is a picture
of a button with Imped 1M Ohm written on it. Press the actual button
below this twice or until the picture of the button reads Imped 50 Ohm.

4.

Press the Auto-Scale button located near the top-right 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.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

5.

If your volts/div setting is not 100 mV/div as displayed on the top-left of


the screen, turn the large knob for channel and adjust the volts/div
scale to this value. If your s/div is not 1 ms/div as displayed to the topright of the screen, turn the large knob for the horizontal and adjust to
this value.

6.

In the last lab, we had 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 InfiniiVision.
In the Measure grouping found in the right-center of the scope, press
Meas button. The default measurements are the frequency and voltage
peak-to-peak. On the bottom of the screen are the statistics of the
sampling and to the right of the screen are just the current measured
values. To erase the statistics from the bottom of the screen just push the
Back button on the lower-left side of the scope.
Because the scope is sampling and measuring continuously, the numbers
that appear on the right of the screen may be constantly changing. You
can freeze the scopes screen with the Stop button on the top-right of the
scope. Do so at this time.
Locate 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 Freq (1) and Pk-Pk (1) in section VI-A-6 of the Lab
Report.

7.

The vertical accuracy of the scope is approximately 2 % of the full scale.


Calculate the accuracy of your expected reading, that is,
0.02 @ (100 mV/div) @ (8 div) = 16 mV
Thus if we accurately generate a 600 mVp-p sine wave then our scope
reading should be somewhere between 584 mV and 616 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-left 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 Pk-Pk (1) in your Lab
Report.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

This time 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 Pk-Pk (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.
Just a note: The horizontal accuracy is approximately 1.6 % and the
range is calculated in a similar fashion.

B)

Function Generator - Amplitude Calibration

1.

Change the vertical scale back to 200 mV/div. Press the Run button.

2.

The function generators settings for amplitude is defaulted to the case


where it is assumed that the function generator is connected to a 50 S
load. Lets see what happens if this is not the case.
Again press the button with the number on it. On the bottom of the
screen is a picture of a button with Imped 50 Ohm written on it. Press the
actual button below this twice or until the picture of the button reads
Imped 1M Ohm. Your waveform will register as approximately 1.2 V
peak-to-peak on the right side 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 generators default load of 50 S to
a high resistance load by entering into the SYStem MENU.
To set the calibration of the function generators 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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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 right of the scope screen.
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 perhaps damaging our
Ohmmeter. So we will have to collect data and use our circuit analysis
techniques to calculate the resistance.
Lets begin by measuring the source resistance of the function generator.
Our current set up can be modeled as shown in Fig. 2.

Figure 2. Function generator - scope equivalent circuit


2.

For RL(1) = 1 MS which is our present connection, record the peak-topeak 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 button for channel and adjusting


ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

the value of the button on the screen to Imped 50 Ohm. 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.

D)
1.

Calculate the source resistance of the function generator by using the


formula found on page 3 of the Lab Lecture Notes. Record the value in
the Lab Report.
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. The cable also has some inductance that can
react with the scope.
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 and the interactions with the
inductance 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 and inductive interactions are
greatly reduced.
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 scope should still be indicating
Imped 50 Ohm for the input resistance of the scope and thus 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 scopes Automatic


Parametric Measurement should be reading about 500 mVp-p because
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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. 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 button for channel
to change the load resistance back to Imped 1M Ohm. 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 and inductive
interactions on the cable. If this were a cable TV connection we would see
what are call ghosts on your TV screen.
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)

Source Resistance of a Battery

1.

Suppose that we repeat the same procedure for measuring the source
resistance to a standard D-Cell battery. In order to do this we will need
to build a circuit.
One of the goals of this course is that each and every student should be
able to build and test a circuit. Since it is difficult for more than one
person to do this, we need to take turns. So if you are in a group of two,
decide which one of you will be the circuit builder this week. Record the
name the Lab Report.
Your lab instructor is keeping a record of this. If you fail to
alternate building the circuits each week with your partner, your
lab report will not be accepted and you will all receive a grade of
0 for that lab.
The Proto-Board, shown in Fig. 3, is a product that allows for the quick
assembly of a circuit without the need to solder wires. The wiring layout
of the Proto-Board is shown on page 4 of the Lab Lecture. This ProtoBoard consists of two blocks with sets of 63 rows of holes. The 5 holes
above each center groove are shorted together internally by a wire frame.
This frame is formed to make a set of spring contacts inside each hole.
The 5 holes above of each groove are also shorted together. Lets verify
that this is the case.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Figure 3. Solderless Proto-board


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 bin on 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 in any row as shown in Fig. 4. 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. Obtain 4 banana-to-grabber wires
from the wall racks and measure the resistance between the wires you
inserted using the 4-wire option of the Fluke 8840A DMM (See Lab I for
procedure.) This should be a small number. Record the value.

Figure 4. Wire inserts

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

3.

Move the top wire to any other hole between it and the bottom 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 four 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 open-side of the board. Measure the
resistance (4-wire probe) between the left-most and right-most holes as
shown in Fig. 5. Record in your Lab Report.
Move the right wire up one hole and you should get an infinite resistance
reading.

Figure 5. Wire inserts


5.

If the resistance of the long row is approximately ten times the resistance
of a short row, then we can use our data from VI-E-2 and VI-E-4 to
calculate the resistance of a short row without the wire inserts.
This is done by subtracting the data in VI-E-2 from VI-E-4, that is,
minus

RLONG ROW + Wire Inserts = VI-E-4


RSHORT ROW + Wire Inserts = VI-E-2

Yields
RLONG ROW - RSHORT ROW = (VI-E-4) - (VI-E-2)
Since

RLONG ROW = 10 C RSHORT ROW

Then

9 RSHORT ROW = (VI-E-4) - (VI-E-2)

And

RSHORT ROW = [(VI-E-4) - (VI-E-2)]/9

Calculate the resistance of a short row and record your results in the Lab
Report.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

6.

The circuit we are going to build uses a tactile push button switch.
Locate, in your box of parts, the Single-Pole-Single-Throw (SPST)
momentary ON push button switch that is shown in Fig. 6.

Figure 6. SPST momentary ON push button switch


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. Momentary ON refers to the state of switch with action. So
in this case the switch is open or off until you hold it down.
7.

Insert the push button switch as shown in Fig. 7. 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 fits snugly in place. Move your 4-wire
resistance measuring probes to the location shown in Fig. 7.

Figure 7. Push button switch


The resistance between the two test points in Fig. 7 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.
8.

In order to measure the resistance of the battery we need to build the


circuit shown in Fig. 8. using the RLOAD given in the Parts List.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

10

Figure 8. Battery test circuit


9.

It is good practice to build your circuit first and then to make connections
for power, which in this case, is the battery.
The sides of the Proto-Board have four BNC jacks. The shinny outer
sleeve of the BNC jack is connected to the frame which we will connect
to the ground of the circuit. Thus this shinny outer sleeve is equivalent
to the black terminal in Fig. 8.
The inner hole of the BNC jack is isolated from the ground connection
with a teflon sleeve. This is connected to various rows on the ProtoBoard. We can use this as the red terminal of Fig. 8. Make the wiring
connections as shown in Fig. 9.

Figure 9. Battery test circuit wiring


Does this set of connections make sense to you relative to Fig. 8 ? If you
are not sure about your wiring have your lab instructor inspect it.
10.

Locate the D-Cell battery mounted on a gray block. Obtain two black and
two red banana-to-banana wires from the wall racks. These wires are
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

11

made from wire and two connectors. Over time the connections get loose
or the banana ends loose their spring. So we need to check the status of
these wires. Measure the resistance of each wire by connecting the two
ends to the 2-wire terminals of the Fluke DMM. If the reading is above
0.05S, give the wire back to your instructor for repair.
In order to connect the banana wires to the Proto-Board we need an
adapter than can convert the BNC connector to a banana connector. Such
an adapter is shown in Fig. 10. Locate this adapter in the blue bin on
your lab bench. Connect this adapter to the BNC connector you wired the
switch to in Fig. 9.

Figure 10. Banana-to-BNC adapter


Connect the black (minus) terminal of the battery to the black terminal
of the banana-to-BNC adapter with a black banana-to-banana wire.
Connect the red (positive) terminal of the battery to the red terminal of
the banana-to-BNC adapter 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
infinity. Record the value of VRL(1) displayed on the DMM in the Lab
Report. (If this voltage is less than 1.3 V, replace the battery.) Calculate
the current IRL(1) = VRL(1) / RL(1) and record in the Lab Report.
11.

Change RL(2) to RLOAD 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) in the Lab Report.
Release the button.

12.

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.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

12

13.

Calculate the source resistance of the battery and fixture by using the
formula found on page 3 of the Lab Lecture Notes. Record the value in
the Lab Report.

14.

A batterys energy capacity is usually given in what is called an amperehour 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. However, as you approach the 80 hours, VS
drops by about 40% and RS increases by about a factor of four.
RS is also temperature sensitive. For a car battery, RS increases as the
temperature decreases. This means you cannot draw as much current as
the temperature decreases. This is why you may need to jump start your
car more times in winter than the summer.

F)

Dynamic Microphone

1.

Locate the dynamic microphone on your lab bench. This too has a soure
resistance associated with it. With little or no acoustical input, all we
have is just the source resistance. So we could use the Fluke Ohmmeter.
Put the switch in the ON position, if necessary. Note the value of
resistance labeled on the microphone. Record in the Lab Report.

2.

Using a pair of grabber wires, measure the resistance of the microphone


and record in the Lab Report.

G)

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.

ASSIGNMENT FOR NEXT LAB PERIOD

1.

Listen to the next recorded lab lecture and read the Lab Procedure
portion of that experiment. A short quiz will be given at the beginning of
the next lab period covering this material.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

13

Lab Report
Lab II - Introduction to Prototyping Circuits

Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Partner: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Date: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Section Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lab Station 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

14

VI-A-6
Measured Frequency =
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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

15

VI-C-2
VRL(1) =
IRL(1) =

(Show work below)

VI-C-3
VRL(2) =
IRL(2) =

(Show work below)

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-1
is building the circuits for this
lab.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

16

VI-E-2
RSHORT ROW + Wire Inserts =
VI-E-4
RLONG ROW + Wire Inserts =
VI-E-5
RSHORT ROW =

(Show work below)

VI-E-7
RSWITCH + Wire Inserts + 2 RSHORT ROW =
VI-E-10
VRL(1) =
IRL(1) =
VI-E-11
VRL(2) =
VI-E-12
RL(2) = RLOAD =
IRL(2) =

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

17

VI-E-13
RS + RFIXTURE =

(Show work below)

VI-F-1
RMICROPHONE =
VI-F-2
RSOURCE =

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

18

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345L: 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


device 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 InfiniiVision's XY plotting feature to plot voltage
transfer curves;
3.
laying out a complex circuit on a Proto-Board with connections for
power and the function generator;
4.
using X10 probes for measurement.

III.

BACKGROUND MATERIAL:
See Lab Lecture Notes.

IV.

EQUIPMENT REQUIRED:
1
1
1
2
2

Agilent InfiniiVision Oscilloscope


HP 33120A Function Generator / Arbitrary Waveform Generator
Fluke 8840A Digital Multimeter
HP 6216C DC Power Supplies
Agilent N2862B 10:1 Passive Probes

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

V.

PARTS REQUIRED:
1
1
1
2
2
1
1
1
3
2
2

Proto-Board
Pliers
Wire stripper and cutter
BNC-to-banana adapters
LM 741 IC operational amplifiers
1N4002 Silicon diode
Red Light Emitting Diode (LED)
Green Light Emitting Diode (LED)
1kS 5% (Brown-Black-Red-Gold) resistors
Resistors (R3 , R4 ) = 22 kS 5% (Red-Red-Orange-Gold)
0.1:F capacitors (glossy green or orange or gold stamped 104K)

VI.

LABORATORY PROCEDURE:

A)

HP 6216C 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 +15 VDC and
!15 VDC. We will use two power supplies to do this. The HP 6216C power
supply is shown in Fig. 1 along with an adapter to convert the banana
input terminals to a BNC terminal. The power supply is adjustable from
a magnitude of 0 to 25 V as shown in Fig. 2.

Figure 1. HP 6216C power supply and BNC-to-banana adapter


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 400 mA 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 V.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Figure 2. HP 6216C power supply equivalent circuit


2.

Since 400 mA of current is large enough to melt our Proto-Board, let's set
the current limit much smaller. Obtain two short 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 25 mA for each supply. Move the
slide switch back to display voltage on the meter and remove the black
banana wires.
Note:

If your circuit ever tries to draw more than 25 mA 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. Please ask you instructor for help.

3.

As shown in Fig. 3, to make the top supply a positive voltage with respect
to ground, connect a BNC-to-Banana adapter into the % and & terminals
such that the GND side tab is connected into the & terminal. Lastly,
connect a black banana wire from the right most terminal of the top
power supply labeled with a ground symbol to the top & terminal of the
BNC-to-Banana adapter. This shorts the & terminal to ground.

4.

As shown in Fig. 3, to make the bottom supply a negative voltage with


respect to ground, connect a BNC-to-Banana adapter into the % and &
terminals such that the GND side tab is connected into the % terminal.
Lastly, connect a black banana wire from the right most terminal of the
bottom power supply labeled with a ground symbol to the top % terminal
of the BNC-to-Banana adapter. This shorts the % terminal to ground. If
you are unsure about these connections, ask your lab instructor to check
this connection for you.

5.

Turn OFF both supplies.


ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

B)

741 Operational Amplifier


The top view of the 741 operational amplifier (op-amp) is shown in Fig.
4. 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.

Figure 3. Power supply connections

Figure 4. 741 IC op-amp

C)

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. 5. See the
Parts Required for the values of R3 and R4 . 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. 5.

3.

The layout for the inverting amplifier on the Proto-Board is shown in Fig.
6. Compare this with the schematic of Fig. 5. 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 by
the printer. 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.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Figure 5. Inverting amplifier with connections labeled

Figure 6. Proposed layout of the inverting amplifier


4.

In the following description, we will connect our circuit to the power


supplies and function generator. Do not turn on the power supplies
or function generator until instructed to do so.
Connect the power supplies and function generator with BNC-to-BNC
coaxial cables to the terminals of Proto-Board as shown in Fig. 6. The
function generator is FG .

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. Your lab instructor
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

should sign off in Section VI-C-5 of the Lab Report that your wiring is
correct before you proceed to the next step.
6.

If not already present, connect two 10:1 probes to your scope, one for
channel and one for channel , as shown in Fig. 7. Turn on the
oscilloscope. Press the Default Setup button to clear the settings of the
last user. The numbers and should be lit. If not, press them.

Figure 7. Connection of X10 probes.


For this lab and all of the following labs we will always use these probes. The
probes are somewhat fragile, so do not remove these probes from the scope
when you are finished with the lab.
The X10 probe uses a circuit called a voltage divider to step the measured
voltage down by a factor of 10. The scope automatically adjusts the scales to
account for this. One advantage of these probes is that we can measure
higher voltages without damaging the inputs of the scope.

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. 5. If the
probe pulls the resistor out of its hole, use a separate piece of wire to
attach the probe.
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 shown in Fig. 5.
If the probe pulls the resistor out of its hole, use a separate piece of wire
to attach the probe.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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 one of the ground bus strips that are connected
to the frame of 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
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.

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

12.

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 below the illuminated
.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Move the ground reference for channel to 2 major divisions from the
bottom of the screen by using the small knob below the illuminated .
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
your instructor for help.
13.

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.

D)

Curve Tracer

1.

We dont want to turn off the function generator because of the HIGH Z
setting, but we can effectively turn it off by disconnecting the BNC-toBNC cable. Disconnect the function generators end of the cable 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.

Unhook your scope probes from your circuit. Remove the resistors R3 and
R4 . We will use the op-amp again.

3.

Our next circuit is shown in Fig. 8. The 1N4002 diode we are about to
test is small and usually has a black body with a white strip. The side
with a white strip painted on it is the n-side and corresponds to the bar
used in the schematic drawing. This time you layout the circuit on the
Proto-Board without making the connections to the power supplies
(which should still be off) or the function generator. Have your lab
partner check your wiring. Do not connect the power supplies and
function generator until instructed to do so. If you are unsure about any
connections, ask your lab instructor for help.

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. 9 shows two 0.1:F bypass capacitors
across the +15 V and -15 V bus strips.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Figure 8. Diode curve tracer

Figure 9. Adding bypass capacitors


5.

Reconnect the probes for channel and channel by hooking onto the
points 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 VP-P and 100 Hz. Reconnect the BNC-toBNC cable to the FG connector. (This should also be the connector where
one side of the resistor R1 is now connected.)

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 @ 1 kS 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 @ 1 kS on the yaxis, we need to change the x-axis from time to voltage.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

To activate this feature, press the Horiz button on the center-top of the
scope. On the bottom of the scope screen, the button will read Time Mode
Normal. Press the button or rotate the knob in the center of the scope
until the button displays Time Mode XY. We are now plotting the y- input
voltage on channel versus the x-input voltage on channel .
Your display may be a little blurry or thick but we will fix that shortly.
9.

Your x-y plot may be off to one corner of the screen. We can move the
zero reference origin anywhere on the screen. Suppose we make the
center of the screen 0 V and 0 mA. To do this rotate the small knobs
below the lighted and . You will see a small color-coded ground
symbol along the far left and top of the screen move with each knob.
Move them so that they are in the middle of the far left and in the middle
of the top of the screen. The origin of our plot is now in the center of the
screen.
We can make the screen plot sharper by increasing the resolution. To do
this press the Acquire button in the Waveform grouping on the centerright of the scope. On the bottom of the scope screen, the button will
read Acq Mode Normal. Press the button or rotate the knob in the center
of the scope until the button displays Acq Mode High Res.
To better read the data, lets change the x-axis to 500 mV/div and the yaxis to 1 V/div by rotating the large knobs for channels and ,
respectively. Lets also increase the intensity of the screen grid to 50%.
(Recall from Lab I: Press Display in the grouping Waveform in the
center-right of the scope. Press the far right button under the screen
labeled Intensity. Increase the intensity to around 50% or whatever
seems best to you by rotating the knob with the illuminated yellow arrow
in the center of the scope.)

10.

Print this V-I characteristic for each member of your group. Label the xand y-axis scales on your plot. Draw a vertical and horizontal line
through the origin in the x and y directions to make it look like the plots
on page 1 of the Lab Lecture.
Mark this section letter and number on the plot and attach it as
indicated in the Lab Report.

11.

Using a ruler or a straight edge, measure the voltage across the diode for
a current of 1 mA. Record the value of VD(ON) for this value of iD in section
VI-D-11 of the Lab Report.
Disconnect the function generators BNC cable and turn off the power
supplies.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

10

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.) It is also the
flat or notched side on the base of LED lense. Turn on the power supplies
and reconnect the function generator. Adjust the x-axis volts/div as
necessary to fit on the screen.
Print this V-I characteristic for each member of your group. Label the xand y-axis scales on your plot. Draw a vertical and horizontal line
through the origin in the x and y direction to make it look like the plots
on page 1 of the Lab Lecture.
Using a ruler or straight edge, measure the voltage across the diode for
a current of 1 mA. Record the value of VD(ON) for this value of iD in section
VI-D-12 of the Lab Report.
Disconnect the function generators BNC cable and turn off the power
supplies.

13.

Repeat step VI- D-12 for a 1 kS resistor.

14.

Repeat step VI-D-12 for a green LED.

15.

To see the actual plotted points, 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.

16.

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-D-16 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?

17.

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.

Listen to the next recorded lab lecture and read the Lab Procedure
portion of that experiment. A short quiz will be given at the beginning of
the next lab period covering this material.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

11

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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

12

VI-C-1
______________________________ is constructing this weeks circuits.
VI-C_5
I ___________(Lab instructors initials) verify that Fig.6 is wired correctly.
VI-C-13
Mark VI-C-13 on the top right side of your plot and attach as the next
page.
VI-D-10
Mark VI-D-10 on the top right side of your plot and attach behind VI-C13.
VI-D-11

For the 1N4002 diode:

For iD = 1 mA, VD(ON) = __________


VI-D-12

For the Red LED:

Mark VI-D-12 on the top right side of your plot and attach behind VI-D10.
For iD = 1 mA, VD(ON) = __________
VI-D-13

For the 1 KS resistor:

Mark VI-D-13 on the top right side of your plot and attach behind VI-D12.
For iR = 1 mA, VR = __________
VI-D-14

For the Green LED:

Mark VI-C-14 on the top right side of your plot and attach behind VI-D13.
For iD = 1 mA, VD(ON) = __________
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

13

VI-C-16
Color Code

Nominal
Resistance

Measured
Resistance

R1
R2
R3
R4

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

14

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345L: 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 dont 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 output
sensors.

III.

BACKGROUND MATERIAL:
See Lab Lecture Notes.

IV.

EQUIPMENT REQUIRED:
1

PC

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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
Parallaxs 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.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

ZERO TOLERANCE WARNING: You are about to use the lab PC. Do not
use the CD 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 ones best interest. Thanks for your cooperation.

Move the mouse and see if the PC monitor responds to this movement.
If not, check to see if your PC is on. A blue light around the on/off button
on the face of the PC indicates that the PC is on. If not, press and wait.
You may have to wait about a minute or so. 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 under
Programs/Parallax/Basic Stamp Editor. 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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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. 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 PCs 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 PCs 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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

before. The program you download is permanently stored in the Basic


Stamps memory. We can easily re-program it just like we did in steps
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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Figure 3. Input and output sensors

Figure 4. Layout

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

5.

To run the program we need to connect the serial cable from our PC to
the Board of Education. You dont 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 Stamps 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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

goto check
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 PCs 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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

10

your file on the PCs 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
dont 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.

ASSIGNMENT FOR NEXT LAB

1.

Do you want to learn more about microcontrollers?


The Pallalax web site at www.parallax.com is rich in hobbyist
applications and has a lot of input from users.

2.

Listen to the next recorded lab lecture and read the Lab Procedure
portion of that experiment. A short quiz will be given at the beginning of
the next lab period covering this material.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

12

VI-A-2
is constructing this weeks circuits.
is typing this weeks programs.
VI-A-3
I
correctly.

(Lab instructors 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-A-8 on the top-right side of your print out and attach behind VIA-7.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

13

VI-B-3
I
correctly.

(Lab instructors 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 instructors 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.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

14

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345L: 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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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 CD 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 ones best interest. Thanks for your cooperation.

Move the mouse and see if the PC monitor responds to this movement.
If not, check to see if your PC is on. A blue light around the on/off button
on the face of the PC indicates that the PC is on. If not, press and wait.
You may have to wait about a minute or so. 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 under
Programs/Parallax/Basic Stamp Editor. 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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

'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 pulses 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.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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)

Calculating Floating Point Answers

1.

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.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Figure 3. Long division

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

11

D)

Checking the Accuracy of the Digital Voltmeter

1.

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
dont 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 PC.
Log off of the EGR network by hitting the Ctrl-Alt-Del keys

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

12

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.

ASSIGNMENT FOR NEXT LAB

1.

There is no lab lecture video for the next lab. Just read the Lab
Procedure portion of that experiment. A short quiz will be given at the
beginning of the next lab period covering this material.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

14

VI-A-2
is constructing this weeks circuits.

is typing this weeks programs.


VI-A-3
I
correctly.

(Lab instructors initials) verify that Fig. 1 is wired

VI-A-8
(Lab instructors initials) verify that the circuit of this
I
section is functioning correctly.
The 8-bit binary number =
The decimal equivalent =
Show work below:

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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%

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

16

VI-D-3
Vdd =
VI-D-4

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

17

This lab does not have a set of lecture notes

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE345L: 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
USB Serial Cable
Wall transformer with output plug
BPI-216 2 Line by 16 Character LCD

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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 CD 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 ones best interest. Thanks for your cooperation.

Move the mouse and see if the PC monitor responds to this movement.
If not, check to see if your PC is on. A blue light around the on/off button
on the face of the PC indicates that the PC is on. If not, press and wait.
You may have to wait about a minute or so. 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 under
Programs/Parallax/Basic Stamp Editor. 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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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 dont 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 dont 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 dont
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 wont
be displayed. Go back and undo the 'PAUSE 1 to PAUSE 1.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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 4 seconds,
followed by is BASIC Stamp (on the next line, without clearing the
display) for 4 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 PCs 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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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
dont 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 PC.
Log off. 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.

VII.

ASSIGNMENT FOR NEXT LAB

1.

Listen to the next recorded lab lecture and read the Lab Procedure
portion of that experiment. A short quiz will be given at the beginning of
the next lab period covering this material.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

VI-A-2
is constructing this weeks circuits.

is typing this weeks programs.


VI-A-3
I
correctly.

(Lab instructors initials) verify that Fig. 1 is wired

VI-A-7

VI-A-9

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

10

VI-A-10
I
(Lab instructors initials) verify that the circuit of this
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 instructors 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.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

11

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345L: ELECTRONIC INSTRUMENTATION


AND SYSTEMS LABORATORY
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
MICHIGAN STATE UNIVERSITY

I.

TITLE: Lab VII - Entertainment System: MP3 Player Power Amplifier,


PA System and Mixer.

II.

PURPOSE: Most students have a portable MP3 or equivalent player.


Docking this portable player into a low cost entertainment system would
be desirable for many students.
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. We will also build a mixer that will allow us to combine our
player with a microphone or any other source of sound.
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;
5.
mixing with an inverting summer.
The laboratory techniques covered are:
1.
triggering;
2.
using averaging to reduce noise pick-up;
3.
using high-frequency noise rejection to improve triggering;
4.
measuring gain.

III.

BACKGROUND MATERIAL:
See Lab Lecture Notes.

IV.

EQUIPMENT REQUIRED:
1
1
1
2
2
1

Agilent InfiniiVision Oscilloscope


HP 33120A Function Generator / Arbitrary Waveform Generator
Fluke 8840A Digital Multimeter
HP 6216C DC Power Supplies
Agilent N2862B 10:1 Passive Probes
8 S JBL Studio Speaker

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

V.

PARTS REQUIRED:
1
1
1
2
1
1
1
2
1
1
3
1
1
1
1
1
2
1

Proto-Board
Pliers
Wire stripper and cutter
BNC-to-Banana adapter
MP3 or equivalent player. (Bring your own if you have one.)
Dynamic microphone
Phono-plug adapter
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) resistor
390 kS 5% (Orange-White-Yellow-Gold) resistor
Resistor (R1 ) = 4.7 kS 5% (Yellow-Violet-Red-Gold)
Resistor (R2 ) = 56 kS 5% (Green-Blue-Orange-Gold)
10 kS potentiometer
0.1 :F capacitors (glossy green or orange or gold stamped 104K)
0.22 :F capacitor (glossy green or orange or gold 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 op-amp in this experiment, we need to supply +6 VDC
and !6 VDC. (This lower voltage is used to protect the power transistors
from excessive currents.) We will use two power supplies to do this. The
HP 6216C power supply is adjustable from a magnitude of 0 to 25 V 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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

CURRENT controls the maximum magnitude of current, turn this knob


fully clockwise. This allows our circuits to draw up 400 mA 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 400 mA of current is large enough to melt our Proto-Board, let's set
the current limit much smaller. Obtain two short 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 50 mA for each supply. Move
the slide switch back to display voltage on the meter and remove the
black banana wires.
Note:

3.

If your circuit ever tries to draw more than 50 mA 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.

As shown in Fig. 2, to make the top supply a positive voltage with respect
to ground, connect a BNC-to-Banana adapter into the % and & terminals
such that the GND side tab is connected into the & terminal. Lastly,
connect a black banana wire from the right most terminal of the top
power supply labeled with a ground symbol to the top & terminal of the
BNC-to-Banana adapter. This shorts the & terminal to ground.

Figure 2. Power supply connections


ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

4.

As shown in Fig. 2, to make the bottom supply a negative voltage with


respect to ground, connect a BNC-to-Banana adapter into the % and &
terminals such that the GND side tab is connected into the % terminal.
Lastly, connect a black banana wire from the right most terminal of the
bottom power supply labeled with a ground symbol to the top % terminal
of the BNC-to-Banana adapter. This shorts the % terminal to ground. If
you are unsure about these connections, ask your lab instructor to check
this connection for you.

5.

Turn OFF both supplies at this time.

B)

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. 3. See
the Parts Required for the values of R1 and R2. 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 VI-D.
The top view of the LM741 operational amplifier (op-amp) is shown in
Fig. 4. 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. 5 has a front view of the bipolar
transistors. The pin locations are the same for both NPN and PNP. Fig.
6 shows the front view of a potentiometer.

3.

The layout for the non-inverting amplifier is shown in Fig. 7. Compare


this with the schematic of Fig. 3 and label which component is which on
Fig. 7. When wiring any circuit, noise and interference can be minimized
by using the shortest length of wire. 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 printer. 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. (Dont
spread the leads apart. They will fit into adjacent holes. Please make
sure that you put a lead in 3 different rows.) 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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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.
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. 7 also shows two 0.1 :F bypass capacitors across the
+6 V and -6 V bus strips.

Figure 3. Non-inverting amplifier with a power booster

Figure 4. LM741 pinout

Fig. 5. Transistor pinout

Fig. 6. Pot pinout

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Figure 7. Non-inverting amplifier with power boost layout


4.

In the following description, we will connect our circuit to the power


supplies and function generator. Do not turn on the power supplies
or function generator until instructed to do so.
Connect the power supplies and function generator with BNC-to-BNC
coaxial cables to the terminals of Proto-Board as shown in Fig. 7 or
however you wired your circuit. The function generator is FG .

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. Your lab instructor
should sign off in Section VI-B-5 of the Lab Report that your wiring is
correct before you proceed to the next step.

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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

to the wire coming from the function generator. If the probe pulls the
capacitor out of its hole, use a separate piece of wire to attached the probe.
We would like to display the output of the power booster 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 2.2 kS resistor
which is connected to the output of your power booster and is also
connected to the two emitters of our transistors. If the probe pulls the
resistor out of its hole, use a separate piece of wire to attached the probe.
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 any of the ground bus strips that are connected
to the metal chassis 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
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 screw driver shown in Fig. 8 and found 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.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Figure 8. Screw driver


11.

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.
If your waveform is jumpy on the screen, this can be due to high
frequency pulses picked up by the trigger circuitry of our scope. These
pulses can come from transmitters, like WKAR, which is located across
the street, or even someone with a wireless device. Triggering is the
process the scope uses to sample repetitive waveforms, store information
and synchronize the waveform. These pulses can cause a false or erratic
triggering.
Press the Mode / Coupling button in the Trigger grouping. Press the
button under the display labeled HF Reject. This will reject any noise
above 50 kHz.
Your waveform should be stable but it may be thick or fuzzy. This again
is noise but now it is coupled or added to your waveform. If something is
erratic or random like this, it can be reduced by taking more samples of
the same waveform and taking the average. Under the Waveform
grouping, press the Acquire button or turn the knob with the illuminated
arrow until the button reads Acq Mode Averaging. Next to that button
is the number of samples for averaging. Set this to 16 if necessary.
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).

12.

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 below the illuminated .
Leave or move (by using the small knob below the illuminated
ground reference for channel in the center of the screen.

) the

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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 1 +
R2 /R1. Rotate the pot until the gain is maximum. This may be clockwise
or counter-clockwise. Adjust the v/div or the ground reference if necessary
to fit on the screen. (Dont press Autoscale - this will reset your triggering
and averaging.) Roughly counting the divisions on the screen and
multiplying by the scale for each channel in volts/div, channel should
be about 1 + R2 /R1 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 power booster. Mark this section letter and number on the top right
side of your plot and attach it as indicated in the Lab Report.
13.

Lets again use the auto measurement features of the InfiniiVision.


In the Measure grouping, press Meas button. The default measurements
are the frequency and voltage peak-to-peak for one channel. We also
want to measure the peak-to-peak for both channels. To do this press the
far left button under the scope display labeled Source. Change to 2. Press
the next button to the right labeled Type. Change it to Peak-Peak. Now
press the next button to the right labeled Add Measurement. You should
now see the peak-to-peak values of both channels and .
On the bottom of the screen are the statistics of the sampling and to the
right of the screen are just the current measured values. To erase the
statistics from the bottom of the screen just push the Back button on the
lower-left side of the scope.
Because the scope is sampling and measuring continuously, the numbers
that appear on the right of the screen may be constantly changing. You
can freeze the scopes screen with the Stop button on the top-right of the
scope. Do so at this time.
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.

14.

Press the Start button. Rotate the pot until the gain is minimum. The
output of the power booster is now approximately zero.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

C)

Adding a Speaker

1.

We dont want to turn off the function generator because of the HIGH Z
setting, but we can effectively turn it off by disconnecting the BNC cable.
Remove function generator end of the wire at this time.
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 upper shelf.
Connect a wire from the output of the power booster which is also
connected to the two emitters of our transistors to one of the BNC
connectors on your Proto-Board. Connect a BNC-to-BNC cable from this
connector to the speaker on your lab bench.
Our speaker is now in parallel with the 2.2 kS resistor. The speakers
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 BNC cable to the function generator. 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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

10

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
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. The slow response of the output is due
to the averaging taking 16 samples.
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.

Remove the BNC cable from the function generator and the Proto-Board.
Turn off the power supplies. Also remove the wire from the BNC
connector on the Proto-Board that goes to the 0.22 :F capacitor.
We are going to insert another circuit between these two points.
Disconnect the channel probe tip from the circuit.

2.

Your MP3 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 isnt 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.
Add the summing inverter shown in Fig. 9 to your power booster. The
output of this circuit will go the 0.22 :F capacitor.
What you have just wired is shown in Fig. 10. Please have your lab
partner check your wiring.
Turn on the power supplies. If your power supply voltages have not
dropped from their 6 V settings, then you probably have not made any
major wiring errors. Turn off the power supplies.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

11

Figure 9. Summing inverter


3.

Set the volume control pot of Fig. 3 to its center position. Connect the
phono plug adapter with the red wire to the left input, the yellow wire to
the right input and the green wire to ground as shown in Fig. 11. Have
you lab partner double check your wiring. Set the volume control of your
MP3 or equivalent player to its minimum value. Leave your player OFF
for now. Place the phono plug into your players headphone jack.
Before having your lab partner turn on the power supplies, line up your
screw driver to adjust the volume control.

Figure 10. Combined circuits

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

12

Figure 11. MP3 player adapter plug


Turn on the power supplies. If your power supply voltages drop from their
initial settings, there is something seriously wrong. Turn off the power
supplies and look for a wiring error or ask your instructor for help. If
everything appears to be OK proceed.
Turn on your player and increase the volume control of your player until
you hear your music. Adjust the volume with volume control pot of Fig.
3. Find the best combination of settings.
4.

Lower the volume to a soft audible level. Disable averaging by pressing


the Acquire button in the Waveform grouping and set to Acq Mode
Normal.
Display the voltage across the speaker on the scope with the time base
set to 1 ms/div. Adjust the volt/div or the ground reference to display the
maximum signal without clipping off of the screen. If you are seeing
multiple waveforms, the trigger level need to be adjusted. In the upper
right corner of the screen is the number 1. This tells you which channel
the scope is trying to trigger off of. Rotating the Level knob in the Trigger
grouping will move a horizontal line across the screen. This needs to
intersect the waveform of the channel indicated at the upper right of the
screen but with the channel probe disconnected we have no waveform
to trigger on.
To change the triggering to channel 2, press the Trigger button in the
Trigger grouping. On the bottom of the screen, change Source 1 to Source
2. A green letter T will appear on the screen. This is where the triggering
of the display is initiated.
Turn off the channel display by pressing the illuminated button until
channel is now longer displayed.
Adjust the trigger level to near the ground reference if necessary. Freeze
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

13

the screen with the Stop button.


Print a copy of this waveform for each member of the lab group. Label
the section number on top. Press Run to restart the screen.
5.

Turn off your player and the power supplies.

E)

Public Address System and Mixer

1.

Add another input to the summing inverter and connect the dynamic
microphone as shown in Fig. 12.

2.

Turn on the power supplies. If your power supply voltages drop from their
initial settings, there is something seriously wrong. Turn off the power
supplies and look for a wiring error or ask you instructor for help. If
everything appears to be OK proceed.
Speak softly into the microphone. Adjust the volume control if necessary.
If the distortion is bad, try cupping your hands around the microphone.
Turn on your player and adjust your players volume so that you can
speak over the music. Sing along if you want. Please keep it short!

Figure 12. Adding a microphone input


3.

Freeze the screen with the Stop button to capture your voice along with
the music.
Print this waveform for each member of your group. Before you go get
the output, return the volume control 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 player and the power supplies. Disconnect the microphone.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

14

5.

Turn off your power supplies. Disconnect your MP3 player. Measure the
resistors R1 and R2 (see Fig. 3) as you disassemble your circuit and record
their values in section VI-E-5 of the Lab Report. Calculate the gain 1 +
R2 /R1 and calculate the error between this and what you measured in VIB-13 using the following formula:
% Error = {(Measured - Calculated) / (Calculated) } x 100%
Disassemble the remainder of your circuit.
Leave the probes attached to the scope and return all cables 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.

Listen to the next recorded lab lecture and read the Lab Procedure
portion of that experiment. A short quiz will be given at the beginning of
the next lab period covering this material.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

15

Lab Report
Lab VII - Entertainment System: MP3 Player Power Amplifier, PA System and
Mixer

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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

16

VI-B-1
______________________________ is constructing this weeks circuits.
VI-B-5
I __________(Lab instructors initials) verify that Fig. 3 is wired correctly.
VI-B-12
Mark VI-B-12 on the top right side of your plot and attach as the next
page.
VI-B-13
Output voltage =

VP-P

Input voltage (Function generator) =

VP-P

Output voltage / Input voltage = Measured Gain =


VI-C-5
Mark VI-C-5 on the top right side of your plot and attach behind VI-B-12.
VI-D-4
Mark VI-D-4 on the top right side of your plot and attach behind VI-C-5.
VI-E-3
Mark VI-E-3 on the top right side of your plot and attach behind VI-D-4.
VI-E-5
R1 = ____________________
R2 = ____________________
Calculated Gain = 1 + R2 / R1 = ____________________
% Error = ____________________

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

17

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345L: 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 InfiniiVision's auto measurements to measure average
voltages, peak voltages, peak-to-peak voltages and frequency;
2.
using the InfiniiVision's Math Functions to differentiate a
capacitor voltage to estimate the maximum repetitive diode
current.

III.

BACKGROUND MATERIAL:
See Lab Lecture Notes.

IV.

EQUIPMENT REQUIRED:
1
1
2

Agilent InfiniiVision Oscilloscope


Fluke 8840A Digital Multimeter
Agilent N2862B 10:1 Passive Probes

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

V.

PARTS REQUIRED:
1
1
1
1
1
1
1
1
1
1

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
Electrolytic capacitor (CL) = 47:F 50V

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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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.

Record the value of the secondary voltage in the Lab Report. Using the
typical value for our labs 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 halfwave rectifier shown in Figs. 2 and 3.

Figure 2. Half-wave rectifier schematic


ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Figure 3. Half-wave rectifier layout


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.

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
any of the grounds of the Proto-Board. Turn ON the transformer.
Press the Auto-Scale button on the scope. 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 and the horizontal
scale to 5 ms/div, if necessary. 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.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

4.

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.

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.

Lets again use the auto measurement features of the InfiniiVision.


In the Measure grouping, press Meas button. The default measurements
are the frequency and voltage peak-to-peak for channel . We also want
to measure the average or DC value of the secondary of the transformer
which is displayed on channel . Press the button under the scope
display labeled Type. Change it to Average-Full Screen. Now press the
next button to the right labeled Add Measurement.
On the bottom of the screen are the statistics of the sampling and to the
right of the screen are just the current measured values. To erase the
statistics from the bottom of the screen just push the Back button on the
lower-left side of the scope.
Because the scope is sampling and measuring continuously, the numbers
that appear on the right of the screen may be constantly changing. You
can freeze the scopes screen with the Stop button on the top-right of the
scope. Do so at this time.
Record in VI-B-6 of your Lab Report the peak-to-peak and frequency of
channel .
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 isnt close to what you measured, ask your instructor for
help.
Record in VI-B-6 the Average - Full Screen of channel in your Lab
Report. Ideally it should be zero but you may see a small value because
of the distortion.
Press the Run button on the top-center of the scope to activate the scope
again. To clear all measurements, press Meas button, then press the
Clear Meas button under the display and finally press the Clear All
button.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

7.

We are going to measure the maximum values of the voltages on


channels and .
Press Meas button. Add to the default measurements the Max value of
channel . We also want to measure maximum for both channels. To do
this press the far left button under the scope display labeled Source.
Change to 2. Now press the button labeled Add Measurement. You should
now see the maximum values of both channels and . Press the Back
button.
Record the maximum values in VI-B-7 of the Lab Report.
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 - Full Screen of channel . Record the value in VIB-7 of the Lab Report. Notice how the average value has changed from
approximately zero to around 6 or 7 volts. The average value of a halfwave rectified signal is approximately the max divided by B. Calculate
this and record in VI-B-7. If this isnt close to what you just measured,
ask your instructor for help.

8.

Press Run, if necessary, to activate the scope again.

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. Find the value of the capacitor CL listed in
the Parts Required. Locate this value 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. 4.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Figure 4. Polarized capacitor


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. 5 with the minus terminal connected to the ground bus.

Figure 5. Have-wave rectifier with smoothing 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 before you proceed to the next
instruction which is to turn ON the transformer.
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 - Full Screen of channel . Hit the Stop button and
record the value in VI-C-3 of the Lab Report.

4.

Press the Run button to activate the scope again. Clear all
measurements by pressing the Meas button, then press the Clear Meas
button under the display and finally press the Clear All button.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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 its 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 InfiniiVision has a math function
that will allow us to differentiate the capacitor voltage.
Locate the Math button in the gray grouping in the far right-center of the
scope and press it. Under the scope display, press the Operator button
and select Differentiate. We want to differentiate the capacitor voltage but
this is on channel . So press the Source button and select 2.
Is the resulting plot very noisy? Since derivatives amplify noise, we
need to use averaging. Under the Waveform grouping, press the Acquire
button and select Acq Mode Averaging. Next to that button is the number
of samples for averaging. Set this to 256.
Turn off the display for channel by pressing the button above the
probe connector twice. You now see the capacitor voltage and its
derivative. To better see the results you may need to decrease the scale
of kV/sec. This is done with the knob labeled Push for Fine in the gray
grouping in the far right-center of the scope. Rotate this knob and make
the derivative at least major 1 division big.
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.

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. Lets
measure its maximum value. Press Meas button. Press the Source
button and select Math f(t). Under Type select Maximum. Press the Add
Measurement button. Press the Back to clear the statistics from the
screen.
Hit the Stop button to freeze your screen. Measure the maximum of the
derivative of the capacitor voltage. Record the 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
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

times the capacitance value. Record the value in VI-C-8.


Press the Run button to activate the scope again.
9.

Turn OFF the transformer switch and remove the 2.2 kS resistor.

D)

Zener Diode Shunt Regulator

1.

The filtered full-wave rectifier with a Zener diode regulator is shown in


Fig. 6. The 1N759A -12 volt Zener diode has a small 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. 6 by adding the regulator circuit.
Connect the scope probes as indicated in Fig. 6. Also make sure that the
probe 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 6. Filtered half-wave rectifier with shunt regulator


2.

Turn ON the switch on the gray transformer box. To clear the screen of
all measurements, press the Default Setup button and then press AutoScale. Turn on averaging by pressing the Acquire button and select Acq
Mode Averaging. Next to that button is the number of samples for
averaging. Set this to 16.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Adjust the vertical scale for each channel to 10 V/div and the horizontal
scale to 5 ms/div, if necessary. Move the ground reference for channel
and to the center of the screen. You are now displaying the
transformers 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 transformers 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 Average - Full Screen voltage across the Zener diode and 2.2
kS load using the measurement feature. 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 Average Full Screen 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 feature and record in the Lab
Report.

7.

Measure the Average - Full Screen value of the capacitor voltage VCL
(channel ) using the measurement feature 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 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.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

10

VII.
1.

ASSIGNMENT FOR NEXT LAB


Listen to the next recorded lab lecture and read the Lab Procedure
portion of that experiment. A short quiz will be given at the beginning of
the next lab period covering this material.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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 weeks 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

VI-B-7
Secondary voltage maximum = VSM =

Output voltage maximum = VOM =

Non-ideal diode drop = VSM !VOM =

Output average voltage = VO DC =


Calculated Output average voltage = VOM / B =

V
V

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

13

VI-C-2
(Lab instructors 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 =

VI-C-5
CL =

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

VI-D-1
I
correctly.

(Lab instructors 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.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

14

VI-D-3

For RL = 2.2 kS
Average output voltage =

VI-D-5

For RL = 1.8 kS
Average output voltage =

VI-D-6
Capacitor ripple voltage = vr =

VP-P

VI-D-7
Average capacitor voltage = VCL =

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

15

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345 e-Notes.......Copyright 2016 by Gregory M. Wierzba. All rights reserved.......Fall 2016.

ECE 345L: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 BJTs breakdown voltage;

III.

BACKGROUND MATERIAL:
See Lab Lecture Notes.

IV.

EQUIPMENT REQUIRED:
1
1
1
1
1
2

Agilent InfiniiVision 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 N2862B 10:1 Passive Probes

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

V.

PARTS REQUIRED:
1
1
1
1
1
1
1
1
1
2
2
1
1
1
2

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 capacitor (glossy green or orange or gold stamped 104K)
1N4002 diode
2N3904 NPN transistors

VI.

LABORATORY PROCEDURE

A)

Inverter

1.

Set one of your 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.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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.
Pressing > will finally cause HIGH Z to appear. To pick this option all we
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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 of


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. 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
LEDs is shown in Fig. 2.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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
supplys 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.
ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

Display VFG and VO1 on the scope using your scope probes. Press the
Auto-Scale button on the scope. 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.
Using the use the auto measurement feature to measure VO1(MAX) but
dont clear the measurement statistics on the lower-center of the display.
You may see the maximum jumping all over the screen. The
measurement statistics 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


ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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)

Adding an Exhaust Fan

1.

Turn OFF the power supply.

2.

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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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.

VII.

ASSIGNMENT

1.

This is the last lab. See the Lab Syllabus for the next lab meeting. Your
TA will return this lab graded and will give the lab SIRS form.

2.

There will a lab exam covering all of the experiments. See the Lab
Syllabus for the time and date.
This exam will be closed book and closed notes. No scrap paper will be
allowed. You should bring a non-programmable calculator, pencil and
ruler. You will NOT be allowed to use a programmable calculator or
share a calculator. The best way to study for this exam is to read
over the lab lecture, lab and your lab report for each experiment.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

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

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

10

VI-A-1
______________________________ is constructing this weeks 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 instructors 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.

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

11

VI-B-5

VI-B-6

VI-C-1
RCdS (LIGHT) = ____________
RCdS (DARK) = ____________

VI-C-3
VCdS (LIGHT) = ____________
VCdS (DARK) = ____________

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

12

VI-C-4

VI-D-2
I, _____________________________(lab instructors signature), verify that
the exhaust fan is correctly connected.
VI-D-3

VI-D-4

ECE 345.....Copyright 2016 by Gregory M. Wierzba. All rights reserved.....Fall 2016.

13

Вам также может понравиться