Uploaded by Abbas Mehdi Plays

EEE-374 Electrical Measurements and Instrumentation

advertisement
EEE374 Electronic Measurement and Instrumentation
Electrical Measurements and Instrumentation
EEE374
Lab Manual
Name
RegistrationNumber
Class
Instructor’sName
COMSATS Institute of Information Technology
Page 1
EEE374 Electronic Measurement and Instrumentation
Introduction
This is the Lab Manual for EEE – 374Electrical Measurements and Instrumentation.
The labs constitute 25 % of the total marks for this course.
During the labs you will work in groups (no more than three students per group). You
are required to complete the ‘Pre-Lab’ section of the lab before coming to the lab. You
will be graded for this and the ‘In-Lab’ tasks during the in-lab viva. You will complete
the ‘Post-Lab’ section of each lab before coming to the next week’s lab.
You are not allowed to wander in the lab or consult other groups when performing
experiments. Similarly the lab reports must contain original efforts. CIIT has a zero
tolerance anti-plagiarism policy.
Apart from these weekly labs you will complete two projects. One mini-project that will
count towards your Lab Sessional II score and a Final Project which will be graded as
Lab Final Exam. The grading policy is already discussed in the Course Description File.
COMSATS Institute of Information Technology
Page 2
EEE374 Electronic Measurement and Instrumentation
Acknowledgement
The labs for EEE-374Electrical Measurements and Instrumentation were designed by
Mr. Syed Mohsin Ghani. The first version was completed in Session Spring 2016, The
second version was completed during the summer break of 2016. Typesetting and
formatting of this version was supervised by Dr. Omar Ahmad and was carried out by
Mr. Abdul Rehman, Mr. Suleman & Mr. Baqir Hussain.
History of Revision
Date of Issue
Team
Comments
July 01, 2016
Mr. MohsinGani
This is the first editable draft of EEE – 374 lab
manual.
February 07,
2018
Mr. Fahd Ali Shifa
Post-lab task in lab 1 and pre-lab tasks of lab 2
were changed.
COMSATS Institute of Information Technology
Page 3
EEE374 Electronic Measurement and Instrumentation
Safety Precautions
•
Be calm and relaxed, while working in lab.
•
First check your measuring equipment.
•
When working with voltages over 40 V or current over 10 A, there must be at least two people
in the lab at all time.
•
Keep the work area neat and clean.
•
Be sure about the locations of fire extinguishers and first aid kit.
•
No loose wires or metals pieces should be lying on the table or neat the circuit.
•
Avoid using long wires, that may get in your way while making adjustments or changing leads.
•
Be aware of bracelets, rings, and metal watch bands (if you are wearing any of them). Do not
wear them near an energized circuit.
•
When working with energize circuit use only one hand while keeping rest of your body away
from conducting surfaces.
•
Always check your circuit connections before power it ON.
•
Always connect connection from load to power supply.
•
Never use any faulty or damage equipment and tools.
•
If an individual comes in contact with a live electrical conductor.
o Do not touch the equipment, the cord, the person.
o Disconnect the power source from the circuit breaker and pull out the plug using
insulated material.
COMSATS Institute of Information Technology
Page 4
EEE374 Electronic Measurement and Instrumentation
Table of Contents
Introduction ................................................................................................................................... 2
Acknowledgement ....................................................................................................................... 3
History of Revision ...................................................................................................................... 3
Safety Precautions ......................................................................................................................... 4
Lab # 1: Familiarization with laboratory equipment and study of instruments and their symbols 8
Objectives ...................................................................................................................................... 8
Pre-Lab .......................................................................................................................................... 8
Post-Lab Task(s).......................................................................................................................... 25
Critical Analysis / Conclusion ....................................................................................................... 26
Lab # 2: Measurement of different electrical quantities by multi-meter and error calculation ... 28
Objectives .................................................................................................................................... 28
Pre Lab ........................................................................................................................................ 28
Pre Lab Task(s) ........................................................................................................................... 31
In-Lab Task(s) ............................................................................................................................. 32
Post-Lab Task(s).......................................................................................................................... 35
Critical Analysis / Conclusion ....................................................................................................... 36
Lab # 3: Measurement of unknown inductance and capacitance by three voltmeter method ..... 38
Objectives .................................................................................................................................... 38
Pre Lab Task(s) ........................................................................................................................... 41
In-Lab Task(s) ............................................................................................................................. 42
Post-Lab Task(s).......................................................................................................................... 45
Lab # 4 Measurement of single phase power different methods ................................................. 48
Objective ..................................................................................................................................... 48
Pre-Lab Task(s) ........................................................................................................................... 53
In-Lab .......................................................................................................................................... 53
Critical Analysis / Conclusion ....................................................................................................... 55
Post Lab ....................................................................................................................................... 56
Lab # 5: Virtual Instrumentation (VI) using LabVIEW: Creating a VI from scratch ................. 59
Objectives .................................................................................................................................... 59
COMSATS Institute of Information Technology
Page 5
EEE374 Electronic Measurement and Instrumentation
Pre-Lab Task(s) ........................................................................................................................... 60
In-Lab Task(s) ............................................................................................................................. 60
Post-Lab Task(s).......................................................................................................................... 69
Lab # 6: Introduction to LabVIEW: Getting started with LabVIEW Virtual Instruments ......... 72
Objectives .................................................................................................................................... 72
Pre-Lab Task(s) ........................................................................................................................... 72
In-Lab Task(s) ............................................................................................................................. 72
Critical Analysis / Conclusion ..................................................................................................... 87
Post-Lab Task(s).......................................................................................................................... 87
Lab # 7: Learning the Physical Properties of Most Common Sensors Used Today Using
National Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1) ........ 90
Objective ..................................................................................................................................... 90
Pre-Lab Task(s) ......................................................................................................................... 101
In-Lab ........................................................................................................................................ 101
Lab # 8: Learning the Physical Properties of Most Common Sensors Used Today Using
National Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-2) ...... 107
Objective ................................................................................................................................... 107
Pre-Lab Task(s) ......................................................................................................................... 114
In-Lab ........................................................................................................................................ 114
Lab # 9: Learning the Physical Properties of Most Common Sensors Used Today Using
National Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-3) ...... 119
Objective ................................................................................................................................... 119
Pre-Lab Task(s) ......................................................................................................................... 128
In-Lab ........................................................................................................................................ 128
Post-Lab..................................................................................................................................... 132
Lab # 10: Learning the Physical Properties of Most Common Sensors Used Today Using
National Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-4) ...... 135
Objective ................................................................................................................................... 135
Pre-Lab Task(s) ......................................................................................................................... 145
In-Lab ........................................................................................................................................ 146
Lab # 11 Measurement of Medium and Low Resistance using Wheatstone Bridge and Kelvin
Double Bridge Kit ..................................................................................................................... 153
COMSATS Institute of Information Technology
Page 6
EEE374 Electronic Measurement and Instrumentation
Objectives .................................................................................................................................. 153
Pre-Lab Task(s) ......................................................................................................................... 154
In-Lab Tasks .............................................................................................................................. 154
Post-Lab..................................................................................................................................... 159
Lab # 12: Measurement of Different Waveform Attributes using Cathode Ray Oscilloscope
(CRO) ........................................................................................................................................ 161
Introduction: .............................................................................................................................. 161
In Lab: ....................................................................................................................................... 168
Post Lab: .................................................................................................................................... 170
COMSATS Institute of Information Technology
Page 7
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Lab # 1: Familiarization with laboratory equipment
and study of instruments and their symbols
Objectives
•
•
To study basic instruments and their symbols
To familiarize ourselves with the laboratory resources and equipment
Pre-Lab
Available Lab Equipment and Resources
The following is the list of equipment available in the laboratory:
Sr. #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Equipment Name
Impedance analyzer
Digital Megohmmeter (Megger)
Kelvin double bridge full set
Wheatstone Bridge
Lux meter
Digital clamp-meter
Portable power analyzer
Digital Earth Tester
Temperature sensor
LAN Tester
Multi-meter
EMF meter (measures electric and magnetic field)
Capacitance meter
Galvanometer
High-voltage meter
Frequency counter
LCR meter
Power supplies
Wattmeter
Phase-sequence meter
LabView software
Personal computers (PC)
Workbenches
QNET Mechatronic Sensors Trainer for NI ELVIS
COMSATS Institute of Information Technology
QTY
3
3
2
1
2
2
2
16
4
5
9
4
14
20
20
20
8
Page 8
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Impedance Analyzer
An impedance analyzer is a computational device that measures opposition to the current in
alternating current (AC) systems. Impedance is a measure of how well a material or component
passes current. This resulting ratio of voltage to current is measured in ohms (Ω). The equipment
connects via input cables or uses a small handheld terminal probe for spot checking.
An impedance analyzer generates an RF signal within a range specified by the user, and injects it
via a probe. The resulting ohm measurements are sampled, measured, and analyzed. This complex
impedance can be used to calculate additional factors, and formatted for rectangular or polar
display. Fixed frequency mode measures one user-defined frequency, while other modes may
permit sequential cycling through a frequency range. The equipment may be controlled via
keypads or with computer and software processors.
This equipment is employed for many types of industrial analysis, research, and technology
production. It tests radio transmission and assists in cable measurement and fault finding.
Figure 1.1
Digital Megohmmeter (Megger)
Megohmmeter (also referred to as a Megger) is a special type of ohmmeter used to measure the
electrical resistance of insulators. Insulating components, for example cable jackets, must be
tested for their insulation strength at the time of commissioning and as part of maintenance of
high voltage electrical equipment and installations. For this purpose, Megohmmeters, which can
provide high DC voltages (typically in ranges from 500 V to 2 kV) at specified current capacity,
are used. Acceptable insulator resistance values are typically 1 to 10 mega ohms, depending on
the standards referenced.
Digital Megohmmeter is a versatile, robust and easy-to-use equipment. It uses an efficient wellexperienced technology, which provides reliable, safe and accurate measurements up to 4,000,000
COMSATS Institute of Information Technology
Page 9
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
MΩ @ 5kV, with 10 test voltages: 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500 and
5000 V. Its microprocessor-based development makes the equipment operation easier and enables
the introduction of functions such as auto-range, memory, test voltage measurement, polarization
and absorption index indication, etc. Another feature that is important in this Megohmmeter is
negative voltages, that refer to the zero potential terminal (R), for detecting moisture by means of
the Evershed effect.
Due to its reduced dimensions and weight, power supply autonomy and mechanical resistance,
this equipment is suitable for fieldwork, and under extreme weather conditions.
Figure 1.2
Kelvin Double Bridge
A Kelvin bridge (also called a Kelvin double bridge, and in some countries a Thomson bridge) is
a measuring instrument used to measure unknown electrical resistors below 1 ohm. It is
specifically designed to measure resistors that are constructed as four terminal resistors. Resistors
above about 1 ohm in value can be measured using a variety of techniques, such as an ohmmeter,
or by using a Wheatstone bridge. In such resistors, the resistance of the connecting wires or
terminals is negligible compared to the resistance value. For resistors of less than 1 ohm, the
resistance of the connecting wires or terminals becomes significant, and conventional
measurement techniques will include them in the result.
To overcome the problems of these undesirable resistances (known as parasitic resistance), very
low value resistors, particular precision resistors, and high current ammeter shunts are constructed
as four terminal resistors. These resistances have a pair of current terminals and a pair of potential
or voltage terminals.
In use, a current is passed between the current terminals, but the volt drop across the resistor is
measured at the potential terminals. The volt drop measured will be entirely due to the resistor
itself, as the parasitic resistance of the leads carrying the current to and from the resistor are not
included in the potential circuit. To measure such resistances, requires a bridge circuit designed
to work with four terminal resistances. That bridge is the Kelvin double bridge.
COMSATS Institute of Information Technology
Page 10
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Figure 1.3
Wheatstone Bridge
A Wheatstone bridge is an electrical circuit used to measure an unknown electrical resistance by
balancing two legs of a bridge circuit, one leg of which includes the unknown component. The
primary benefit of a Wheatstone bridge is its ability to provide extremely accurate measurements
(in contrast with something like a simple voltage divider). Its operation is similar to the original
potentiometer, which was invented by Samuel Hunter Christie in 1833 and improved and
popularized by Sir Charles Wheatstone in 1843. One of the Wheatstone bridge's initial uses was
for the purpose of soils analysis and comparison.
The Wheatstone bridge illustrates the concept of a difference measurement, which can be
extremely accurate. Variations on the Wheatstone bridge can be used to measure capacitance,
inductance, impedance and other quantities, such as the amount of combustible gases in a sample,
with an explosimeter. The Kelvin Bridge was specially adapted from the Wheatstone bridge for
measuring very low resistances. In many cases, the significance of measuring the unknown
resistance is related to measuring the impact of some physical phenomenon (such as force,
temperature, pressure, etc.) which thereby allows the use of Wheatstone bridge in measuring those
elements indirectly.
COMSATS Institute of Information Technology
Page 11
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Figure 1.4
Lux Meter
A lux meter is a device for measuring brightness, specifically, the intensity with which the
brightness appears to the human eye. This is different than measurements of the actual light
energy produced by or reflected from an object or light source. The lux is a unit of measurement
of brightness, or more accurately, illuminance. It ultimately derives from the candela, the standard
unit of measurement for the power of light. A candela is a fixed amount, roughly equivalent to
the brightness of one candle.
While the candela is a unit of energy, it has an equivalent unit known as the lumen, which
measures the same light in terms of its perception by the human eye. One lumen is equivalent to
the light produced in one direction from a light source rated at one candela. The lux takes into
account the surface area over which this light is spread, which affects how bright it appears. One
lux equals one lumen of light spread across a surface one square meter.
COMSATS Institute of Information Technology
Page 12
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
A lux meter works by using a photo cell to capture light. The meter then converts this light to an
electrical current, and measuring this current allows the device to calculate the lux value of the
light it captured. The most common use of this type of meter is in photography and video filming.
By measuring the light in lumens, photographers can adjust their shutter speed and depth of field
to get the best picture quality. The device can also be very useful for filming outdoor scenes of
television programs or movies as it allows adjustments to make sure scenes filmed in different
light levels have a consistent brightness on screen.
Figure 1.5
Digital Clamp Meter
A digital clamp meter is a device that measures current in amperes (A) by magnetic induction.
This type of measurement is non-intrusive and very convenient. The digital clamp meter is
squeezed open, and the cable whose current needs measurement is enclosed in the clamp meter
loop. The clamp meter is removed after the current reading is made, and all this can be done
without having to interrupt the continuity of the cable under test. In old methods an ammeter had
to be inserted, which meant disrupting the current to do the measurement.
The basic principle behind the digital clamp meter is magnetic induction. A piece of wire with
electrical current flowing through it will also have a magnetic field with intensity in proportion
to the current flow. This magnetic field can induce current flow in a second wire. If the second
wire is properly engineered, a second current in proportion to the current on the first cable can be
produced. The clamp couples the magnetic field from the first wire to the second wire.
COMSATS Institute of Information Technology
Page 13
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Figure 1.6
Portable Power Analyzer
Power analyzers accurately measure electrical power characteristics of devices that generate,
transform, or consume electricity. Power analyzers, also called power meters or watt-meters,
provide precise measurements of true power (watts), power factor, harmonics and efficiency in
inverters, motor drives, lighting, home appliances, office equipment, power supplies, and
industrial machinery.
Portable power analyzers are units designed for easy transportation along with temporary and
simple installation. They are also capable of measuring electrical parameters whether or not the
data is recorded in the memory. Since, these instruments must perform measurements in a number
of installations with very different features, they have setup menus for the most common
installations (single-phase, two-phase, 3-wire or 4-wire 3-phase).
Figure 1.7
COMSATS Institute of Information Technology
Page 14
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Digital Earth Meter
Earth resistance testers are used by ground survey teams for a variety of reasons. Electrical
engineers may need to know the resistivity of ground in order to ensure proper grounding of
electrical equipment. Geology teams may conduct these tests to ‘estimate’ the composition of
soil, water deposits, underground rock deposition, etc. The digital earth tester available in the lab
is ET-3000. This equipment is used to measure earth resistance and earth voltage. It has three
ranges for earth resistance measurement which are 19.99 ohm, 199.9 ohm, and 1.999 kilo ohm
respectively. Its voltage may be varied from 0 – 199.9V for earth voltage measurement. It has a
large LCD display, which makes reading the measurements easier. It also has a data hold function
to freeze the display reading value. All of this is housed in a durable and portable housing plastic
case with a front protective cover.
Figure 1.8
Temperature Sensor
A temperature sensor is a device that gathers data concerning the temperature from a source and
converts it to a form that can be understood either by an observer or another device. These sensors
come in many different forms and are used for a wide variety of purposes, from simple home use
to extremely accurate and precise scientific use. They play a very important role almost
everywhere that they are applied; knowing the temperature helps people to pick their clothing
before a walk outside, just as it helps chemists to understand the data collected from a complex
chemical reaction.
The best known example is the mercury-in-glass thermometer. Mercury expands and contracts
based on changes in temperature; when these volume changes are quantified, temperature can be
measured with a fair degree of accuracy. The outside temperature is the source of the
measurements and the position of the mercury in the glass tube is the observable quantification
of temperature that can be understood by observers. Typically, mercury-in-glass thermometers
are only used for non-scientific purposes because they are not extremely accurate. In some cases,
COMSATS Institute of Information Technology
Page 15
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
they can be used in high school or college chemistry labs when a very accurate measurement of
temperature is not important.
A more complex temperature sensor will generally be computerized for more accurate results.
These, too, are sometimes used in homes for non-scientific purposes; some people keep sensors
outside, that wirelessly send the outside temperature to a digital display inside. In a lab, a digital
sensor will typically be calibrated to be far more accurate. These devices typically take one of
two forms: contact sensors measure their own temperatures after they have achieved thermal
equilibrium with their environments, and noncontact sensors measure heat radiation from their
environments within a given area. All heat sensors tend to have some level of error in their
readings, as temperature is quite difficult to measure accurately.
Figure 1.9
LAN Tester
LAN testers cover the fields of installation and network control. A LAN tester can be used in a
workplace, and is ideal for technical service professionals and network administrators. These
testers can determine IP addresses, identify polarity, connected port and link connectivity.
Furthermore, they can test fiber optic cables. They can also show cable break points and incorrect
connections in fiber optic lines.
With these LAN testers, one can test the state of LAN network connections to Hubs and Switches,
analyze the traffic of a network, and which IP it generates.
COMSATS Institute of Information Technology
Page 16
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Figure 1.10
Multi-meter
A multi-meter measures electrical properties such as AC or DC voltage, current, and resistance.
Rather than having separate meters, this device combines a voltmeter, an ammeter, and an
ohmmeter. Electricians and the general public might use it on batteries, components, switches,
power sources, and motors to diagnose electrical malfunctions and narrow down their cause.
The two main kinds of a multi-meter are analog and digital. A digital device has an LCD screen
that gives a straight forward decimal read out, while an analog display moves a bar through a
scale of numbers and must be interpreted. Either type will work over a specific range for each
measurement, and users should select one that's compatible with what he or she meters most, from
low-voltage power sources to high-voltage car batteries. Multi-meters are specified with a
sensitivity range, so consumers should make sure they get the appropriate one.
Figure 1.11
EMF Meter (Electromagnetic Field Meter)
Electromagnetic Field meters (EMF) measure AC and DC currents, or fields of electricity, within
a certain area. The sensitivity of the tool can vary by model and manufacturer, but most can
measure a field of electromagnetic activity between 60 and 50 hertz (Hz). Other EMF detection
meters can detect fields as low as 20 Hz, although these are costly and generally only utilized in
the fields of scientific research. They are mostly used to measure household electric currents.
There are two basic EMF meter varieties, analog and digital. An analog EMF meter allows the
user to read the results as they occur on a field that is marked by different lines and measurements.
A digital EMF meter displays the results on a digital screen. Each has its own distinct advantages,
with proponents of either type claiming that their chosen EMF meter is more accurate. Within
these two types, there are myriad features available to the consumer, including lights that flash to
COMSATS Institute of Information Technology
Page 17
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
signal a sudden change in electromagnetic fields, or audio noises such as chirps and beeps to
indicate the same.
Figure 1.12
Capacitance Meter
A capacitance meter is a specialized piece of testing equipment. It is used to determine the
potential capacitance of a given capacitor. These meters come in many varieties and sizes in order
to measure capacitance in many different contexts. The ability to measure capacitance is included
in some but not all multi-meters.
Physically, most of these devices are simple handheld units with two leads that can be connected
to a capacitor for testing. Older models used an analog display, but these are now quite
uncommon. Specialized types of capacitance meters, especially those for testing very large or
very small capacitors, are likely to be larger units with different types of specialized probes
appropriate for the type of measurement that a particular capacitance meter is designed to take.
Capacitors are manufactured in a wide variety of sizes. Large models used in power transmission
can contain many orders of magnitude more electrical power than the extremely tiny capacitors
built into modern integrated circuits. The range of capacitor sizes means that most types of
capacitance meter are optimized for measuring capacitance in capacitors of only certain sizes.
The small test current generated by the capacitance meter function of a standard handheld digital
multi-meter is not sufficient to generate an accurate reading for a large industrial capacitor.
Similarly, this same tiny current might actually be powerful enough to overwhelm the resistor in
a tiny capacitor located on a circuit board. Specialized and highly precise models of capacitance
meter exist for the measurement of capacitance at this level.
COMSATS Institute of Information Technology
Page 18
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Figure 1.13
Galvanometer
Electric current is often measured using an instrument called a Tangent Galvanometer. Able to
measure the presence as well as the direction and power of currents, the instrument was first used
in the early 1800s. It typically has a vertical copper wire coil, wrapped around a circular frame,
and a compass in the middle. The compass needle generally responds to the magnetic field of the
electrical current, which is compared to the Earth’s magnetic field in the experiment. This
scientific instrument has been built in many forms and more modern ones often use beams of light
to determine measurements, while some versions are used to measure the magnetic field of the
Earth.
The instrument works based on the tangent law of magnetism. This principle defines the tangent
of the angle, traveled through by the compass needle, as being proportionate to a ratio of how
strong two magnetic fields are. These fields are usually perpendicular to one another. Currents
measured are typically proportional to the tangent of the same angle the needle goes through.
However, it is important to mention here that in its most basic form, a galvanometer can only
detect electric current but not measure it. In order to enable this instrument to measure electric
current, some modifications must be made in it to convert it to either ammeter or voltmeter.
Figure 1.14
COMSATS Institute of Information Technology
Page 19
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Frequency Counter
A frequency counter is an electronic instrument, or component of one, that is used for measuring
frequency. Frequency counters usually measure the number of oscillations or pulses per second
in a repetitive electronic signal.
Most frequency counters work by using a counter which accumulates the number of events
occurring within a specific period of time. After a preset period known as the gate time (1 second,
for example), the value in the counter is transferred to a display and the counter is reset to zero.
If the event being measured repeats itself with sufficient stability and the frequency is
considerably lower than that of the clock oscillator being used, the resolution of the measurement
can be greatly improved by measuring the time required for an entire number of cycles, rather
than counting the number of entire cycles observed for a pre-set duration (often referred to as the
reciprocal technique). The internal oscillator which provides the time signals is called the time
base, and must be calibrated very accurately.
Figure 1.15
LCR Meter
An LCR meter is a device that is used to test the electrical impedance of a piece of equipment. In
operation, it is capable of identifying the measurement of an object's resistance to steady electrical
current. This is most helpful when dealing with alternating current (AC). It will determine the
relative change in magnitude of the repetitive variations of the voltage and current known as
amplitudes.
Inductance is one of the major properties which an LCR meter will test. Inductance is a change
in the flow of current through a circuit and some device such as a resistor prevents that change.
This is called electromotive force. Because electrical currents produce magnetic fields that reduce
the rate of change in the current, the LCR will measure the ratio of magnetic flux.
An LCR will also measure the ability for an object to continue to hold an electrical charge. This
is known as capacitance. The meter can test the amount of charge stored at a specific point known
as electric potential. Typically measured in volts, this shows the exact static charge in the electric
field of the object.
COMSATS Institute of Information Technology
Page 20
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
When measuring strict electrical resistance, the LCR meter will help identify the exact opposition
of the current. A component that contains a uniform width will have a proportional resistance to
its length. This is helpful in determining the correct design of elements involved with the circuit.
Figure 1.16
Power Supplies
A power supply is a device that takes an incoming electrical current and amplifies it to levels
required by various devices. In many instances, this type of device is also implemented to take
the incoming electricity and deliver it across many other electronic devices, often at different
preset levels. This device allows manufacturers to create electronics and machinery that can
handle many different tasks from a single source of power, without the need for various adapters
and additional hardware. Within other devices, a power supply is used to transform various types
of power into a compatible format to be stored, like solar energy to electrical energy.
Perhaps the most common use of this type of device is within computer systems. As electricity
enters the power supply, it is momentarily stored and then distributed to numerous functions
throughout the system, allowing the motherboard, hard drive, and other various devices to receive
electricity in order to function. Each one of these items requires a separate voltage, and it is
delivered through specialized connectors that attach in a certain manner. For example,
motherboards require either a 20-pin or a 24-pin power supply, and they are not interchangeable
without the purchase of an additional adapter.
COMSATS Institute of Information Technology
Page 21
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Figure 1.17
Watt-Meter
A watt-meter is an instrument which gives a visual indication of the amount of electrical energy
being supplied to a circuit. This indication is expressed in watts which is the standard unit of
measure for electrical energy supply or consumption. There are two commonly used types of
wattmeter: analog and digital. Analog meters indicate power supply via a needle and scale
indicator, while digital instruments display the power usage on a liquid crystal display (LCD).
Watt-meters are typically rated for a set voltage range but may include features such as coil taps,
which allow for multiple voltages.
All electrical equipment consumes power, subject to a set of known constants which include the
rated voltage, the current usage expressed in amps, and the overall energy usage expressed in
watts. Some types of electrical appliances or installations use far more energy than others of
similar voltage ratings. A wattmeter allows for power usage to be monitored to establish whether
circuits are operating correctly. This information is crucial in larger installations where large
resistive loads are used. The watt-meters in such installations allow operators and technicians to
keep track of individual circuit health and overall power supply balancing and consumption.
Watt-meters are generally presented in one of two basic formats. The first is the traditional analog
wattmeter. These are electrodynamic instruments and consist of three internal coils — two static
current coils and a movable potential coil which has the indicator needle attached to it. When an
electrical current is passed through the two current coils, an electromagnetic field is generated.
This field causes the potential coil to move and display a value on the scale behind the needle.
The second type of wattmeter is the electronic or digital meter. These devices differ from
electrodynamic meters in the way they calculate power usage. Digital meters use a microprocessor
to assess voltage and amperage values from the circuit at a frequency of several thousand samples
per second. These samples are used to calculate an average power factor or power usage. The
power factor reading is then displayed digitally on a LCD display.
COMSATS Institute of Information Technology
Page 22
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Figure 1.18
Phase Sequence Meter
Phase sequence meter is used for detecting the sequence of the supply in three-phase electric
circuits. The direction of rotation of three phase electric motors can be changed by changing the
phase sequence of supply. Also, the correct operation of measuring instruments like 3 phase
energy meter and automatic control of devices also depend on the phase sequence. Different types
of phase sequence testers are available in today’s market like contact or non-contact, static or
rotating, etc., in a wide range of voltage or power ratings.
COMSATS Institute of Information Technology
Page 23
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Figure 1.19
QNET Mechatronic Sensors Trainer for NI ELVIS
The QNET Mechatronic Sensors Trainer (MECHKIT), shown in Figure 1.20, is designed to teach
and demonstrate the fundamentals of interfacing with mechatronic sensors. The system is
configured to utilize a wide variety of sensors measuring pressure, flex, infrared and visible light,
magnetism, temperature etc. In particular, the system can be used to teach measurement and
calibration fundamentals. This is done using a PC with real-time control capabilities and the NI
ELVIS II.
The MECHKIThas 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.
COMSATS Institute of Information Technology
Page 24
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Figure 1.20
Post-Lab Task(s)
Write a report about tasks performed in this lab discussing their significance and suggesting
improvements which can be made in them to better accomplish lab objectives. Also present all
the data which you have collected in lab regarding various equipment in tabulated form. Marks
will be awarded based on presentation of data in a form which is concise, clearly readable and
easily understandable.
1. Copied reports will receive zero marks.
2. It is the responsibility of the student to ensure that his/her report is not copied (not even by
his/her friends). In case of copy, the first version will receive marks while all subsequent
copies shall stand rejected (receive zero marks).
3. Reports must be printed unless otherwise stated.
4. Graphs must be drawn by hand on proper graph papers if need be without using any software
and attached in manual in their place.
COMSATS Institute of Information Technology
Page 25
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Critical Analysis / Conclusion
(By Student about Learning from the Lab)
COMSATS Institute of Information Technology
Page 26
Lab # 1 Familiarization with laboratory equipment and study of instruments and their symbols
Performance
Viva
(10 Marks)
(5 Marks )
Total/15
Performance
/6
Results
/3
Critical Analysis
/1
Comments
COMSATS Institute of Information Technology
Page 27
Lab # 2 Measurement of different electrical quantities by multi-meter and error calculation
Lab # 2: Measurement of different electrical
quantities by multi-meter and error calculation
Objectives
•
•
To measure different electrical quantities by using digital multi-meter.
To calculate the error in measurements.
Pre Lab
Description of Equipment(s)
Voltmeter
Voltmeter is used to measure the potential difference between two points in a circuit. It is
connected in parallel with the circuit, between points where the potential measurement has
to be made. This is the reason why a voltmeter will not disrupt the flow of current through
the circuit in which voltage measurements are being made if it is disconnected from the
circuit.
A Voltmeter is made by connecting a high resistance in series with a Galvanometer. The
resistance is chosen to be high so that the instrument does not draw current from the circuit
(thereby reducing accuracy).
Ammeter
AnAmmeter is used to measure current flowing in a circuit. It is connected in series in the
circuit between points where the current measurement has to be made. This is the reason
why an ammeter will disrupt the flow of current through the circuit in which current
measurements are being made if it is disconnected from the circuit.
An Ammeter is made by connecting a low resistance in parallel with a Galvanometer. The
resistance is chosen to be low, so that most of the current passes through the shunt rather
than the Galvanometer. This is done because a Galvanometer is a very sensitive equipment
and it cannot measure heavy currents. The value of shunt resistor is so chosen so as to
produce full scale deflection for maximum amount of current for which it is designed.
COMSATS Institute of Information Technology
Page 28
Lab # 2 Measurement of different electrical quantities by multi-meter and error calculation
Digital Multi Meter (DMM)
A multi-meter measures electrical properties such as AC or DC voltage, current, and
resistance. Rather than have separate meters, this device combines a voltmeter, an
ammeter, and an ohmmeter. Electricians and the general public might use it on batteries,
components, switches, power sources, and motors to diagnose electrical malfunctions and
narrow down their cause.
Figure 2.1
The two main kinds of a multi-meter are analog and digital. A digital device has an LCD
screen that gives a straight forward decimal read out, while an analog display moves a bar
through a scale of numbers and must be interpreted. Either type will work over a specific
range for each measurement, and users should select one that's compatible with what he or
she meters most, from low-voltage power sources to high-voltage car batteries. Multimeters are specified with a sensitivity range, so consumers should make sure they get the
appropriate one.
Error: It is the difference of the actual value and the measured value. It is denoted by E or
ε. Mathematically it is given as:
𝐸 = 𝑉𝐴 − 𝑉𝑚
Where,
VA = Actual value of electrical quantity (in this case voltage)
Vm = Measured value of electrical quantity
Measured value is the value of a quantity which is measured through the measuring
instrument (meter). It is denoted by the respective quantity symbol followed by the
subscript “m”.
Actual value is the actual value of a quantity. It is also known as the rated value. It is
denoted by the respective quantity symbol followed by subscript the “A”.
COMSATS Institute of Information Technology
Page 29
Lab # 2 Measurement of different electrical quantities by multi-meter and error calculation
Percentage Error: Error alone cannot give complete information regarding an instrument.
To get the complete picture, error is represented as a percentage of actual value.
Mathematically, it is given as:
𝑃𝑒𝑟𝑐𝑒𝑛𝑡𝑎𝑔𝑒 𝐸𝑟𝑟𝑜𝑟 =
𝑉𝐴 − 𝑉𝑚
× 100%
𝑉𝐴
Measurement Error Combinations
Sum of Quantities
Where a quantity is determined as the sum of two measurements, the total error is the sum of
the absolute errors in each measurement.
E = (V1 ± ∆V1) + (V2 ±∆V2)
E = (V1+V2) ± (∆V1+∆V2)
Difference of Quantities
A potential difference is determined as the difference between two measured voltages.
E = (V1 ± ∆V1) - (V2 ±∆V2)
E = (V1 - V2) ± (∆V1+∆V2)
Product of Quantities
When a calculated quantity is the product of two or more quantities, the percentage error is
the sum of the percentage errors in each quantity.
P = EI
P = (E ± ∆E) × (I ± ∆I)
% error in P = (% error in I ) + (% error in E )
Thus, when a voltage is measured with an accuracy of ± 1%, and a current is measured with
an accuracy of ±2%, the calculated power has an accuracy of ±3%.
Statistical Analysis
1. Arithmetic Mean Valued
When a number of measurements of a quantity are made and the measurements are not all
exactly equal, the best approximation to the actual value is found by calculating the average
COMSATS Institute of Information Technology
Page 30
Lab # 2 Measurement of different electrical quantities by multi-meter and error calculation
value, or arithmetic mean, of the results. For n measured values of x1, x2, x3,… xn the
arithmetic mean is

