Experiment # 2 Introduction To Sensors Objective: Tayyab Hussain 2016-EE-410

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Intrduction to rebotics Lab.

Manual

Name Tayyab Hussain


Reg.No 2016-EE-410
Marks/ Grade

EXPERIMENT # 2

Introduction to Sensors

Objective
The objective of this lab to know about basic concept of working of different Sensors its
application in different fields.

1-LM 35 Sensor

Introduction
The LM35 is an integrated circuit sensor that can be used to measure temperature with an
electrical output proportional to the temperature (in °C).It can measure temperature more
accurately than a using a thermistor. The sensor circuitry is sealed and not subject to
oxidation.The LM35 generates a higher output voltage than thermocouples and may not
require that the output voltage be amplified.The LM35 has an output voltage that is
proportional to the Celsius temperature.The scale factor is .01V/°C.

Working Principle

There are two transistors in the center of the drawing. One has ten times the emitter area of
the other. This means it has one tenth of the current density, since the same current is going
through both transistors. This causes a voltage across the resistor R1 that is proportional to
the absolute temperature, and is almost linear across the range.The "almost" part is taken care
of by a special circuit that straightens out the slightly curved graph of voltage versus
Intrduction to rebotics Lab. Manual

temperature.The amplifier at the top ensures that the voltage at the base of the left transistor
(Q1) is proportional to absolute temperature (PTAT) by comparing the output of the two
transistors.The amplifier at the right converts absolute temperature (measured in Kelvin) into
either Fahrenheit or Celsius, depending on the part (LM34 or LM35).The little circle with the
"i" in it is a constant current source circuit.The two resistors are calibrated in the factory to
produce a highly accurate temperature sensor.The integrated circuit has many transistors in it
two in the middle, some in each amplifier, some in the constant current source, and some in
the curvature compensation circuit. All of that is fit into the tiny package with three leads.
Circuit Diagram

Arduino Code

int outputpin= A0;


void setup()
{
Serial.begin(9600);
}
//main loop
void loop()
{
int rawvoltage= analogRead(outputpin);
float millivolts= (rawvoltage/1024.0) * 5000;
float celsius= millivolts/10;
Serial.print(celsius);
Serial.print(" degrees Celsius, ");
Serial.print((celsius * 9)/5 + 32);
Serial.println(" degrees Fahrenheit");
delay(1000);
}

Applications
1-It is used in industry for checking the temperature of boilers.
2-it is used In IOT projects.
3-it is used in fire alarm project.
Intrduction to rebotics Lab. Manual

2 –Light dependent Resistor


Introduction
An ​LDR​ is a component that has a (variable) resistance that changes with the light intensity
that falls upon it. This allows them to be used in light sensing circuits.

Working Principle
This resistor works on the principle of photo conductivity. It is nothing but, when the light
falls on its surface, then the material conductivity reduces and also the electrons in the
valence band of the device are excited to the conduction band. These photons in the incident
light must have energy greater than the band gap of the semiconductor material.This makes
the electrons to jump from the valence band to conduction.

Circuit Diagram

Arduino code
int​ LDRValue ​=​ ​0​;​
void​ setup​()​ ​{
Serial.​begin​(​9600​);​
}
void​ loop​()​ ​{
LDRValue ​=​ analogRead​(​LDRpin​);
Serial.​println​(​LDRValue​);​
delay​(​100​);​
}
Applications
1-LDR Based light Intensity Control for Street Lights.
2-Security System Controlled by An Electronic Eye.
3-​ potentiometer
Intrduction to rebotics Lab. Manual

Introduction
The Potentiometer is an electric instrument that used to measure the ​EMF (electro motive
force)​ of a given cell, the internal resistance of a cell. And also it is used to compare EMFs of
different cells. It can also use as a ​variable resistor​ in most of the applications.
Working Principle
The basic working principle of this is based on the fact that the fall of the potential across any
portion of the wire is directly proportional to the length of the wire, provided wire has
uniform cross-sectional area and the constant current flowing through it.“When there is no
potential difference between any two nodes there is electric current will flow”.
Circuit Diagram

Arduino Code
nt potPin = 2;
int ledPin = 13;
int val = 0;

void setup() { pinMode(ledPin, OUTPUT);

} void loop() {
val = analogRead(potPin);
digitalWrite(ledPin, HIGH);
delay(val);
digitalWrite(ledPin, LOW);
delay(val); }
Applications
1-It is used in audio control.
2-It is used in television.
3-it is used in ​Transducers.

4-​ infrared sensor


Introduction
An ​infrared sensor​ is an electronic device, that emits in order to sense some aspects of the
surroundings. An IR sensor can measure the heat of an object as well as detects the
Intrduction to rebotics Lab. Manual

motion.These types of sensors measures only infrared radiation, rather than emitting it that is
called as a ​ IR sensor​.
Working Principle

1. Planck’s radiation law:​ Every object at a temperature T not equal to 0 K emits


radiation
2-​Stephan Boltzmann Law:​ The total energy emitted at all wavelengths by a black
body is related to the absolute temperature

3-Wein’s Displacement Law:​ Objects of different temperature emit spectra that peak at
different wavelengths.All objects which have a temperature greater than absolute zero (0
Kelvin) posses thermal energy and are sources of infrared radiation as a result.

Circuit Diagram

Arduino code
const int IR_Sensor=2;
void setup(){
pinMode(13, OUTPUT);
pinMode(IR_Sensor,INPUT);}
void loop() {
if(digitalRead(IR_Sensor)==HIGH) {
digitalWrite(13, HIGH); }else{
digitalWrite(13, LOW); }
delay(1000);
}

Application
1-Climatology
2-Photo bio modulation
3- ​Gas detectors
5-Passive ​infrared sensor
​Introduction
Intrduction to rebotics Lab. Manual

A ​passive infrared sensor​ (​PIR sensor​) is an electronic ​sensor​ that measures ​infrared​ (IR)
light radiating from objects in its field of view. They are most often used in
PIR-based ​motion detectors​.

Working Principle
All objects with a temperature above ​absolute zero​ emit ​heat​ energy in the form of radiation.
Usually this radiation isn't visible to the ​human eye​ because it radiates at infrared
wavelengths, but it can be detected by electronic devices designed for such a purpose.
The term ​passive​ in this instance refers to the fact that PIR devices do not generate or radiate
energy for detection purposes. They work entirely by detecting ​infraredradiation​ (radiemitted
by or reflected from objects.

Circuit Diagram

Arduino code

1. int​ pirSensor = ​8​;


2. int​ relayInput = ​7​;
3.
4. void​ ​setup​()​ ​{
5. pinMode​(​pirSensor, INPUT​)​;
6. pinMode​(​relayInput, OUTPUT​)​;
7. }
8.
9. void​ ​loop​()​ ​{
10. int​ sensorValue = ​digitalRead​(​pirSensor​)​;
11.
12. if​ ​(​sensorValue == ​1​)​ ​{
13. digitalWrite​(​relayInput, LOW​)​;
Intrduction to rebotics Lab. Manual

14. }

Applications
● All outdoor Lights
● Lift Lobby
● Multi Apartment Complexes
● Common staircases
● For Basement or Covered Parking Area
● Shopping Malls
● For garden lights

You might also like