Electrical Instrumentation for Mechanical Systems



Welcome to the MECHATRONICS LAB!  To get ready for the kind of design work you'll be doing later in the semester, you need to become familiar with electrical signals and the instruments used to create / measure them.  That's what this lab experience is all about ...

THE PURPOSE of this lab is to familiarize you with the operation and use of the instruments found in lab.  To augment your ability to develop mechatronic systems, it is very important that you become comfortable with their use.  This lab also presents a number of definitions of signal characteristics, measurements and other related terms.  You must thoroughly understand these definitions and should consult with your lab professor if you are having any difficulty.

The OSCILLOSCOPE

Without a doubt, the oscilloscope is the most versatile and common measurement device to be found in an instrumentation lab.  In a nutshell, the oscilloscope is a device that displays a visual image of an electric signal in a two-dimensional format where the signal’s amplitude is graphed as a function of time.

The amplitude of a signal is defined as the signal’s electrical strength at any instant in time.  If the strength is in terms of electromotive force (voltage), then the unit of measure of the amplitude is the volt (V).  If the strength is in terms of current, then the unit of measure is the ampere, or amp (A).  For our purposes, we’ll be focusing mostly on voltage measurements.

When a signal’s amplitude does not vary with time, the signal is said to be DC (Direct Current).  When the signal’s amplitude varies with time, it is said to be AC (Alternating Current).  When an AC signal repeats its amplitude / time relationship over a period of time, the signal is said to be periodic.

The amount of time it takes for a periodic signal to repeat its cycle is simply termed the period (T).  The unit of measure for the period is the second.  Thought of another way, the period measurement tells us how fast an electric signal repeats itself.  A related measurement, called the frequency (f), tells us how many times a signal repeats itself every second.  The period and frequency are related:
 
 

 f = 1 / T


From this we see that the unit of frequency is 1/second, and is termed the Hertz (Hz).  For a lot of signals, the measure of frequency is a very large number.  This is a good place to introduce the common practice of affixing universal prefixes to units of measure.  For example, we’ve all probably heard an FM radio station’s broadcast frequency referred to as a certain number of “megahertz”.  Such as here in Flint, “CK105” broadcasts at 105.5 megahertz (MHz).  The “mega” prefix means 106 (million) hertz in this case.  Similarly, a lot of the signal amplitudes we’ll measure in this class will be in terms of “thousandths” (10-3) of volts.  These are called “millivolts”.  The listing below gives prefixes and their values that we’ll use in this class.  You should get to know these routinely.

Prefixes

Name     Value     Nomenclature
pico    =    10-12        p
nano   =    10-9          n
micro  =    10-6         m  or u
milli     =    10-3         m
kilo      =    103          k
mega  =    106          M
giga    =    109          G
 

The oscilloscopes found in lab are a newer generation of scope called a “digital storage oscilloscope”.  Unlike older scopes, these devices have built-in circuitry that permits advanced functionality such as automatic scaling and automatic measurements.  What does this mean to you?  Well, unlike older scopes where you had to adjust several parameters just to be able to see the waveform, these instruments scale and display the waveforms by simply pushing a button.  If you want to measure amplitude, or frequency, or any of a number of other possible measurement parameters, all you have to do is hit another button.  This makes using these instruments a very simple matter, as you’ll see!

Before using the oscilloscope, we need to provide it with a signal to measure.  One device for doing this is a function generator, which is an instrument that is designed to allow the user to select and create voltage signals, using waveforms with defined characteristics such as amplitude and frequency.  There are several of these devices in lab, but for now we’ll use the HP3324.  This has a very simple interface that allows you to select waveforms and parameter values with the push of a button.  Here’s a couple of notes about using these devices:
 

When it seems that there’s a problem with your instruments in measuring a signal, always check these three points first.  They account for about just about all problems with these instruments!

LAB PROCEDURE

Let’s get some experience with the function generator and oscilloscope.  Carefully perform the following:

1. Power up your oscilloscope and function generator.

2. On the function generator, select a sinusoidal waveform and set the frequency to be 2,500 Hz (or 2.5 kHz ... the "k" means "kilo") and the peak-to-peak amplitude to be 2 volts (2 Vpp).  The peak-to-peak amplitude is the total amplitude between the maximum and minimum level of the waveform.