x
x1  x2  x3 ......xn
n
Determining the arithmetic mean of several measurements is one method of minimizing the
effects of random errors. Random errors are the result of chance or accidental occurrences.
2. Deviation
The difference between anyone measured value and the arithmetic mean of a series of
measurements is termed the deviation. The average deviation may be calculated as the
average of the absolute values of the deviations
D
d1  d 2  d3  ......  d n
n
3. Standard Deviation
The mean-squared value of the deviations can also be calculated by first squaring each
deviation value before determining the average. This gives a quantity known as the variance.
Taking the square root of the variance produces the root mean squared (rms) value, also
termed the standard deviation (  ).
d12  d 2 2  d32  ......  d n 2

n
Resistance: It is the opposition to the flow of current, and is denoted by R. The actual value
of resistance is mentioned on the resistor body in the form of color coding. The Ohm Range
of DMM through selector switch is selected for the measurement of the Resistance value.
Pre Lab Task(s)
Answer the following questions:
1. What is a DMM?
2. Give setup of DMM if you must measure WAPDA supply voltage. Explain how
various leads must be connected, ranges selected, and all other precautions.
3. How will you express errors in measurements taken in this lab?
COMSATS Institute of Information Technology
Page 31
Lab # 2 Measurement of different electrical quantities by multi-meter and error calculation
In-Lab Task(s)
Precautions
1. Since you will be working at supply voltage, vigilance is a MUST.
2. Make sure that the red test lead of the DMM is connected in VΩmA terminal and the
black test lead is connected in COM terminal.
3. When measuring AC voltage, make sure you have selected 500V from the AC range
(not DC range). This is a common mistake and must be avoided to ensure safety of
personnel and instrument.
4. Do not connect the current range of DMM in parallel with supply.
5. Turn OFF the multi-meter when done taking readings.
In-Lab Tasks
Task-1
Procedure
1. Check that the DMM is working properly, and that the battery of the DMM is not low.
2. Move the selector switch to AC Voltage range of 500V.
3. To measure voltage, put the leads into the phase and neutral of the supply. The DMM
will display the measured value of voltage.
4. To measure the resistance, move the selector range into Ohm zone and connect probes
with the resistor terminal, which will give the measured value of the Resistor.
5. The actual value of AC voltage in Pakistan is 230V + 5% at 50Hz. The actual value of
resistance may be found by reading the color code.
6. Calculate the error and percentage error.
7. Explain the possible causes of these errors in conclusion of your post lab report.
Task -2
1. Create simple series circuit for calculation of the sum of the errors.
2. Calculate the maximum percentage error in the sum of two voltage measurements when
R1= 100 Ω and R2 = 50 Ω using this circuit
COMSATS Institute of Information Technology
Page 32
Lab # 2 Measurement of different electrical quantities by multi-meter and error calculation
3. Create the circuit given below in figure,
4. Calculate the maximum percentage error in the difference of two measured voltages when
R1 = 100Ω and R2 100
5. An 820 Ω resistance with an accuracy of ±10% carries a current of 10 mA. The current was
measured by an analog ammeter on a 25 mA range with an accuracy of ±2% of full scale.
Calculate the power dissipated in the resistor, and determine the accuracy of the result.
6. Use the five DMM voltmeter to determine the average measured voltage and the average
deviation. Use series circuit of part 1.
Observations and Calculations
Actual value of AC voltage = ______________ V
Measured value of AC voltage = ______________ V
COMSATS Institute of Information Technology
Page 33
Lab # 2 Measurement of different electrical quantities by multi-meter and error calculation
Actual value of resistance = ____________ Ω
Measured value of resistance = ____________ Ω
Error in AC voltage reading = _____________ V
Error in resistance reading = _____________ Ω
Percentage error in AC voltage reading = __________ %
Percentage error in resistance reading = __________ %
COMSATS Institute of Information Technology
Page 34
Lab # 2 Measurement of different electrical quantities by multi-meter and error calculation
Post-Lab Task(s)
Write a report about tasks performed in this lab discussing their significance and suggesting
improvements which can be made in them to better accomplish lab objectives. Present all
the data which you have collected in lab in tabulated form. Marks will be awarded based
on presentation of data in a form which is concise, clearly readable and easily
understandable. After performing necessary calculations, analyze the results plus data and
fill out the “critical analysis/conclusion” section in your manuals.
Notes:
1. Your reports must have pre-lab tasks attached after front page followed by all pages of
performed lab from laboratory manual, your written report and finally the filled-out
“critical analysis/conclusion” page.
2. The “critical analysis/conclusion” page needs to be attached only once as last page of
your report.
3. Copied reports will receive zero marks.
4. It is the responsibility of the student to ensure that his/her report is not copied (not even
by his/her friends). In case of copy, the first version will receive marks while all
subsequent copies shall stand rejected (receive zero marks).
5. Reports must be printed unless otherwise stated.
6. Graphs must be drawn by hand on proper graph papers if need be without using any
software and attached in manual in their place.
COMSATS Institute of Information Technology
Page 35
Lab # 2 Measurement of different electrical quantities by multi-meter and error calculation
Critical Analysis / Conclusion
COMSATS Institute of Information Technology
Page 36
Lab # 2 Measurement of different electrical quantities by multi-meter and error calculation
Performance
Viva
(10 Marks)
(5 Marks )
Total/15
Performance
/6
Results
/3
Critical Analysis
/1
Comments
COMSATS Institute of Information Technology
Page 37
Lab # 3 Measurement of unknown inductance and capacitance by three voltmeter method
Lab # 3: Measurement of unknown inductance
and capacitance by three voltmeter method
Objectives
•
•
To learn to use three voltmeters to find the value of unknown inductance and capacitance
To calculate the value of unknown inductance and capacitance via application of phasor
mathematics
Theory (Unknown Inductance)
Circuit Diagram
Figure 3.1
On analyzing the circuit in Figure 3.1, it is observed that the two elements, i.e., resistor and
inductor, are connected in series which implies that the same amount of current is passing
through each element. The voltage drop in the inductor (V3) lags the supply current
whereas voltage drop in the resistor (V2) is in phase with the supply current. Moreover, we
know that the sum of voltage drops in the loop must be equal to the supply voltage
(Kirchhoff Voltage Law). Therefore, the phasor representation of the circuit in question
can be shown in Figure 3.2 as:
COMSATS Institute of Information Technology
Page 38
Lab # 3 Measurement of unknown inductance and capacitance by three voltmeter method
Figure 3.2
Note that the phase of the inductor voltage is not at 90o w.r.t supply voltage because the
inductor in question is not an ideal one (it has some stray resistance). The mathematical
derivation is now shown.
By applying Pythagorean Theorem:
The voltage across the resistor, measured by the voltmeter is given by:
V2 = IR
𝑉2
𝐼=
𝑅
Whereas the voltage across the inductor, measured by the second voltmeter is given by:
V3 = IZ
𝑉3
𝑍=
𝐼
and,
COMSATS Institute of Information Technology
Page 39
Lab # 3 Measurement of unknown inductance and capacitance by three voltmeter method
Theory (Unknown Capacitance)
Circuit Diagram
Figure 3.3
On analyzing the circuit in Figure 3.3, it is observed that the two elements, i.e., resistor and
capacitance, are connected in series which implies that the same amount of current is
passing through each element. The voltage drop in the capacitor lags the supply current
whereas the voltage drop in the resistor is in phase with the supply current. Moreover, we
know that, the sum of voltage drops in the loop must be equal to the supply voltage (KVL).
Therefore, the phasor representation of the circuit in question can be shown in the following
diagram as:
Figure 3.4
COMSATS Institute of Information Technology
Page 40
Lab # 3 Measurement of unknown inductance and capacitance by three voltmeter method
Note that the phasor of the capacitor voltage is not at 90o with respect to the supply voltage
because the capacitor in question is not an ideal one (it has some stray resistance). The
mathematical derivation is now shown.
By applying Pythagorean Theorem:
The voltage across the resistor, measured by the voltmeter is given by:
V2 = IR
𝑉2
𝐼=
𝑅
Whereas that across the capacitor is measured by the second voltmeter as:
V3 = IZ
𝑉3
𝑍=
𝐼
Pre Lab Task(s)
What do you understand by Kirchhoff Voltage Law (KVL)? Write a small description.
COMSATS Institute of Information Technology
Page 41
Lab # 3 Measurement of unknown inductance and capacitance by three voltmeter method
In-Lab Task(s)
Procedure (for Unknown Inductance)
1.
2.
3.
4.
Make the circuit according to Figure 3.1, with the value of resistance known.
Connect the voltmeters as shown in Figure 3.1.
Note down the readings of each voltmeter and record them in the table below.
Take at least three readings with different resistors, keeping the unknown inductance
same.
5. Calculate the value of phase angle, current, and unknown inductance for each iteration
and take the average of the inductance values. This is the value of unknown inductance.
Observations and Calculations
Sr. Resistor
#
(Ω)
V1
V2
V3
(V)
(V)
(V)
Phase
(∅)
I
Z
L
(A)
(Ω)
(H)
Average value of the unknown inductance = ____________ H.
Procedure (for Unknown Capacitance)
1.
2.
3.
4.
Make the circuit according to Figure 3.3, with the value of resistance known.
Connect the voltmeters as shown in Figure 3.3.
Note down the readings of each voltmeter and record them in the table.
Take at least three readings with different resistors keeping the unknown capacitance
same.
5. Calculate the value of the phase angle, current, and unknown capacitance for each
iteration and take the average of capacitance values. This is the value of the unknown
capacitance.
COMSATS Institute of Information Technology
Page 42
Lab # 3 Measurement of unknown inductance and capacitance by three voltmeter method
Observations and Calculations
Sr. Resistor
#
(Ω)
V1
V2
V3
(V)
(V)
(V)
∅
I
Z
C
(A)
(Ω)
(F)
1
2
3
Average value of unknown capacitance = ____________ F
COMSATS Institute of Information Technology
Page 43
Lab # 3 Measurement of unknown inductance and capacitance by three voltmeter method
Critical Analysis / Conclusion
COMSATS Institute of Information Technology
Page 44
Lab # 3 Measurement of unknown inductance and capacitance by three voltmeter method
Post-Lab Task(s)
1.Write a one-page note on the phenomenon of inductance and capacitance.
2. What effect does a capacitor and inductor have on the resistance? Compare and
comment on both.
COMSATS Institute of Information Technology
Page 45
Lab # 3 Measurement of unknown inductance and capacitance by three voltmeter method
COMSATS Institute of Information Technology
Page 46
Lab # 3 Measurement of unknown inductance and capacitance by three voltmeter method
Performance
Viva
(10 Marks)
(5 Marks )
Total/15
Performance
/6
Results
/3
Critical Analysis
/1
Comments
COMSATS Institute of Information Technology
Page 47
Lab # 4 Measurement of single phase power by (a) three voltmeters (b) three ammeters method
Lab # 4 Measurement of single phase power
different methods
Objective
To measure single phase power by three voltmeters method
To measure single phase power by three ammeters method
Pre Lab
Circuit Diagram
COMSATS Institute of Information Technology
Page 48
Lab # 4 Measurement of single phase power by (a) three voltmeters (b) three ammeters method
On analyzing the given circuit in Figure 4.1 (three voltmeters method), it is observed that the
two elements, resistor and inductor, are connected in series which implies that same amount
of current is passing through each element. The voltage drop in the inductor leads the supply
current whereas voltage drop in the resistor is in phase with the supply current. Moreover, we
know that, the sum of voltage drops in the loop must be equal to the supply voltage (KVL).
Therefore, the phasor representation of the circuit in question can be shown in the following
diagram as:
COMSATS Institute of Information Technology
Page 49
Lab # 4 Measurement of single phase power by (a) three voltmeters (b) three ammeters method
Note that the phasor of inductor voltage is not at 90o w.r.t supply voltage because the inductor
in question is not an ideal one (it has some stray resistance). The mathematical derivation is
now shown.
By applying Pythagorean Theorem:
Now voltage across resistor measured by voltmeter is given by:
V2 = IR -------------------- eq (2)
Putting equation (2) in equation (1):
COMSATS Institute of Information Technology
Page 50
Lab # 4 Measurement of single phase power by (a) three voltmeters (b) three ammeters method
On analyzing the given circuit in Figure 4.2 (three ammeters method), it is observed that
there are two paths available to the flowing current. This means that the current is divided
among two branches one of which is purely resistive and the other is inductive. The current
passing through resistive branch is in phase with supply current whereas that passing through
inductive branch lags the supply current by some angle which is less than 90o. Moreover, we
know that, the sum of currents leaving a node must equal the current entering the node
(KCL). Therefore, the phasor representation of the circuit in question can be shown in the
following diagram as:
Note that the phasor of inductive current is not at 90o w.r.t supply current. This is because the
inductor in question is not an ideal one (it has some stray resistance). The mathematical
derivation is now shown.
By applying Pythagorean Theorem:
COMSATS Institute of Information Technology
Page 51
Lab # 4 Measurement of single phase power by (a) three voltmeters (b) three ammeters method
Now, 𝐼2=𝑉2/𝑅
Put value of I2 in eq (1), we get,
But real power across any load is given by
COMSATS Institute of Information Technology
Page 52
Lab # 4 Measurement of single phase power by (a) three voltmeters (b) three ammeters method
Pre-Lab Task(s)
What do you understand by Kirchhoff Current Law (KCL)? Write a small description. Attach
an extra A4 paper if needed (No copying from others).
In-Lab
Procedure
1. Make the circuit as shown in Figure 4.1 with the known value of Resistance.
2. Connect the voltmeters as shown in Figure 4.1.
3. Note down the reading of each voltmeter and record in observation table 4.1.
4. Take at least three reading with different resistors keeping the load same.
5. Now, make the circuit as shown in Figure 4.2 with the known value of Resistance.
6. Connect the ammeters as shown in Figure 4.2.
7. Note down the reading of each ammeter and record in the observation table 4.2.
8. Take at least three reading with different resistors keeping the load same.
9. Calculate the value of real power for each iteration and take the average of these values.
This is the value of real power across load.
Observations and Calculations
Average value of real power across load via three voltmeters method = ____________W.
COMSATS Institute of Information Technology
Page 53
Lab # 4 Measurement of single phase power by (a) three voltmeters (b) three ammeters method
Average value of real power across load via three ammeters method = ____________ W.
COMSATS Institute of Information Technology
Page 54
Lab # 4 Measurement of single phase power by (a) three voltmeters (b) three ammeters method
Critical Analysis / Conclusion
COMSATS Institute of Information Technology
Page 55
Lab # 4 Measurement of single phase power by (a) three voltmeters (b) three ammeters method
Post Lab
1. From Figure 4.1: V1 = V2 + V3. Is it true? Explain and justify your answer.
2. From Figure 4.2: A1 = A2 + A3. Is it true? Explain and justify your answer.
COMSATS Institute of Information Technology
Page 56
Lab # 4 Measurement of single phase power by (a) three voltmeters (b) three ammeters method
COMSATS Institute of Information Technology
Page 57
Lab # 4 Measurement of single phase power by (a) three voltmeters (b) three ammeters method
Performance
Viva
(10 Marks)
(5 Marks )
Total/15
Performance
/6
Results
/3
Critical Analysis
/1
Comments
COMSATS Institute of Information Technology
Page 58
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab # 5: Virtual Instrumentation (VI) using
LabVIEW: Creating a VI from scratch
Objectives
•
•
To learn to customize a VI.
To learn to create a VI from a blank file.
Pre-Lab
Description of Equipment
You can choose one of many LabVIEW template VIs to use as a starting point when
building VIs. However, sometimes you need to build a VI for which a template is not
available. This lab teaches you how to build and customize a VI without using a template.
In the following exercises, you will open a blank VI and add structures and Express VIs to
the block diagram to build a new VI. You will build a VI that generates a signal, reduces
the number of samples in the signal, and displays the resulting data in a table on the front
panel. After you complete the exercises, the front panel of the VI will look similar to the
front panel in Figure 8.1.
Figure 8.1
COMSATS Institute of Information Technology
Page 59
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Pre-Lab Task(s)
LabVIEW uses a slightly different approach to programming than other programming
languages. Study, understand and write a short note on that approach
(Hint:www.google.com).
In-Lab Task(s)
Opening a blank VI
If no template is available for the VI you want to build, you can start with a blank VI and
add Express VIs to accomplish a specific task.
Complete the following steps to open a blank VI.
1. In the Getting Started window, click the Blank VI link in the New section or press the
<Ctrl-N> keys to open a blank VI. A blank front panel window and block diagram
window appear.
Note: You can also open a blank VI by selecting File » New VI or by selecting File »
New and selecting Blank VI from the Create New list.
2. If the Functions palette is not visible, right-click any blank space on the block diagram
to display a temporary version of the Functions palette. Click the thumbtack
, in
the upper left corner of the Functions palette to pin the palette so it is no longer
temporary.
Adding an Express VI that Simulates a Signal
Complete the following steps to find the Express VI you want to use and add it to the block
diagram.
1. Select Help » Show Context Help from the front panel window or block diagram
window to display the Context Help window, shown in the figure below. You can also
click the Show Context Help Window button
toolbar to display the Context Help window.
COMSATS Institute of Information Technology
, on the front panel or block diagram
Page 60
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Figure 8.2
2.
3.
4.
5.
6.
7.
8.
9.
Tip: You also can press the <Ctrl-H> key to display the Context Help window.
On the Functions palette, select the Express » Input palette and move the cursor over
one of the Express VIs on the Input palette.
When you move the cursor over a VI, the Context Help window displays information
about that VI.
Use the information that appears in the Context Help window to find the Express VI
that can simulate a sine wave signal.
Keep the Context Help window open. The context help provides useful information as
you complete the rest of this exercise.
Select the Express VI and place it on the block diagram. The Configure Simulate Signal
dialog box appears.
Move the cursor over the various options in the Configure Simulate Signal dialog box,
such as Frequency (Hz) and Amplitude. Read the information that appears in the
Context Help window.
Configure the Simulate Signal Express VI to generate a sine wave with a frequency of
10.7 and amplitude of 2.
The signal in the Result Preview window changes to reflect the configured sine wave.
Click the OK button to save the current configuration and close the Configure Simulate
Signal dialog box.
Move the cursor over the Simulate Signal Express VI and read the information that
appears in the Context Help window.
Notice that the Context Help window displays information about how you configured
the Simulate Signal Express VI in addition to the standard context help description.
Save the VI as Reduce Samples.vi in an easily accessible location.
Searching the Help and Modifying the Signal
Complete the following steps to use the LabVIEW Help to search for the Express VI that
reduces the number of samples in a signal.
1. Move the cursor over the Simulate Signal Express VI and click the Detailed help link
in the Context Help window to display the Simulate Signal topic in the LabVIEWHelp.
COMSATS Institute of Information Technology
Page 61
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
2.
3.
4.
5.
6.
7.
8.
9.
You might have to enlarge or scroll down in the Context Help window to see the
Detailed help link.
You also can access the LabVIEW Help by right-clicking a VI or function on the block
diagram or on a pinned palette and selecting Help from the shortcut menu or by
selecting Help » Search the LabVIEW Help.
Click the Search tab, enter sample compression in the Type in the word(s) to search for
text box, and press the <Enter> key. You can place quotation marks around the phrase
to search for the exact phrase.
For example, you can enter "sample compression" to narrow the search results.
This word choice reflects what you want this Express VI to do—compress, or reduce,
the number of samples in a signal.
Double-click the Sample Compression topic in the search results to display the topic
that describes the Sample Compression Express VI.
After you read the description of the Express VI, click the Place on the block diagram
button to place the Express VI on the cursor.
Move the cursor to the block diagram.
Place the Sample Compression Express VI on the block diagram to the right of the
Simulate Signal Express VI.
Configure the Sample Compression Express VI to reduce the signal by a factor of 25
using the mean of these values.
Click the OK button to save the current configuration and close the Configure Sample
Compression dialog box.
Use the Wiring tool to wire the Sine output of the Simulate Signal Express VI to the
Signals input of the Sample Compression Express VI.
Customizing a User Interface (UI) from the Block Diagram
In the previous exercises, you added controls and indicators to the front panel using the
Controls palette. You also can create controls and indicators from the block diagram.
Complete the following steps to create controls and indicators from the block diagram.
1. On the block diagram, right-click the Mean output of the Sample Compression Express
VI and select Create » Numeric Indicator from the shortcut menu to create a numeric
indicator. A Mean indicator
, appears on the block diagram.
2. Right-click the Mean output of the Sample Compression Express VI and select Insert
Input/ Output from the shortcut menu to insert the Enable input.
In a previous exercise you learned to add inputs and outputs by expanding the Express VI
using the down arrows. Using the shortcut menu is a different way of displaying and
selecting the inputs and outputs of an Express VI.
COMSATS Institute of Information Technology
Page 62
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
3. Right-click the Enable input and select Create » Control from the shortcut menu to
create a switch. A Boolean control
, appears on the block diagram.
Control terminals have a thicker border than indicator terminals. Also, an arrow appears
on the right of the terminal if the terminal is a control, and an arrow appears on the left of
the terminal if the terminal is an indicator.
4. Right-click the wire that connects the Sine output of the Simulate Signal Express VI to
the Signals input of the Sample Compression Express VI and select Create » Graph
Indicator from the shortcut menu.
5. Use the Wiring tool to wire the Mean output of the Sample Compression Express VI to
the Sine graph indicator.
The Merge Signals function appears.
6. Arrange the objects on the block diagram so they appear similar to Figure 8.3.
Figure 8.3
7. Display the front panel.
The controls and indicators you added appear on the front panel with labels that correspond
to the inputs and outputs from which you created the controls and indicators.
Note: You might need to scroll or resize the front panel to see all controls and indicators.
8. Arrange the controls and indicators as shown in Figure 8.4.
Figure 8.4
COMSATS Institute of Information Technology
Page 63
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
9. Save the VI.
Configuring a VI to Run Continuously until the User Stops It
In the current state, the VI runs once, generates one signal, and then stops running. To run
the VI until a condition occurs, you can use a While Loop.
Complete the following steps to add a While Loop to the block diagram.
1. Display the front panel and run the VI.
The VI runs once and then stops. The front panel does not have a stop button.
2. Display the block diagram.
3. Click the Search button
, on the Functions palette, and enter While in the text
box. LabVIEW searches as you type and displays any matches in the search results text
box. LabVIEW displays a folder glyph to the left of subpalettes in the search results
and displays a light blue glyph to the left of Express VIs in the search results.
4. Double-click While Loop <<Execution Control>> to display the Execution Control
subpalette and temporarily highlight the While Loop on the subpalette.
5. Select the While Loop on the Execution Control palette.
6. Move the cursor to the upper left corner of the block diagram. Click and drag the cursor
diagonally to enclose all the Express VIs and wires, as shown in Figure 8.5.
Figure 8.5
7. Click to create the While Loop around the Express VIs and wires. The While Loop,
shown below, appears with a STOP button wired to the conditional terminal. This
While Loop is configured to stop when the user clicks the STOP button.
8. Display the front panel and run the VI.
COMSATS Institute of Information Technology
Page 64
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
The VI now runs until you click the STOP button. A While Loop executes the VIs and
functions inside the loop until the user clicks the STOP button.
9. Click the STOP button and save the VI.
Using the Error List Window
If a VI contains an indicator you do not want to use, you can delete it.
Complete the following steps to remove the Mean indicator from the front panel.
1. On the front panel, move the cursor over the Mean indicator until the Positioning tool
appears.
2. Click the Mean indicator
3. Display the block diagram.
, to select it and press the <Delete> key.
A wire appears as a dashed black line with a red X in the middle
. The
dashed black line is a broken wire. The Run button appears broken to indicate the VI
cannot run.
4. Click the broken Run button to display the Error list window.
The Error list window lists all errors in the VI and provides details about each error.
You can use the Error list window to locate errors.
5. In the errors and warnings list, select the Wire: has loose ends error and click the Help
button to display more information about the error.
Tip: You also can move the Wiring tool over a broken wire to display a tip strip that
describes why the wire is broken. This information also appears in the Context Help
window when you move the Wiring tool over a broken wire.
6. In the errors and warnings list, double-click the Wire: has loose ends error to highlight
the broken wire.
7. Press the <Ctrl-B> key to delete the broken wire.
Pressing the <Ctrl-B> key deletes all broken wires on the block diagram. You can press
the <Delete> key to delete only the selected wire.
8. Select View » Error List to display the Error list window. No errors appear in the errors
and warnings field.
Tip: You also can press the <Ctrl-L> keys to display the Error list window.
9. Click the Close button to close the Error list window.
The Run button no longer appears broken.
Controlling the speed of execution
To plot the points on the waveform graph more slowly, you can add a time delay to the
block diagram.
COMSATS Institute of Information Technology
Page 65
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Complete the following steps to control the speed at which the VI runs.
1. On the block diagram, search for the Time Delay Express VI on the Functions palette
and place it inside the While Loop.
You can use the Time Delay Express VI to control the execution rate of the VI.
2. Enter 0.25 in the Time delay (seconds) text box.
This time delay specifies how fast the loop runs. With a 0.25 second time delay, the
loop iterates once every quarter of a second.
3. Click the OK button to save the current configuration and close the Configure Time
Delay dialog box.
4. Display the front panel and run the VI.
5. Click the Enable switch and examine the change on the graph.
If the Enable switch is on, the graph displays the reduced signal. If the Enable switch
is off, the graph does not display the reduced signal.
6. Click the STOP button to stop the VI.
Using a Table to Display Data
Complete the following steps to display a collection of mean values in a table on the front
panel.
1. On the front panel, search for the Express Table indicator on the Controls palette and
place it on the front panel to the right of the waveform graph.
2. Display the block diagram.
LabVIEW wired the Table terminal to the Build Table Express VI.
3. If the Build Table Express VI and the Table terminal are not selected already, click an
open area on the block diagram to the left of the Build Table Express VI and the Table
terminal. Drag the cursor diagonally until the selection rectangle encloses the Build
Table Express VI and the Table terminal, shown below.
A moving dashed outline, called a marquee, highlights the Build Table Express VI, the
Table terminal, and the wire joining the two.
4. Drag the objects into the While Loop to the right of the Sample Compression Express
VI.
If you drag objects near the border of the While Loop, the loop resizes to enclose the
Build Table Express VI and the Table terminal.
When you place an object in a While Loop near the border, the loop resizes to add
space for that object.
COMSATS Institute of Information Technology
Page 66
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
5. Use the Wiring tool to wire the Mean output of the Sample Compression Express VI to
the Signals input of the Build Table Express VI.
The block diagram should appear similar to Figure 8.6.
Figure 8.6
6. Display the front panel and run the VI.
7. Click the Enable switch.
If the Enable switch is on, the table displays the mean values of every 25 samples of
the sine wave. If the Enable switch is off, the table does not record the mean values.
8. Stop the VI.
9. Experiment with properties of the table by using the Table Properties dialog box. For
example, try changing the number of columns to one.
10. Save and close the VI.
Searching for Examples
To learn more about how you can use a certain VI, you can search for and view an example
that uses the VI.
Complete the following steps to find and open an example that uses the Time Delay
Express VI.
1. Select Help » Search the LabVIEW Help to display the LabVIEW Help.
2. Click the Search tab, enter "time delay" in the Type in the word(s) to search for text
box, and press the <Enter> key.
Tip: Before you search, you can narrow the search results by placing a checkmark in
the Search titles only checkbox near the bottom of the help window. You also can use
COMSATS Institute of Information Technology
Page 67
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
operators such as AND, OR, and NEAR in the Type in the word(s) to search for text
box to narrow the search results. Refer to the Using Help book on the Contents tab in
the LabVIEW Help for more information about searching help.
3. Click the Location column header to sort the search results by content type. Reference
topics contain reference information about LabVIEW objects such as VIs, functions,
palettes, menus, and tools. How-To topics contain step-by-step instructions for using
LabVIEW. Concept topics contain information about LabVIEW programming
concepts.
4. Double-click the Time Delay search result to display the reference topic that describes
the Time Delay Express VI.
5. After you read the description of the Express VI, click the Open example button in the
Example section near the bottom of the topic to open an example that uses the Time
Delay Express VI.
6. Click the Browse related examples button to open the NI Example Finder and display
a list of examples similar to the example that uses this VI. The NI Example Finder
searches among hundreds of examples, including all installed examples and the
examples locatedon the NI Developer Zone at www.ni.com/zone. You can modify an
example to fit an application, or you can copy and paste from one or more examples
into a VI that you create.
You also can right-click a VI or function on the block diagram or on a pinned palette
and select Examples from the shortcut menu to display a help topic with links to
examples for that VI or function. To launch the NI Example Finder and browse or
search examples, select Help » Find Examples or click the Find Examples link in the
Examples section of the Getting Started window.
After you experiment with the NI Example Finder and the example VIs, close the NI
Example Finder.
References
Texas Instruments LabVIEW Manual, Chapter 2
COMSATS Institute of Information Technology
Page 68
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Critical Analysis / Conclusion
Post-Lab Task(s)
Prepare a clear and concise report pertaining to the tasks performed in this lab. Show all
the results obtained from simulations. The report MUST be in your own words otherwise
it will be rejected.
COMSATS Institute of Information Technology
Page 69
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 70
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Performance
Viva
(10 Marks)
(5 Marks )
Total/15
Performance
/6
Results
/3
Critical Analysis
/1
Comments
COMSATS Institute of Information Technology
Page 71
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab # 6: Introduction to LabVIEW: Getting
started with LabVIEW Virtual Instruments
Objectives
•
•
To get acquainted with the LabVIEW software.
To learn to create VIs in LabVIEW.
Pre-Lab
Theory
LabVIEW programs are called Virtual Instruments, or VIs, because their appearance and
operation imitate physical instruments, such as oscilloscopes and multimeters. LabVIEW
contains a comprehensive set of tools for acquiring, analyzing, displaying, and storing data,
as well as tools to help one troubleshoot the code that he/she writes. In LabVIEW, one can
build a user interface (UI), or front panel, with controls and indicators. Controls are knobs,
push buttons, dials, and other input mechanisms. Indicators are graphs, LEDs, and other
output displays. After one builds the UI, code can be added using VIs and structures to
control the front panel objects (the block diagram contains this code).
LabVIEW can be used to communicate with the hardware, such as data acquisition, vision,
and motion control devices, as well as GPIB, PXI, VXI, RS232, and RS485 instruments.
Pre-Lab Task(s)
Get familiar with LabVIEW. Learn the basics (you will get graded in the end of the lab
session (see lab assessment criteria in the end)):
http://www.ni.com/getting-started/labview-basics/environment
http://www.ni.com/academic/students/learn-labview/
http://www.learnni.com/getting-started/Home/Index/
In-Lab Task(s)
Building a Virtual Instrument (VI)
In the following exercises, you will build a VI that generates a signal and displays it in a
graph. After the completion of the exercises, the front panel of the VI will look similar to
COMSATS Institute of Information Technology
Page 72
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
the front panel in Figure 7.1, which shows a VI acquiring the voltage and current signal
and displaying it on the computer.
Figure 7.1
Launching LabVIEW
The Getting Started window, shown in Figure 7.2, appears when youlaunch LabVIEW.
Use this window to create new VIs, select among themost recently opened LabVIEW files,
find examples, and launch theLabVIEW Help. You also can access information and
resources to help youlearn about LabVIEW, such as specific manuals, help topics, and
resourceson the National Instruments website (www.ni.com).
COMSATS Institute of Information Technology
Page 73
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Figure 7.2
Opening a New VI from Template Vis
LabVIEW provides built-in template VIs that include sub-VIs, functions, structures, and
front panel objects you need to start building common measurement applications.
Complete the following steps to create a VI that generates a signal and displays it on the
front panel.
10. Launch LabVIEW.
11. In the Getting Started window, click the New, or VI from Template link to display the
‘New dialog box.
12. From the Create New list, select VI » From Template » Tutorial (Getting Started) »
Generate and Display. This template VI generates and displays a signal.
A preview and brief description of the template VI appear in the description section in the
right pane. Figure 7.3 shows the ‘New dialog box’ and the preview of the Generate and
Display template VI.
COMSATS Institute of Information Technology
Page 74
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Figure 7.3
13. Click the OK button to create a VI from the template. You canalsodouble-click the
name of the template VI in the Create New list tocreate a VI from a template.
LabVIEW displays two windows: the front panel window and the block diagram
window.
14. Examine the front panel window.
The UI, or front panel, appears with a grey background andincludes controls and
indicators. The title bar of the front panelindicates that this window is the front panel
for the Generate andDisplay VI.
Note:If the front panel is not visible, you can display the front panel by selectingWindow
» Show Front Panel. You can also switch between the front panel window andblock
diagram window at any time by pressing the <Ctrl-E> key.
15. Select Window» Show Block Diagram. Examine the blockdiagram of the VI.
The block diagram appears with a white background and includes VIsand structures
that control the front panel objects. The title bar of theblock diagram indicates that this
window is the block diagram for theGenerate and Display VI.
16. On the front panel toolbar, click the Run
the <Ctrl-R> key to run a VI.
COMSATS Institute of Information Technology
button, shown at left. You can also press
Page 75
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
A sine wave appears on a graph in the front panel.
17. Stop the VI by clicking the STOP
button, shown at left, on the frontpanel.
Adding a Control to the Front Panel
The controls on the front panel simulate the input mechanisms on a physicalinstrument and
supply data to the block diagram of the VI. Many physicalinstruments have knobs you can
turn to change an input value.
Complete the following steps to add a knob control to the front panel:
Tip: Throughout these exercises, you can undo recent edits by selecting Edit»Undo
orpressing the <Ctrl-Z> keys.
10. If the Controls palette, shown in Figure 7.4 on the next page, is not visible on the front
panel, then go toView » Controls Palette.
11. If you are a new LabVIEW user, the Controls palette opens with the Express subpalette
visible by default. If you do not see the Express subpalette, click Express on the
Controls palette to display the Express subpalette.
Figure 7.4
12. Move the cursor over the icons on the Express subpalette to locate the Numeric
Controls palette.
When you move the cursor over the icons on the Controls palette, the name of the
subpalette, control, or indicator appears in a tip strip below the icon.
13. Click the Numeric Controls icon to display the Numeric Controls palette.
14. Click the knob control on the Numeric Controls palette. This will givecontrol to the
cursor, using which you can place the knob on the front panel to the left of the
waveform graph.
Note: You will use this knob in a later exercise to control the amplitude of asignal.
15. Select File » Save As and save the VI as Acquiring a Signal.vi in an easily accessible
location.
COMSATS Institute of Information Technology
Page 76
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Changing the Signal Type
The block diagram has a blue icon labelled Simulate Signal. This iconrepresents the
Simulate Signal Express VI. The Simulate Signal Express VIsimulates a sine wave by
default.
Figure 7.5
Complete the following steps to change this signal to a sawtooth wave.
1. Display the block diagram by pressing the <Ctrl-E> key or by clicking the block
diagram.
Locate the Simulate Signal Express VI, shown at the left. An Express VI is a component
of the block diagram that you can configure to perform common measurement tasks.
The Simulate Signal Express VI simulates a signal based on the configuration that you
specify.
2. Right-click the Simulate Signal Express VI, and select Properties from the shortcut
menu to display the Configure Simulate Signal dialog box.
You also can double-click the Express VI to display the Configure Simulate Signal
dialog box. If you wire data to an Express VI and run it, the Express VI displays real
data in the configuration dialog box. If you close and reopen the Express VI, the VI
displays sample data in the Configuration Dialog Box until you run the VI again.
3. Select Sawtooth from the Signal type pull-down menu.
The waveform on the graph in the Result Preview section changes to a sawtooth wave.
The Configure Simulate Signal dialog box should appear similar to the Figure 7.6.
COMSATS Institute of Information Technology
Page 77
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Figure 7.6
4. Click the OK button to save the current configuration and close the Configure Simulate
Signal dialog box.
5. Move the cursor over the down arrows at the bottom of the Simulate Signal Express
VI. The down arrows indicate you can reveal hidden inputs and outputs by extending
the border of the Express VI.
6. When a double-headed arrow appears, click and drag the border of the Express VI to
add two rows. When you release the border, the Amplitude input appears.
Figure 7.7
COMSATS Institute of Information Technology
Page 78
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
7. Once the Amplitude input appears on the block diagram, you can configure the
amplitude of the sawtooth wave.
8. In Figure 7.7, notice that Amplitude is an option in the Configure Simulate Signal
dialog box. When inputs, such as amplitude, appear on the block diagram and in the
configuration dialog box, you can configure the inputs in either location.
Wiring Objects on the Block Diagram
To use the Knob to change the amplitude of the signal, you must connecttwo objects on
the block diagram.
Complete the following steps to wire the knob to the amplitude input ofthe Simulate Signal
Express VI.
1. On the block diagram, move the cursor over the Knob
terminal.
The cursor becomes an arrow
, or a Positioning tool. Use the Positioning tool to
select, position, and resize objects.
2. Use the Positioning tool to select the Knob terminal and make sure it is to the left of
the Simulate Signal Express VI and inside the grey loop (shown below).
The terminals inside the loop are representations of front panelcontrols and indicators.
Terminals are entry and exit ports thatexchange information between the front panel
and block diagram.
3. Deselect the Knob terminal by clicking a blank space on the block diagram. If you want
to use a different tool with an object, you must deselect the object to switch the tool.
4. Move the cursor over the arrow on the Knob
terminal.
The cursor becomes a Wire spool, or the Wiring tool . Usethe Wiring tool to wire
objects together on the block diagram.
5. When the Wiring tool appears, click the arrow on the Knob terminal and then click the
arrow on the amplitude input of the Simulate Signal Express VI, shown below, to wire
the two objects together.
COMSATS Institute of Information Technology
Page 79
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Figure 7.8
A wire appears and connects the two objects. Data flows along this wire from the Knob
terminal to the Express VI.
6. SelectFile » Save to save the VI.
Running a VI
Running a VI executes the solution.
Complete the following steps to run the Acquiring a Signal VI.
1. Display the front panel by pressing the <Ctrl-E> key or by clicking the front panel.
2. Click the Run button or press the <Ctrl-R> key to run the VI.
3. Move the cursor over the knob.
The cursor becomes a hand , or the Operating tool. Use the Operating tool to change
the value of a control.
4. Using the Operating tool, turn the knob to adjust the amplitude of the sawtooth wave.
The amplitude of the sawtooth wave changes as you turn the knob. As you change the
amplitude, the Operating tool displays a tip strip that indicates the numeric value of the
knob. The y-axis on the graph scales automatically to account for the change in
amplitude.
To indicate that the VI is running, the Run button changes to a darkened arrow.
You
can change the value of mostcontrols while a VI runs, but you cannot edit the VI in
other ways whilethe VI runs.
5. Click the STOP
button, shown at left, to stop the VI.
6. The STOP button stops the VI after the VI completes the current iteration.
The Abort Execution button
, stops the VI immediately, before the VI finishes the
current iteration. Aborting a VI that uses external resources, such as external hardware,
might leave the resources in an unknown state by not resetting or releasing them properly.
Design the VIs you create with a stop button to avoid this problem.
COMSATS Institute of Information Technology
Page 80
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Modifying a Signal
Complete the following steps to scale the signal by 10 and display theresults in the graph
on the front panel.
1. On the block diagram, use the Positioning tool to double-click the wire that connects
the Simulate Signal Express VI to the Waveform Graph terminal shown below.
Figure 7.9
2. Press the <Delete> key to delete this wire.
3. If the Functions palette, shown in Figure 7.10, is not visible, select View » Functions
Palette to display it. The Functions palette opens with the Express subpalette visible by
default. If you have selected another subpalette, you can return to the Express
subpalette by clicking Express on the Functions palette.
Figure 7.10
4. On the Arithmetic & Comparison palette, select the Formula Express VI
, and
place it on the block diagram inside the loop between the Simulate Signal Express VI
and the Waveform Graph terminal. You can move the Waveform Graph Terminal to
the right to make more room between the express VI and the terminal.
The Configure Formula dialog box appears when you place the Express VI on the block
diagram. When you place an Express VI on the block diagram, the configuration dialog
box for that VI always appears automatically.
COMSATS Institute of Information Technology
Page 81
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
5. Click the Help
button, in the bottom right corner of the Configure Formula
dialog box to display the LabVIEW Help topic for this express VI.
The Formula help topic describes the express VI, the Configuration dialog box options,
and the inputs and outputs of the Express VI. Each Express VI has a corresponding
help topic you can access by clicking the help button in the configuration dialog box or
by right-clicking the express VI and selecting help from the shortcut menu.
6. In the Formula topic, find the dialog box option whose description indicates that it
enters a variable into the formula.
7. Minimize LabVIEW help to return to the Configure Formula dialog box.
8. Change the text in the Label column of the dialog box option you read about
from x1 to Sawtooth to indicate the input value to the Formula Express VI. When you
click in the formula text box at the top of the Configure Formula dialog box, the text
changes to match the label you entered.
9. Define the value of the scaling factor by entering *10 after Sawtooth in the formula
text box. The Configure Formula dialog box should appear similar to Figure 7.11.
Figure 7.11
You can use the Input buttons in the Configuration dialog box or youcan use the *, 1,
and 0 keyboard buttons to enter the scaling factor. If you use the input buttons in the
Configuration dialog box, LabVIEW places the formula input after the Sawtooth input
in the Formula textbox. If you use the keyboard, click in the Formula text box
afterSawtooth and enter the formula you want to appear in the text box.
Note: If you enter a formula in the Formula text box that is not valid, the Errors LED,
in the upper right corner turns grey and displays the text “Invalid Formula”.
10. Click the OK button to save the current configuration and close the configure formula
dialog box.
COMSATS Institute of Information Technology
Page 82
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
11. Move the cursor over the arrow on the sawtooth output of the Simulate Signal Express
VI.
12. When the Wiring tool appears, click the arrow on the sawtooth output, and then click
the arrow on the sawtooth input of the formula express VI, shown below, to wire the
two objects together.
Figure 7.12
13. Use the Wiring tool to wire the result output of the Formula Express VI to the
Waveform Graph terminal.
Examine the wires connecting the express VIs and terminals. Thearrows on the Express
VIs and terminals indicate the direction that thedata flows along these wires. The block
diagram should appear similar to Figure 7.13.
Figure 7.13
Tip: You can right-click any wire and select clean up wire from the shortcut menu tohave
LabVIEW automatically find a route for the wire around existing objects on the
blockdiagram. LabVIEW also routes a wire to decrease the number of bends in the wire.
14. Press the <Ctrl-S> key or select File»Save to save the VI.
COMSATS Institute of Information Technology
Page 83
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Displaying Two Signals on a Graph
To compare the signal generated by the Simulate Signal Express VI and thesignal modified
by the Formula Express VI on the same graph, use theMerge Signals function.
Complete the following steps to display two signals on the same graph.
1. On the block diagram, move the cursor over the arrow on the Sawtooth output of the
Simulate Signal Express VI.
2. Use the Wiring tool to wire the Sawtooth output to the Waveform Graph terminal.
The Merge Signals function
, appears where the two wires connect. A function
is a built-in execution element, comparable to an operator, function, or statement in a
text-based programming language. The Merge Signals function takes the two separate
signals and combines them so that both can display on the same graph.
The block diagram should appear similar to Figure 7.14.
Figure 7.14
3. Press the <Ctrl-S> keys or select File»Save to save the VI.
4. Return to the front panel, run the VI, and turn the knob control.
The graph plots the original sawtooth wave and the scaled sawtoothwave with 10 times
the amplitude, as you specified in the FormulaExpress VI. The maximum value on the
y-axis automatically scales asyou turn the knob.
5. Click the STOP button to stop the VI.
Customizing a Knob Control
The knob control changes the amplitude of the sawtooth wave, so labellingit Amplitude
accurately describes the behaviour of the knob.
1. Complete the following steps to customize the appearance of the knob. On the front
panel, right-click the Knob and select Properties from the shortcut menu to display the
Knob Properties dialog box.
COMSATS Institute of Information Technology
Page 84
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
2. In the Label section on the Appearance page, delete the label Knob, and enter
Amplitude in the text box.
The Knob Properties dialog box should appear similar to Figure 7.15.
Figure 7.15
3. Click the Scale tab and in the Scale Style section. Place a checkmark in the Show color
ramp checkbox.
The knob on the front panel updates to reflect these changes.
4. Click the OK button to save the current configuration and close the Knob Properties
dialog box.
5. Save the VI.
6. Reopen the Knob Properties dialog box and experiment with other properties of the
knob. For example, on the Scale page, try changing the colors for the marker text color
by clicking the color box.
7. Click the Cancel button to avoid applying any changes you made while experimenting.
If you want to keep the changes you made, click the OK button.
Customizing a Waveform Graph
The waveform graph indicator displays the two signals. To indicate whichplot is the scaled
signal and which is the simulated signal, you cancustomize the plots.
Complete the following steps to customize the appearance of the waveformgraph indicator.
COMSATS Institute of Information Technology
Page 85
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
1. On the front panel, move the cursor over the top of the plot legend on the Waveform
graph.
Though the graph has two plots, the plot legend displays only one plot.
2. When a double-headed arrow appears, shown in Figure 7.16, click and drag the border
of the plot legend to add one item to the legend. When you release the mouse button,
the second plot name appears.
Figure 7.16
3. Right-click the Waveform graph and select Properties from the shortcut menu to
display the Waveform Graph Properties dialog box.
4. On the Plots page, select Sawtooth from the pull-down menu. In the colors section,
click the Line color box to display the color picker. Select a new line color.
5. Select Sawtooth (Formula Result) from the pull-down menu.
6. Place a checkmark in the Ignore waveform or Dynamic attributes, including plot names
checkbox.
7. In the Name text box, delete the current label and change the name of this plot to Scaled
Sawtooth.
8. Click the OK button to save the current configuration and close the Waveform Graph
Properties dialog box.
9. The plot color and plot legend on the front panel change.
10. Reopen the Waveform Graph Properties dialog box and experiment with other
properties of the graph. For example, on the Scales page, try disabling automatic
scaling and changing the minimum and maximum value of the y-axis.
11. Click the Cancel button to avoid applying any changes you made while experimenting.
If you want to keep the changes you made, click the OK button.Save and close the VI.
References
Texas Instruments LabVIEW Manual, Chapter 1
COMSATS Institute of Information Technology
Page 86
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Critical Analysis / Conclusion
Post-Lab Task(s)
Prepare a clear and concise report pertaining to the tasks performed in this lab. Show all
the results obtained from simulations. The report MUST be in your own words otherwise
it will be rejected.
COMSATS Institute of Information Technology
Page 87
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Performance
Viva
(10 Marks)
(5 Marks )
Total/15
Performance
/6
Results
/3
Critical Analysis
/1
Comments
COMSATS Institute of Information Technology
Page 88
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 89
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab # 7: Learning the Physical Properties of Most
Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors
(MECHKIT) Trainer (PART-1)
Objective
•
Learn to use the infrared distance measuring sensor on QNET MECHKIT.
•
Learn to use the sonar sensors on QNET MECHKIT for long-distance
measurements.
Pre-Lab Theory
The MECHKIT has ten types of sensors, two types of switches, a push button, and two
LEDS. This QNET module can be used to teach the physical properties of most sensors used
today, and the techniques and limitations of their application. The components of MECHKIT
Trainer are:
ID # Description
ID #
Description
1
Piezo Sensor
16
ENC B LED
2
Flexible link (strain gauge)
17
ENC Index LED
3
Flexible link ruler
18
Optical position sensor knob
4
Temperature sensor gain
19
Magnetic field sensor knob
5
Temperature sensor offset
20
AD0 Jumper
6
Thermistor
21
AD1 Jumper
7
Push button
22
AD2 Jumper
8
Micro switch
23
AD5 Jumper
9
Optical switch
24
Potentiometer
10
Infrared sensor on/off switch
25
DO 1 LED
COMSATS Institute of Information Technology
Page 90
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
11
Infrared sensor on/off LED
26
DO 0 LED
12
Infrared sensor
27
Plunger (pressure sensor)
13
Sonar sensor
28
Pressure sensor
14
Encoder knob
29
Plunger ruler
15
ENC A LED
30
PCI connector to NI ELVIS
Sensor Properties
This section discusses various sensor properties that are often found in technical
specifications.
Resolution
The resolution of a sensor is the minimum change that can be detected in the quantity that is
being measured. For instance, 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 for the application, this may be
adequate.
Range
Range sensors can only take measurements of a target within a certain operating range. The
operating range specifies a maximum, and sometimes also a minimum, distance where the
COMSATS Institute of Information Technology
Page 91
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
target can be from the sensor in order to obtain 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.
Absolute and Incremental
Absolute sensors detect a unique position. Incremental sensors measure a relative position
that depends on a prior position 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 is used, then it will
detect the same angle regardless if it has just been powered.
Analog Sensor Measurement
Analog sensors output a signal that correlates to the quantity it is measuring. The relationship
between the output signal of the sensor and the actual measurement varies depending on the
type of sensor. For example, the voltage measured by a potentiometer is directly proportional
to the angle it is measuring. However, the resistance of a thermistor decreases exponentially as
the temperature increases. Some of the different ways to characterize analog sensors is
illustrated in Figure 7.2.
COMSATS Institute of Information Technology
Page 92
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Linear sensors can be modelled using the equation:
y = ax + b
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 such as polynomial
y = ax2 + bx + c
or exponential
y = aebx
Infrared Sensor
Infrared (IR) sensors are widely used in robots, automotive systems, and various other
applications that require an accurate, medium-range non-contact position measurement. An IR
sensor is typically composed of an infrared emitting diode (IRED), a position sensing detector
(PSD), and a signal processing circuit. It outputs a voltage the correlates to the distance of the
remote target. The infrared distance measuring sensor on the QNET MECHKIT board is shown
in Figure 7.3.
COMSATS Institute of Information Technology
Page 93
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Infrared-based distance sensors typically have a smaller maximum range than sonar but the
resolution is better.
Infrared Sensor VI
The virtual instrument used to collect data using the IR sensor is shown in Figure 7.4. The
virtual instrument used to calibrate IR range data is shown in Figure 7.5.
COMSATS Institute of Information Technology
Page 94
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Use the QNET Infrared VI to view and calibrate the readings of the infrared sensor on the
MECHKIT as the target distance is changed. The components of the VI are listed in Table
below and identified in Figure 7.6 and Figure 7.7.
COMSATS Institute of Information Technology
Page 95
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 96
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Sonar Sensor
Often used in mobile robotics, sonar sensors are fitted with an emitter that generates ultrasonic
waves and a receiver that captures them after hitting a target. A timer calculates how long it
takes for the signal to return and, given the speed of sound in air, the distance of the remote
target is measured. The sonar ranger on the mechatronic trainer is pictured in Figure 7.8.
COMSATS Institute of Information Technology
Page 97
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Sonar sensors are great for long-distance measurements. For example, the one mounted on
mechatronic board can go up to 21 feet. However, in general, these devices do not have good
close-range measurements and their resolution can be relatively coarse.
Sonar Sensor VI
The virtual instrument used to collect data using the sonar sensor is shown in Figure 7.9. The
virtual instrument used to calibrate sonar range data is shown in Figure 7.10.
COMSATS Institute of Information Technology
Page 98
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Sonar Sensor Laboratory VI
Use the QNET Infrared VI to view and calibrate the readings of the infrared sensor on the
MECHKIT as the target distance is changed. The components of the VI are listed in Table
below, and identified in Figure 7.11 and Figure 7.12.
COMSATS Institute of Information Technology
Page 99
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 100
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Pre-Lab Task(s)
Write a 1-page note on Infrared and Sonar Sensors (No copying from lab manual and class
mates).
In-Lab
Infrared
Collect Data
1. Ensure J10 is set to Infrared.
2. Open and configure the QNET MECHKIT Infrared VI as described in Figure 7.6 and
Figure 7.7. Note: Make sure the correct Device 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 to generate noise in other sensor measurements.
5. Get a target, such as a sturdy piece of cardboard, that is at least 10 by 10 cm 2 with a reflective
colour like white or 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 Target Range (cm) array, as shown in Figure 7.4.
COMSATS Institute of Information Technology
Page 101
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
8. Enter the corresponding measured voltage from the IR sensor in the Sensor Measurement
(V) array, as shown in Figure 7.4.
9. Repeat for different target positions. The IR sensor is quadratic. As the measurements are
entered, the coefficients 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.
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 the Table below.
4. Click on Stop button to stop the VI.
Sonar
Collect Data
1. Ensure J9 is set to Sonar.
2. Open and configure the QNET MECHKIT Sonar VI as described in Figure 7.11 and
Figure 7.12. Make sure the correct Device 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 cm 2 with a
reflective colour like white or 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 Target Range (cm) array, as shown in Figure 7.9.
7. Enter the corresponding measured voltage from the sonar sensor in the Sensor
Measurement (V) array, as shown in Figure 7.9.
8. Repeat for different target positions. The sonar sensor is linear. The slope and intercept are
generated and the fitted curve is automatically plotted.
COMSATS Institute of Information Technology
Page 102
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
9. Enter your collected target distances and voltages. Capture the Sensor Readings scope as
well.
10. Click on Stop button to stop the VI.
COMSATS Institute of Information Technology
Page 103
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Critical Analysis / Conclusion
Post-Lab
IR Sensor
What did you notice when the target is close to the IR sensor? That is, did the behaviour of
the sensor change when the target was in close proximity as opposed to being further away?
Sonar
What is the resolution and operating range of the sonar sensor? How does the resolution and
range compare with the IR sensor?
COMSATS Institute of Information Technology
Page 104
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 105
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab Assessment
Pre Lab
/5
Performance
/5
Results
/5
Viva
/5
Critical Analysis
/5
COMSATS Institute of Information Technology
/25
Page 106
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab # 8: Learning the Physical Properties of Most
Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors
(MECHKIT) Trainer (PART-2)
Objective
•
•
Learn to use the magnetic field sensor on QNET MECHKIT.
Learn to use the piezo sensor on QNET MECHKIT for measuring vibration.
Pre-Lab
Magnetic Field Sensor
A magnetic field transducer outputs a voltage proportional to the magnetic field that is
applied to the target. The magnetic field sensor is the chip located on the bottom of Figure
8.1. It applies a magnetic field perpendicular to the flat screw head. The position of the screw
head is changed by rotating the knob. This magnetic field transducer has a similar range to
the optical position sensor.
Magnetic Field Virtual Instrument
COMSATS Institute of Information Technology
Page 107
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
The virtual instrument used to collect data using the magnetic field transducer is shown in
Figure 8.2. The virtual instrument used to calibrate magnetic field data is shown in Figure
8.3.
COMSATS Institute of Information Technology
Page 108
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Using this VI, the magnetic field measurements can be read as the target is moved at different
locations using the knob on the QNET mechatronic sensors trainer. The components of the
QNET Magnetic Field VI are summarized in Table below and identified in Figure 8.4 and
Figure 8.5.
COMSATS Institute of Information Technology
Page 109
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 110
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Piezo Sensor
Piezo sensors measure vibration. The piezo sensor on the QNET-MECHKIT trainer, shown
in Figure 8.6, is connected to a plastic band that has a brass disc weight at the end.
COMSATS Institute of Information Technology
Page 111
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Piezo Sensor VI
The QNET Piezo VI is used to view the piezo sensor readings as the plastic strip on the
QNET MECHKIT is perturbed. The components of the VI are listed in Table below, and
identified in Figure 8.7 and Figure 8.8.
COMSATS Institute of Information Technology
Page 112
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 113
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Pre-Lab Task(s)
Write a 1-page note on magnetic field and Piezo Sensors (No copying from lab manual and
class mates).
In-Lab
Magnetic Field Sensor
Collect Data
1. Ensure J8 is set to Magnetic Field.
2. Open and configure the QNET MECHKIT Magnetic Field VI as described in Figure 8.4
and Figure 8.5. Make sure the correct 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 slightly counter-clockwise so the 0 mark on the knob faces up. This will be
reference 0 inches target position. Enter this in the Target Range (inch) array, shown in
Figure 8.2.
5. Enter the voltage measured from the magnetic field position sensor for the reference 0-inch
position in the Sensor Measurement (V) array. The array is indicated in Figure 8.2.
6. Turn the knob counter-clockwise one rotation to move the target further from the sensor.
The target moves 1-inch for every 20 turns. Enter the position the target has moved from the
reference in the Target Range (inch) array.
7. Record the measured sensor voltage in the Sensor Measurement (V) array
8. Take samples for the entire range of the target (i.e. until the knob cannot be rotated CCW
anymore). The magnetic field sensor is exponential. The parameters of the exponential
function are outputted and the fitted curve is automatically plotted as data is entered.
9. Enter the range and measured sensor voltages and capture the Sensor Readings scope.
10. Click on Stop button to stop the VI.
COMSATS Institute of Information Technology
Page 114
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
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. For instance, 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.
Piezo Sensor
Data Analysis
1. Ensure J8 is set to Piezo.
2. Open and configure the QNET MECHKIT Piezo VI as described in Figure 8.7 and Figure
8.8. Make sure the correct Device 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 response in the Piezo (V) scope.
5. Grab the end of the plastic band and move it slowly up and down. Examine the response.
6. Click on Stop button to stop the VI.
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 use the cursor to take measurements off the graph.
4. Click on Stop button to stop the VI.
COMSATS Institute of Information Technology
Page 115
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Critical Analysis / Conclusion
COMSATS Institute of Information Technology
Page 116
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Post-Lab
Prepare a clear and concise report pertaining to the tasks performed in this lab. Show all the
results obtained from simulations. The report MUST be in your own words otherwise it will
be rejected.
COMSATS Institute of Information Technology
Page 117
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab Assessment
Pre Lab
/5
Performance
/5
Results
/5
Viva
/5
Critical Analysis
/5
COMSATS Institute of Information Technology
/25
Page 118
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab # 9: Learning the Physical Properties of Most
Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors
(MECHKIT) Trainer (PART-3)
Objective
Learn to use the pressure sensor on QNET MECHKIT.
Learn to use the potentiometer sensor on QNET MECHKIT for measuring position.
Pre-Lab
Pressure Sensor
A pressure sensor is attached to the plunger on the QNET mechatronic board shown in Figure
9.1. This is a gage pressure sensor and its measurements are relative to the atmospheric
pressure. The voltage signal generated is proportional to the amount of pressure in the vessel
of the plunger. So as the plunger is pushed further, the air inside the vessel becomes more
compressed and the reading increases.
COMSATS Institute of Information Technology
Page 119
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Pressure sensors can also be used to indirectly measure other values. For example, in the
QNET mechatronics board the position of the plunger head is measured. It can also be used
to measure the amount of volume in a reservoir or the altitude of an aerial vehicle.
Pressure Sensor Virtual Instrument
The virtual instrument used to collect data using the pressure sensor is shown in Figure 9.2.
The virtual instrument used to calibrate pressure data is shown in Figure 9.3.
COMSATS Institute of Information Technology
Page 120
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
The pressure sensor VI can be used to view the pressure sensor measurements as the plunger
is moved at different locations within the syringe on the QNET mechatronic sensors trainer.
The Table below lists and describes the main components of the QNET Pressure Sensor VI
and they are uniquely identified by an ID number in Figure 9.4 and Figure 9.5.
COMSATS Institute of Information Technology
Page 121
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 122
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 123
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Potentiometer Sensor
Rotary potentiometers are absolute analog sensors used to measure angular position, such as
a load shaft of a motor. They are great to obtain a unique position measurement. However,
caution must be used as their signal is discontinuous. That is, after a few revolutions
potentiometers will reset their signal back to zero. The potentiometer on the QNET
MECHKIT board is shown in Figure 9.6.
COMSATS Institute of Information Technology
Page 124
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
The virtual instrument used to collect data using the potentiometer is shown in Figure 9.7.
The virtual instrument used to calibrate potentiometer data is shown in Figure 9.8.
COMSATS Institute of Information Technology
Page 125
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
This VI can be used to view the potentiometer measurements when moving the potentiometer
knob on the QNET mechatronic sensors trainer. Table below lists and describes the main
elements of the QNET Potentiometer VI and every element is uniquely identified by an ID
number in Figure 9.9 and Figure 9.10.
COMSATS Institute of Information Technology
Page 126
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 127
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Pre-Lab Task(s)
Write a 1-page note on Pressure and Potentiometer Sensors (No copying from lab manual and
class mates).
In-Lab
Pressure Sensor
Collect Data
1. Ensure J9 is set to Pressure.
2. Open and configure the QNET MECHKIT Pressure VI as described in Figure 9.4 and
Figure 9.5. Make sure the correct Device is chosen (Important: Completely remove the
plunger from the tube and re-insert it. This will ensure the chamber is pressurized enough).
3. Run QNET_MECHKIT_Pressure_Sensor.vi
4. Push the plunger up to the initial 1 ml mark on the tube and measure the resulting voltage
using the Pressure (V) scope (or the digital display).
5. Enter the result in the Sensor Measurement (V) array, as indicated in Figure 9.2.
6. Repeat for when the plunger is at 0.8 ml, 0.6 ml, 0.4 ml, 0.2 ml, and 0 ml. The pressure
sensor is quadratic. The coefficients for the second-order polynomial are generated and the
COMSATS Institute of Information Technology
Page 128
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
fitted curve is automatically plotted.
7. Enter collected results and capture the Sensor Readings scope.
8. Click on Stop button to stop the VI.
Calibrate Sensor
1. Run the QNET_MECHKIT_Pressure_Sensor.vi
2. In the Calibrate Sensor tab, enter the polynomial coefficients, as illustrated in Figure 9.3,
to measure correct position of the plunger. Verify that the sensor is reading properly, e.g.
display should read 0.5 ml when plunger is placed at 0.5 ml.
3. Enter the a, b, and c, parameters used.
4. Click on Stop button to stop the VI.
Potentiometer Sensor
Data Analysis
1. Ensure J10 is set to POT.
2. Open and configure the QNET MECHKIT Potentiometer VI as described in Figure 9.9 and
Figure 9.10. Make sure the correct 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 9.7.
6. Enter corresponding measured sensor voltage in Sensor Measurement (V) array (shown in
Figure 9.7).
7. Fill out table with an appropriate amount of data points. Notice that as the measured
potentiometer readings are entered, a curve is automatically generated to fit the data. The
slope and intercept of this line is generated as well.
8. Enter the collected data and capture the Sensor Reading chart.
COMSATS Institute of Information Technology
Page 129
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Sensor Calibration
1. Run QNET_MECHKIT_Potentiometer.vi
2. In the Calibrate Sensor tab, set the Gain and Offset controls, as indicated in Figure 9.8, to
values such that the potentiometer measures the correct angle. Verify that the sensor is
reading properly, e.g. when pot arrow is 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.
COMSATS Institute of Information Technology
Page 130
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Critical Analysis / Conclusion
COMSATS Institute of Information Technology
Page 131
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Post-Lab
Prepare a clear and concise report pertaining to the tasks performed in this lab. Show all the
results obtained from simulations. The report MUST be in your own words otherwise it will
be rejected.
COMSATS Institute of Information Technology
Page 132
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 133
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab Assessment
Pre Lab
/5
Performance
/5
Results
/5
Viva
/5
Critical Analysis
/5
COMSATS Institute of Information Technology
/25
Page 134
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab # 10: Learning the Physical Properties of
Most Common Sensors Used Today Using
National Instruments (NI) QNET Mechatronics
Sensors (MECHKIT) Trainer (PART-4)
Objective
Learn to use the strain gauge on QNET MECHKIT to measure deflection
Learn to use the thermistor sensor on QNET MECHKIT to measure temperature.
Pre-Lab
Strain Gauge with Flexible Link
A strain gauge measures strain, or deflection, of an object. As shown in Figure 10.1, in the
QNET mechatronic sensors trainer a strain gauge is used to measure the deflection of a
flexible link. As the link bends, the resistance of the strain gauge changes.
Strain Gauge Virtual Instrument
The virtual instrument used to collect data using the strain gauge is shown in Figure 10.2.
The virtual instrument used to calibrate strain data is shown in Figure 10.3. The virtual
instrument used to determine the natural frequency of the flexible link is shown in Figure
10.4.
COMSATS Institute of Information Technology
Page 135
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 136
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 137
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
This VI can be used to view the strain gauge measurements when moving the flexible link on
the QNET mechatronic sensors trainer. Table below lists and describes the main elements of
the QNET Flex gauge VI and every element is uniquely identified by an ID number in Figure
10.5, Figure 10.6, and Figure 10.7.
COMSATS Institute of Information Technology
Page 138
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 139
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 140
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Temperature Sensor
There are several different types of transducers available to measure temperature: the
thermocouple, the resistance temperature detector (RTD), the thermistor, and the integrated
circuit (IC). Each have their own advantages and disadvantages. The Thermocouple has a
wide temperature range and is easy to use but is the least stable and sensitive. The RTD, on
the other hand, is most stable and accurate of the sensors but is slow and relatively more
expensive. The IC is the only linear transducer, has the highest output, but is slow. The
thermistor responds very quickly but has a limited temperature range. The thermistor on the
mechatronic sensors board is shown in Figure 10.8.
The thermistor is a resistor that changes value according to the temperature. The relationship
between the resistance of the thermistor and the temperature, T, can be described using the Bparameter equation
R = R0eB (1/T – 1/T0)
The resistance is R0 when the temperature is at T0. For the thermistor on the mechatronic
sensors trainer, the sensor resistance is
R0 = 47000Ω
when the temperature is at 25 degrees Celsius, or
T0 = 298.15K
Thermistors are typically part of a circuit. In the QNET mechatronic sensors trainer, the
thermistor is in the circuit shown in Figure 10.9 and labeled by R.
COMSATS Institute of Information Technology
Page 141
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Using the voltage divider rule, the voltage entering the negative terminal of the second
operation amplifier, i.e. the offset op amp, is
vi = 30 (R + 10000) - 15
6700 + R
The output voltage of the circuit is
V0 = Av (voff – vi)
where voff is, the voltage adjusted using the Offset potentiometer and Av is the amplifier gain
that can be changed externally using the Gain potentiometer. The Gain and Offset
potentiometers are on the QNET mechatronic sensor trainer and shown in Figure 10.10.
COMSATS Institute of Information Technology
Page 142
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Temperature Sensor VI
The virtual instrument used to collect temperature data is shown in Figure 10.11. The virtual
instrument used to calibrate temperature data is shown in Figure 10.12.
COMSATS Institute of Information Technology
Page 143
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
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 below and identified in Figure 10.13.
COMSATS Institute of Information Technology
Page 144
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Pre-Lab Task(s)
Write a 1-page note on Strain Gauge and Thermistor Sensors (No copying from lab manual
and class mates).
COMSATS Institute of Information Technology
Page 145
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
In-Lab
Strain Gauge
Collect Data
1. Ensure J7 is set to Strain Gauge.
2. Open and configure the QNET MECHKIT Flex gauge VI as described in Figure 10.5,
Figure 10.6 and Figure 10.7. Make sure the correct Device is chosen.
3. Run QNET_MECHKIT_Flexgauge.vi
4. Move the flexible link to -1 cm.
5. Enter the strain gauge voltage reading in the Sensor Measurement (V) array (indicated in
Figure 10.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 entered and its slope and intercept are generated.
7. Enter the measured voltages and capture the Sensor Readings scope.
8. Click on Stop button to stop the VI.
Calibrate Sensor
1. Run the QNET_MECHKIT_Flexgauge.vi
2. Select the Calibrate Sensor tab and enter the slope and intercept obtained in Collect Data
Section into the Calibration Gain and Offset controls shown in Figure 10.3. When the link is
moved, the slider indicator in the VI should 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.
Natural Frequency
1. Run the QNET_MECHKIT_Flexgauge.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 spectrum should then load in the chart, as shown in Figure 10.4 (the value
shown is incorrect).
4. Enter natural frequency found and capture the resulting power spectrum response. Hint:
You can use the cursor to take measurements off the graph.
COMSATS Institute of Information Technology
Page 146
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
5. Click on Stop button to stop the VI.
Temperature Sensor
Collect Data
1. Ensure J9 is set to Temperature.
2. Open and configure the QNET MECHKIT Temperature VI as described in Figure 10.13.
Make sure the correct Device is chosen.
3. Run QNET_MECHKIT_Temperature.vi
4. As discussed in theory, the thermistor is part of a circuit and the output voltage can be varied
using the Gain and Offset potentiometers on the QNET mechatronic sensors board. Rotate
the Gain knob on the counter-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 at room temperature, T0 = 298 K. Note: For this step, assume your room
is at 25.0 degrees Celsius even though 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.0 Celsius. Enter the voltage read at room temperature and with the fingertip. Note: The
thermistor is very sensitive. Do not press down too hard on the sensor with your finger when
taking measurements. Otherwise, the measurement will not be consistent. Note: After
releasing the sensor it takes a while for the temperature reading to settle back to 0 V. You
can bring the temperature down faster by gently blowing on the sensor.
7. Click on Stop button to stop the VI.
Sensor Calibration
1. Run the QNET_MECHKIT_Temperature.vi
2. Enter the B parameter that was found in Pre-Lab Task in the Temperature Sensor VI, as
shown in Figure 10.12. 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.
COMSATS Institute of Information Technology
Page 147
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 148
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Critical Analysis / Conclusion
COMSATS Institute of Information Technology
Page 149
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Post-Lab
Prepare a clear and concise report pertaining to the tasks performed in this lab. Show all the
results obtained from simulations. The report MUST be in your own words otherwise it will
be rejected.
COMSATS Institute of Information Technology
Page 150
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 151
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab Assessment
Pre Lab
/5
Performance
/5
Results
/5
Viva
/5
Critical Analysis
/5
COMSATS Institute of Information Technology
/25
Page 152
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab # 11
Measurement of Medium and Low
Resistance using Wheatstone Bridge and Kelvin
Double Bridge Kit
Objectives
•
To learn the use of Wheatstone bridge kit BR-1640 (Part A)
•
To measure the value of unknown resistance via BR-1640
•
To measure the value of low resistance using Kelvin bridge trainer (Part B)
Pre-Lab
Description of Equipment(s)
A Wheatstone bridge is a type of electrical circuit known as a bridge circuit and is used to
determine the resistance of a circuit element. This can be used to test the resistance of various
components such as resistors, sections of wire, and any other electrical conductor. A typical
bridge circuit of the Wheatstone type uses four resistors split into two legs. By balancing one
leg of the circuit with a fixed, known resistance against the one with the unknown resistor, it
is possible to calculate the resistance of the component being tested.
COMSATS Institute of Information Technology
Page 153
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
A Kelvin bridge (also called a Kelvin double bridge and in some countries a Thomson
bridge) is a measuring instrument used to measure unknown electrical resistors below 1 ohm.
It is specifically designed to measure resistors that are constructed as four terminal resistors.
Resistors above about 1 ohm in value can be measured using a variety of techniques, such as
an ohmmeter or by using a Wheatstone bridge. In such resistors, the resistance of the
connecting wires or terminals is negligible compared to the resistance value. For resistors of
less than an ohm, the resistance of the connecting wires or terminals becomes significant, and
conventional measurement techniques will include them in the result.
Pre-Lab Task(s)
Write a 1-page note on Wheat Stone and Kelvin Bridge highlighting the bridge’s circuit
along with circuit diagram (No copying from lab manual and class mates).
In-Lab Tasks
Task -1
Procedure
1. First verify that the meter indicates zero position when GA button is not pressed. If the
needle is not at zero position adjust the screw on the meter to align the needle exactly at zero
position.
2. The EXT GA terminal should be shorted when the measurements are done with internal
galvanometer.
3. Tightly connect the unknown resistance to the RX terminals (X1, X2) in the bottom right
corner of BR-1640.
4. Approximate the value of the resistor from its color code and set the multiplier knob of the
instrument for the values of the resistor indicated in the table below.
COMSATS Institute of Information Technology
Page 154
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
5. Pre-set the measurement dial to 1999 ohms. Do not change the multiplier set in the
previous step.
6. Press and hold the BA button and note the deflection direction of the needle when GA
button is pressed instantaneously. If the needle deflects to the right, it means the value
indicated on measurement knobs is lower than the connected unknown resistor and vice
versa.
7. Adjust the measurement knob so that the needle is exactly at zero position. The value of
unknown resistance is obtained by the following formula.
Rx = (Sum of the indicating values of measurement dials) x (Multiplying factor)
8. Repeat the procedure for three different unknown resistors.
Observations and Calculations
Sr.
#
Estimated
Resistance
Value (Ω)
Multiplier
Sum of Indicating
Values of
Measurement Dials
(Ω)
Rx, (Ω)
1.
2.
3.
COMSATS Institute of Information Technology
Page 155
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Task -2
Procedure
1. Adjust the Galvanometer sensitivity knob to ‘min’.
2. Connect the resistance to be measured in such a way that the leads from C1 and P1 are
connected to one end and those from C2 and P2 are connected to the other end in the kit. If
the resistance does not have 4 terminals then connect the resistor between P1, P2. Then short
the terminal C1 to P1 and C2 to P2.
3. Choose the multiplier and stepping value according to the table given below.
4. Turn on the switch K1, after warm up for 5 mins adjust the zero adjustor until the
galvanometer point to zero.
5. Press “G” and then “B” if the galvanometer points to +ve direction, it means the value of
measuring resistance is smaller than the estimated value. You should decrease the value of
measuring resistance from adjustment dial. If the galvanometer points to –ve direction, it
means the value of measuring resistance is larger than the estimated value. You should
increase the value of measuring resistance from adjustment dial.
6. When the galvanometer nearly points to zero, increase the sensitivity of the galvanometer
to maximum and adjust the measurement dial until the needle points exactly to zero.
7. When the needle points exactly to zero the value of ‘Rx’ is calculated from the following
formula:
Rx = Multiplier value x (value of stepper dial + value indicated on the measurement
dial)
8. Repeat the experiment with three different value resistors (below 11Ω)
Observations and Calculations
Sr.
#
Estimated Rx
(Ω)
Multiplier
Stepping
dial
(Ω)
Value indicated
on measurement
dial
(Ω)
Measured Rx
(Ω)
1
2
3
COMSATS Institute of Information Technology
Page 156
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 157
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Critical Analysis / Conclusion
COMSATS Institute of Information Technology
Page 158
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Post-Lab
Prepare a clear and concise report pertaining to the tasks performed in this lab. Show all the
results obtained from simulations. The report MUST be in your own words otherwise it will
be rejected.
COMSATS Institute of Information Technology
Page 159
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab Assessment
Pre Lab
/5
Performance
/5
Results
/5
Viva
/5
COMSATS Institute of Information Technology
/25
Page 160
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab # 12: Measurement of Different Waveform
Attributes using Cathode Ray Oscilloscope
(CRO)
Objectives:
To learn to use CRO in measurement of:
1. Time period/frequency
2. Amplitude (peak value/peak-peak value)
3. Phase difference
Pre Lab:
Introduction:
Oscilloscope:
An oscilloscope is a graph displaying device. It is used to visualize time-varying electronic
signals on a screen. The signals are graphed using an analog circuitry or a digital apparatus.
Analog Oscilloscope:
It works on the functionality of Cathode Ray Tube (CRT). A beam of electrons is made to
fall on a screen where it becomes visible as a bright blue dot. The beam is then moved
along a horizontal line using a saw-tooth voltage applied along the horizontal axis. The fast
moving dot gives the appearance of a blue line. Then the signal to be graphed on the screen
is applied vertically so that the beam of electrons moves in a vertical access accordingly.
The result is a plot of the time varying applied signal on the oscilloscope screen.
Digital Oscilloscope:
It works on the functionality of Analog-to-Digital (A/D) converter. The applied input
analog signal is sampled at a high rate; the received samples are then plotted on the screen.
Digital Oscilloscopes have some obvious benefits over analog counterparts. The advent in
digital circuitry has made the oscilloscopes cheaper. Moreover the sampled signal in a
digital oscilloscope can be stored in memory, can be easily modified or transferred to a
computer for further analysis. In this lab we shall conduct all experiments using digital
oscilloscopes.
COMSATS Institute of Information Technology
Page 161
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
However it is advised that engineering students should get hands-on experience on both
types of oscilloscopes.
Fig No.1: Agilent 3000 Series Oscilloscope (Panel Controls)
COMSATS Institute of Information Technology
Page 162
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Fig No.2: Oscilloscope Display
Using the Oscilloscope:
Auto –Scale Feature:
The oscilloscope has a very useful auto-scale feature that sets the various display scales
automatically according to the input waveform. It is a handy tool to start with until the
students get a better grasp at the control knobs. The students are advised not to rely on this
feature completely but try to learn to set the scale parameters themselves.
Fig No.3: Auto Scale Button
This feature requires an input frequency at least 50Hz and a duty cycle at least 1%.
Input a Signal:
Use one of the supplied passive probes to input the signal into one of the channels of the
oscilloscope.
Using the Run Control Buttons:
There are two buttons for starting and stopping the oscilloscope’s acquisition system:
Run/Stop and Single.
Fig No.4: Run Control Buttons
•
•
•
When the Run/Stop button is green, the oscilloscope is acquiring data.
To stop acquiring data, press Run/Stop. When stopped, the last acquired waveform
is displayed.
When the Run/Stop button is red, data acquisition is stopped. To start acquiring
data, press Run/Stop.
COMSATS Institute of Information Technology
Page 163
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
•
To capture and display a single acquisition (whether the oscilloscope is running or
stopped), press Single. After capturing and displaying a single acquisition, the
Run/Stop button is red.
Horizontal Scale
The horizontal controls consist of:
• The horizontal scale knob — changes the oscilloscope’s time per division setting
using the center of the screen as a reference.
• The horizontal position knob — changes the position of the trigger point (trigger
is explained in the subsequent section) relative to the center of the screen.
• The Main/Delayed button ( We shall not use this button in this lab: For details of
this feature refer to the user manual of the device)
Fig No.5: Horizontal Controls
•
•
•
Turn the horizontal scale knob to change the horizontal time per division (time/div)
setting. The time/div setting changes in a 1- 2- 5 step sequence. The time/div setting
is also known as the sweep speed.
Push the horizontal scale knob to toggle between vernier (fine scale) adjustment
and normal adjustment. With vernier adjustment, the time/div setting changes in
small steps between the normal (coarse scale) settings.
The time/div setting is displayed in the status bar at the bottom of the screen.
Triggering:
The trigger determines when captured data should be stored and displayed. When a trigger
is set up properly, it can convert unstable displays or blank screens into meaningful
waveforms. When the oscilloscope starts to acquire a waveform, it collects enough data
so that it can draw the waveform to the left of the trigger point. The oscilloscope
continues to acquire data while waiting for the trigger condition to occur. After it detects a
trigger, the oscilloscope continues to acquire enough data so that it can draw the waveform
to the right of the trigger point.
The oscilloscope provides these trigger modes:
COMSATS Institute of Information Technology
Page 164
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
•
•
•
Edge — can be used with analog and digital circuits. An edge trigger occurs when
the trigger input passes through a specified voltage level with the specified slope.
Pulse — is used to find pulses with certain widths.
Video — is used to trigger on fields or lines for standard video waveforms.
Fig No.6: Trigger Controls
•
•
•
•
To adjust the trigger level, turn the trigger Level knob. Two things happen: The
trigger level value is displayed at the lower left- hand corner of the screen and
a line is displayed showing the location of the trigger level with respect to the
waveform (except when using AC coupling or LF reject coupling modes).
Push 50% to set the level at 50% of the signal’s vertical amplitude.
To make an acquisition even if no valid trigger has been found: Press Force.
Forcing a trigger is useful, for example, when you want to display the DC
voltage of a level signal.
Vertical Controls
The vertical controls consist of:
•
•
•
The channel (1, 2), Math, and Ref buttons — turn waveforms on or off (and
display or hide their menus).
The vertical scale knobs — change the amplitude per division setting for a
waveform, using ground as a reference.
The vertical position knobs — change the vertical position of the waveform on the
screen.
COMSATS Institute of Information Technology
Page 165
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Fig No. 7: Vertical Controls
•
•
•
•
•
•
•
•
•
•
Pressing the channel (1, 2), Math, or Ref buttons have the following effect: If
the waveform is off, the waveform is turned on and its menu is displayed. If the
waveform is on and its menu is not displayed, its menu will be displayed. If
the waveform is on and its menu is displayed, the waveform is turned off and
its menu goes away.
Turn its vertical scale knob to change the amplitude per division setting. The
amplitude/div setting changes in a 1- 2- 5 step sequence from 2 mV/div to 10
V/div (with “1X” probe attenuation). Ground is used as a reference.
Push its vertical scale knob to toggle between Vernier (fine scale) adjustment and
normal adjustment. With Vernier adjustment, the amplitude/div setting changes in
small steps between the normal (coarse scale) settings.
The amplitude/div setting is displayed in the status bar at the bottom of the screen.
Adjusting their vertical position lets you compare waveforms by aligning them
above one another or on top of each other. When an input channel waveform is on:
Turn the vertical position knob to change the vertical position of the waveform on
the screen. Notice that the ground reference symbol on the left side of the display
moves with the waveform.
Notice that, as you adjust the vertical position, a message showing the position
of the ground reference relative to the center of the screen is temporarily displayed
in the lower left- hand corner of the screen.
To specify channel coupling, if the channel’s menu is not currently displayed, press
the channel button (1, 2). In the Channel menu, press Coupling to select between:
DC — passes both DC and AC components of the input waveform to the
oscilloscope.
AC — blocks the DC component of the input waveform and passes the AC
component.
GND — the waveform is disconnected from the oscilloscope input.
COMSATS Institute of Information Technology
Page 166
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Function Generator
A function generator is a device to generate arbitrary time varying waveforms. It is used
for testing and designing circuits in a lab environment. The function generator used in this
lab is Agilent 3320A.
Using the Function Generator: -
Fig No.8 Snapshot of Agilent 3320A Function Generator
Generating a Signal:•
•
•
•
•
•
Turn the power on and press the output key.
Press the sine key, if not already active.
Enter a value of 2 using numeric keypad and then choose units to be kHz. We can
also specify time period instead of frequency if we press the “Freq” soft key and
then specify the time period.
Similarly press the Amplitude soft key to enter amplitude and offset soft key to
enter DC offset.
The units can be changed by pressing first the +/- key and then entering new units.
Similarly by pressing the square, ramp, pulse etc keys we can generate arbitrary
waveforms of different characteristics.
REFERENCE
1. User`s and Services Guide Agilent 3000 Series Oscilloscopes.
2. Users Guide Agilent 33220 A 20MHZ Function / Arbitrary Waveform Generator.
Pre-Lab Task
COMSATS Institute of Information Technology
Page 167
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
In Lab:
OBJECTIVES
•
Basic understanding of creating arbitrary waveforms using function generator.
•
Basic understanding of viewing a time varying voltage waveform on digital
oscilloscope and understanding various control knobs of digital oscilloscope.
EQUIPMENT AND MATERIALS
1. Digital Function Generator
2. Digital Oscilloscope with Probes.
SECTION I – Lab Tasks
Task 1:1. Turn on Oscilloscope and Function generator.
2. Note down the values of Channel 1 status and Time base status on the oscilloscope
screen. Write them down in the table.
3. Generate a sinusoidal wave of 2 KHZ and 5Vp-p. Connect the signal using probes to the
oscilloscope. Press Auto Scale.
4. Press channel (1) button, make sure from the menu that coupling is DC, bandwidth
limit is off and probe is set at (1X).
5. Play with the horizontal and vertical position and scale knobs and try to understand
their effect. Finally auto-scale again.
6. Note down the new values of Channel 1 Status and Time base Status. Interpret the
graph displayed using these values.
7. Change the offset to -1V then 1.5V then 2V then. Observe the change in waveform.
Change the vertical scale i.e. the whole waveform is again at the centre of screen. Note
down the new values of Channel 1 Status and Time base Status.
8. Press “measure” button, press “Voltage” and then press soft keys to determine values
of Vpp, Vrms, Vmin and Vmax. Similarly press “Time” and determine the values of
frequency, period etc. Fill the table.
9. Change the coupling to AC. What do you observe?
Task-2:1. Generate a square wave pulse between 0-5V. Let the frequency be 4KHZ. What is the
time period?
2. Change the duty cycle to 25%.
COMSATS Institute of Information Technology
Page 168
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
3. What is the value of time base status? For how much time the waveform is +5Volts (0n
time). For how much time the waveform is 0Volts (Off-time). Find the ratio of On-time
and the time period of the square wave.
4. To measure the time (off or on) note down the time base status. It represents how much
time one division (box) on the horizontal axis represents. Using this information
calculate the time i.e. divisions for which the wave is +5V and for which it is 0volts.
5. Another method is to press “measure” button of oscilloscope. Press “Time” (press soft
key again to view next set of measurements) and note down the value of “+width” (ontime) and “-width” (off-time).
6. Change the duty cycle to 70% and repeat the experiment.
Task-3:
Set the oscilloscope and function generator to display on the oscilloscope screen the exact
voltage waveform as shown below i.e. the on time is only 50% of the off time and only
five complete cycles are visible on the screen. The voltage should vary from 0 to 1V.
(Choose frequency of your own choice, show the output to the instructor)
Task 1:
CH-1 status
Time Base Status
CH-1status(after
offset)
Time Base
Status(after offset)
1Voltage
Measurements
Time Measurements
Task 2:
Time
Period
Duty Cycle
Time
Status
Base On-Time
COMSATS Institute of Information Technology
Off-Time
Ratio
Page 169
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Critical Analysis / Conclusion
Post Lab:
Answer the following
1.
2.
3.
4.
What is meant by offset?
What is meant by duty cycle?
What is the relationship of phase shift, frequency and time?
What is meant by DC and AC coupling?
COMSATS Institute of Information Technology
Page 170
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
COMSATS Institute of Information Technology
Page 171
Lab # 7 Learning the Physical Properties of Most Common Sensors Used Today Using National
Instruments (NI) QNET Mechatronics Sensors (MECHKIT) Trainer (PART-1)
Lab Assessment
Pre Lab
/5
Performance
/5
Results
/5
Viva
/5
Critical Analysis
/5
COMSATS Institute of Information Technology
/25
Page 172
Download