Académique Documents
Professionnel Documents
Culture Documents
Student Manual
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic
or mechanical, including photocopying, recording, storing in an information retrieval system, or
translating, in whole or in part, without the prior written consent of Quanser Inc.
Table of Contents
1. INTRODUCTION..........................................................................................................................................1
2. PREREQUISITES.........................................................................................................................................1
4. IN-LAB EXPERIMENTS.............................................................................................................................39
4.1. Strain Gage with Flexible Link.......................................................................................................39
4.1.1. Collect Data.........................................................................................................................................39
4.1.2. Calibrate Sensor...................................................................................................................................40
4.1.3. Natural Frequency................................................................................................................................41
4.1.4. Exercises..............................................................................................................................................42
4.4. Potentiometer..................................................................................................................................49
4.4.1. Collect Data.........................................................................................................................................49
4.4.2. Calibrate Sensor...................................................................................................................................50
4.4.3. Exercises..............................................................................................................................................52
4.5. Infrared............................................................................................................................................53
4.5.1. Collect Data.........................................................................................................................................53
4.5.2. Calibrate Sensor...................................................................................................................................54
4.5.3. Exercises..............................................................................................................................................56
4.6. Sonar...............................................................................................................................................58
4.6.1. Collect Data.........................................................................................................................................58
4.6.2. Calibrate Sensor...................................................................................................................................59
4.6.3. Exercises..............................................................................................................................................60
4.9. Encoder...........................................................................................................................................70
4.9.1. Analysis of A, B, and I Signals............................................................................................................70
4.9.2. Encoder Calibration.............................................................................................................................71
4.9.3. Exercises..............................................................................................................................................72
5. REFERENCES...........................................................................................................................................93
1. Introduction
This manual contains laboratory procedures and exercises for the QNET Mechatronic Sensors
(MECHKIT) trainer, depicted in Figure 1. See Reference [2] for details about the hardware of this
device.
The prerequisites to run the LabVIEW Virtual Instruments (VIs) for the mechatronic sensors trainer are
listed in Section 2 and described in Section 3. The in-lab procedures for each of the on-board sensors
and switches are given in Section 4. The exercises are given within the lab procedures and labeled
Exercise. In that case, enter your answer in the Exercises section found at the end of that particular
laboratory.
2. Prerequisites
The following system is required to run the QNET MECHKIT virtual instruments:
PC equipped with either:
NI-ELVIS I and an NI E-Series or M-Series DAQ card.
NI ELVIS II
If these are not all installed the VI will not be able to run! Please make sure all the software and
hardware components are installed. If an issue arises, see the troubleshooting section in Reference [2].
3.1. Summary
Table 1 below lists and describes the MECHKIT LabVIEW VIs supplied with the QNET CD.
VI Description
QNET_MECHKIT_Flexgage Calibrate strain gage attached to the flexible link and find
natural frequency of link.
QNET_MECHKIT_Pressure Sensor Calibrate pressure sensor attached to plunger device.
QNET_MECHKIT_Piezo Find natural frequency of plastic filament through power
spectrum.
QNET_MECHKIT_Potentiometer Calibrate potentiometer to get correct angle.
QNET_MECHKIT_Infrared Calibrate infrared sensor to measure target distance.
QNET_MECHKIT_Sonar Instrument sonar sensor to measure target range..
QNET_MECHKIT_Optical Calibrate optical sensor to measure the position of the flat
screw head, which can be adjusted using the knob.
QNET_MECHKIT_Magnetic_Field Instrument magnetic field sensor to measure position of
the screw head, which can be adjusted using its knob.
QNET_MECHKIT_Encoder Used to teach the fundamentals of a rotary optical
encoder.
QNET_MECHKIT_Temperature Calibrate thermistor to measure correct temperature.
QNET_MECHKIT_Switches_and_LEDs Change the on/off behaviour of the micro switch, push
button, and optical switch and drive on-board LEDs.
QNET_MECHKIT_Switch_Debounce High-frequency analysis of micro switch and push button.
Table 1: MECHKIT VIs supplied with the QNET CD.
3.2. Description
3.2.1. Flexgage
This VI can be used to view the strain gage measurements when moving the flexible link on the QNET
mechatronic sensors trainer. As a quick description, Table 2 lists and describes the main elements of the
QNET Flexgage VI and every element is uniquely identified by an ID number in Figure 2, Figure 3, and
Figure 4.
3.2.4. Potentiometer
This VI can be used to view the potentiometer measurements when moving the potentiometer knob on
the QNET mechatronic sensors trainer. As a quick description, Table 5 lists and describes the main
elements of the QNET Potentiometer VI and every element is uniquely identified by an ID number in
Figure 9 and Figure 10.
3.2.9. Encoder
This VI shows the A, B, and Index signals generated by the rotary optical encoder on the QNET
mechatronic sensors trainer as the knob is rotated. The components of the QNET Encoder VI are
described in Table 10 and identified in Figure 19.
3.2.10. Temperature
The measured voltage output from the thermistor circuit is displayed on this VI as well as the calibrated
temperature reading. The QNET MECHKIT Temperature VI components are given in Table 11 and
identified in Figure 20.
Figure 21: QNET-MECHKIT Switches and LEDs VI: "Opto Switch" tab selected.
Figure 22: QNET-MECHKIT Switches and LEDs VI: "Micro Switch" tab selected.
Figure 23: QNET-MECHKIT Switches and LEDs VI: "Push Button" tab selected.
Figure 24: QNET-MECHKIT Switches and LEDs VI: "Digital Outputs" tab selected.
4. In-Lab Experiments
4.1.4. Exercises
Exercise 1: Collected Data
Parameter Value Units Notes
Sensor Measurement: at -1.0 cm V
Sensor Measurement: at -0.5 cm V
Sensor Measurement: at 0 cm V
Sensor Measurement: at 0.5 cm V
Sensor Measurement: at 1.0 cm V
Table 14: Collected strain gage data.
4. Exercise 1: Enter collected results in Table 16 and capture the Sensor Readings scope.
4.2.3. Exercises
Exercise 1: Collect Data
Parameter Value Units Notes
Sensor Measurement: 6.0 cm V
Sensor Measurement: 5.0 cm V
Sensor Measurement: 4.0 cm V
Sensor Measurement: 3.0 cm V
Sensor Measurement: 2.0 cm V
Sensor Measurement: 1.0 cm V
Sensor Measurement: 0.0 cm V
Table 16: Data collected from the pressure sensor.
4.3.3. Exercises
Exercise 1: Strain Gage versus Piezo
4.4. Potentiometer
1. Ensure J10 is set to POT.
2. Run the QNET_MECHKIT_Potentiometer VI.
4.4.3. Exercises
Exercise 1: Collected Data
Pot Angle (deg) Sensor Measurement (V)
4.5. Infrared
1. Ensure J10 is set to Infrared.
2. Run the QNET_MECHKIT_Infrared VI.
3. Turn ON the IR switch to enable the Infrared sensor. The IR ON LED should be lit bright red.
4. Important: Make sure you turn OFF the IR switch when the experiment is over. When active,
the infrared sensor tends to generate noise in other sensor measurements.
4.5.3. Exercises
Exercise 1: Collect Data
Target Range (cm) Sensor Measurement (V)
b cm/V
c cm
Table 21: IR sensor calibration parameters.
4.6. Sonar
1. Ensure J9 is set to Sonar.
2. Run the QNET_MECHKIT_Sonar VI.
4.6.3. Exercises
Exercise 1: Collected Data
Target Range (cm) Sensor Measurement (V)
4.7.3. Exercises
Exercise 1: Collected Data
Target Range (in) Sensor Measurement (V)
4.8.3. Results
Exercise 1: Collected Data
Target Range (in) Sensor Measurement (V)
4.9. Encoder
1. Ensure jumpers J7 is set to Enc A, J8 to Enc B, and J10 to Enc I.
2. Run the QNET_MECHKIT_Encoder VI.
4.9.3. Exercises
2. Exercise 3: Find the thermistor resistance at room temperature, R0, and at the fingertip, R. Enter
your results in Table 32.
3. Exercise 4: Derive the equation to find the exponential parameter, B, and compute it based on
the obtained results.
4. Run the QNET_MECHKIT_Temperature VI.
5. Exercise 5: Enter the B parameter that was found in Exercise 4 in the Temperature Sensor VI,
as shown in Figure 43. Place your fingertip on the sensor and capture the obtained response in
Temperature Sensor (deg C) scope.
4.10.3. Exercises
Exercise 1: Measured Voltage
Temperature (deg Temperature Measured Voltage Units Notes
C) (K) (V)
25 298 V Voltage at room temp, T0
32 305 V Voltage with finger, T
Table 31: Measured thermistor readings.
4.11.4. LEDs
1. Select the Digital Outputs tab.
2. As shown in Figure 47, switch DO 1 and DO 0 between the up/down positions and examine its
effect on the on-board LEDs.
3. Exercise 5: In Table 35, record what position, i.e. up or down, the DO 1 and DO 0 switches
have to be in such that the DO 1 and DO 0 LEDs are lit.
4.11.5. Exercises
Exercise 1: Optical Switch
Hint: If preferred, you can change the Acquisition Mode to Run Once so the oscilloscope
stops when the trigger is engaged.
5. If the trigger has been setup correctly, then the oscilloscope screen should capture a closeup
view of the micro switch signal as it goes from 5 V to 0 V.
6. Try to setup the oscilloscope for the Push Button. This is on analog input channel #2 and you
can choose to configure it on the Channel 1 of the oscilloscope (if you do, make sure you enable
the channel).
Hint: To increase the sampling rate and obtain a more closeup view of the signal, decrease
the Time/Div knob control.
7. When you are done, stop and close down the Oscilloscope instrument.
CAUTION: Make sure any ELVISmx instrument, e.g. the oscilloscope, is closed before
running any ELVIS II based VI. Otherwise the VI will not be able to run.
as the Oscilloscope tool used in Section 4.12.1. It is already setup with a trigger and does not
run continuously as the oscilloscope instrument does.
2. Run the QNET_MECHKIT_Debounce VI.
3. Exercise 1: Setup the Trigger for the Micro Switch (ELVIS CH #0) and enter settings in Table
36.
4. Press on the micro switch. The VI should stop and a response displayed on both graphs.
5. Exercise 2: Capture the Micro Switch scope. What do you notice about the output signal from
the micro switch?
Figure 49: VI used to analyze debounce of micro switch and push button.
Explain.
6. Exercise 6: When triggering on one channel, notice that there is a signal on the other channel
(e.g. when pressing the micro switch observe the Ch1 scope). Capture representative plots and
explain why this occurs.
4.12.4. Exercises
Exercise 1: Trigger Parameters for Micro Switch
Trigger Parameters Value Units Notes
Type
Slope
Source
Level V
Table 36: Trigger parameter for micro switch.
5. References
[1] QNET Practical Control Guide
[2] QNET User Guide