Sie sind auf Seite 1von 36

INSTRUMENTATION AND MEASUREMENT (EE 405)

Electrical Engineering
SPRING 2015
LAB MANUAL
Student Names: Hassan Ahmed
Semester Project Title:
__________________________________________
Marks Obtained
Project: _______

Lab Manual _______

Instructor: Engr. Junaid Ahmed Hashmani


Signature: ____________

DHA Suffa University


Lab Plan

Course Name: Instrumentation & Measurement


Course Code: EE 405L
Lab No.

List of Manuals and Activity Planner for the Semester

To get acquainted with NI-ELIVS-II prototyping board

An Introduction to NI LabVIEW (Part 1)

An Introduction to NI LabVIEW (Part 2)

Hardware interfacing with LabVIEW NI-DAQmx

To Experiment with Maker hub Lynx LabVIEW interface for Arduino

To Experiment with Lab View VISA library

Experimenting with State Machine in LabVIEW

Making Stroboscope for measuring rotation speed


using NI-ELVIS and LabVIEW

To experiment with Strain gauges and plot average value on LabVIEW

10

To experiment with F2V and V2F converters

11

To Plot the characteristic curve of K type thermocouple and PT100 and thermistor

12

To use Wien Bridge to measure Frequency in audio range

13

Measurement related lab projects

Dated

Lab 1: NI_ELIVS_II_Orientation
Measurement & Instrumentation
Lab

Q1) What NI ELVIS stands for National Instrument Educational Laboratory Virtual
Instrumentation Suite.

Q2) Write the status of LEDs when you put the power switch (at rear side
of NI ELVIS) on. a. Power LED OFF
b. USB Ready LED ON
c. USB Active LED OFF
d. +!5 V OFF
e. -!5 V OFF
f.

5 V OFF

Q3) Write the status of LEDs when you put the proto board power switch (at rear
side of NI ELVIS) on. a. a. Power LED ON
b. USB Ready LED ON
c. USB Active LED OFF
d. +!5 V ON
e. -!5 V ON
f.

5 V ON

Q4) Write down the voltage levels available from NI ELVIS


power supplies a. a. +!5 V

Frequency
Measurements
NI ELVIS Function Generator
NI ELVIS Oscilloscope
Desktop Oscilloscope
100Hz
100.025
100.021
200Hz
200.0481
200.043
500Hz
499.9340
499.922
1 kHz
1.0001
k
1.00003
k
100kHz
100.0000
k
99.9980
k
500kHz
500.0001
k
499.990
k
1 MHz
1.0000
M
999.982
k
maximum Frequency
5.0000
M
4.99992
M

- DIGITAL WRITER
Digital Writer to put the LEDs on in this(DONE
10101010
)
READER
- DIGITAL
USE the Digital Reader instrument to read from digital input lines.
Loop back the Digital output to Digital
(DONE
inputs.
)
to design an Arbitrary waveform of following shape
- UseArbitrary Waveform Generator
a. 10 mS =Sine Wave
b. 20 mS = Square Wave
c. 10 mS = Stair wave

Lab2: Introduction to LabVIEW


In this laboratory, you will learn how to use the LabVIEW development environment,
which is based on the graphical programming language G. You will then write a
LabVIEW programs to accomplish following tasks.
Note: Snaps shot of your VI should be inserted in completed script of this lab to
show your work.
Try to Experiment and write down the operations following short cuts
Ctrl E: Toggles between Block diagram and Front panel
Ctrl T: Opens Both windows side by side
Ctrl R: Run once
Ctrl period: Stops the program
Ctrl space: Quick drop menu
Ctrl B: Removes broken wires
Ctrl shift right click: Opens tool pallete
Ctrl H: Shows context help
Ctrl left click and drag: Displaces the entire object to have some space in
between.
TAB: Helps select different tools when the tools switch is off.
Task 1

Putting LED on and off using Switch

Concepts: Control and indicators

Task 2 Write a simple while loop to increment a number

Concepts: While loop, shift registers


and tunnels

Task 3
Write a VI to solve the equation __fill up the table y = -7.5e-t/15 0.05t +
10.75 for following values of t
t (seconds)
0
10
20
30
40
50
1000

y
3.25
6.39
7.77
8.23
8.22
7.98
-39.25

Concepts: For loop, Arrays, Arithmetic functions +, -, x, exponential and divide

Loop Timing in LabVIEW


Normally when a loop, such as a while loop, finishes executing one iteration, it immediately begins running the next. It
is often beneficial to control how often a loop executes, or its frequency. For example, if you wanted to acquire data in
a loop, you would need a method to control the frequency of the data acquisition.

Write down the functions you can use to control loop execution timings
1 Wait function.
2 Timed loop.

Task 4: Make following calculator to calculate addition, subtraction and


multiplication
Concepts. (Case structure)
Simple Calculator

https://manual.eg.poly.edu/index.php/Introduction_to_LabVIEW
Create a program that simulates a basic calculator. The calculator will be able to add, subtract,
and multiply.