3. Connect the output of the function generator to the input of the oscilloscope.  You’ll notice that there are two possible inputs on the oscilloscopes (Channel 1 or Channel 2).  Use Channel 1 for this measurement, and connect these with an RG-58 co-axial cable.

4. Press the Auto Scale button to view the waveform.  Look at the top of the screen and you’ll see an indicator of what the scaling is on each division gridline on the screen.  Remember that the amplitude is on the vertical scale and that time is on the horizontal scale.   Note that on signals of very low frequency the Auto Scale button may not work.  In this case, it will be necessary to use the manual scaling knobs to view the waveform.  To see how these work, turn them now and see the effect that changing the scaling has on the waveform.  Note too that the scaling numbers at the top of the screen change when you do this.  Back on the function generator, change the waveform and view the different types of waves that can be generated.  Notice especially the “square wave”, and how it is simply a waveform that alternates between two amplitude levels.  We’ll be using the square wave frequently later on this semester.  Return to the sinusoidal waveform and continue on.

5. Press the Time button in the “Measure” set near the top of the oscilloscope, and then the button that corresponds to frequency (at the bottom of the screen).  This measurement should closely match the frequency you selected on the function generator.  Calculate the period of this waveform by using the equation that relates frequency and period.  Now press the button on the oscilloscope that corresponds to period.  The values should match.

6. Press the Voltage measure button, and then the button corresponding to peak-to-peak voltage.  Does the automatic measurement match the setting you used on the function generator? It won’t.  This illustrates a very important principle in instrumentation.  A characteristic of the instruments called “impedance” must match.  For now, think of impedance as the tendency of a component to limit the flow of current from the signal.  If the impedance is high, less current will be allowed into the instrument and vice-versa.  It turns out that the impedance of the oscilloscope is 20,000 times higher than the impedance that the function generator expects to be connected to!  To correct this, we need to match the impedances.  Obtain a "50-ohm terminator" and a co-axial "Tee" connector from your professor and place it on the input of the oscilloscope.  Reconnect your signal lead and repeat the measurement for amplitude.  You'll see now that the expected amplitude and measured amplitude match. Count the divisions (the spaces between the horizontal lines) between the top peak of the waveform and the bottom.  Multiply this number by the scaling factor (volts per division). Does the peak-to-peak amplitude match the automatic measurement?

7. Press the Cursors button on the oscilloscope.  Note that two additional vertical lines and two additional horizontal lines appear on the screen.  Adjusting the position of these lines gives the user yet another way of performing time and amplitude measurements.  Adjust these lines to verify the values of amplitude, frequency and period measured earlier.  These cursors become very valuable when making measurements on noisy signals.  To adjust the position of a cursor, select which cursor you want to move (buttons at the bottom of the screen) and manually turn the small knob near the Cursors button.  You should see the line move on the screen.  To measure amplitude, position one horizontal cursor at the top of the waveform and the other horizontal cursor at the bottom.  Look at the bottom of the screen.  You'll see a number of measurement related data, including your peak-to-peak amplitude.  Try to measure the frequency (hint: you need to position the vertical cursors to measure period!)

8. Yet another instrument in lab for measuring signal characteristics is the Digital Multimeter (DMM).  These devices measure a tremendous number of different electrical characteristics such as the amplitude and frequency of a signal, and the impedance of a device or component, just to name a few.  Use the DMM to measure the frequency of a signal from the function generator.  Next, output a DC voltage from the DC power supply in lab to the DMM and measure its voltage.  Note that this is a signal that does not vary periodically in time.  You can, however, vary the amplitude by turning the control knob on the power supply.  Navigating around the DMM should be relatively straightforward ... the key to it all is where you plug your wires in.  Looking at the face where the wires plug in, you'll see nomenclature indicating what each connection is for.  Think about what it is you're trying to measure as you figure out where to put your wires!

Introduction to Sensors

The PURPOSE of this portion of the lab is to give you a quick introduction to sensors and how they can give a varying electrical signal in response to some kind of physical change.

Potentiometers

A potentiometer is a device that varys its impedance with the changing of mechanical position.  We've all encountered potentiometers before.  Today in lab you turned knobs on the oscilloscope to do things such as vary the position of the cursors.  That knob was actually a potentiometer.  When you turned it, you changed the impedance of the potentiometer and the oscilloscope used that change as a way of "knowing" what you wanted to do!

