EE 382 Lab Manual: Instrumentation Guide
EE 382 Lab Manual: Instrumentation Guide
Revised in 2024
2
EE 382 Instrumentation and Measurements
Table of Contents
.................................................................................................................................................................................... 1
EE 382 Instrumentation and Measurements .............................................................................................................. 1
Lab Experiment 01: Introduction to Instrumentation and measurements, Porteous and Arduino ........................... 8
Objectives: .............................................................................................................................................................. 8
Pre Lab .................................................................................................................................................................... 8
Part (a) Introduction to Instruments ...................................................................................................................... 8
Part(b): Introduction to Porteous ........................................................................................................................... 9
Part(c): Introduction to Arduino ........................................................................................................................... 14
BoardBreakdown ...................................................................................................................................................... 16
HowToProgramArduino .............................................................................................................................................. 17
DownloadSoftware ................................................................................................................................................... 17
ConnectYourArduinoUno ........................................................................................................................................... 17
In Lab Tasks ........................................................................................................................................................... 18
Post Lab: ................................................................................................................................................................ 18
Lab Experiment 02: MEASUREMENTS AND ERROR ANALYSIS USING STATISTICAL TOOLS ...................................... 19
Objectives: ............................................................................................................................................................ 19
Pre Lab .................................................................................................................................................................. 19
INTRODUCTION: .................................................................................................................................................... 19
Mean: .................................................................................................................................................................... 19
Variance (S2): ......................................................................................................................................................... 19
Standard Deviation: .............................................................................................................................................. 19
In Lab Tasks ........................................................................................................................................................... 20
Post Lab ................................................................................................................................................................. 21
Lab Experiment 03: DC AMMETERS DESIGN AND CALIBERATION USING GALVANOMETER AND PROTEUOUS ...... 22
Objectives: ............................................................................................................................................................ 22
Pre Lab .................................................................................................................................................................. 22
Galvanometer ................................................................................................................................................... 22
Workingprinciple:.................................................................................................................................................. 22
AmmeterDesignFromGalvanometer......................................................................................................................... 23
TheBasicAmmeter Circuit ..................................................................................................................................... 23
INSTRUMENTSANDCOMPONENTS........................................................................................................................ 24
PROCEDURE .......................................................................................................................................................... 24
3
EE 382 Instrumentation and Measurements
Fig.3.2BasicDC AmmeterCircuitundercalibration.............................................................................................. 24
In Lab Tasks: .......................................................................................................................................................... 25
Post Lab: ................................................................................................................................................................ 25
Absoluteerror ............................................................................................................................................................ 25
Lab Experiment 04: DCVOLTMETERSDESIGN&CALIBARTION USING GALVANOMETER and PRPTEUOS.................. 28
Objectives: ............................................................................................................................................................ 28
Pre Lab .................................................................................................................................................................. 28
Introduction: ......................................................................................................................................................... 28
In Lab Tasks: .......................................................................................................................................................... 30
Post Lab: ................................................................................................................................................................ 30
LAB EXPERIMENT 05: HALF WAVE RECTIFICATION (USING HARDWARE AND PROTEOUS)...................................... 32
OBJECTIVE ............................................................................................................................................................. 32
Pre Lab: ................................................................................................................................................................. 32
Introduction .......................................................................................................................................................... 32
WORKING PRINCIPLE OF A HALF WAVE RECTIFIER............................................................................................... 32
EQUIPMENT: ......................................................................................................................................................... 32
In Lab Tasks: .......................................................................................................................................................... 33
POST LAB: .............................................................................................................................................................. 35
Lab Experiment 06: FULL WAVE RECTIFICATION USING HARDWARE AND PROTEOUS............................................ 36
objective:............................................................................................................................................................... 36
Pre Lab: ................................................................................................................................................................. 36
In Lab Tasks: .......................................................................................................................................................... 37
POST LAB: .............................................................................................................................................................. 40
Lab Experiment 7: Introduction to Arduino Basic Programming .............................................................................. 41
Objective: .............................................................................................................................................................. 41
Pre Lab: ................................................................................................................................................................. 41
HowToProgramArduino .............................................................................................................................................. 41
DownloadSoftware ................................................................................................................................................... 41
In lab Tasks: ........................................................................................................................................................... 42
ArduinoTask1:BlinkanLED ......................................................................................................................................... 42
CompleteSketch ........................................................................................................................................................ 43
Setup: ........................................................................................................................................................................ 44
Task:4PushbuttonandLEDwithArduino-DigitalInput &Output .................................................................................. 46
4
EE 382 Instrumentation and Measurements
Requiredequipment: ................................................................................................................................................. 46
Schematic: ................................................................................................................................................................. 46
Lab Experiment 08: Position and Displacement Measurement Using Flex Sensor and its Interfacing with Arduino
Mega ......................................................................................................................................................................... 48
OBJECTIVE: ............................................................................................................................................................ 48
Introduction .............................................................................................................................................................. 48
How it Works......................................................................................................................................................... 48
EQUIPMENT .............................................................................................................................................................. 50
In Lab Tasks: .......................................................................................................................................................... 50
PROCEDURE: ......................................................................................................................................................... 50
EQUIPMENT .............................................................................................................................................................. 51
Code: ..................................................................................................................................................................... 52
Task 2: ................................................................................................................................................................... 52
LAB Experiment 9: TEMPERATURE MEASUREMENT USING LM35 SENSOR AND ITS INTERACING WITH ARDUINO
MEGA ........................................................................................................................................................................ 54
Objective: .............................................................................................................................................................. 54
Pre lab: .................................................................................................................................................................. 54
Introduction: ......................................................................................................................................................... 54
Lab Experiment 10: Open Ended Lab ........................................................................................................................ 58
Problem Statement ............................................................................................................................................... 58
Deliverable: ........................................................................................................................................................... 58
Lab 11: RESISTANCE MEASURMENT USING LDR SENSOR AND ITS INTERFACING WITH ARDUINO MEGA .............. 59
Objective: .............................................................................................................................................................. 59
Pre Lab: ................................................................................................................................................................. 59
ThePhotoconductiveCell ....................................................................................................................................... 59
TheLightDependentResistor ................................................................................................................................. 59
LDRonan ArduinoAnalogPin .................................................................................................................................. 59
Equipment ............................................................................................................................................................. 60
In Lab Tasks: .......................................................................................................................................................... 60
Task 1: ................................................................................................................................................................... 60
Task2:LED ControllingusingLDR ............................................................................................................................ 63
Step2:Hardware Requirement .................................................................................................................................. 63
Step 4: TheCode ........................................................................................................................................................ 65
Task3:ActivateBuzzerandLEDusingLDRandArduino .............................................................................................. 66
5
EE 382 Instrumentation and Measurements
LEDconnection .................................................................................................................................................. 67
LDRConnection.................................................................................................................................................. 67
BuzzerConnection ............................................................................................................................................. 67
Lab 12: DC Wheatstone Bridge Principle and Analysis ............................................................................................. 69
Objective: .............................................................................................................................................................. 69
Pre Lab: ................................................................................................................................................................. 69
Introduction: ......................................................................................................................................................... 69
INSTRUMENTS AND COMPONENTS ...................................................................................................................... 70
In Lab Tasks: .......................................................................................................................................................... 70
Lab Experiment 13: Capacitance Measurement Using AC Bridges........................................................................... 71
Objective: .............................................................................................................................................................. 71
Pre Lab: ................................................................................................................................................................. 71
Introduction .......................................................................................................................................................... 71
INSTRUMENTS AND COMPONENTS ...................................................................................................................... 71
In Lab Tasks: .......................................................................................................................................................... 72
Lab Experiment 14: Inductance Measurement using AC Bridges ............................................................................. 73
Objective: .............................................................................................................................................................. 73
Pre Lab: ................................................................................................................................................................. 73
AC Bridges Introduction ........................................................................................................................................ 73
Maxwell's Bridge ................................................................................................................................................... 74
Schering Bride: ...................................................................................................................................................... 76
In Lab Tasks: .......................................................................................................................................................... 76
Lab Experiment 15: Understanding the Working principle and behavior of function Generator, Oscilloscope and
AC/DC Rectifiers .................................................................................................................................................... 78
Objective: .............................................................................................................................................................. 78
Pre Lab: ................................................................................................................................................................. 78
Function Generator:.............................................................................................................................................. 78
OSCILLOSCOPE: ..................................................................................................................................................... 78
AC/ DC RECTIFIERS: ............................................................................................................................................... 79
Lab Experiment 16: Understanding the working principle and behavior of Spectrum and Network Analyzers .. 81
Objective: .............................................................................................................................................................. 81
Pre Lab: ................................................................................................................................................................. 81
Spectrum Analyzer ................................................................................................................................................ 81
Network Analyzer.................................................................................................................................................. 82
6
EE 382 Instrumentation and Measurements
7
EE 382 Instrumentation and Measurements
Pre Lab
The two most important commonly used quantities are the current and the voltage. The current is a serial
quantity and measured by using ammeter. The voltage is defined between two nodes and measured by
connecting a voltmeter across those two nodes.
(a) The electronic circuit, (b) measuring current and (c) voltage: Current is measured by connecting the
ammeter in series to the resistor; the voltage is measured by connecting the voltmeter in parallel to it.
Ohmmeter is used just as voltmeter.
Equipment:
Digital Multimeter
12V Battery
8
EE 382 Instrumentation and Measurements
1x 1k ohm
1x 100 ohm
2x 10 k ohm
Connecting wires
Procedure:
1. Connect the circuit as shown in figure.
2. Calculate the current and the voltages across the resistors R1 and R2 of figure for (1) R2=10 kΩ
and (2) R2=100Ω.
3. Open one end of R1. Connect the analog ammeter in series and measure the current
4. Open one end of R2. Connect the analog ammeter in series and measure the current
5. Connect the analog voltmeter across the resistor R1 and measure V1.
6. Connect the analog voltmeter across the resistor R2 and measure V2.
7. Connect the ohmmeter across the resistor R1 and measure R1.
8. Connect the ohmmeter across the resistor R2 and measure R2.
9. Now theoretically calculate both current and voltage and compare both results.
9
EE 382 Instrumentation and Measurements
10. Using proteus you can find different parents of circuits such as current, the voltage value of any
component, and resistance at any instant which is very difficult in a practical circuit.
Implementation:
Step 1: Open ISIS software and select New design in File menu
Step 2: A dialogue box appears to save the current design. However, we are creating a new design
file so you can click Yes or No depending on the content of the present file. Then a Pop-Up
appears asking to select the template. It is similar to selecting the paper size while printing. For now
select default or according to the layout size of the circuit.
10
EE 382 Instrumentation and Measurements
Step 3:An untitled design sheet will be opened, save it according to your wish, it is better to create a
new folder for every layout as it generates other files supporting your design. However, it is
not mandatory.
11
EE 382 Instrumentation and Measurements
12
EE 382 Instrumentation and Measurements
Step 5: Click On Pick from Libraries. It shows the categories of components available and a search
option to enter the part name.
Step 6: Select the components from categories or type the part name in Keywords text box.
13
EE 382 Instrumentation and Measurements
What Is Arduino?
Arduino is an open source programmable circuit board that can be integrated into awide variety of
makerspace projects both simple and complex. This board contains a micro controller which is a
bletobeprogrammedtosenseandcontrolobjectsinthephysicalworl.
By responding to sensors and inputs, the Arduino is abletointeractwith a large array of outputs such as
LEDs, motors and displays.Because of it’s flexibility and low cost, Arduino has become a very popular
choice for makers andmakerspaceslookingto createinteractivehardwareprojects.
14
EE 382 Instrumentation and Measurements
15
EE 382 Instrumentation and Measurements
16
EE 382 Instrumentation and Measurements
Download Software
Download the free software known as the IDE.The Arduino IDE is the interfacewhere you will write the
sketches that tell the board what to do. You can find the latest version of this software on the
ArduinoIDEdownloadpage.
To install the software, you will need to click on the link that corresponds with your computer’s
operating system.
ConnectYourArduinoUno
At this point you are ready to connect your Arduino to your computer. Plug one end of the USB cable to
the Arduino Uno and then the other end of the USB to
yourcomputer’sUSBport.Oncetheboardisconnected,youwillneedtogotoToolsthenBoardthenfinallyselect
ArduinoUno.
17
EE 382 Instrumentation and Measurements
Next, you have to tell the Arduino which port you are using on your computer. To select port,
gotoTools thenPortthenselecttheportthatsaysArduino.
In Lab Tasks
1. By considering the above circuits measure the following parameters and compare their
results.
2. Design the circuits in proteus and measure current and voltage.
Voltage
R2 Current
Post Lab:
Draw the graph between voltage and current for theoretical and practical, compare the results.
18
EE 382 Instrumentation and Measurements
Pre Lab
Introduction:
Measurements are never perfect; there are always errors. When we measure something multiple
times, we'll likely get different values. We can't know the exact value, but by improving our
measurements and techniques, we reduce errors and gain more confidence. Repeated measurements
tend to cluster around an average value, which we call the "mean," and we use the "standard
deviation" to describe how spread out the values are from that mean.
Mean:
For a set of N measured values for some quantity x, the mean of x is represented by the symbol
𝑋and is calculated by the following formula:
Variance (S2):
Average squared deviation of values from mean.
Standard Deviation:
Spread or deviation of the measured values about the mean is called Standard Deviation.Positive
square root of the variance and is defined as:
19
EE 382 Instrumentation and Measurements
Equipment:
15 x Resistors
1 x Digital Multimeter
Procedure:
1. Obtain a sample of 10 resistors at random. Using your digital multimeter, measure the values
of the entire set of 10 resistors.
2. Measure and record their values under Sample 1 in table given below.
3. After that, obtain a second sample of 5 resistors. Ensure that your selection is random.
Repeat step 3 for Sample 2.
In Lab Tasks
1. Write the observations in the following table.
S# Sample 1 Var SD Sample 2 Var SD
1
2
3
4
5
6
7
8
9
10
2. Calculate the required statistical parameters of each set of resistance values obtained in Table
1.1. Record these values in Table 1.2
Sample 2
Table 1.2
3. With regard to these statistical parameters, which sample of resistors matches best with the
main set? Record your findings in Table 1.3 given below. (Tick ✓ the appropriate box in
each row.)
Statistical Parameters Sample 1 Sample 2
Mean
Variance
Standard Deviation
20
EE 382 Instrumentation and Measurements
Post Lab:
1. Does a greater value of uncertainty affect your confidence in your results? Why?
2. If three resistors from Sample 1 are connected in series, what would be the total resistance?
(Hint: Uncertainty propagates).
3. If two resistors from Sample 2 are connected in parallel, what would be the total resistance?
4. Draw table of part 2 with calculated values.
21
EE 382 Instrumentation and Measurements
The moving coil, suspension, and permanent magnet are the main parts of the galvanometer.
22
EE 382 Instrumentation and Measurements
Moving Coil. The moving coil is the current carrying part of the galvanometer. It is rectangularor
circular and has the number of turns of fine copper wire. The coil is freely moved about itsvertical
axis of symmetry between the poles of a permanent magnet. The iron core provides the low
reluctanceflux path and hence provides the strong magnetic field for the coil to move in.
Suspension. The coil issuspendedbyaflatribbonwhichcarriesthecurrenttothecoil.Theother current
carrying coil is the lower suspension whose torque effect is negligible. The uppersuspension coil is
made up of gold or copper wire which is made in the form of a ribbon. The mechanical
strengthofthewireis notverystrong, and hen cethegalvanometershandle carefully.
Let,l,d:the lengthof respectiveverticalandhorizontal sideofthecoil inthemeter.
N: number ofturnsin thecoil,
B: Fluxdensityin theairgap,wb/m2
i: currentthroughmovingcoilinAmpere
K: springconstant of suspension, Nm/rad
θf: finalsteady-statedeflectionofmovingcoilinradiance
Theforceoneachsideofthecoilisgivenas,Henc
edeflectingtorquebecomes,
AmmeterDesignFromGalvanometer
The DC ammeter is used to measure the steady current that flows fromone point to another in agiven
circuit. ThebasicDCammeteriscapableofmeasuringcurrentsfrommicroamperestoseveral milliamperes.
When used with external resistance shunts, its range can be extended tocurrentsof several hundred
amperes.
TheBasicAmmeter Circuit
The PMMC movement is inherently an ammeter. The amount of current required to deflect
themeter to full scale is called the full-scale deflection current, I FSD, and theresistance of the
coilwinding is designated RM. Since it is desirable to keep the basic meter movement small
andlight, the full-scale deflection current for mostmovements is less than 100 𝝻A. To
measurelargercurrents(IT),itisnecessarytobypassorshuntexcesscurrentaroundthemetercoil.Forthispur
poseaparallelshuntresistorRSisusedwhichis calculated by using thefollowingformula.
23
EE 382 Instrumentation and Measurements
Now a calibration equation can be determined using the least squares regression algorithm thatmust
relate the deflection with the current through the ammeter. The calibration equation alsocomes in
handywhilerevisingthe scaleof themeter.
Instrumentsand Components:
Galvanometer
Resistors
1xDigitalMultimeter
PowerSupply
BreadBoard
Procedure:
1. SetupthecircuitshowninFig.3.1.
Fig:3.1
2. Adjust the supply voltage and Rsuch that the galvanometer shows full scalede flection. Note
down the full scaled eflection current valuefromyourdigital multi-meter.
IFSD=
3. IfNischosen tobe20,what wouldbethe valueof IT? .
4.
In Lab Tasks:
1. Carefullyadjustthevalueofpowersupplyvoltagesin ordertogetgalvanometer Deflection so f5,
10, 15,20 ,25&30 units. Onthe tablebelow, recordthecorrespondingreadingsofthe current shown
bythemultimeter.
Deflection(units) AmmeterReading(mA) MultimeterReadings(mA) AbsoluteError RelativeError
5
10
15
20
25
30
Post Lab:
Absoluteerror
RelativeError
25
EE 382 Instrumentation and Measurements
Obtainthescatterdiagramofthecurrent(X)vsdeflection(Y)onthegraph below.
1. Doesthetrendofthegraphallowyoutousetheleastsquares regressionmethod? Explain.
26
EE 382 Instrumentation and Measurements
27
EE 382 Instrumentation and Measurements
Since the total resistance must equal the applied voltage divided by the meter current, wemay solve for the
series multiplier resistor, R Sas follows
Now a calibration equation can be determine during the leasts quaresregressionalgorithm that mustre late
the deflection with the voltage across the voltmeter. The calibration eruptional socomes in handy while
revising the scale of the meter.
Instruments and Components
Galvanometer
Resistors
1xDigitalMultimeter
PowerSupply
BreadBoard.
28
EE 382 Instrumentation and Measurements
Procedure
1. Set up the circuitsh own inFig.4.1.
IFSD =---------------------------------------------------
--
3. Use the multi-meterto measure the voltage across the meter, and then calculate the internal
resistance of the galvanometer.
RM=
4. Fig.4.2shows a basic DC volt meter circuit under calibration. Calculate there quired value of the
multiplier /series resistor RSif the range of the volt meter is 0-15 V.
29
EE 382 Instrumentation and Measurements
In Lab Tasks:
Carefully adjust the power supply voltage esinordertogetgalvanometerdeflections of 5, 10, 15, 20, 25 & 30
units. On the table below, record the correspondingreadingsofthe voltageshown bythe multimeter.
Deflections(X)
Fig. 4.3 ScatterDiagram
Post Lab:
1. Doesthetrendofthegraphallowyoutousetheleastsquaresregressionmethod? Explain.
2. Take 6 Readings of voltmeter at deflection unit 25 and find Precision of 5th Measurement?
30
EE 382 Instrumentation and Measurements
31
EE 382 Instrumentation and Measurements
Equipment:
1. Diode 1N4007
2. Resistor 10K
32
EE 382 Instrumentation and Measurements
3. Capacitor 1000uF
4. Toggle Switch
5. Connecting wires
6. Breadboard
In Lab Tasks:
A) Half wave rectifier circuit without filter capacitor:
Procedure:
1. Connect the diode in series with a 10kΩ resistor.
2. Generate a 1kHz signal from the function generator.
3. Now connect the output of the function generator with the diode.
4. Now by using a BNC to BNC connector view the input waveform on channel 1 of oscilloscope
and output waveform across the resistor on channel 2.
5. Now by using measurements button analyze the different parameters of the waveform.
6. By using DMM, measure the input AC voltage, output DC voltage and output AC voltage.
7. Compare your results with the one shown on oscilloscope. Are both the results same?
8. Similarly make the proteus simulation of the same circuit and compare it with your practical
readings.
33
EE 382 Instrumentation and Measurements
Half wave rectifier without filter capacitor converts AC voltage into pulsating DC voltage. Filter capacitor
is used to obtain smooth DC voltage. Construct the following circuit to perform this practical.
Observation:
1) Without filter capacitor
34
EE 382 Instrumentation and Measurements
Post Lab:
1. Define ripple factor
2. What is the effect of filter capacitor on ripple voltage ?
3. What is the mathematical relationship between Vrms and Vp-p?
35
EE 382 Instrumentation and Measurements
Pre Lab:
Introduction:
The Bridge rectifier is a circuit, which converts an ac voltage to dc voltage using both half cycles of the
input ac voltage. The Bridge rectifier has four diodes connected to form a Bridge. The load resistance is
connected between the other two ends of the bridge.
For the positive half cycle of the input ac voltage, diode D1 and D2 conducts whereas diodes D3 and D4
remain in the OFF state. The conducting diodes will be in series with the load resistance RL and hence the
load current flows through RL.
For the negative half cycle of the input ac voltage, diode D3 and D4 conducts whereas diodes D1 and D2
remain in the OFF state. The conducting diodes will be in series with the load resistance RL and hence the
load current flows through RL in the same direction as in the previous half cycle. Thus a bidirectional
wave is converted into a unidirectional wave.
Ripple factor is a measure of effectiveness of a rectifier circuit and defined as a ratio of RMS value of ac
component to the dc component in the rectifier output.
Equipment:
4 x Diodes
1x 10kΩ
Function Generator
Bread board
Oscilloscope
36
EE 382 Instrumentation and Measurements
Precautions:
1. Check the wires of DMM for continuity test before use.
2. Keep the power supply at Zero volts before Start.
3. All the contacts must be intact.
In Lab Tasks:
Procedure:
Part (a) : Without filter Capacitor:
1. Connect the circuit as shown below.
2. Use function generator instead of a transformer.
37
EE 382 Instrumentation and Measurements
3. Connect channel 1 probe of oscilloscope with the input signal to observe the input waveform.
4. Connect channel 2 probe of oscilloscope across the resistor and observe the output waveform.
5. Similarly measure the input and output using digital multimeter.
6. Make the proteus simulation and verify your results.
Observation:
AC input Voltage (rms), Vrms=_____________
DC output Voltage Vdc=_________________
AC output Voltage (Ripple Voltage) Vr : _____________
Ripple factor: (Vr/Vdc)=_______________________
Input Wave Form:
38
EE 382 Instrumentation and Measurements
3. Connect channel 1 probe of oscilloscope with the input signal to observe the input waveform.
4. Connect channel 2 probe of oscilloscope across the resistor and observe the output waveform.
5. Similarly measure the input and output using digital multimeter.
6. Make the proteus simulation and verify your results.
Observation:
AC input Voltage(rms), Vrms=_____________
DC output Voltage Vdc=_________________
AC output Voltage (Ripple Voltage) Vr : _____________
Ripple factor: (Vr/Vdc)=_______________________
39
EE 382 Instrumentation and Measurements
Post Lab:
1. Define ripple factor
2. What is the effect of filter capacitor on ripple voltage?
3. What is the mathematical relationship between Vrms and Vp-p?
40
EE 382 Instrumentation and Measurements
Download Software
Download the free software known as the IDE.The Arduino IDE is the interfacewhere you will write the
sketches that tell the board what to do. You can find the latest version of this software on the
ArduinoIDEdownloadpage.
To install the software, you will need to click on the link that corresponds with your computer’s
operating system Connect Your Arduino Uno
At this point you are ready to connect your Arduino to your computer.Plug one endof the USB cable to
the Arduino Uno and then the other end of the USB to your computer’s USB port. Once the board is
connected, you will need to go to Tools then Board then finally select Arduino Uno.
41
EE 382 Instrumentation and Measurements
Next, you have to tell the Arduino which port you are using on your computer. To select port,
gotoTools thenPortthenselecttheportthatsaysArduino.
In lab Tasks:
Arduino Task1: Blink an LED:
It’s finally time to do your first Arduino project.In this example, we are going tomakeyourArduinoboard
blinkanLED.
42
EE 382 Instrumentation and Measurements
Complete Sketch
43
EE 382 Instrumentation and Measurements
Setup:
44
EE 382 Instrumentation and Measurements
voidsetup() //runonce,whenthesketchstarts
pinMode(redPin,
// setsthe digitalpinasoutput
OUTPUT);pinMode(greenPin,O
voidloop() //runoverandoveragain
{
//setstheRedLEDon
digitalWrite(redPin,
//setstheGreenLEDon
HIGH);digitalWrite(greenPin,
HIGH);delay(500);digitalWrite // waitsforhalf asecond
(redPin,
//setstheRedLEDoff
LOW);digitalWrite(greenPin,LO
//setstheGreenLEDoff
45
EE 382 Instrumentation and Measurements
Schematic:
46
EE 382 Instrumentation and Measurements
47
EE 382 Instrumentation and Measurements
Introduction:
This flex sensor is a variable resistor like no other. The resistance of the flex sensor increases as the body of
the component bends.
Flex sensors are available in two sizes: one 2.2" (5.588cm) long and another coming in at 4.5" (11.43cm)
long.
How it Works:
One side of the sensor is printed with a polymer ink that has conductive particles embedded in it. When the
sensor is straight, the particles give the ink a resistance of about 30k Ohms. When the sensor is bent away
from the ink, the conductive particles move further apart, increasing this resistance (to about 50k-70K Ohms
when the sensor is bent to 90°, as in the diagram below).
48
EE 382 Instrumentation and Measurements
When the sensor straightens out again, the resistance returns to the original value. By measuring the
resistance, you can determine how much the sensor is being bent.
NOTE:
These flex sensors are designed to be flexed in just one direction - away from the link- as demonstrated in the
image below.
Bending the sensor in the other direction will not produce any reliable data, and may damage the sensor. Also
take care not to bend the sensor close to the base, as they have a tendency to kink and fail.
Left flat, these sensors will look like a 30kΩ resistor. As it bends, the resistance between the two terminals
will increase to as much as 70kΩ at a 90° angle.
49
EE 382 Instrumentation and Measurements
Equipment:
Breadboard
flex sensor
Digital Multi Meter
Jumping wires
Resistor 10k
In Lab Tasks:
PROCEDURE:
Part(a) : Flex Sensor
Observation:
Observation:
50
EE 382 Instrumentation and Measurements
Equipment:
Arduino & Breadboard
flex sensor
Digital Multi Meter
Led &Resistor 10k,220 ohm
51
EE 382 Instrumentation and Measurements
Code:
//Constants:
const int ledPin = 3; //pin 3 has PWM funtion
const int flexPin = A0; //pin A0 to read analog input
//Variables:
int value; //save analog value
void setup(){
pinMode(ledPin, OUTPUT); //Set pin 3 as 'output'
Serial.begin(9600); //Begin serial communication
}
void loop(){
value = analogRead(flexPin); //Read and save analog value from potentiometer
Serial.println(value); //Print value
value = map(value, 700, 900, 0, 255);//Map value 0-1023 to 0-255 (PWM)
analogWrite(ledPin, value); //Send PWM value to led
delay(100); //Small delay
}
Task 2:
Create a voltage divider circuit combining a flex sensor with a 47k resistor. - The resistor should connect
from A0 to GND.
52
EE 382 Instrumentation and Measurements
The 47kΩ resistor on the ground side, and the flex sensor on the 5V side, means as the flex sensor's
resistance increases (meaning the sensor is bending) the voltage on A0 will decrease.
void setup()
{
Serial.begin(9600);
pinMode(FLEX_PIN, INPUT);
}
void loop()
{
// Read the ADC, and calculate voltage and resistance from it
int flexADC = analogRead(FLEX_PIN);
float flexV = flexADC * VCC / 1023.0;
Serial.println(flexV);
delay(500);}
53
EE 382 Instrumentation and Measurements
1. LM35 is a temperature sensor which can measure temperature in the range of -55°C to 150°C.
2. It is a 3-terminal device that provides analog voltage proportional to the temperature. The higher the
temperature, the higher the output voltage.
3. The output analog voltage can be converted to digital form using ADC so that a microcontroller can
process it.
Apparatus:
1. Temperature Sensor (LM35)
2. Arduino Mega 2560
3. Connecting Wires
4. Breadboard
In Lab Tasks:
Connection Diagram of LM35 Temperature Sensor with Arduino
54
EE 382 Instrumentation and Measurements
55
EE 382 Instrumentation and Measurements
56
EE 382 Instrumentation and Measurements
Code:
Output:
57
EE 382 Instrumentation and Measurements
58
EE 382 Instrumentation and Measurements
59
EE 382 Instrumentation and Measurements
In this setup we will make it that the value read from the Analog pin will actually increaseas light increases.
For this we use a tiny circuit that pushes power through the LDR. Sincethe LDR decreases its resistance as
lightincreases, more “power” willpass throughittotheAnalogpin,whichresultsin theArduino“reading”ahigher
value.
The analog pin will read values between 0 and 1023, so it converts the analog signal to adigital
representation – also called Analog Digital Converter (AD or ADC), which is builtintotheArduino.
Equipment:
Arduino
USBcabletoconnecttheArduinotoourcomputer.
ArduinoIDE
an LDR
a10KΩ resistor
3 wires
asmallbreadboard
In Lab Tasks:
Task 1:
Connect +5V of the Arduino to one pin of the LDR (LDR pins can be swapped, so no worries about
polarityhere).
Connect the other pin of the LDR to A0 (analog pin of the Arduino) and one pin of the 10KΩ
resistor.Connect the otherpinofthe10KΩresistortoGNDofthe Arduino.
Schematic
60
EE 382 Instrumentation and Measurements
Arduino–LDRconnectedtoanAnalogPin
Breadboarddrawing
Arduino– LDRconnectedtoanAnalogPin
61
EE 382 Instrumentation and Measurements
ConnectyourArduinowiththeUSBcabletoyourcomputer.
StarttheArduinoIDEandmakesureyouselecttherightboardandserialport.For selecting the right board, go to
“Tools”“Board”“Arduino Uno” (if you’re using anArduino Uno), and for the right port, go to
“Tools”“Port”“/dev/cu.usbmodem1411(ArduinoUno)”
Copy and past the sketch above into the Arduino IDE (either paste over the existing emptycode,or openanew
sketch – “File”“New“)andclickthe“Upload”button
Nextstartthe“Tools” “SerialMonitor”sowecanseetheoutput,whichwillbesomethinglikethis:
62
EE 382 Instrumentation and Measurements
Step 1: Principle:
63
EE 382 Instrumentation and Measurements
Step 3:Assembly:
65
EE 382 Instrumentation and Measurements
66
EE 382 Instrumentation and Measurements
Step 2: Schematic
Draw Yourself!!
LED connection:
1. LED attach to board
2. Resistor (220ohm) onelegattachtoLEDlongleg
3. The greenwireattachto resistor'semptyleg→ ArduinoD13
4. TheblackwireattachoLED shortleg →Arduino GND
LDR Connection:
1. LDR attach to board
2. Resistor (10kohm) attach to LDRoneleg
3. The Black wire attach to LDR other(empty)leg→ArduinoGnd
4. TheYellowwire attachtoLDR and resistor samecolumn →ArduinoA0
5. TheRedwireattachtoresistoremptyleg→ Arduino5V
Buzzer Connection:
1. Buzzer+topin12onArduino
2. Buzzer-toGNDonArduino
Code
const int ledPin =
13;const int buzzerPin
= 12;const int ldrPin =
A0;void setup ()
{Serial.begin(9600);
pinMode(ledPin,
OUTPUT);pinMode(buzzerPi
n,
OUTPUT);pinMode(ldrPin,I
NPUT);
67
EE382 Instrumentation and Measurements Lab Manual
}
voidloop(){
intldrStatus=analogRead(ldrPin);//readthestateoftheLDRvalue
if (ldrStatus>=
400)
{tone(buzzerPin,
100);digitalWrite
(ledPin,HIGH);d
elay(100);noTon
e(buzzerPin);digi
talWrite(ledPin,
LOW);delay(100
);
Serial.println("-----------ALARMACTIVATED -------");
}
else
{noTone(
buzzerPin
);
digitalWrite(ledPin,
LOW);Serial.println("ALARM
DEACTIVATED");
}
}
68
EE382 Instrumentation and Measurements Lab Manual
𝑅2
𝑅𝑋 = 𝑅3
𝑅1
69
EE382 Instrumentation and Measurements Lab Manual
In Lab Tasks:
Procedure:
1. Choose R1 = R2 = 100Ω.
2. Then set up the Wheatstone bridge shown in Fig. 9.1.
3. Connect an unknown resistance in one arm of the bridge and achieve the balance condition by
adjusting the variable resistance in the adjacent arm. Use a DMM to measure the voltage across
nodes A & B. The DMM should read zero when the bridge is balanced.
4. Remove the variable resistor from the circuit and measure its value using your DMM. (This step is
omitted when dealing with practical Wheatstone bridges because the variable resistor knobs come
with calibrated dials.)
R3 = _________________________________
1. Repeat Step 3 & 4 to measure three more unknown resistances and note your results in the table
below.
RX
S. No. R3 RX (Multimeter) Error
(Wheatstone Bridge)
1
2
3
Table 9.1 Wheatstone Bridge - Multimeter Comparison (R2/R1 = 1)
2. Replace R2 with 1 kΩ and then repeat step 5. Note your results in Table 9.2
RX
S. No. R3 RX (Multimeter) Error
(Wheatstone Bridge)
1
2
3
Table 9.2 Wheatstone Bridge - Multimeter Comparison (R2/R1 = 10)
70
EE382 Instrumentation and Measurements Lab Manual
𝑅1
𝐶𝑋 = 𝐶1
𝑅2
The unknown capacitor is actually more a function of the value of the known standard capacitor than the
values of R1 and R2, because only the ratio of the resistances is involved. Because of its simplicity, the basic
circuit has no provision for balancing the resistive component of a capacitor. It is intended for pure
capacitive elements with no leakage (i.e., infinite parallel resistance).
71
EE382 Instrumentation and Measurements Lab Manual
Capacitors
Variable Resistor
x Digital Multimeter
x LCR meter
1 x Power Supply
Bread Board
In Lab Tasks:
Procedure:
1. Choose R1 = 100Ω.
2. Then set up the Capacitance Bridge shown in Fig. 10.1.
3. Connect an unknown capacitance in one arm of the bridge and achieve the balance condition by
adjusting the variable resistance in the adjacent arm. Use a DMM to measure the voltage across
nodes A & B. The DMM should read zero when the bridge is balanced.
4. Remove the variable resistor from the circuit and measure its value using your DMM. (This step is
omitted when dealing with practical AC bridges because the variable resistor knobs come with
calibrated dials.)
R2 = _________________________________
5. Repeat Step 3 & 4 to measure three more unknown capacitances and note your results in the table
below.
CX CX (LCR
S. No. R2 Error
(Capacitance Bridge) meter)
1
2
3
Table 10. 1 Capacitance Bridge – LCR meter Comparison (R 1 = 100Ω)
6. Replace R1 with 1 kΩ and then repeat step 5. Note your results in Table 10.2
CX CX (LCR
S. No. R2 Error
(Capacitance Bridge) meter)
1
2
3
Table 10. 2 Capacitance Bridge – LCR meter Comparison (R 1 = 1 kΩ)
72
EE382 Instrumentation and Measurements Lab Manual
As shown in above figure, AC bridge mainly consists of four arms, which are connected in rhombus or
square shape. All these arms consist of some impedance.The detector and AC voltage source are also
required in order to find the value of unknown impedance. Hence, one of these two are placed in one
diagonal of AC bridge and the other one is placed in other diagonal of AC bridge. The balancing condition
of Wheatstone’s bridge as –
We will get the balancing condition of AC bridge, just by replacing R with Z in above equation.
73
EE382 Instrumentation and Measurements Lab Manual
Here, Z1 and Z2are fixed impedances. Whereas Z3is a standard variable impedance and Z4is an unknown
impedance.
Maxwell's Bridge:
Maxwell’s bridge is an AC bridge having four arms, which are connected in the form of a rhombus or
square shape. Two arms of this bridge consist of a single resistor, one arm consists of a series combination
of resistor and inductor & the other arm consists of a parallel combination of resistor and capacitor.An AC
detector and AC voltage source are used to find the value of unknown impedance. Hence, one of these two
are placed in one diagonal of Maxwell’s bridge and the other one is placed in other diagonal of Maxwell’s
bridge.Maxwell’s bridge is used to measure the value of medium inductance. The circuit diagram of
Maxwell’s bridge is shown in the below figure.
In above circuit, the arms AB, BC, CD and DA together form a rhombus or square shape. The arms AB and
CD consist of resistors, R2and R3 respectively. The arm, BC consists of a series combination of resistor,
R4and inductor, L4. The arm, DA consists of a parallel combination of resistor, R1and capacitor, C1.
Let, Z1,Z2,Z3and Z4are the impedances of arms DA, AB, CD and BC respectively. The values of these
impedances will be
74
EE382 Instrumentation and Measurements Lab Manual
By comparing the respective real and imaginary terms of above equation, we will get.
By substituting the values of resistors R1, R2and R3in Equation 1, we will get the value of resistor, R4.
Similarly, by substituting the value of capacitor, C1and the values of resistors, R2and R3in Equation 2, we
will get the value of inductor, L4.
The advantage of Maxwell’s bridge is that both the values of resistor, R4 and an inductor, L4 are
independent of the value of frequency.
75
EE382 Instrumentation and Measurements Lab Manual
Schering Bride:
In Lab Tasks:
Procedure:
Part A:
76
EE382 Instrumentation and Measurements Lab Manual
1. Construct the Maxwell Bridge shown below using C1=10uF, R1= R3 =1K Pot, R2=10 ohms. Apply
a 1 KHz, 10Vp-p sinusoidal signal to the bridge.
Part B:
1. Construct the Schering Bridge shown below using C1=10uF, R1= 1K, R2 =1K Pot, C3=1uF. Apply
a 1 KHz, 10 Vp-p sinusoidal signal to the bridge.
77
EE382 Instrumentation and Measurements Lab Manual
Pre Lab:
Function Generator:
A function generator is a piece of electronic test equipment or software used to generate different types of
electrical waveforms over a wide range of frequencies. Some the common waveforms produced by the
function generator includes sine wave, square wave, triangular wave.
Oscillo scope:
The cathode ray oscilloscope is an electronic test instrument, it is used to obtain waveformswhen the
different input signals are given. The oscilloscope observes the changes in the electrical signals over time,
thus the voltage and time describe a shape and it is continuously graphed beside a scale. By seeing the
waveform, we can analyze some properties like amplitude, frequency, rise time, distortion, time interval,
and etc.The CRO working principle depends on the electron ray movement because of the electrostatic
force. Once an electron ray hits a phosphor face, then it makes a bright spot on it. A Cathode Ray
Oscilloscope applies the electrostatic energy on the electron ray from two vertical ways. The spot on the
phosphor monitor turns due to the effect of these two electrostatic forces which are mutually perpendicular.
It moves to make the necessary waveform of the input signal.
78
EE382 Instrumentation and Measurements Lab Manual
AC/ DC Rectifiers:
A rectifier is an electrical device used to convert alternating current (AC) into direct current (DC) by
allowing a current to flow through the device in one direction only. Diodes work like one-way valves within
the rectifier to maintain this flow of current. This process is generally known as “rectification.” A halfwave
rectifier circuit uses only one diode for the transformation. A halfwave rectifier is defined as a type of
rectifier that allows only one-half cycle of an AC voltage waveform to pass while blocking the other half
cycle. On the other hand a full wave rectifier has four diodes connected to form a Bridge. The load
resistance is connected between the other two ends of the bridge. For the positive half cycle of the input ac
voltage, diode D1 and D2 conducts whereas diodes D3 and D4 remain in the OFF state. The conducting
diodes will be in series with the load resistance RL and hence the load current flows through RL. For the
negative half cycle of the input ac voltage, diode D3 and D4 conducts whereas diodes D1 and D2 remain in
the OFF state. The conducting diodes will be in series with the load resistance RL and hence the load
current flows through RL in the same direction as in the previous half cycle. Thus a bidirectional wave is
converted into a unidirectional wave.
Circuit Diagram:
79
EE382 Instrumentation and Measurements Lab Manual
Wave Shapes:
In Lab Tasks:
Implement half wave rectifier and show its waveform.
Implement full wave rectifier and show its waveform.
Generate a sinusoidal waveform of 50k HZ , 20 Pk-pk amplitude from function generator and
display it on oscilloscope.
80
EE382 Instrumentation and Measurements Lab Manual
Pre Lab:
Spectrum Analyzer:
A spectrum analyzer measures the magnitude of an input signal versus frequency within the full frequency
range of the instrument. The primary use is to measure the power of the spectrum of known and unknown
signals. The input signal that most common spectrum analyzers measure is electrical; however, spectral
compositions of other signals, such as acoustic pressure waves and optical light waves, can be considered
through the use of an appropriate transducer. Spectrum analyzers for other types of signals also exist, such
as optical spectrum analyzers which use direct optical techniques such as a monochromator to make
measurements.
By analyzing the spectra of electrical signals, dominant frequency, power, distortion, harmonics, bandwidth,
and other spectral components of a signal can be observed that are not easily detectable in time domain
waveforms. These parameters are useful in the characterization of electronic devices, such as wireless
transmitters.The display of a spectrum analyzer has frequency displayed on the horizontal axis and the
amplitude on the vertical axis. To the casual observer, a spectrum analyzer looks like an oscilloscope, which
plots amplitude on the vertical axis but time on the horizontal axis. In fact, some lab instruments can
function either as an oscilloscope or a spectrum analyzer.
81
EE382 Instrumentation and Measurements Lab Manual
Network Analyzer:
A network analyzer is an instrument that measures the network parameters of electrical networks. Today,
network analyzers commonly measure s–parameters because reflection and transmission of electrical
networks are easy to measure at high frequencies, but there are other network parameter sets such as y-
parameters, z-parameters, and h-parameters. Network analyzers are often used to characterize two-port
networks such as amplifiers and filters, but they can be used on networks with an arbitrary number of ports.
In Lab Tasks:
82