# E11 Lab #12008

Lab report due the next time you come to lab.

Before you start this lab, be sure to read the lab rules

The room where you will be doing this (and other) labs has computers equipped with web browsers, so you need not print this out (though you certainly may, if you would like to).  Since this document is fairly long, you should look through it at least once before coming to lab.

## Introduction to Laboratory Equipment

This laboratory exercise will familiarize you with the equipment you will be using throughout the semester.  Since there is essentially no theory involved in this lab, there will not be a formal report.   This lab is not very interesting conceptually, but you will need to know how to use this equipment for the rest of the labs this year.  The in-lab portion is fairly short, and the write-up doesn't require much writing, but there are a number of different tasks so it make take some time.

The lab exercise is split into four parts

1. Verification of Ohms Law (Use of voltmeters and ammeters)

2. Use of the Oscilloscope and Function Generator

I would like to give you a short quiz on the using the function generator and oscilloscope before you leave the lab.

## Verification of Ohms law

1. Connect the circuit shown with R=10kΩ. Use the resistance boxes, variable DC supplies, and DVM's (Digital Volt-amp-ohm Meters) that are in the lab.    Note that voltage is measured between two points (across a circuit element), while current is measured through a part of the circuit. For this reason you must always break a circuit to insert an ammeter to measure current
.
2. Vary the voltage from 0 to 10 volts in approximately 2.5 volt increments and record the measured voltage and current at each setting. Then come down again from 10 to 0 volts to check for consistency. There is no reason to use increments of exactly 2.5 volts, just be sure to record the voltages carefully.
3. Repeat 2 with a 20kΩ resistance.

## Use of the Oscilloscope and Function Generator

We will use the oscilloscope to measure voltage waveforms as a function of time.  The function generator creates a wide variety of different voltage waveforms that we will use as inputs to circuits that we build.

The Oscilloscope

Let's examine the TDS3014B oscilloscope (or simply "scope") first.

The scope has a display screen on the left and several controls on the right.  By the end of this lab you should know what most of these do.    The controls are split up into 5 separate areas as shown below.