Assignment:
Build a VI that simulates a heating and cooling system. The system must be controlled either manually or
automatically. Design the VI so that:

The air conditioner is turned on when the temperature is above 80F.

The heater is turned on when the temperature is less than 60F.

The heater and the air conditioner are turned off when the temperature is between 60F and 80F.
1

The front panel must contain:


a

Three LEDs: one to represent the AC, one to represent the heater, and one to show that
the system is being operated manually.

Three switches: one to control the AC, one to control the heater, and one to control
manual or automatic operation.

A thermometer to set the temperature of the system. By default, the thermometer is an


indicator; right-click on it and select Change to control. The thermometer should be set
to 70F.

The Block diagram must contain:


a

A Boolean case statement to control the manual and automatic operation of the AC and
the heater.

After the VI is completed, it must be tested:


a

Using the slide bar on the thermometer, change the system temperature. Make sure the
AC and heat come on as directed.

Test the program's manual operation by turning the manual switch on and then turning
the AC and heat switches on. Each of the LEDs should light up when its corresponding
switch is in the On position.

Have the TA test the VI.

Once testing is completed, take a screenshot of the VI.

Save the VI.

Lab 3:
An Introduction to NI LabVIEW (Part 2)
This lab is continuation of 2nd lab. In this lab you will get more knowledge
about LabVIEW
Note: Snap shots of your VI should be inserted in completed
script of this lab to show your work.

Task 1 Write a simple while loop to increment a number


Loop Execution Timing control
Normally when a loop, such as a while loop, finishes executing one iteration,
it immediately begins running the next. It is often beneficial to control how
often a loop executes, or its frequency. For example, if you wanted to acquire
data in a loop, you would need a method to control the frequency of the data
acquisition.
Write down the functions you can use to control loop execution timings
3 ________________________
4 ________________________
Concepts: While loop, tunnels, shift registers
Task 2: Convert Decimal Number to Binary number
Note: converted binary output is in reverse order so you will have to reverse
the array.
Functions used: number to Boolean array, Reverse 1D Array

Task3: Create New VI from Template VI. Simulated >> Generate and Display
Use the control knob to control the frequency and amplitude of the signal
Use the Programming >>waveform > analog wfm > measurement > ampl
and lelel for amplitude measurement
&
Programming >>waveform > analog wfm > measurement > tone for
frequency measurement

Task4:
Specify the value of voltage and frequency at which you want the LED to
light, use the Tone measurement and ampl and levels vi.
Note: Use comparison palette for comparing amplitude and frequency.
Task 5: Write log data of amplitude to a file
Task 6: Writing data only on user input

Assignment:
1 Add time stamping with your log data
2 Make a RPM counter with simulated square wave.

Task 1

Task 2

Task 3

Task 4:

Task 5:

Assignment 1:

Assignment 2:

Lab 4
Hardware interfacing with
LabVIEW NI-DAQmx

will be
digital
and NI

Objective: In this lab you


acquiring analog and
signals using LabVIEW
ELVIS

Analog INPUT
TASK 1: Acquire and display an external voltage signal (from desktop power supply)
and display its magnitude on numeric indicator and on Waveform graph and on
Waveform chart. See this tutorial to accomplish above task.
http://www.ni.com/academic/students/learndaq/acquire-generate/ (taking a
measurement)

TASK 2: Acquire and display an external voltage signal (from desktop function
generator) and see its amplitude and duty cycle, frequency and show it on
Waveform graph

TASK 3: Lissajous patterns are used to measure phase or frequency relationships


b/w two signals.
From Labview Help >> find Examples search for Lissajous and run the Lissajous
with Express VIs.vi and play with this VI to understand Lissajous patterns.

TASK 4: Acquire two signals (one from desktop function Generator and second from
NI ELVIS FGEN) multiply and add and multiply them and show the output on
Waveform Graph

TASK 5: Show the two signals on xy Graph to make Lissajous patterns.


Draw Lissajous patterns for following

Signal X Frequency = Signal Y


frequency

Signal X Frequency = Signal Y


frequency / 2

Signal X Frequency = 2 x Signal Y


frequency

Signal X Frequency = 3 x Signal Y


frequency

Digital INPUT
TASK 6:
Using square wave signal from function generator make a RPM counter. Implement
this formula to get correct RPM value. RPM = frequency multiply by 60

TASK 7: Implement RPM counter using RPM = 1/time period * 60


Question: What difference did you found in RPM counter implemented in above two
tasks?
Which one is more accurate and fast?

Answer:
RPM calculated using time period is more accurate and fast as it keeps on varying
and doesnt keep a constant value.

TASK 8: use DAQ Assistant to acquire a digital data and show it on LED on front
panel

Digital Signal Generation


TASK 9:
use DAQ Assistant to acquire a digital data and loop it back to LED outputs on NI
ELVIS digital output
1) Using square wave signal from function generator make a RPM
counter. 2) Analog Sine and PWM square wave generation