In this way, a potentiometer can be thought of as a sensor for mechanical position.  Basically, if we can obtain a voltage from a potentiometer that is related to mechanical position, then an arbitrary measure of that voltage would give us a way of knowing the position or "where" the potentiometer (and anything attached to it!) is.  Later in lecture we'll learn about the circuit that accomplishes this.  For now, let's just explore the concept a little:

** Make sure and return all equipment to your lab professor at the end of your lab! **

9. Obtain a potentiometer assembly from your lab professor.  Hook the red (or white) wire to the red terminal on the DC power supply, and the black wire to the green terminal.
10. Hook a "co-axial to patch cord" converter to the oscilloscope.  Using alligator cables and/or patch cords, hook the green wire to the positive input of this converter (the hole that does not have the "GND" tab).  Hook a patch cord from the GND input back to the green terminal on the DC power supply.
11. Turn the voltage on the power supply up to about 3 volts.
12. Obtain a trace of the DC signal on the oscilloscope.  NOTE: Auto Scale will not work!
13. Move the arm attached to the potentiometer.  Does your signal's amplitude on the oscilloscope change?
14. Remove the wires from the oscilloscope and hook them to the DMM, configuring it so that it can measure DC volts.  Verify that you're measuring different voltage levels for different positions of the potentiometer arm.
15. Record voltage levels for the following positions:

16. Using these data points, construct a simple linear relationship between angle and voltage (y = mx + b).
17. Using your relationship, predict what voltage you would measure for 45 degrees and 135 degrees.  Move the potentiometer arms to these approximate positions.  Do the measured voltages reasonably match predicted values??

You see, if we took the time to very carefully determine the exact relationship between position and voltage, then a subsequent measure of voltage should give us a very accurate way of measuring position.  The potentiometer is thus an accurate position sensor.  Many other sensors work on this same concept.
 

Introduction to Actuators

The PURPOSE of this portion of the lab exercise is to give you an opportunity to work with electromechanical actuators and gain an understanding of some basic functionality.

DC Motors

The DC electric motor has historically been one of the most versatile and useful actuating devices ever conceived.  Recent developments in integrated circuit (IC) control devices have made their use even more broad.  We'll learn a lot about this later in the course.  Because these circuits allow greatly improved positional control over conventional methods, along with the fact that DC motors are extremely inexpensive, it is a safe bet that the DC motor will be a leading actuator for mechatronic devices for a long time to come.

The procedures outlined below are designed to lead you through a series of motor circuits and concepts meant to illustrate the functionality and control capability of DC motors.  First, we consider a method of controlling speed.  Later in the course, you'll see how easy it is to create this functionality in a mechatronic device!

Demonstration

A common technique for controlling the speed of a motor is to use pulse width modulation (PWM).  This is a technique of controlling the “on” time of a square wave.  You see, earlier we looked at square waves as being waveforms that alternate between an “on” or “high” state and an “off” or “low” state.  In the example we saw earlier, these states alternated in an equal fashion.  In other words, the “high” time is equal to the “low” time.  But in PWM, these times are not equal.  For example, if the “high” time is greater than the “low” time, then the average current of the waveform is higher than the case where the times are reversed, that is, when the “low” time is greater than the “high” time.  By varying the time of the “high” state, that is, the pulse width, then we have a way of varying current and thus varying speed of the motor.

D1) Obtain an HP33120A function generator and create a square wave with a frequency of 100 Hz, amplitude 3 Vpp, and a 1.5-volt DC offset.  Observe this waveform on the oscilloscope.
D2) Change the duty cycle to 20%.  Observe the difference in the waveform on the oscilloscope.
D3) Vary the duty cycle by rotating the knob on the function generator.  Observe how the pulse width changes.
D4) Hook a DC motor to this waveform.
D5) Observe the speed of the motor as the pulse width is varied from 20% duty cycle to 80% duty cycle.

Now we'll look at positional control.  In mechatronic devices it's frequently desired to know just how much a motor has turned, or alternately, to specify how much it should turn to accomplish some desired function.  A method for monitoring motor rotation is currently gaining a lot of attention where the sensor for rotation is the motor itself!