• The largest section (blue - roughly the left third half of the front panel) is for the inputs, and is labeled "VERTICAL".  The controls in this section set the vertical scale for the voltage waveforms being displayed.  The oscilloscope has four inputs, called channels each with a BNC (perhaps for Bayonet Needle Connector, but I've never found a definitive answer) connector, to which the input is connected.  If you look closely at the connector you'll see that there are two conducting (metallic) elements that are electrically shielded from each other.  The inner connector is called the "pin" and is where the voltage signal is applied.  The outer conductor is called the "shell" and is connected to a ground reference.  All of the shells are connected internally, so you needn't connect more than one of them.
• There is another section labeled "HORIZONTAL" (red).  This section is used to set the time scale (or "time base") for the voltage waveform being displayed.
• Next to the "HORIZONTAL" section is one labeled "TRIGGER" (green).   You will learn what this does soon enough.  This is perhaps the most complicated part of the oscilloscope to understand.
• The fourth section is the one at the top and it is used for a wide variety of measurement and utility functions (yellow).  We will use these at various times throughout the semester, but not much today.
• The last section (pink) has the "Run/Stop" button that we will use to freeze the display when we take measurements.

The first three sections listed are the most important, and are the only sections I will quiz you on at the end of the lab.

In addition to the functional areas described above, there are several menu buttons to the right and below the screen.  Their function changes depending on the actions you are asking the scope to perform, or the settings you are trying to change

The Function Generator

Shown below is a diagram of the Wavetek Model FG2A function generator.   You will learn about the individual controls during the course of the lab.   You should pay special attention to the controls that are highlighted and labeled from 1 to 8..

Use of the Oscilloscope and Function Generator

Before you begin, rest assured that there is nothing you can do to harm the equipment in the lab.  Feel free to experiment.  Don’t worry about breaking anything.

Turn on the oscilloscope (the power button is at the lower left) and the function generator (the "Pwr" button, labeled "1").  Connect the "Main" output of the function generator (labeled "2") to the channel "1" input of the oscilloscope using a BNC cable.  Note that this cable has two conductors (which is needed for a voltage measurement, which is always the difference between two potentials).

Setting the "VERTICAL" controls

Make sure that channel 1 is turned on and the others are all turned off; to turn on a channel just press its corresponding button.  To turn it off, select it and then hit the “OFF” button (just above the “SCALE” button.  Now hit the “MENU” button (just below “SCALE”).  A menu will appear at the bottom of the screen just above the row of seven buttons.

• The leftmost button gives the coupling mode.  Make sure it is set to “DC.”  If not, press the button, the rightmost buttons now give you a set of choices.  Choose “DC.”
• Set "Invert" to "Off"
• Set "Bandwidth” to “Full”
• Leave “Fine Scale” as it is.
• Set "Position" to "0.”  The “POSITION” knob is at the top of the “VERTICAL” section.
• Set “Probe Setup” to “1X”
• Turn the “SCALE” (or Volts/Div) knob until the voltage scale (at the bottom of the screen) reads "2 V".  This means that each vertical division (i.e., the height of the squares on the screen) on the screen represents 2V.  So if a signal takes up 4 divisions, it represents a change of 8 volts.

Setting the time base ("HORIZONTAL" section)

• change the “SCALE" (or Time/Div - Time per Division) knob until the time is 1 ms per division (i.e., the width of the squares on the screen).  The time per division is shown at the bottom of the screen.
• Make sure the “LED” next to the “DELAY” button is on (if it is off, hit the button).
• Turn the “POSITION” knob until the delay (at the bottom of the screen) reads 0.00000 s.

Set the function generator as follows:

• Select sine wave function (labeled "3" in the figure above).
• The frequency select knob ("4") should be set to "1.0"
• The frequency range buttons ("5") should be set to "x1K"  (1K = 1000)
• Set the amplitude ("6") about midway between the minimum and maximum settings.  Also make sure this button is pushed in.
• Make sure the attenuation buttons (labeled "7") is out
• he DC offset ("8") should be "Off" - this is the pushed-in setting

Setting the triggering on the oscilloscope as follows (all buttons in the "TRIGGER" area):

• Hit the "MENU" button and select CH1 from the screen menu.  This sets the trigger source as channel 1.  If you had signals connected to the other inputs you could use them as the trigger input.
• Set the “Type Edge” to “Edge”.
• Set the “Coupling” to “DC.”
• Set the slope to rising edge (the icon shows a signal increasing as it goes from left to right).
• Select "Mode" and hit "Auto" and then “Set to Min”

Understanding the function generator.

1. Figure out what the Frequency range buttons ("5") and the frequency select knob ("4") do.
2. Figure out what turning the amplitude ("6") knob does.
3. Figure out what the output select buttons ("3") do.
4. Figure out what the attenuation buttons ("7") do - pulling the amplitude knob ("6") also has the same effect.
5. To understand what the DC offset knob ("8) does, set the function generator to a sine wave output.  The output created by the function generator can now be written:
V(t)=A+B*sin(ω*t)
This means that the output voltage (V(t)) is equal to a constant signal (A) and a time varying part (B*sin(ω*t)).  The constant is called the DC (Direct Current) part of the signal.  The time varying part is called the AC (Alternating Current).  This is somewhat of a misnomer because all the signals measured by the oscilloscope are voltage, but it is the convention.  By turning the DC offset off, the value of "A" is set to zero.  When you pull the offset knob, and then turn it, the signal moves up and down on the scope screen because your are varying the value of "A."
6. Experiment with all of these controls to make sure you understand them.  You will be quizzed on them later.

Understanding the Oscilloscope.

1. Figure out what the "SCALE” (Volts/Div) knob in the "VERTICAL" section of the front panel does.
2. Figure out what the "POSITION" knob in the "VERTICAL" section does (note the ground reference shown at the right of the screen).
3. Select Channel 1 and figure out what the "Coupling" option on the screen menu does.  Set the function generator so that it has a DC offset (see above) and then set the "Coupling" to "AC".  Then set it to the ground symbol, then set it back to "DC".  Make sure you understand the difference between "AC" and "DC" coupling.  You should be able to explain it in terms of which part of the signal  V(t)=A+B*sin(ω*t) is being displayed in each mode.
4. Figure out what the "Time/Div" knob in the "HORIZONTAL" section of the front panel does.
5. Figure out what the knob labeled "Delay" in the "HORIZONTAL" section does.
6. The hardest part of the oscilloscope to understand is triggering.  An oscilloscope is generally (always, in this class) used to display repetitive signals.  In order to have the signal displayed clearly on the screen, consecutive repetitions must be displayed exactly on top of each other.  To do this we pick a point on the wave which we call the trigger point, and place this point at the same place on the screen.  This ensures that consecutive waveforms are displayed one on top of another.  The trigger point is determined by a "level" and a "slope".  The scope is set up now so that the trigger point is in the middle of the screen.
1. Turn the "Level" knob in the "TRIGGER" area.  Notice how the voltage of the signal at the center of the screen changes to be equal to the trigger level (which is displayed as a horizontal line on the screen as long as you continue to turn the knob, and a small arrow at the right when it is not being changed).  Note that if you set the trigger level beyond the extrema of the signal being displayed, that you no longer get a nice static display (because the scope must try to decide for itself when to trigger, since the signal never crosses the trigger level).
2. In addition to the trigger level it is necessary to define the trigger slope, since the waveform crosses each voltage twice -- once while increasing (positive slope) and once while decreasing (negative slope).  This slope is set via the on-screen menu after hitting the "Slope/Coupling" button.  Try it.
7. The last thing you should know is that you can change the location of the trigger point on the screen by changing the setting of the “DELAY” in the “HORIZONTAL” section.  This sets a delay between when the trigger occurs and when the display starts.

This obviously only touches upon some of the features of these oscilloscopes.   We'll use a couple of other features in future labs, but those described in the previous section are the only ones that you'll be tested upon today.

One last bit of information.  If you are having trouble getting a good picture on the screen, you can always hit the button labeled "AUTOSET " which will try to set all the various modes and scales of the oscilloscope in order to get a good picture.  Though this seems like a wonderful idea, use this feature with caution.   In trying to come up with a good picture, teh scope may set modes that you don't expect (for example, choosing between "AC" and "DC" coupling), so you can easily misinterpret the scope output unless you go back to see how all of the modes are set.

## Transferring data from oscilloscope to computer

Start a web browser, and enter the IP address at the top of your scope (i.e., 130.58.84.xxx, where xxx is different for each scope).  For an oscilloscope acquiring signals on two channels, you might get a screen like the one below:

You can print the screen - there is a black and white printer in the lab called "HP LaserJet P1505."

You can also save it to disk for later use by Matlab.  To do this stop the scope, since we are acquiring two channels worth of data, we need to ensure that it is from the same scope screen.

Now select the “data” tab at the top of the web page.  Transfer the data from Channel 1 and Channel 2 to a new folder on your desktop, using the “spreadsheet” format.  Note that the programs are saved with names like “getwfm(x).isf,” so it will be easier to make sense of them if each set of files is in their own directory, to which you can give a meaningful name.

To work with the data from within Matlab, you must import the files you just saved.  I saved channel 1 in a file called "getwfm(2).isf" and channel 2 in a file called "getwfm(3).isf."  To import the data, go to File->Import data, and set the file type (at bottom of dialog box) to "All files (*.*)."   Select the first file (in my case "getwfm(2).isf").  The import Wizard opens

The time data appears in column 1, the waveform data in column 2.  Hit "Next >".

Change the name of the variable from the given name (getwfm0x2820x29) to something more meaningful.  I'll call this variable "E11Chan1."  I'll repeat for the second channel of data.

Now lets get the data into more easily handled forms.

Matlab code section 1:

```>> t=E11Chan1(:,1);  %Time is first column of data file.
>> c1=E11Chan1(:,2); %Channel 1 data is second column of first file.
>> c2=E11Chan2(:,2); %Channel 2 data is second column of second file.
>> plot(t,c1,t,c2);
>> xlabel('Time (s)');
>> ylabel('Volts (V)');
>> title('Scope Data');
>> legend('Channel 1', 'Channel 2');```

.

Matlab code section 2:

```>> myIndex=find(t>=0);  %Find all points where t is equal to or greater than zero.
>> plot(t(myIndex), c1(myIndex), t(myIndex), c2(myIndex));```

## Finishing up

Make sure you have all the information you will need for your report.  Let me know before you leave the lab - I am going to give each person (individually) a short oral quiz so you can demonstrate your knowledge of the oscilloscope and function generator.  Please feel free to ask me if you have any questions, or if you are unsure of something, before the quiz.

email me with any comments on how to improve the information on this page (either presentation or content), or to let me know if you had any particular difficulties with this lab.
You may use any portion of this document for your lab report, but be sure to reference it.

Back