Ass Sppu Te
Ass Sppu Te
4. Optional Filters: Some IR sensors include filters to eliminate light from other sources
or to enhance specific wavelengths of infrared light.
Key Parameters of IR Sensors
Range: The distance at which the sensor can detect an object. Active IR sensors
typically have ranges from a few centimeters to several meters, while PIR sensors can
detect motion from several meters away.
Field of View (FoV): The angle over which the sensor can detect infrared radiation.
PIR sensors, for example, have a wide field of view, which is important for motion
detection.
Response Time: The time it takes for the sensor to detect an object and provide an
output signal. PIR sensors often have a slight delay as they detect slow changes in IR
radiation.
Sensitivity: Defines how small a change in IR radiation the sensor can detect. In PIR
sensors, sensitivity may be adjusted to detect larger or smaller movements.
Applications of IR Sensors
1. Proximity Detection:
o Mobile phones use IR sensors to detect if a user is holding the phone near
their face during a call, so the screen can turn off.
2. Motion Sensing:
o PIR sensors are used in automatic lighting systems, alarm systems, and
security cameras to detect motion in a specific area.
3. Optical Encoders:
IR sensors are used in encoders to measure the position, speed, and direction of
rotating devices like motors.
4. Obstacle Detection:
In robotics and autonomous vehicles, IR sensors are employed to detect obstacles
and avoid collisions.
Code:-
int IRPin=26;
void setup() {
// put your setup code here, to run once:
pinMode(IRPin,INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
digitalRead(IRPin);
delay(500);
}
Assignment:- 4
Aim:- Design and implement IoT system for one of the applications
like: Traffic Application, Medical/Health application, Social
Application etc.
Theory:-
IoT-Based Fire Detection and Automated Response System with Motor
Activation:-
Fire detection systems are crucial for preventing fire-related accidents and damage.
Traditionally, fire detection systems are passive, relying on alarms to alert nearby personnel.
With advancements in IoT, fire detection can be integrated into a smart system that not only
detects fire early but also responds automatically by activating critical devices like water
pumps, sprinkler systems, or exhaust fans (i.e., motors) without human intervention.
This project describes the integration of fire sensors (temperature and smoke), IoT-based
communication, and motor control in a real-time, automated fire response system. The
system leverages cloud-based platforms for data logging and remote monitoring, and
microcontrollers like Arduino or ESP8266/ESP32 for local processing and control.
5. Power Supply:
o A regulated power supply ensures that the sensors, microcontroller, and motor
are properly powered.
Step-by-Step Process:
1. System Initialization:
o The microcontroller powers up, initializes sensors, and establishes a Wi-Fi
connection.
o The motor continues running until the fire is extinguished or a manual reset is
triggered.
Code:-
int relaypin=22;
int IRPin=18;
int IRVal;
void setup() {
// put your setup code here, to run once:r
pinMode(IRPin,INPUT);
pinMode(relaypin,OUTPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
IRVal=digitalRead(IRPin);
if (IRVal==0) {
Serial.println("Fire");
digitalWrite(relaypin,LOW);
delay(500);
}
else{
Serial.println("NoFire");
digitalWrite(relaypin,HIGH);
delay(500);
}
delay(500);
}