Lab 5:
Makerhub Lnx LabVIEW interface for Arduino
Making Arduino work with Labveiw
Objective: To Interface Arduino with LabVIEW
Task 1: To make LED on Arduino board to blink

See this Video to accomplish above tasks.


https://www.labviewmakerhub.com/doku.php?
id=learn:tutorials:libraries:linx:digilent_physical_computing_kit:setup

Task 2: Acquire and display an external voltage signal (from desktop power
supply) and display its magnitude on numeric indicator and on Waveform
graph
and
on
Waveform
chart.

See Example program Analog read 1channel.vi. In example finder search for
makerhub

Task 3: Experiment with digital output and make a digital output on Arduino
low and high under the control of labview.
Triggering pin 12 from Labview and checking with LED

Task4: Make a Light intensity meter using analog read in conjunction with
LDR.
Changing light intensity to 0 by covering the LDR with Thumb

Task5: Make Battery charger using upper analog voltage read and digital out
functions. The system should charge the battery upto 3 volts and switch off
the charger after the voltage has reached 3 volts.
Charging

Not Charging

Task6:
Generate PWM signal on Arduino PWM output
Generating a signal of 75% duty cycle on pin number 3

Lab 6: Experimenting with Lab View VISA


library
Task1: Utilization of Visa library: Receive bunch of data from Arduino serial
port and show that in a response box.

Task2: Receive data byte by byte and terminate the receiving, if a letter A is
received from serial port

Task3: Receive data byte by byte and show every byte in separate response
box.

Lab 7: Experimenting with State Machine


in LABVIEW
Finite-state machine (FSM)
A finite-state
machine (FSM)
or
simply
a state
machine
is
a
mathematical model of computation used to design both computer
programs and sequential logic circuits. It is conceived as an abstract
machine that can be in one of a finite number of states. The machine is in
only one state at a time; the state it is in at any given time is called
the current state. It can change from one state to another when initiated by
a triggering event or condition; this is called a transition. A particular FSM is
defined by a list of its states, its initial state, and the triggering condition for
each transition.

The behavior of state machines can be observed in many devices in modern


society that perform a predetermined sequence of actions depending on a
sequence of events with which they are presented. Simple examples
are vending machines, which dispense products when the proper
combination of coins is deposited, elevators, whose sequence of stops is
determined by the floors requested by riders, traffic lights, which change
sequence when cars are waiting, and combination locks, which require the
input of combination numbers in the proper order.

Task1: Implement state machine as shown in this video


https://www.youtube.com/watch?v=vtw6HMwaTIQ

DEFAULT

WAITING FOR PULSE

WAITING FOR BUTTON

RUNNING MOTOR

SHUTDOWN

Lab 8
Making Stroboscope for measuring rotation speed using NIELVIS and LabVIEW

What is Stroboscope?
A stroboscope is an instrument that emits a series of brief, intense flashing
lights at specific intervals.
When the flashing light from a stroboscope is directed onto an object rotating
at high speed (e.g., a cooling fan inside a PC), the moving fan appears to
stand still.
The stroboscope makes the fan rotating at high speed appear to stand still
due to the visual persistence*1 of the human eye.
When the frequency of the flashing lights from the stroboscope is adjusted to
synchronize with the fan rotating speed, the number of apparently stationary
fan blades you see corresponds to the actual number of fan blades.* 2
The retina of the human eye retains an image for approximately 1/16th of a
second. The stroboscope relies on this characteristic of the human eye to
provide its intended function. Projectors used in movie theaters also rely on
characteristics of human vision to display motion pictures.

Task 1: Mark a line on the rotating device at some convenient


location.
Using Function generator Sync output drive an high brightness LED through a
NPN transistor based switch circuit as shown in following figure. Beginning
with a flash rate that is clearly higher than the frequency of the rotating
device, adjust the flash rate until the mark on the device appears stationary.
The function generator display will then show the frequency of rotation i.e
revolution per second. (RPS).
Note: If the initial flash rate is not clearly higher than the frequency of
rotation, care must be taken, as the mark will appear stationary whenever
the frequency of rotation is a higher harmonic of the flash rate.)

Task 2: Using NI-ELVIS with LabVIEW make a system to show the


RPM.
Formula RPM= RPS x 60

Task 3: Disconnect the Function generator and use NI-ELVIS with LabVIEW
to generate strobing signal for your light source.

Lab 9: To Experiment with Strain


gauge
TASK:
First of all, check the strain gauge by applying 5 volts on red and black wire and
checking the voltages using DMM.

Then setup ad620 instrumentation amplifier to give you 0-5 volts.

Then display ad620 output voltages on lab view.

Then display averages of three readings.

WEIGHT (Kg)
0
0.5
1.0
1.5
2.0
2.5

WITH NULL-OFFSET

VOLTAGE (V)
0.32
0.52
0.72
0.92
1.12
1.32

Das könnte Ihnen auch gefallen