To understand this, we have to consider that a motor is fundamentally an electromagnet spinning inside of a permanent magnet.  Now we all know that forming wires into the shape of a coil creates an electromagnet.  When a motor is powered-up, the electromagnet coils displace with respect to the permanent magnet based on the respective polarity of the magnets.  By rapidly switching polarities, the motor spins.  However, whenever a coil of wire passes by a permanent magnet, electric voltage is generated.  This is the operating principle of a generator.

With this in mind, as the coils of a DC motor pass by the permanent magnets, a tiny pulse of energy is generated.  This voltage potential shows up on the wires between the power supply and the motor, and is termed “back-EMF”.  Measuring and counting these pulses provides a means of telling how much motor displacement has occurred and further, what the speed of the motor is.

HOW?? Well, think about it ... every time a coil passes by a permanent magnet in the motor there is a pulse of electricity.  You'll soon see that on the oscilloscope.  Now if we know, for example, that the motor has three magnets inside it then every time there's a rotation the coils must pass by these three magnets.  But further, there might be more than one coil!  If, again for example, there are two coils in the motor then for every revolution we should see six total pulses.

Now, let's say that we could capture six pulses on an oscilloscope's screen.  If you could determine the time it took to create these six pulses, wouldn't you have a way of knowing how fast the motor is turning?  So far, you have gained the knowledge to do this on your oscilloscope at least two ways!

Procedure

** Make sure and return all equipment to your lab professor at the end of your lab! **

18) Obtain a DC motor with a 5-ohm resistor soldered to its leg from your lab professor.
19) Set the DC power supply to its lowest value.  Hook up the motor by connecting the power through the resistor.  Slowly increase the voltage until the motor begins to turn.  You should not exceed more than 2 volts!
20) Measure the voltage drop across the resistor (put one measurement lead on one side of the resistor, and the other lead on the other side), observing the waveform on the oscilloscope.  Increasing the motor voltage a little may improve the measured signal.
21) Measure the frequency of the signal.  If it is known that 6 pulses occur for every revolution of the motor, what is the motor speed in RPM?  Can you obtain the same speed by measuring the time between six pulses using the cursors?
22) Gently slow down the motor by applying slight finger pressure to the shaft.  Is the reduction in speed reflected on the oscilloscope?

Next, we again look at speed control.  One of the simplest techniques for controlling speed is to change the voltage applied to the motor.  You can verify this by changing the voltage level on the DC supply and motor set-up used above:

23) Starting at the lowest voltage on your DC supply possible, take data points for motor speed at ½ volt increments (use a DMM to verify voltage settings), increasing the voltage to the motor to a maximum of 4 volts.  Use the back-EMF technique detailed above to measure motor speed.  Plot the results in your lab report. WARNING!  THE RESISTOR MAY GET QUITE HOT DURING THIS!
 

Lab Report - use separate paper to complete!
 

1. Sketch some of the waveforms you generated and identify them by name.

2. According to the function generator, what was the amplitude of the signal you generated to be measured by the oscilloscope?  What is the amplitude measurement without the 50-ohm terminator?  With the terminator?

3. Show how you manually calculated amplitude by counting divisions and multiplying by the scaling factor:

4. What were the voltage levels from the potentiometer for zero degrees? 90 degrees? 180 degrees?  Show how you obtained your position / voltage math function:

5. Using your relationship, predict the voltage for 45 degrees and 135 degrees.  What should they be?  What are the actual measurements?

6. A photodiode is a device that, much like the potentiometer, can be used in a circuit to create a voltage that varys with the amount of light that falls on it.  For now let's consider zero volts as a sign that there is no light at all.  Let's say that you were programming a computer, and that the programming language was a simple "command" language where you basically tell the computer "if something is this, then do that".  Write two statements that might (a) tell the computer to turn on a light when the photodiode voltage is zero and (b) turn the light off when the voltage is not zero.

7. Sketch an example of a PWM signal with a low duty cycle.  Sketch one with a high duty cycle.

8. For the motor exercise, what was the measured frequency of the back-EMF pulses?  What motor speed does this translate to? Show how you arrive at that!  Show the same for how you get the speed by measuring the time between 6 pulses.

9. Report your voltage / speed data points for the DC motor and plot the relationship.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

end