100

QNET MECHKIT Workbook Student

Embed Size (px)

DESCRIPTION

uso de Labview

Citation preview

  • 2011 Quanser Inc., All rights reserved.

    Quanser Inc.119 Spy CourtMarkham, OntarioL3R [email protected]: 1-905-940-3575Fax: 1-905-940-3576

    Printed in Markham, Ontario.

    For more information on the solutions Quanser Inc. offers, please visit the web site at:http://www.quanser.com

    This document and the software described in it are provided subject to a license agreement. Neither the software nor this document may beused or copied except as specified under the terms of that license agreement. All rights are reserved and no part may be reproduced, stored ina retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the priorwritten permission of Quanser Inc.

    AcknowledgementsQuanser, Inc. would like to thank the following contributors:

    Dr. Hakan Gurocak, Washington State University Vancouver, USA, for his help to include embedded outcomes assessment, and

    Dr. K. J. strm, Lund University, Lund, Sweden for his immense contributions to the curriculum content.

    QNET MECHKIT Workbook - Student Version 2

  • Contents1 Introduction 6

    2 Sensor Properties 72.1 Resolution 72.2 Range 72.3 Absolute and Incremental 72.4 Analog Sensor Measurement 7

    3 Strain Gage with Flexible Link 93.1 Background 93.2 Strain Virtual Instrument 103.3 Lab 1: Collect Data 123.4 Lab 2: Calibrate Sensor 133.5 Lab 3: Natural Frequency 133.6 Results 13

    4 Pressure Sensor 144.1 Background 144.2 Pressure Virtual Instrument 154.3 Lab 1: Collect Data 164.4 Lab 2: Calibrate Sensor 174.5 Results 17

    5 Piezo Sensor 185.1 Background 185.2 Lab 1: Data Analysis 185.3 Lab 2: Natural Frequency 18

    6 Potentiometer 196.1 Background 196.2 Potentiometer Virtual Instrument 206.3 Lab 1: Collect Data 216.4 Lab 2: Calibrate Sensor 226.5 Results 22

    7 Infrared 237.1 Background 237.2 Potentiometer Virtual Instrument 247.3 Lab 1: Collect Data 257.4 Lab 2: Calibrate Sensor 267.5 Results 26

    8 Sonar 278.1 Background 278.2 Sonar Virtual Instrument 288.3 Lab 1: Collect Data 298.4 Lab 2: Calibrate Sensor 308.5 Results 30

    9 Optical Position 319.1 Background 319.2 Optical Virtual Instrument 329.3 Lab 1: Collect Data 339.4 Lab 2: Calibrate Sensor 349.5 Results 34

    QNET MECHKIT Workbook - Student Version v 1.0

  • 10 Magnetic Field 3510.1 Background 3510.2 Magnetic Field Virtual Instrument 3610.3 Lab 1: Collect Data 3710.4 Lab 2: Calibrate Sensor 3810.5 Results 38

    11 Encoder 3911.1 Background 3911.2 Encoder Virtual Instrument 4111.3 Lab 1: Analysis of A, B, and I Signals 4111.4 Lab 2: Encoder Calibration 4211.5 Results 42

    12 Temperature Sensor 4312.1 Background 4312.2 Temperature Virtual Instrument 4512.3 Lab 1: Collect Data 4612.4 Lab 2: Calibrate Sensor 4712.5 Results 47

    13 Switches and LEDs 4813.1 Background 4813.2 Switches and LEDs Virtual Instrument 5013.3 Lab 1: Optical Switch 5313.4 Lab 2: Micro Switch 5413.5 Lab 3: Push Button 5413.6 Lab 4: LEDs 5413.7 Results 55

    14 Switch DebounceAnalysis 5614.1 Background 5614.2 Switches and LEDs Virtual Instrument 5714.3 Lab 1: Running the Oscilloscope 5814.4 Lab 2: Micro Switch 5914.5 Lab 3: Push Button 5914.6 Results 60

    15 System Requirements 6115.1 Overview of Files 6115.2 Strain Gage with Flexible Link VI 6215.3 Pressure Laboratory VI 6415.4 Piezo VI 6615.5 Potetiometer VI 6815.6 Infrared Sensor Laboratory VI 7015.7 Sonar Sensor VI 7215.8 Optical Position Laboratory VI 7415.9 Magnetic Field Laboratory VI 7615.10 Encoder Laboratory VI 7815.11 Temperature Laboratory VI 8015.12 Switches and LEDs Laboratory VI 8115.13 Switch Debounce Laboratory VI 84

    16 Lab Report 8516.1 Template for Content

    (Strain Gage with Flexible Link) 86

    QNET MECHKIT Workbook - Student Version 4

  • 16.2 Template for Content(Pressure Sensor) 87

    16.3 Template for Content(Piezo Film Sensor) 88

    16.4 Template for Content(Potentiometer) 89

    16.5 Template for Content(Infrared Sensor) 90

    16.6 Template for Content(Sonar Sensor) 91

    16.7 Template for Content(Optical Sensor) 92

    16.8 Template for Content(Magnetic Field Sensor) 93

    16.9 Template for Content(Encoder) 94

    16.10 Template for Content(Temperature Sensor) 95

    16.11 Template for Content(Switches and LEDs) 96

    16.12 Template for Content(Switch Debounce Analysis) 97

    16.13 Tips for Report Format 98

    QNET MECHKIT Workbook - Student Version v 1.0

  • 1 INTRODUCTION

    Mechatronics engineering is a cross-disciplinary field that combines mechanical and electronic design in controlsystems architecture though the application of computer programming. One of the most useful topics that can becovered in an introductory mechatronics course is the understanding and application of sensors. Various sensorsare used in all types of industries. For example, in the automotive industry magnetic field transducers are used forthrottle, pedal, suspension, and valve position sensing. In assembly line and machine automation, optical sensorsare used for non-contact position sensing and safety. Piezo film sensors are installed in packages to log vibrationhistory of a shipment.

    The QNET mechatronics sensors (MECHKIT) trainer is shown in Figure 1.1. It has ten types of sensors, two typesof switches, a push button, and two LEDS. This QNET module can be used to teach the physical properties of mostsensors used today, and the techniques and limitations of their application.

    Figure 1.1: QNET Mechatronic Sensors Trainer (MECHKIT)

    There are 12 experiments: strain gage with flexible link, pressure sensor, piezo sensor, potentiometer, infrared,sonar, optical position, magnetic field, encoder, temperature sensor, switches and LEDs, and switch debounceanalysis. The experiments can be performed independently.

    Topics Covered

    Strain gauge to measure deflection

    Piezo film sensor to measure vibration

    Rotary potentiometer to measure position

    Pressure and thermistor sensors

    Long range sensors: sonar and infrared

    Short range sensors: magnetic field and optical

    Micro switch, push button, and optical switch

    Light emitting diodes (LEDs)

    Encoders

    Switch debouncing

    PrerequisitesIn order to successfully carry out this laboratory, the user should be familiar with the following:

    Using LabVIEWrto run VIs.

    QNET MECHKIT Workbook - Student Version 6

  • 2 SENSOR PROPERTIES

    This section discusses various sensor properties that are often found in technical specifications.

    2.1 Resolution

    The resolution of a sensor is the minimum change that can be detected in the quantity that is being measured. Forinstance a sensor that measures angular position of a motor shaft may only be able to detect a 1 degree change.Thus if the motor moves 0.5 degrees, it will not be detected by the sensor. Depending on the precision needed forthe application, this may be adequate.

    2.2 Range

    Range sensors can only take measurements of a target within a certain operating range. The operating rangespecifies a maximum, and sometimes also a minimum, distance where the target can be from the sensor in order toobtain an accurate measurement. Sensors with a small range are the magnetic field and optical position sensors.Sensor with a relatively larger range are infrared and sonar.

    2.3 Absolute and Incremental

    Absolute sensors detect a unique position. Incremental sensors measure a relative position that depends on a priorposition or last power on/off. For example, if an incremental rotary encoder is used to measure the position of wheel,the encoder will measure zero every time its power is reset. If an absolute sensor such as a rotary potentiometer isused, then it will detect the same angle regardless if it has just been powered.

    2.4 Analog Sensor Measurement

    Analog sensors output a signal that correlates to the quantity it is measuring. The relationship between the outputsignal of the sensor and the actual measurement varies depending on the type of sensor. For example, the voltagemeasured by a potentiometer is directly proportional to the angle it is measuring. However, the resistance of athermistor decreases exponentially as the temperature increases.

    Some of the different ways to characterize analog sensors is illustrated in Figure 2.1.

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 2.1: Different sensor responses

    Linear sensors can be modeled using the equation

    y = ax+ b (2.1)

    where a is the rate of change and b is the offset. Variable x is the sensor output signal and y is the measurement,e.g. for the potentiometer x would be the voltage measured by the sensor and y would be the angular measurement(in either degrees or radians). Other types of sensors need to be characterized by more complex relationship suchas polynomial

    y = ax2 + bx+ c (2.2)

    or exponential

    y = aebx (2.3)

    QNET MECHKIT Workbook - Student Version 8

  • 3 STRAIN GAGE WITH FLEXIBLELINK

    3.1 Background

    A strain gage measures strain, or deflection, of an object. As shown in Figure 3.1, in the QNET mechatronic sensorstrainer a strain gage is used to measure the deflection of a flexible link. As the link bends, the resistance of the straingage changes.

    Figure 3.1: Strain gage measuring deflection of flexible link on QNET mechatronic sensors trainer

    deflection of flexible link on QNET mechatronic sensors trainer.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 3.2 Strain Virtual Instrument

    The virtual instrument used to collect data using the strain gage is shown in Figure 3.2. The virtual instrument usedto calibrate strain data is shown in Figure 3.3. The virtual instrument used to determine the natural frequency of theflexible link is shown in Figure 3.4.

    Figure 3.2: Collecting flexgage data

    QNET MECHKIT Workbook - Student Version 10

  • Figure 3.3: Calibrating the strain gage sensor

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 3.4: Finding natural frequency of flexible link

    3.3 Lab 1: Collect Data

    1. Ensure J7 is set to Strain Gage.

    2. Open and configure the QNET MECHKIT Flexgage VI as described in Section 15.2. Make sure the correctDevice is chosen.

    3. Run QNET_MECHKIT_Flexgage.vi

    4. Move the flexible link to -1 cm.

    5. Enter the strain gage voltage reading in the Sensor Measurement (V) array (indicated in Figure 3.2).

    6. Repeat for -0.5 cm, 0 cm, 0.5 cm, and 1.0 cm. A linear curve is automatically fitted to the data being enteredand its slope and intercept are generated.

    7. Enter the measured voltages and capture the Sensor Readings scope.

    QNET MECHKIT Workbook - Student Version 12

  • Parameter Value Units NotesSensor Measurement: at -1.0 cm VSensor Measurement: at -0.5 cm VSensor Measurement: at 0 cm VSensor Measurement: at 0.5 cm VSensor Measurement: at 1.0 cm VGain cm/VOffset cm

    Table 3.1: Strain gage results

    8. Click on Stop button to stop the VI.

    3.4 Lab 2: Calibrate Sensor

    1. Run the QNET_MECHKIT_Flexgage.vi

    2. Select the Calibrate Sensor tab and enter the slope and intercept obtained in Section 3.3 into the CalibrationGain and Offset controls shown in Figure 3.3, below. When the link is moved, the slider indicator in the VIshould match up with the actual location of the flexible link on the QNET module.

    3. Enter the gain and offset obtained.

    4. Click on Stop button to stop the VI.

    3.5 Lab 3: Natural Frequency

    1. Run the QNET_MECHKIT_Flexgage.vi

    2. Select the Natural Frequency tab.

    3. Manually perturb the flexible link and stop the VI when it stops resonating (after about 5 seconds). The spectrumshould then load in the chart, as shown in Figure 3.4 (the value shown is incorrect).

    4. Enter natural frequency found and capture the resulting power spectrum response. Hint: You can use thecursor to take measurements off the graph.

    5. Click on Stop button to stop the VI.

    3.6 Results

    Parameter Value Units NotesGain cm/VOffset cmNatural Frequency Hz

    Table 3.2: Strain gage results summary

    QNET MECHKIT Workbook - Student Version v 1.0

  • 4 PRESSURE SENSOR

    4.1 Background

    A pressure sensor is attached to the plunger on the QNET mechatronic board shown in Figure 4.1. This is a gagepressure sensor and its measurements are relative to the atmospheric pressure. The voltage signal generated isproportional to the amount of pressure in the vessel of the plunger. So as the plunger is pushed further, the air insidethe vessel becomes more compressed and the reading increases.

    Figure 4.1: Pressure sensor on QNET mechatronic sensors trainer

    Pressure sensors can also be used to indirectly measure other values. For example, in the QNET mechatronicsboard the position of the plunger head is measured. It can also be used to measure the amount of volume in areservoir or the altitude of an aerial vehicle.

    QNET MECHKIT Workbook - Student Version 14

  • 4.2 Pressure Virtual Instrument

    The virtual instrument used to collect data using the strain gage is shown in Figure 3.2. The virtual instrument usedto calibrate strain data is shown in Figure 3.3. The virtual instrument used to determine the natural frequency of theflexible link is shown in Figure 3.4.

    Figure 4.2: Collecting pressure data

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 4.3: Calibrating the pressure sensor

    4.3 Lab 1: Collect Data

    1. Ensure J9 is set to Pressure.

    2. Open and configure the QNET MECHKIT Pressure VI as described in Section 15.3. Make sure the correctDevice is chosen. Important: Completely remove the plunger from the tube and re-insert it. This will ensure the chamber ispressurized enough.

    3. Run QNET_MECHKIT_Pressure_Sensor.vi

    4. Push the plunger up to the 6 cm marked on the MECHKIT board and measure the resulting voltage using thePressure (V) scope (or the digital display).

    5. Enter the result in the Sensor Measurement (V) array, as indicated in Figure 4.2.

    6. Repeat for when the plunger is at 5.0 cm, 4.0 cm, 3.0 cm, 2.0 cm, 1.0 cm, and 0 cm. The pressure sensor isquadratic. The coefficients for the second-order polynomial are generated and the fitted curve is automaticallyplotted.

    7. Enter collected results and capture the Sensor Readings scope.

    QNET MECHKIT Workbook - Student Version 16

  • Parameter Value Units NotesSensor Measurement: at 6.0 cm VSensor Measurement: at 5.0 cm VSensor Measurement: at 4.0 cm VSensor Measurement: at 3.0 cm VSensor Measurement: at 2.0 cm VSensor Measurement: at 1.0 cm VSensor Measurement: at 0.0 cm V

    Table 4.1: Pressure sensor results

    8. Click on Stop button to stop the VI.

    4.4 Lab 2: Calibrate Sensor

    1. Run the QNET_MECHKIT_Pressure_Sensor.vi

    2. In the Calibrate Sensor tab, enter the polynomial coefficients, as illustrated in Figure 4.3, to measure correctposition of the plunger. Verify that the sensor is reading properly, e.g. display should read 0.5 cm when plungeris placed at 0.5 cm.

    3. Enter the a, b, and c, parameters used.

    4. Click on Stop button to stop the VI.

    4.5 Results

    Parameter Value Units Notesa cm/V2b cm/Vc cm

    Table 4.2: Pressure sensor results summary

    QNET MECHKIT Workbook - Student Version v 1.0

  • 5 PIEZO SENSOR

    5.1 Background

    Piezo sensors measure vibration. The piezo sensor on the QNET-MECHKIT trainer, shown in Figure 5.1, is con-nected to a plastic band that has a brass disc weight at the end.

    Figure 5.1: Piezo sensor on the QNET mechatronic sensors trainer

    5.2 Lab 1: Data Analysis

    1. Ensure J8 is set to Piezo.

    2. Open and configure the QNET MECHKIT Piezo VI as described in Section 15.4. Make sure the correctDevice is chosen.

    3. Run QNET_MECHKIT_Piezo.vi

    4. Manually perturb the plastic band that is attached to the piezo sensor by flicking it and examine the responsein the Piezo (V) scope.

    5. Grab the end of the plastic band and move it slowly up and down. Examine the response.

    6. Based on these two tests, what does the Piezo sensor measure? How is this different then a strain gagemeasurement? Capture a sample Piezo (V) scope response after it has been perturbed (by flicking it).

    7. Click on Stop button to stop the VI.

    5.3 Lab 2: Natural Frequency

    1. Run the QNET_MECHKIT_Piezo.vi

    2. Manually perturb the piezo sensor.

    3. Capture the resulting power spectrum response and give the measured natural frequency. Hint: You can usethe cursor to take measurements off the graph.

    4. Click on Stop button to stop the VI.

    QNET MECHKIT Workbook - Student Version 18

  • 6 POTENTIOMETER

    6.1 Background

    Rotary potentiometers are absolute analog sensors used to measure angular position, such as a load shaft of amotor. They are great to obtain a unique position measurement. However, caution must be used as their signal isdiscontinuous. That is, after a few revolutions potentiometers will reset their signal back to zero. The potentiometeron the QNET MECHKIT board is shown in Figure 6.1.

    Figure 6.1: Potentiometer knob on QNET mechatronic sensors trainer

    QNET MECHKIT Workbook - Student Version v 1.0

  • 6.2 Potentiometer Virtual Instrument

    The virtual instrument used to collect data using the potentiometer is shown in Figure 6.2. The virtual instrumentused to calibrate potentiometer data is shown in Figure 6.3.

    Figure 6.2: Collecting potentiometer data

    QNET MECHKIT Workbook - Student Version 20

  • Figure 6.3: Calibrating the potentiometer

    6.3 Lab 1: Collect Data

    1. Ensure J10 is set to POT.

    2. Open and configure the QNET MECHKIT Potentiometer VI as described in Section 15.5. Make sure the cor-rect Device is chosen.

    3. Run QNET_MECHKIT_Potentiometer.vi

    4. Rotate the arrowhead of the potentiometer to a certain position, e.g. 45 degrees.

    5. Enter the position in the Pot Angle (deg) array, as indicated in Figure 6.2.

    6. Enter corresponding measured sensor voltage in Sensor Measurement (V) array (shown in Figure 6.2).

    7. Fill out table with an appropriate amount of data points. Notice that as the measured potentiometer readingsare entered, a curve is automatically generated to fit the data. The slope and intercept of this line is generatedas well.

    8. Enter the collected data and capture the Sensor Reading chart.

    QNET MECHKIT Workbook - Student Version v 1.0

  • Parameter Value Units NotesSensor Measurement: at 0 deg VSensor Measurement: at 45 deg VSensor Measurement: at 90 deg VSensor Measurement: at 135 deg VSensor Measurement: at 180 deg VGain deg/VOffset deg

    Table 6.1: Potentiometer sensor results

    9. Click on Stop button to stop the VI.

    6.4 Lab 2: Calibrate Sensor

    1. Run QNET_MECHKIT_Potentiometer.vi

    2. In the Calibrate Sensor tab, set the Gain and Offset controls, as indicated in Figure 6.3, to values such thatthe potentiometer measures the correct angle. Verify that the sensor is reading properly, e.g. when pot arrowis turned to 45.0 deg, the Display: Potentiometer (deg) knob indicator should read 45.0 degrees.

    3. Enter Gain and Offset values used.

    4. Click on Stop button to stop the VI.

    6.5 Results

    Parameter Value Units NotesGain deg/VOffset deg

    Table 6.2: Potentiometer sensor results summary

    QNET MECHKIT Workbook - Student Version 22

  • 7 INFRARED

    7.1 Background

    Infrared (IR) sensors are widely used in robots, automotive systems, and various other applications that requirean accurate, medium-range non-contact position measurement. An IR sensor is typically composed of an infraredemitting diode (IRED), a position sensing detector (PSD), and a signal processing circuit. It outputs a voltage thecorrelates to the distance of the remote target. The infrared distance measuring sensor on the QNET MECHKITboard is shown in Figure 7.1.

    Figure 7.1: IR sensor on QNET mechatronic sensors trainer

    Infrared-based distance sensors typically have a smaller maximum range than sonar but the resolution is better.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 7.2 Potentiometer Virtual Instrument

    The virtual instrument used to collect data using the IR sensor is shown in Figure 7.2. The virtual instrument usedto calibrate IR range data is shown in Figure 7.3.

    Figure 7.2: Collecting IR data

    QNET MECHKIT Workbook - Student Version 24

  • Figure 7.3: Calibrating the IR sensor

    7.3 Lab 1: Collect Data

    1. Ensure J10 is set to Infrared.

    2. Open and configure the QNET MECHKIT Infrared VI as described in Section 15.6. Make sure the correctDevice is chosen.

    3. Run QNET_MECHKIT_Infrared.vi

    4. Turn ON the IR switch to enable the Infrared sensor. The IR ON LED should be lit bright red. Important:Make sure you turn OFF the IR switch when the experiment is over. When active, the infrared sensor tends togenerate noise in other sensor measurements.

    5. Get a target, such as a sturdy piece of cardboard, that is at least 10 by 10 cm2 with a reflective colour like whiteor yellow.

    6. Begin with the target close to the IR sensor and slowly move it away.

    7. Once its range of operation is found, enter the distance between the target and the IR sensor in the TargetRange (cm) array, as shown in Figure 7.2.

    8. Enter the corresponding measured voltage from the IR sensor in the Sensor Measurement (V) array, as shownin Figure 7.2.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 9. Repeat for different target positions. The IR sensor is quadratic. As the measurements are entered, thecoefficients for the second-order polynomial are generated and the fitted curve is automatically plotted.

    10. Record your distance and voltage observations and capture the corresponding Sensor Readings scope.

    Parameter Value Units NotesSensor Measurement: at 17cm VSensor Measurement: at 22 cm VSensor Measurement: at 27 cm VSensor Measurement: at 32 cm VSensor Measurement: at 37 cm VSensor Measurement: at 42 cm VSensor Measurement: at 47 cm VSensor Measurement: at 52 cm VSensor Measurement: at 57 cm V

    Table 7.1: IR sensor results

    11. What did you notice when the target is close to the IR sensor? That is, did the behaviour of the sensor changewhen the target was in close proximity as opposed to being further away?

    12. Click on Stop button to stop the VI.

    7.4 Lab 2: Calibrate Sensor

    1. Run QNET_MECHKIT_Infrared.vi

    2. In the Calibrate Sensor tab, enter the polynomial coefficients to correctly measure the distance of the target.Check that it is measuring correctly, e.g. when target is 25.0 cm away, the display should read 25.0 cm.

    3. Enter the a, b and c values used in Table 7.2.

    4. Click on Stop button to stop the VI.

    7.5 Results

    Parameter Value Units Notesa cm/V2b cm/Vc cm

    Table 7.2: IR sensor results summary

    QNET MECHKIT Workbook - Student Version 26

  • 8 SONAR

    8.1 Background

    Often used in mobile robotics, sonar sensors are fitted with an emitter that generates ultrasonic waves and a receiverthat captures them after hitting a target. A timer calculates how long it takes for the signal to return and, given thespeed of sound in air, the distance of the remote target is measured. The sonar ranger on the mechatronic traineris pictured in Figure 8.1.

    Figure 8.1: Sonar sensor on QNET mechatronic sensors trainer

    Sonar sensors are great for long-distance measurements. For example, the one mounted on mechatronic boardcan go up to 21 feet. However, in general, these devices do not have good close-range measurements and theirresolution can be relatively coarse.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 8.2 Sonar Virtual Instrument

    The virtual instrument used to collect data using the sonar sensor is shown in Figure 8.2. The virtual instrumentused to calibrate sonar range data is shown in Figure 8.3.

    Figure 8.2: Collecting sonar data

    QNET MECHKIT Workbook - Student Version 28

  • Figure 8.3: Calibrating the sonar sensor

    8.3 Lab 1: Collect Data

    1. Ensure J9 is set to Sonar.

    2. Open and configure the QNET MECHKIT Sonar VI as described in Section 15.7. Make sure the correctDevice is chosen.

    3. Run QNET_MECHKIT_Sonar.vi

    4. Get a target, such as a sturdy piece of cardboard, that is at least 10 by 10 cm2 with a reflective colour like whiteor yellow.

    5. Begin with the target close to the sonar sensor and slowly move it upwards.

    6. Once its range of operation is found, enter the distance between the target and the sonar sensor in the TargetRange (cm) array, as shown in Figure 8.2.

    7. Enter the corresponding measured voltage from the sonar sensor in the Sensor Measurement (V) array, asshown in Figure 8.2.

    8. Repeat for different target positions. The sonar sensor is linear. The slope and intercept are generated andthe fitted curve is automatically plotted.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 9. Enter your collected target distances and voltages. Capture the Sensor Readings scope as well.

    Parameter Value Units NotesSensor Measurement: at 7 cm VSensor Measurement: at 8 cm VSensor Measurement: at 9 cm VSensor Measurement: at 10 cm VSensor Measurement: at 11 cm V

    Table 8.1: Sonar sensor results

    10. What is the resolution and operating range of the sonar sensor? How does the resolution and range comparewith the IR sensor?

    11. Click on Stop button to stop the VI.

    8.4 Lab 2: Calibrate Sensor

    1. Run QNET_MECHKIT_Sonar.vi

    2. Select the Calibrate Sensor tab and enter Gain and Offset coefficients to correctly measure the distance of thetarget. Make sure the coefficients are correct, e.g. when the target is 10.0 inches away then the Sonar (inch)display should read 10.0 inches.

    3. Enter Gain and Offset values used in Table 8.2.

    4. Click on Stop button to stop the VI.

    8.5 Results

    Parameter Value Units NotesRange cmResolution cmGain cm/VOffset cm

    Table 8.2: Sonar sensor results summary

    QNET MECHKIT Workbook - Student Version 30

  • 9 OPTICAL POSITION

    9.1 Background

    Optical position sensors are used in applications such as assembly lines, machine automation, and even edgedetection in robots. The optical position sensor on the QNET mechatronic sensors board is the black plastic housinglocated at the bottom of Figure 9.1. An infrared emitting diode and an NPN silicon phototransistor are mountedside-by-side and are used to measure the position of a target. This sensor has a range of 0.25 inches.

    Figure 9.1: Optical position sensor (bottom) and target position knob (top) on QNET mechatronic sensors trainer

    QNET MECHKIT Workbook - Student Version v 1.0

  • 9.2 Optical Virtual Instrument

    The virtual instrument used to collect data using the optical position sensor is shown in Figure 9.2. The virtualinstrument used to calibrate optical position data is shown in Figure 9.3.

    Figure 9.2: Collecting optical position data

    QNET MECHKIT Workbook - Student Version 32

  • Figure 9.3: Calibrating the optical position sensor

    9.3 Lab 1: Collect Data

    1. Ensure J7 is set to Optical Position.

    2. Open and configure the QNET MECHKIT Optical Position VI as described in Section 15.8. Make sure thecorrect Device is chosen.

    3. Run QNET_MECHKIT_Optical.vi

    4. Gently turn the knob of the optical position sensor clockwise until the flat metal surface gently rests on top ofthe tube. Then, rotate the knob slightly counter-clockwise so the 0 mark on the knob faces up. At this point,the reflective target is very close to the optical sensor and will be the reference 0 inch position. Enter the 0position in the first element of the Target Range (inch) array, shown in Figure 9.2.

    5. Enter the voltage measured by the optical position sensor, when the target is 0 inches away, in the SensorMeasurement (V) array, as indicated in Figure 9.2.

    6. Turn the knob counter-clockwise one rotation to move the target further from the sensor. The target moves1-inch for every 20 turns. Enter the position the target has moved from the reference in the Target Range (inch)array, which is shown in Figure 9.2.

    7. Record the measured sensor voltage in the Sensor Measurement (V) array.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 8. Take samples for the entire range of the target (i.e. until the knob cannot be rotated CCW anymore). Remarkthat the optical position sensor is exponential. As data is being entered, the exponential parameters aregenerated and the fitted curve is automatically plotted.

    9. Enter the measured sensor data and capture the Sensor Readings response.

    Parameter Value Units NotesSensor Measurement: at 0 in. VSensor Measurement: at 0.025 in. VSensor Measurement: at 0.050 in. VSensor Measurement: at 0.075 in. VSensor Measurement: at 0.100 in. VSensor Measurement: at 0.125 in. VSensor Measurement: at 0.150 in. VSensor Measurement: at 0.175 in. VSensor Measurement: at 0.200 in. VSensor Measurement: at 0.225 in. VSensor Measurement: at 0.250 in. VSensor Measurement: at 0.28 in. V

    Table 9.1: Optical position sensor results

    10. Click on Stop button to stop the VI.

    9.4 Lab 2: Calibrate Sensor

    1. Run QNET_MECHKIT_Optical.vi

    2. Select the Calibrate Sensor tab, enter values for the Gain and Damping exponential function parameters, asshown in Figure 9.3, to correctly measure the distance of the target, e.g. when target is 0.10 inches away thendisplay should read 0.10 inches.

    3. Enter the Gain and Damping parameters used into Table 9.2.

    4. Click on Stop button to stop the VI.

    9.5 Results

    Parameter Value Units NotesGain inDamping

    Table 9.2: Optical position sensor results

    QNET MECHKIT Workbook - Student Version 34

  • 10 MAGNETIC FIELD

    10.1 Background

    A magnetic field transducer outputs a voltage proportional to the magnetic field that is applied to the target. Themagnetic field sensor is the chip located on the bottom of Figure 10.1. It applies a magnetic field perpendicular tothe flat screw head. The position of the screw head is changed by rotating the knob. This magnetic field transducerhas a similar range to the optical position sensor.

    Figure 10.1: Magnetic field transducer on QNET mechatronic sensors trainer

    QNET MECHKIT Workbook - Student Version v 1.0

  • 10.2 Magnetic Field Virtual Instrument

    The virtual instrument used to collect data using the magnetic field transducer is shown in Figure 10.2. The virtualinstrument used to calibrate magnetic field data is shown in Figure 10.3.

    Figure 10.2: Collecting magnetic field data

    QNET MECHKIT Workbook - Student Version 36

  • Figure 10.3: Calibrating the magnetic field transducer

    10.3 Lab 1: Collect Data

    1. Ensure J8 is set to Magnetic Field.

    2. Open and configure the QNET MECHKIT Magnetic Field VI as described in Section 15.9. Make sure thecorrect Device is chosen.

    3. Run QNET_MECHKIT_Magnetic_Field.vi

    4. Gently turn the knob of the magnetic field sensor clockwise until it is at its limit. Then, rotate the knob slightlycounter-clockwise so the 0 mark on the knob faces up. This will be reference 0 cm target position. Enter thisin the Target Range (cm) array, shown in Figure 10.2.

    5. Enter the voltage measured from the magnetic field position sensor for the reference 0 cm position in theSensor Measurement (V) array. The array is indicated in Figure 10.2.

    6. Turn the knob counter-clockwise one rotation to move the target further from the sensor. The target moves1-inch for every 20 turns. Enter the position the target has moved from the reference in the Target Range (cm)array.

    7. Record the measured sensor voltage in the Sensor Measurement (V) array.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 8. Take samples for the entire range of the target (i.e. until the knob cannot be rotated CCW anymore). Themagnetic field sensor is exponential. The parameters of the exponential function are outputted and the fittedcurve is automatically plotted as data is entered.

    9. Enter the range and measured sensor voltages and capture the Sensor Readings scope.

    Parameter Value Units NotesSensor Measurement: at 0 in. VSensor Measurement: at 0.025 in. VSensor Measurement: at 0.050 in. VSensor Measurement: at 0.075 in. VSensor Measurement: at 0.100 in. VSensor Measurement: at 0.125 in. VSensor Measurement: at 0.150 in. VSensor Measurement: at 0.175 in. VSensor Measurement: at 0.200 in. V

    Table 10.1: Magnetic field transducer results

    10. Click on Stop button to stop the VI.

    10.4 Lab 2: Calibrate Sensor

    1. Run QNET_MECHKIT_Magnetic_Field.vi

    2. Enter Gain and Damping exponential function parameters to correctly measure the distance of the target. Forinstance, when target is at 0.10 inches from the reference, then the display should read 0.10 inches.

    3. Record Gain and Damping parameters used for correct measurement.

    4. Click on Stop button to stop the VI.

    10.5 Results

    Parameter Value Units NotesGain in/VDamping

    Table 10.2: Magnetic field transducer results summary

    QNET MECHKIT Workbook - Student Version 38

  • 11 ENCODER

    11.1 Background

    Similar to rotary potentiometers, encoders can also be used to measure angular position. There are many typesof encoders but one of the most common is the rotary incremental optical encoder, shown in Figure 11.1. Unlikepotentiometers, encoders are relative. The angle they measure depends on the last position and when it was lastpowered. It should be noted, however, that absolute encoders are available.

    Figure 11.1: US Digital incremental rotary optical shaft encoder

    The encoder has a coded disk that is marked with a radial pattern. As the disk rotates (with the shaft), the lightfrom an LED shines through the pattern and is picked up by a photo sensor. This effectively generates the A and Bsignals shown in Figure 11.2. An index pulse is triggered once for every full rotation of the disk, which can be usedfor calibration or homing a system.

    Figure 11.2: Optical incremental encoder signals

    The A and B signals that are generated as the shaft rotates are used in a decoder algorithm to generate a count. Theresolution of the encoder depends on the coding of the disk and the decoder. For example, an encoder with 1024lines on the disk can generate a total of 1024 counts for every rotation of the encoder shaft. However, in a quadraturedecoder the number of counts quadruples, therefore the encoder would generate 4098 counts per revolution.

    The encoder knob on the QNET mechatronic sensors trainer is pictured in Figure 11.3 and the corresponding A, B,

    QNET MECHKIT Workbook - Student Version v 1.0

  • and Index signals are displayed on the LEDs shown in Figure 11.4.

    Figure 11.3: Encoder wheel on QNETmechatronic sensortrainer

    Figure 11.4: Encoder LEDs on QNET mechatronic sensortrainer

    QNET MECHKIT Workbook - Student Version 40

  • 11.2 Encoder Virtual Instrument

    The virtual instrument used to collect and calibrate encoder data is shown in Figure 11.5.

    Figure 11.5: Running the encoder VI

    11.3 Lab 1: Analysis of A, B, and I Signals

    1. Ensure J7 is set to Enc A, J8 is set to Enc B, and J10 is set to Enc I.

    2. Open and configure the QNET MECHKIT Encoder VI as described in Section 15.10. Make sure the correctDevice is chosen.

    3. Run QNET_MECHKIT_Encoder.vi

    4. Turn the encoder knob clockwise and examine the response of the A and B signals. Note that the signalsare offset by 2.5 V for display purposes. Similarly, turn the encoder knob counter-clockwise and enter yourobservation.

    5. When is the index pulse triggered? What can this be used for?

    6. Click on Stop button to stop the VI.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 11.4 Lab 2: Encoder Calibration

    1. Run QNET_MECHKIT_Encoder.vi

    2. Using the 16-bit Position (counts) indicator on the VI, as shown in Figure 11.5, rotate the knob and determinehow how many counts there are per revolution. Enter your result in the Counts per rev box in the VI. Rotatethe knob and confirm that the Angle (deg) indicator is displaying an accurate angle.

    3. Turn the knob such that the 0 is in the upward position and reset the counter by clicking on the Reset button.

    4. Enable the index by clicking on the Enable Index button.

    5. Rotate the knob a full CW turn until the index is triggered. Keep turning the knob until the 0 mark on the knob ispointing upwards. What do you notice about the 16-bit Position (counts) and the Angle (deg) indicator values?

    6. Adjust the Reload Value such that Angle (deg) measures 0 degrees when the 0 mark of the knob is pointingup. Confirm this by moving the knob CW.

    7. Enter the Count per rev and the Reload Value values used for a calibrated measurement.

    8. Position the knob such that its 0 label is pointing upwards again. The Counts per rev and Angle (deg) shouldboth be reading 0. Rotate the knob in the CCW fashion one full rotation. Is Angle (deg) reading 0 degrees?Discuss why or why not.

    9. Click on Stop button to stop the VI.

    11.5 Results

    Encoder Knob Rotation A or B Signal Leads?ClockwiseCounter-clockwise

    Table 11.1: A and B signals and encoder rotation

    Parameter Value Units NotesCounts per rev counts/revReload Value counts

    Table 11.2: Encoder calibration

    QNET MECHKIT Workbook - Student Version 42

  • 12 TEMPERATURE SENSOR

    12.1 Background

    As described in [3], there are several different types of transducers available to measure temperature: the thermo-couple, the resistance temperature detector (RTD), the thermistor, and the integrated circuit (IC). Each have theirown advantages and disadvantages. The Thermocouple has a wide temperature range and is easy to use but is theleast stable and sensitive. The RTD, on the other hand, is most stable and accurate of the sensors but is slow andrelatively more expensive. The IC is the only linear transducer, has the highest output, but is slow. The thermistorresponds very quickly but has a limited temperature range. The thermistor on the mechatronic sensors board isshown in Figure 12.1.

    Figure 12.1: Temperature sensor on QNET mechatronic sensors trainer

    The thermistor is a resistor that changes value according to the temperature. As given in [4], the relationship betweenthe resistance of the thermistor and the temperature, T , can be described using the B-parameter equation

    R = R0eB

    1

    T1

    T0

    !(12.1)

    The resistance is R0 when the temperature is at T0. For the thermistor on the mechatronic sensors trainer, thesensor resistance is

    R0 = 47000 (12.2)

    when the temperature is at 25 degrees Celsius, or

    T0 = 298:15K (12.3)

    Thermistors are typically part of a circuit. In the QNET mechatronic sensors trainer, the thermistor is in the circuitshown in Figure 12.2 and labeled by R.

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 12.2: Thermistor circuit on QNET mechatronic sensors module

    Using the voltage divider rule, the voltage entering the negative terminal of the second operation amplifier, i.e. theoffset op amp, is

    vi =30(R+ 10000)

    67000 +R 15 (12.4)

    The output voltage of the circuit is

    vo = Av(voff vi) (12.5)

    where voff is the voltage adjusted using the Offset potentiometer and Av is the amplifier gain that can be changedexternally using the Gain potentiometer. The Gain and Offset potentiometers are on the QNET mechatronic sensortrainer and shown in Figure 12.3.

    Figure 12.3: Thermistor Gain and Offset potentiometers on QNET mechatronic sensors trainer

    QNET MECHKIT Workbook - Student Version 44

  • 12.2 Temperature Virtual Instrument

    The virtual instrument used to collect temperature data is shown in Figure 12.4. The virtual instrument used tocalibrate temperature data is shown in Figure 12.5.

    Figure 12.4: Collecting temperature sensor data

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 12.5: Calibrating the temperature sensor

    12.3 Lab 1: Collect Data

    1. Ensure J9 is set to Temperature.

    2. Open and configure the QNET MECHKIT Temperature VI as described in Section 15.11. Make sure the cor-rect Device is chosen.

    3. Run QNET_MECHKIT_Temperature.vi

    4. As discussed in Section 12.1, the thermistor is part of a circuit and the output voltage can be varied usingthe Gain and Offset potentiometers on the QNET mechatronic sensors board. Rotate the Gain knob on thecounter-clockwise until it hits its limit.

    5. Adjust the Offset knob such that the Temperature Sensor (V) scope reads 0 V. This is the voltage measured atroom temperature, T0 = 298 K. Note: For this step, assume your room is at 25.0 degrees Celsius (C) eventhough it's probably warmer or cooler.

    6. Gently place your fingertip on the temperature sensor and examine the response in the Temperature Sensor(V) scope. The surface temperature of the fingertip is approximately 32.0C. Enter the voltage read at roomtemperature and with the fingertip.Note: The thermistor is very sensitive. Do not press down too hard on the sensor with your finger when taking

    QNET MECHKIT Workbook - Student Version 46

  • measurements. Otherwise, the measurement will not be consistent.Note: After releasing the sensor it takes a a while for the temperature reading to settle back to 0 V. You canbring the temperature down faster by gently blowing on the sensor.

    7. Click on Stop button to stop the VI.

    12.4 Lab 2: Calibrate Sensor

    12.4.1 Pre-Lab Exercises

    1. The voltage being measured on the QNET MECHKIT is the output voltage, vo, of the circuit discussed Sec-tion 12.1. Using the circuit and its corresponding equations, derive the formula that can be used to find thethermistor resistance from the output voltage of the circuit, R.

    2. Find the thermistor resistance at room temperature, R0, and at the fingertip, R.

    3. Derive the equation to find the exponential parameter, B, and compute it based on the obtained results.

    12.4.2 In-Lab Experiment

    1. Run the QNET_MECHKIT_Temperature.vi

    2. Enter the B parameter that was found in Section 12.4.1 in the Temperature Sensor VI, as shown in Figure12.5. Place your fingertip on the sensor and capture the obtained response in Temperature Sensor (deg C)scope.

    3. Based on the measured response in Step 2, is the temperature sensor reading correctly?

    4. Click on Stop button to stop the VI.

    12.5 Results

    Temperature (C) Temperature (K) Measured Voltage (V) Units Notes25 298 V Voltage at room temp, T032 305 V Voltage with finger, T

    Table 12.1: Measured thermistor readings summary

    Temperature (C) Temperature (K) Measured Resistance () Units Notes25 298 Resistance at room temp, R032 305 Resistance with finger, R

    Table 12.2: Measured thermistor resistances summary

    QNET MECHKIT Workbook - Student Version v 1.0

  • 13 SWITCHES AND LEDS

    13.1 Background

    13.1.1 Switches

    Different applications call for different types of switches. For example, a micro switch may be used to detect mobilerobot hitting a wall whereas an optical switch could be used to detect an edge. The push button is the most commontype of switch mechanism. A switch that is active high means the output is high, e.g. 5.0 V, when the switch istriggered (e.g. pressed down). Active low means the signal is high, e.g. 5.0 V, when the switch is not engaged (e.g.not pressed down).

    The different switches on the QNET mechatronic sensors trainer are introduced in this section followed by a discus-sion about debouncing.

    Micro Switch

    The micro switch is an active low device and is shown in Figure 13.1.

    Figure 13.1: Micro switch on QNET mechatronic sensors

    Push Button

    The push button on the QNET MECHKIT is pictured in Figure 13.2 and is active high.

    QNET MECHKIT Workbook - Student Version 48

  • Figure 13.2: Push button on QNET mechatronic sensors trainer

    Optical Switch

    The optical switch, shown in Figure 13.3, is a photo-microsensor that includes transmissive and reflective compo-nents. As opposed to the push button and micro switch, this is a non-contact triggering solution. It is triggered whenthe reflective sensor does not detect any light, i.e. when an object is placed between the components. It goes lowwhen no object is detected.

    Figure 13.3: Optical switch on QNET mechatronic sensors trainer

    Light Emitting Diodes (LEDs)

    A light-emitting diode, or LED, is a low-energy and robust indicator that is used in many applications. The LEDs onthe mechatronic sensors trainer, labeled LED7 and LED8, are pictured in Figure 13.4. They are connected to digitaloutput lines from which they can be turned on and off. As with switches, LEDs can be wired to be active high oractive low.

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 13.4: LEDs on QNET mechatronic sensors trainer

    13.2 Switches and LEDs Virtual Instrument

    The virtual instrument used to collect optical switch data is shown in Figure 13.5. The virtual instruments used tocalibrate the micro switch, and push button are shown in Figure 13.6, and Figure 13.7 respectively. The virtualinstrument used to control the LEDs is shown in Figure 13.8.

    Figure 13.5: Optical switch VI

    QNET MECHKIT Workbook - Student Version 50

  • Figure 13.6: Calibrating micro switch

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 13.7: Calibrating the push button

    QNET MECHKIT Workbook - Student Version 52

  • Figure 13.8: Setting the digital outputs

    13.3 Lab 1: Optical Switch

    1. Ensure J7 is set to Opto Switch.

    2. Open and configure the QNET MECHKIT Switches and LEDs VI as described in Section 15.12. Make surethe correct Device is chosen.

    3. Run QNET_MECHKIT_Switches_and_LEDs.vi

    4. Select the Opto Switch tab.

    5. Take piece of paper and slide it up and down into the optical switch. Examine the raw responses in the OpticalSwitch scope.

    6. Adjust threshold, indicated in Figure 13.5, to obtain an on/off or 0/1 digital measurement in the Optical Switch- Digital scope.

    7. Record threshold used to get on/off measurement and paste the response of the Optical Switch and OpticalSwitch - Digital scopes.

    8. Click on Stop button to stop the VI.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 13.4 Lab 2: Micro Switch

    1. Ensure J8 is set to Micro Switch.

    2. Run QNET_MECHKIT_Switches_and_LEDs.vi

    3. Select the Micro Switch tab.

    4. Press on the micro switch and examine its raw response in Micro Switch scope.

    5. Adjust the Gain and Offset, shown in Figure 13.6, such that this the signal goes from 0 to 1 in theMicro Switch Digital scope when the micro switch is pressed.

    6. Record theGain andOffset used and capture representativeMicro Switch andMicro Switch - Digital responses.

    7. Click on Stop button to stop the VI.

    13.5 Lab 3: Push Button

    1. Ensure J9 is set to Push Button.

    2. Run QNET_MECHKIT_Switches_and_LEDs.vi

    3. Select the Push Button tab.

    4. Press on the push button and examine its raw response in the Push Button scope.

    5. Adjust the Gain and Offset, indicated in Figure 13.7, such that this signal goes from 0 to 1 in the Push Button Digital scope when the push button is pressed.

    6. Record theGain andOffset parameters used and capture representative Push Button and Push Button - Digitalresponses.

    7. Explain how the micro switch and push button behave differently.

    8. Click on Stop button to stop the VI.

    13.6 Lab 4: LEDs

    1. Run QNET_MECHKIT_Switches_and_LEDs.vi

    2. Select the Digital Outputs tab.

    3. As shown in Figure 13.8, switch DO 1 and DO 0 between the up/down positions and examine its effect on theon-board LEDs.

    4. 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 DO0 LEDs are lit.

    5. Click on Stop button to stop the VI.

    QNET MECHKIT Workbook - Student Version 54

  • 13.7 Results

    Parameter Value Units NotesGainOffsetGainOffsetDO 1 Switch position for DO 1 LED ONDO 1 Switch position for DO 1 LEDOFF

    Table 13.1: Switch and LED results summary

    QNET MECHKIT Workbook - Student Version v 1.0

  • 14 SWITCH DEBOUNCEANALYSIS

    14.1 Background

    14.1.1 Switch Debouncing

    When implemented digitally, debounce is a type of signal conditioning algorithm that ensures the switch, button, orsensor does not trigger anything due to unexpected conditions.

    For example, consider a high-powered cart that is mounted on a track. Proximity sensors are installed that detectwhen the cart goes beyond a safety limit, in which case the amplifier is deactivated. However due to the high-frequency switching in the motor leads, the proximity switches are sometimes unexpectedly triggered even whenthe cart is in the safe zone. The raw signal from the proximity sensor is shown in the top plot of Figure 14.1. Toavoid this, the output signal from the sensor is passed though a debounce switch and the resulting signal is shownin the bottom plot of Figure 14.1.

    Figure 14.1: Sample debounce response

    Note: This laboratory is for the ELVIS II only. The ELVIS I does not have the functionality to perform this experiment

    QNET MECHKIT Workbook - Student Version 56

  • 14.2 Switches and LEDs Virtual Instrument

    The NI ELVISmx Oscilloscope is shown in Figure 14.2. The virtual instrument used to analyze and debounce themicro switch, and push button is shown in Figure 14.3.

    Figure 14.2: NI ELVISmx Oscilloscope instrument when pressing micro switch

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 14.3: VI used to analyze debounce of micro switch and push button

    14.3 Lab 1: Running the Oscilloscope

    1. Ensure J8 is set to Micro Switch and J9 to Push Button.

    2. Run the Oscilloscope NI ELVISmx instrument. By default, this is located under Start \All Programs \NationalInstruments \NI ELVISmx \Instruments.

    3. Click on the green start arrow to run the Oscilloscope.

    4. To read the micro switch, set the Source control in Channel 0 Settings to AI 1 (i.e. analog input channel #1).The response obtained should be similar as shown in Figure 14.2.

    5. Press on the micro switch and ensure you are getting the expected signal. Since the Acquisition Mode is setto continuous, the instrument keeps on running and the signal can be observed in real-time.

    6. To examine the behaviour of the micro switch when it is engaged, configure the Trigger section to stop. Note:If preferred, you can change the Acquisition Mode to Run Once so the oscilloscope stops when the trigger isengaged.

    7. If the trigger has been setup correctly, then the oscilloscope screen should capture a closeup view of the microswitch signal as it goes from 5 V to 0 V.

    QNET MECHKIT Workbook - Student Version 58

  • 8. Try to setup the oscilloscope for the Push Button. This is on analog input channel #2 and you can choose toconfigure it on the Channel 1 of the oscilloscope (if you do, make sure you enable the channel). Note: Toincrease the sampling rate and obtain a more closeup view of the signal, decrease the Time/Div knob control.

    9. 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 IIbased VIs. Otherwise the VI will not be able to run.

    14.4 Lab 2: Micro Switch

    1. Ensure J8 is set to Micro Switch.

    2. The QNET MECHKIT Debounce VI, which is shown in Figure 14.3, has the same functionality as the Os-cilloscope tool used in Section 14.3. It is already setup with a trigger and does not run continuously as theoscilloscope instrument does. The Debounce VI is described in more detail in Section 15.13.

    3. Run QNET_MECHKIT_Debounce.vi

    4. Setup the Trigger for the Micro Switch (Ch #0).

    5. Press the micro switch. The VI should stop and a response displayed on both graphs.

    6. Capture the Micro Switch scope. What do you notice about the output signal from the micro switch?

    7. Click on Stop button to stop the VI.

    14.5 Lab 3: Push Button

    1. Ensure J9 is set to Push Button.

    2. Run QNET_MECHKIT_Debounce.vi

    3. Setup the Trigger for the Push Button (CH #1) and enter the settings in Table 14.1.

    4. Press the push button. The VI should stop and a response displayed on both graphs.

    5. Capture the Push Button scope. What do you notice about the push button signal?

    6. Which control would require debounce more micro switch or push button? Explain.

    7. When triggering on one channel, notice that there is a signal on the other channel (e.g. when pressing themicro switch observe the Ch1 scope). Capture representative plots and explain why this occurs.

    8. Click on Stop button to stop the VI.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 14.6 Results

    Trigger Parameters Value Units NotesMicro SwitchTypeSlopeSourceLevel VPush ButtonTypeSlopeSourceLevel V

    Table 14.1: Debouncing trigger parameters summary

    QNET MECHKIT Workbook - Student Version 60

  • 15 SYSTEM REQUIREMENTS

    Required Hardware

    NI ELVIS II (or NI ELVIS I)

    Quanser QNET Mechatronic Sensors Trainer. See QNET MECHKIT User Manual ([2]).

    Required Software

    NI LabVIEWr2010 or later

    NI DAQmx

    NI LabVIEW Control Design and Simulation Module

    ELVIS II Users: ELVISmx installed from ELVIS II CD.

    ELVIS I Users: ELVIS CD 3.0.1 or later installed.

    Caution: If these are not all installed then the VI will not be able to run! Please make sure all the softwareand hardware components are installed. If an issue arises, then see the troubleshooting section in the QNET VTOLUser Manual ([2]).

    15.1 Overview of Files

    File Name DescriptionQNET MECHKIT User Manual.pdf This manual describes the hardware of the QNET Mecha-

    tronic Sensors trainer and how to setup the system on theELVIS.

    QNET MECHKIT Lab Manual (Student).pdf This laboratory guide contains pre-lab questions and labexperiments demonstrating how to calibrate and use sen-sors on the QNET MECHKIT trainer LabVIEWr.

    QNET_MECHKIT_Flexgage.vi Control the current in the propeller motorQNET_MECHKIT_Pressure Sensor.vi Validate transfer function model and identify system pa-

    rametersQNET_MECHKIT_Piezo.vi Control the pitch of the VTOL device using PIDQNET_MECHKIT_Potentiometer.vi Calibrate potentiometer to get correct angleQNET_MECHKIT_Infrared.vi Calibrate infrared sensor to measure target distanceQNET_MECHKIT_Sonar.vi Implement sonar sensor to measure target rangeQNET_MECHKIT_Optical.vi Calibrate optical sensor to measure the position of the flat

    screw head, which can be adjusted using the knobQNET_MECHKIT_Magnetic_Field.vi Implement magnetic field sensor to measure position of the

    screw head, which can be adjusted using its knobQNET_MECHKIT_Encoder.vi Used to teach the fundamentals of a rotary optical encoderQNET_MECHKIT_Temperature.vi Calibrate thermistor to measure correct temperatureQNET_MECHKIT_Switches_and_LEDs.vi Change the on/off behaviour of the micro switch, push but-

    ton, and optical switch and drive on-board LEDsQNET_MECHKIT_Switch_Debounce.vi High-frequency analysis of micro switch and push button

    Table 15.1: Files supplied with the QNET MECHKIT Laboratory.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 15.2 Strain Gage with Flexible Link VI

    This VI can be used to view the strain gage measurements when moving the flexible link on the QNET mechatronicsensors trainer. Table 15.2 lists and describes the main elements of the QNET Flexgage VI and every element isuniquely identified by an ID number in Figure 15.1, Figure 15.2, and Figure 15.3.

    Figure 15.1: QNET-MECHKIT Flexgage VI: Collect Data tab selected

    QNET MECHKIT Workbook - Student Version 62

  • Figure 15.2: QNET-MECHKIT Flexgage VI: Calibrate tab

    Figure 15.3: QNET MECHKIT Flexgage VI: Natural Frequency tab

    QNET MECHKIT Workbook - Student Version v 1.0

  • ID # Label Description Unit1 Scope: Flexgage (V) Scope showing raw voltage measured by strain gage V2 Link Position (cm) Position of flexible link along printed graduated ruler on QNET board cm3 Sensor Measurement (V) Recorded strain gage measurement for each link position V4 Sensor Readings Graph showing measured and curve fitted data5 Slope Slope computed by curve fitting algorithm cm/V6 Intercept Intercept computed by curve fitting algorithm cm7 Gain (cm/V) Sensor calibration gain (slope) cm/V8 Offset (cm) Sensor calibration offset (intercept) cm9 Slider: Flexgage (cm) Displays position of flexible link using Gain and Offset parameter cm10 Scope: Flexgage (cm) Displays position of flexible link using Gain and Offset parameter cm11 Graph: Power Spectrum Graph showing power spectrum of flexible link (after being perturbed)12 Cursor Displays numerically the location of the cursor on the Power Spec-

    trum graph13 Device Selects the NI DAQ device14 Sampling Rate Sets the sampling rate of the VI Hz15 Stop Stops the LabVIEW VI from running

    Table 15.2: Nomenclature of QNET-MECHKIT Flexgage VI

    15.3 Pressure Laboratory VI

    This VI can be used to view the pressure sensor measurements as the plunger is moved at different locations withinthe syringe on the QNET mechatronic sensors trainer. Table 15.3 lists and describes the main components of theQNET Pressure Sensor VI and they are uniquely identified by an ID number in Figure 15.4 and Figure 15.5.

    QNET MECHKIT Workbook - Student Version 64

  • Figure 15.4: QNET MECHKIT Pressure Sensor: Collect Data tab

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 15.5: QNET MECHKIT Pressure Sensor VI: Calibration tab

    ID # Label Description Unit1 Scope: Pressure Sensor (V) Scope showing raw voltage measured by pressure sensor V2 Plunger Position (cm) Position of syringe along printed graduated ruler on QNET

    boardcm

    3 Sensor Measurement (V) Recorded pressure sensor measurement for each plunger po-sition

    V

    4 Graph: Sensor Readings Graph showing measured and curve fitted data5 c (Collect Data tab) Intercept computed by curve fitting algorithm cm6 b (Collect Data tab) Slope computed by curve fitting algorithm cm/V7 a (Collect Data tab) Rate of slope computed by curve fitting algorithm cm/V2

    8 a (Calibrate Sensor tab) Rate of slope computed by curve fitting algorithm cm/V29 b (Calibrate Sensor tab) Slope computed by curve fitting algorithm cm/V10 c (Calibrate Sensor tab) Intercept computed by curve fitting algorithm cm11 Scope: Pressure Sensor (cm) Chart displays position of target using a, b, and c parameters cm12 Pressure (cm) Slide indicator displays position of target using a, b, and c pa-

    rameterscm

    13 Device Selects the NI DAQ device14 Sampling Rate Sets the sampling rate of the VI Hz15 Stop Stops the LabVIEW VI from running

    Table 15.3: Nomenclature of QNET-MECHKIT Pressure Sensor VI

    15.4 Piezo VI

    TheQNETPiezo VI is used to view the piezo sensor readings as the plastic strip on theQNETMECHKIT is perturbed.The components of the VI are listed in Table 15.4, and identified in Figure 15.6 and Figure 15.7.

    QNET MECHKIT Workbook - Student Version 66

  • Figure 15.6: QNET MECHKIT Piezo Sensor VI: Collect Data tab

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 15.7: QNET MECHKIT Piezo Sensor VI: Natural Frequency tab

    ID # Label Description Unit1 Scope: Piezo (V) Scope showing raw voltage measured by piezo film sensor V2 Graph: Power Spectrum Graph showing power spectrum of film (after being perturbed)3 Cursor Displays numerically the location of the cursor on the Power Spec-

    trum graph4 Device Selects the NI DAQ device5 Sampling Rate Sets the sampling rate of the VI Hz6 Stop Stops the LabVIEW VI from running

    Table 15.4: Nomenclature of QNET-MECHKIT Piezo VI

    15.5 Potetiometer VI

    This VI can be used to view the potentiometer measurements when moving the potentiometer knob on the QNETmechatronic sensors trainer. Table 15.5 lists and describes the main elements of the QNET Potentiometer VI andevery element is uniquely identified by an ID number in Figure 15.8 and Figure 15.9.

    QNET MECHKIT Workbook - Student Version 68

  • Figure 15.8: QNET MECHKIT Potentiometer VI: Collect Data tab

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 15.9: QNET MECHKIT Potentiometer VI: Calibration tab

    ID # Label Description Unit1 Scope: Potentiometer (V) Scope showing raw voltage measured by potentiometer V2 Pot Angle (deg) Angle of top arrow on the potentiometer knob deg3 Sensor Measurement (V) Recorded potentiometer measurement for each angle V4 Sensor Readings Graph showing measured and curve fitted data5 Slope Slope computed by curve fitting algorithm deg/V6 Intercept Intercept computed by curve fitting algorithm deg7 Gain (deg/V) Sensor calibration gain (slope) deg/V8 Offset (deg) Sensor calibration offset (intercept) deg9 Scope: Potentiometer (deg) Displays angular position of potentiometer according to the Gain

    and Offset parametersdeg

    10 Knob: Potentiometer (deg) Displays position of potentiometer according to the Gain and Off-set parameters

    deg

    11 Device Selects the NI DAQ device12 Sampling Rate Sets the sampling rate of the VI Hz13 Stop Stops the LabVIEW VI from running

    Table 15.5: Nomenclature of QNET-MECHKIT Potentiometer VI

    15.6 Infrared Sensor Laboratory VI

    Use the QNET Infrared VI to view and calibrate the readings of the infrared sensor on the MECHKIT as the targetdistance is changed. The components of the VI are listed in Table 15.6 and identified in Figure 15.10 and Figure15.11.

    QNET MECHKIT Workbook - Student Version 70

  • Figure 15.10: QNET MECHKIT Infrared Sensor VI: Collect Data tab

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 15.11: QNET MECHKIT Infrared Sensor VI: Calibration tab

    ID # Label Description Unit1 Scope: Infrared Sensor (V) Scope showing raw voltage measured by infrared sensor V2 Target Range (cm) Distance between the target and IR sensor cm3 Sensor Measurement (V) Recorded IR measurement for each target position V4 Graph: Sensor Readings Graph showing measured and curve fitted data5 c (Collect Data tab) Intercept computed by curve fitting algorithm cm6 b (Collect Data tab) Slope computed by curve fitting algorithm cm/V7 a (Collect Data tab) Rate of slope computed by curve fitting algorithm cm/V2

    8 a (Calibrate Sensor tab) Rate of slope computed by curve fitting algorithm cm/V29 b (Calibrate Sensor tab) Slope computed by curve fitting algorithm cm/V10 c (Calibrate Sensor tab) Intercept computed by curve fitting algorithm cm11 IR Sensor (cm) Displays target distance using a, b, and c parameters cm12 IR (cm) Knob displays position of target using a, b, and c parameters cm13 Device Selects the NI DAQ device14 Sampling Rate Sets the sampling rate of the VI Hz15 Stop Stops the LabVIEW VI from running

    Table 15.6: Nomenclature of QNET-MECHKIT Infrared VI

    15.7 Sonar Sensor VI

    Use this VI to view the sonar measurements as a target is moved at different distances away from the sensor. Table15.7 lists and describes the main components of the QNET Sonar VI and they are uniquely identified by an ID numberin Figure 15.12 and Figure 15.13.

    QNET MECHKIT Workbook - Student Version 72

  • Figure 15.12: QNET MECHKIT Sonar VI: Collect Data tab

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 15.13: QNET MECHKIT Sonar VI: Calibration tab

    ID # Label Description Unit1 Scope: Sonar (V) Scope showing raw voltage measured by sonar V2 Target Range (in) Distance between target and sonar sensor in3 Sensor Measurement (V) Recorded sonar measurement for each target position V4 Sensor Readings Graph showing measured and curve fitted data5 Slope Slope computed by curve fitting algorithm in/V6 Intercept Intercept computed by curve fitting algorithm in7 Gain (deg/V) Sensor calibration gain (slope) in/V8 Offset (deg) Sensor calibration offset (intercept) in9 Scope: Sonar (in) Displays target position according to theGain andOffset parameters in10 Meter: Sonar (in) Displays target position according to theGain andOffset parameters in11 Device Selects the NI DAQ device12 Sampling Rate Sets the sampling rate of the VI Hz13 Stop Stops the LabVIEW VI from running

    Table 15.7: Nomenclature of QNET-MECHKIT Sonar Sensor VI

    15.8 Optical Position Laboratory VI

    The QNET-MECHKIT Optical VI is used to view the measurements of the optical position sensor as the target ismoved at different locations using the knob. The components of the VI are described in Table 15.8 and identified inFigure 15.14 and Figure 15.15.

    QNET MECHKIT Workbook - Student Version 74

  • Figure 15.14: QNET MECHKIT Optical VI: Collect Data tab

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 15.15: QNET MECHKIT Optical VI: Calibration tab

    ID # Label Description Unit1 Scope: Optical Position Sensor (V) Scope showing raw voltage measured by optical position

    sensorV

    2 Target Range (in) Distance between the target and optical sensor in3 Sensor Measurement (V) Recorded optical sensor measurement for each target po-

    sitionV

    4 Graph: Sensor Readings Graph showing measured and curve fitted data5 a Exponential function amplitude parameter computed by

    curve fitting algorithm6 b Exponential function decay/growth parameter computed

    by curve fitting algorithm7 Amplitude Gain of exponential function8 Damping Exponential decay/growth factor of exponential function9 Scope: Optical Position (in) Scope that shows position of target based on entered Am-

    plitude and Damping parametersin

    10 Display: Optical Position (in) Slider indicator displays position of target based on enteredAmplitude and Damping parameters

    in

    11 Device Selects the NI DAQ device12 Sampling Rate Sets the sampling rate of the VI Hz13 Stop Stops the LabVIEW VI from running

    Table 15.8: Nomenclature of QNET-MECHKIT Optical VI

    15.9 Magnetic Field Laboratory VI

    Using this VI, the magnetic field measurements can be read as the target is moved at different locations using theknob on the QNET mechatronic sensors trainer. The components of the QNET Magnetic Field VI are summarized

    QNET MECHKIT Workbook - Student Version 76

  • in Table 15.9 and identified in Figure 15.16 and Figure 15.17.

    Figure 15.16: QNET MECHKIT Magnetic Field VI: Collect Data tab

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 15.17: QNET MECHKIT Magnetic Field VI: Calibration tab

    ID # Label Description Unit1 Scope: Magnetic Field Sensor (V) Scope showing raw voltage measured by magnetic field

    sensorV

    2 Target Range (in) Distance between the target and magnetic field sensor in3 Sensor Measurement (V) Recorded sensor measurement for each target position V4 Graph: Sensor Readings Graph showing measured and curve fitted data5 a Exponential function amplitude parameter computed by

    curve fitting algorithm6 b Exponential function decay/growth parameter computed

    by curve fitting algorithm7 Amplitude Gain of exponential function8 Damping Exponential decay/growth factor of exponential function9 Scope: Magnetic Field (in) Scope that shows position of target based on entered Am-

    plitude and Damping parametersin

    10 Display: Magnetic Field (in) Slider indicator displays position of target based on enteredAmplitude and Damping parameters

    in

    11 Device Selects the NI DAQ device12 Sampling Rate Sets the sampling rate of the VI Hz13 Stop Stops the LabVIEW VI from running

    Table 15.9: Nomenclature of QNET-MECHKIT Magnetic Field VI

    15.10 Encoder Laboratory VI

    This VI shows the A, B, and Index signals generated by the rotary optical encoder on the QNETmechatronic sensorstrainer as the knob is rotated. The components of the QNET Encoder VI are described in Table 15.10 and identifiedin Figure 15.18.

    QNET MECHKIT Workbook - Student Version 78

  • Figure 15.18: QNET MECHKIT Encoder VI

    ID # Label Description Unit1 Scope: Encoder A and B (V) Scope showing encoder A (blue) and B (red) voltage signals. Sig-

    nals are offset by 2.5 V for viewing purposesV

    2 Scope: Encoder Index (V) Scope displays the index trigger V3 Reset Resets the encoder count4 Enable Index When enabled, the encoder count is reset on an index pulse5 16-bit Position (counts) Count generated by decoder6 Counts per rev Number of counts for every full rotation7 Reload Value (counts) Resets the count to this value8 Angle (deg) Angle measured by encoder according to the Counter per rev pa-

    rameter9 Device Selects the NI DAQ device10 Sampling Rate Sets the sampling rate of the VI Hz11 Stop Stops the LabVIEW VI from running

    Table 15.10: Nomenclature of QNET-MECHKIT Encoder VI

    QNET MECHKIT Workbook - Student Version v 1.0

  • 15.11 Temperature Laboratory VI

    The measured voltage output from the thermistor circuit is displayed on this VI as well as the calibrated temperaturereading. The QNET MECHKIT Temperature VI components are given in Table 15.11 and identified in Figure 15.19.

    Figure 15.19: QNET MECHKIT Temperature VI

    ID # Label Description Unit1 R0 Resistance of thermistor at temperature specified in T02 T0 Room temperature in Kelvin3 B Thermistor equation exponential parameter4 Scope: Temperature Sensor (V) Scope shows the output voltage of the thermistor circuit V5 Scope: Temperature Sensor (deg C) Scope displays the measured temperature based on

    the T0 and B parameters entered C

    6 Temperature (deg C) Thermometer displays the measured temperaturebased on the T0 and B parameters entered

    C

    7 Device Selects the NI DAQ device8 Sampling Rate Sets the sampling rate of the VI Hz9 Stop Stops the LabVIEW VI from running

    Table 15.11: Nomenclature of QNET-MECHKIT Temperature VI

    QNET MECHKIT Workbook - Student Version 80

  • 15.12 Switches and LEDs Laboratory VI

    The QNET MECHKIT Switches and LEDs VI allows users to view the output of the optical switch, micro switch,and push button and calibrate them to obtain a desired on/off behaviour. This VI can also be used to drive thedigital output lines #0 and #1 that are connected to the LEDs on the QNET mechatronics sensors trainer. The VIcomponents are listed in Table 15.12 and identified in figures Figure 15.20, Figure 15.21, Figure 15.22, and Figure15.23.

    Figure 15.20: QNET MECHKIT Switches and LEDs VI: Opto Switch tab

    QNET MECHKIT Workbook - Student Version v 1.0

  • Figure 15.21: QNET MECHKIT Switches and LEDs VI: Micro Switch tab

    Figure 15.22: QNET MECHKIT Switches and LEDs VI: Push Button tab

    QNET MECHKIT Workbook - Student Version 82

  • Figure 15.23: QNET MECHKIT Switches and LEDs VI: Digital Outputs tab

    ID # Label Description Unit1 Scope: Optical Switch Scope shows the optical switch output voltage V2 Scope: Optical Switch - Digital Scope displays readout of optical switch when passed through

    Threshold switch3 Threshold Adjusts the threshold of the optical switch that determines

    when it is ON or OFFV

    4 Scope: Micro Switch Scope shows the micro switch output voltage V5 Scope: Micro Switch - Digital Scope displays calibrated micro switch output based on Gain

    and Offset parameters.6 Gain Micro switch calibration gain7 Offset Micro switch calibration offset8 Scope: Push Button Scope shows the push button output voltage V9 Scope: Push Button - Digital Scope displays calibrated push button output based on Gain

    and Offset parameters.10 Gain Push button calibration gain11 Offset Push button calibration offset12 DO 1 Digital output to channel #1 - connected to LED7 on QNET

    MECHKIT trainer13 DO 0 Digital output to channel #0 - connected to LED8 on QNET

    MECHKIT trainer14 Device Selects the NI DAQ device15 Sampling Rate Sets the sampling rate of the VI Hz16 Stop Stops the LabVIEW VI from running

    Table 15.12: Nomenclature of QNET-MECHKIT Switches and LEDs VIs

    QNET MECHKIT Workbook - Student Version v 1.0

  • 15.13 Switch Debounce Laboratory VI

    In this VI, the triggered output of the Micro Switch and the Push Button can be viewed. The ELVISmx OscilloscopeVI is setup to monitor either the Micro Switch or Push Button analog input lines at a sample rate 100 kHz. Once thesignal is triggered, the VI automatically stops and outputs a 1k sample of the voltage output. In effect, this gives a a10 ms sample of the signal. See Table 15.13 for a listing of the VI components that are shown in Figure 15.24.

    Figure 15.24: QNET MECHKIT Debounce VI

    ID # Label Description Unit1 Type Type of signal trigger2 Source Select which ELVIS channel (0 or 1) to trigger3 Slope Select whether the trigger is to occur when the edge is rising

    (positive) or decreasing (negative)6 Level (V) Threshold of the trigger V4 Graph: Micro Switch/ELVIS Ch0 Graph displays the triggered micro switch output5 Graph: Push Button/ELVIS Ch1 Graph displays the triggered push button output7 Device Selects the NI DAQ device

    Table 15.13: Nomenclature of QNET-MECHKIT Debouncing VI

    QNET MECHKIT Workbook - Student Version 84

  • 16 LAB REPORT

    This laboratory contains twelve groups of experiments, namely,

    1. Flexgage,

    2. Pressure Sensor,

    3. Piezo Film Sensor,

    4. Potentiometer,

    5. Infrared Sensor,

    6. Sonar Sensor,

    7. Optical Position,

    8. Magnetic Field,

    9. Encoder,

    10. Temperature,

    11. Switches and LEDs, and

    12. Switch Debouncing.

    For each experiment, follow the outline corresponding to that experiment to build the content of your report. Also,in Section 16.13 you can find some basic tips for the format of your report.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 16.1 Template for Content(Strain Gage with Flexible Link)

    I. PROCEDURE

    1. Collect Data

    Briefly describe the main goal of the experiment. Briefly describe the experimental procedure in Step 7 in Section 3.3.

    2. Calibrate Sensor

    Briefly describe the main goal of the experiment. Briefly describe the experimental procedure in Step 3 in Section 3.4.

    3. Natural Frequency

    Briefly describe the main goal of the experiment. Briefly describe the experimental procedure in Step 4 in Section 3.5.

    II. RESULTSDo not interpret or analyze the data in this section. Just provide the results.

    1. Sensor readings plot from Step 7 in Section 3.3.

    2. Power spectrum response from Step 4 in Section 3.5.

    3. Provide applicable data collected in this laboratory from Table 3.2.

    III. ANALYSISProvide details of your calculations (methods used) for analysis for each of the following:

    1. Natural frequency measurement in Step 4 of Section 3.5.

    QNET MECHKIT Workbook - Student Version 86

  • 16.2 Template for Content(Pressure Sensor)

    I. PROCEDURE

    1. Collect Data

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 7 in Section 4.3.

    2. Calibrate Sensor

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 3 in Section 4.4.

    II. RESULTSDo not interpret or analyze the data in this section. Just provide the results.

    1. Sensor readings from Step 7 in Section 4.3.

    2. Provide applicable data collected in this laboratory from Table 4.2.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 16.3 Template for Content(Piezo Film Sensor)

    I. PROCEDURE

    1. Data Analysis

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 6 in Section 5.2.

    2. Natural Frequency

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 3 in Section 5.3.

    II. RESULTSDo not interpret or analyze the data in this section. Just provide the results.

    1. Sensor response from Step 6 in Section 5.2.

    2. Power spectrum response from Step 3 in Section 5.3.

    III. ANALYSISProvide details of your calculations (methods used) for analysis for each of the following:

    1. Piezo sensor analysis in Step 6 in Section 5.2.

    2. Natural frequency measurement from Step 3 in Section 5.3.

    QNET MECHKIT Workbook - Student Version 88

  • 16.4 Template for Content(Potentiometer)

    I. PROCEDURE

    1. Collect Data

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 8 in Section 6.3.

    2. Calibrate Sensor

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 3 in Section 6.4.

    II. RESULTSDo not interpret or analyze the data in this section. Just provide the results.

    1. Sensor response from Step 8 in Section 6.3.

    2. Provide applicable data collected in this laboratory from Table 6.2.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 16.5 Template for Content(Infrared Sensor)

    I. PROCEDURE

    1. Collect Data

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 10 in Section 7.3.

    2. Calibrate Sensor

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 3 in Section 7.4.

    II. RESULTSDo not interpret or analyze the data in this section. Just provide the results.

    1. Sensor response from Step 10 in Section 7.3.

    2. Provide applicable data collected in this laboratory from Table 7.2.

    III. ANALYSISProvide details of your calculations (methods used) for analysis for each of the following:

    1. Observations in Step 11 in Section 7.3.

    QNET MECHKIT Workbook - Student Version 90

  • 16.6 Template for Content(Sonar Sensor)

    I. PROCEDURE

    1. Collect Data

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 9 in Section 8.3.

    2. Calibrate Sensor

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 3 in Section 8.4.

    II. RESULTSDo not interpret or analyze the data in this section. Just provide the results.

    1. Sensor response from Step 9 in Section 8.3.

    2. Provide applicable data collected in this laboratory from Table 8.2.

    III. ANALYSISProvide details of your calculations (methods used) for analysis for each of the following:

    1. Sonar sensor analysis in Step 10 of Section 8.3.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 16.7 Template for Content(Optical Sensor)

    I. PROCEDURE

    1. Collect Data

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 9 in Section 9.3.

    2. Calibrate Sensor

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 3 in Section 9.4.

    II. RESULTSDo not interpret or analyze the data in this section. Just provide the results.

    1. Sensor response from Step 9 in Section 9.3.

    2. Provide applicable data collected in this laboratory from Table 9.2.

    QNET MECHKIT Workbook - Student Version 92

  • 16.8 Template for Content(Magnetic Field Sensor)

    I. PROCEDURE

    1. Collect Data

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 9 in Section 10.3.

    2. Calibrate Sensor

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 3 in Section 10.4.

    II. RESULTSDo not interpret or analyze the data in this section. Just provide the results.

    1. Sensor response from Step 9 in Section 10.3.

    2. Provide applicable data collected in this laboratory from Table 10.2.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 16.9 Template for Content(Encoder)

    I. PROCEDURE

    1. Analysis of A, B, and I Signals

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 4 in Section 11.3.

    2. Encoder Calibration

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 7 in Section 11.4.

    II. RESULTSDo not interpret or analyze the data in this section. Just provide the results.

    1. Provide applicable data collected in this laboratory from Table 11.1 and Table 11.2.

    III. ANALYSISProvide details of your calculations (methods used) for analysis for each of the following:

    1. Enocder signal observations from Step 4 in Section 11.3.

    2. Identifying the transfer function in Step 5 in Section 11.3.

    3. Index pulse analysis in Step 8 in Section 11.4.

    QNET MECHKIT Workbook - Student Version 94

  • 16.10 Template for Content(Temperature Sensor)

    I. PROCEDURE

    1. Collect Data

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 6 in Section 12.3.

    2. Calibrate Sensor

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 2 in Section 12.4.2.

    II. RESULTSDo not interpret or analyze the data in this section. Just provide the results.

    1. Sensor response from Step 2 in Section 12.4.2.

    2. Provide applicable data collected in this laboratory from Table 12.1.

    IV. CONCLUSIONSInterpret your results to arrive at logical conclusions for the following:

    1. Sensor response from Step 3 in Section 12.4.2.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 16.11 Template for Content(Switches and LEDs)

    I. PROCEDURE

    1. Optical Switch

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 7 in Section 13.3.

    2. Micro Switch

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 6 in Section 13.4.

    3. Push Button

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 6 in Section 13.5.

    4. LEDs

    Briefly describe the main goal of the experiment. Briefly describe the experiment procedure in Step 4 in Section 13.6.

    II. RESULTSDo not interpret or analyze the data in this section. Just provide the results.

    1. Provide applicable data collected in this laboratory from Table 13.1.

    III. ANALYSISProvide details of your calculations (methods used) for analysis for each of the following:

    1. Optical switch response from Step 7 in Section 13.3.

    2. Micro switch and digital response from Step 6 in Section 13.4.

    3. Push button and digital response from Step 6 in Section 13.5.

    4. Comparitive analysis in Step 7 in Section 13.5.

    5. Observations in Step 4 in Section 13.6.

    QNET MECHKIT Workbook - Student Version 96

  • 16.12 Template for Content(Switch Debounce Analysis)

    I. PROCEDURE

    1. Running the Oscilloscope

    Briefly describe the main goal of the experiment.

    2. Micro Switch

    Briefly describe the main goal of the experiment. Briefly describe the experimental procedure in Step 4 in Section 14.4.

    3. Push Button

    Briefly describe the main goal of the experiment. Briefly describe the experimental setup in Step 3 in Section 14.5.

    II. RESULTSDo not interpret or analyze the data in this section. Just provide the results.

    1. Optical switch response from Step 6 in Section 14.4.

    2. Micro switch and digital response from Step 5 in Section 14.5.

    3. Cross channel response from Step 7 in Section 14.5.

    III. ANALYSISProvide details of your calculations (methods used) for analysis for each of the following:

    1. Trigger settings in Step 4 in Section 14.4.

    2. Trigger settings in Step 3 in Section 14.5.

    3. Micro switch observations in Step 6 in Section 14.4.

    4. Push button observations in Step 5 in Section 14.5.

    5. Comparitive analysis in Step 6 in Section 14.5.

    6. Cross talk analysis in Step 7 in Section 14.5.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 16.13 Tips for Report Format

    PROFESSIONAL APPEARANCE

    Has cover page with all necessary details (title, course, student name(s), etc.)

    Each of the required sections is completed (Procedure, Results, Analysis and Conclusions).

    Typed.

    All grammar/spelling correct.

    Report layout is neat.

    Does not exceed specified maximum page limit, if any.

    Pages are numbered.

    Equations are consecutively numbered.

    Figures are numbered, axes have labels, each figure has a descriptive caption.

    Tables are numbered, they include labels, each table has a descriptive caption.

    Data are presented in a useful format (graphs, numerical, table, charts, diagrams).

    No hand drawn sketches/diagrams.

    References are cited using correct format.

    QNET MECHKIT Workbook - Student Version 98

  • REFERENCES

    [1] Quanser Inc. QNET Mechatronic Sensors Trainer User Manual, 2011.

    [2] Agilent Technologies. Practical Temperature Measurements (Application Note 290), 2008.

    [3] Wikipedia. Thermistor. http://en.wikipedia.org/wiki/Thermistor.

    QNET MECHKIT Workbook - Student Version v 1.0

  • 1 Introduction2 Sensor Properties2.1 Resolution2.2 Range2.3 Absolute and Incremental2.4 Analog Sensor Measurement

    3 Strain Gage with Flexible Link3.1 Background3.2 Strain Virtual Instrument3.3 Lab 1: Collect Data3.4 Lab 2: Calibrate Sensor3.5 Lab 3: Natural Frequency3.6 Results

    4 Pressure Sensor4.1 Background4.2 Pressure Virtual Instrument4.3 Lab 1: Collect Data4.4 Lab 2: Calibrate Sensor4.5 Results

    5 Piezo Sensor5.1 Background5.2 Lab 1: Data Analysis5.3 Lab 2: Natural Frequency

    6 Potentiometer6.1 Background6.2 Potentiometer Virtual Instrument6.3 Lab 1: Collect Data6.4 Lab 2: Calibrate Sensor6.5 Results

    7 Infrared7.1 Background7.2 Potentiometer Virtual Instrument7.3 Lab 1: Collect Data7.4 Lab 2: Calibrate Sensor7.5 Results

    8 Sonar8.1 Background8.2 Sonar Virtual Instrument8.3 Lab 1: Collect Data8.4 Lab 2: Calibrate Sensor8.5 Results

    9 Optical Position9.1 Background9.2 Optical Virtual Instrument9.3 Lab 1: Collect Data9.4 Lab 2: Calibrate Sensor9.5 Results

    10 Magnetic Field10.1 Background10.2 Magnetic Field Virtual Instrument10.3 Lab 1: Collect Data10.4 Lab 2: Calibrate Sensor10.5 Results

    11 Encoder11.1 Background11.2 Encoder Virtual Instrument11.3 Lab 1: Analysis of A, B, and I Signals11.4 Lab 2: Encoder Calibration11.5 Results

    12 Temperature Sensor12.1 Background12.2 Temperature Virtual Instrument12.3 Lab 1: Collect Data12.4 Lab 2: Calibrate Sensor12.5 Results

    13 Switches and LEDs13.1 Background13.2 Switches and LEDs Virtual Instrument13.3 Lab 1: Optical Switch13.4 Lab 2: Micro Switch13.5 Lab 3: Push Button13.6 Lab 4: LEDs13.7 Results

    14 Switch Debounce Analysis14.1 Background14.2 Switches and LEDs Virtual Instrument14.3 Lab 1: Running the Oscilloscope14.4 Lab 2: Micro Switch14.5 Lab 3: Push Button14.6 Results

    15 System Requirements15.1 Overview of Files15.2 Strain Gage with Flexible Link VI15.3 Pressure Laboratory VI15.4 Piezo VI15.5 Potetiometer VI15.6 Infrared Sensor Laboratory VI15.7 Sonar Sensor VI15.8 Optical Position Laboratory VI15.9 Magnetic Field Laboratory VI15.10 Encoder Laboratory VI15.11 Temperature Laboratory VI15.