Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Fire Detecting Using Arduino
WhatsApp
Sr Karthiga
4y
10.8k
0
6
100
Article
FIRESENSOR.rar
Flame sensor
Figure 1:
Flame Sensor
It is used to detect and respond to the presence of Flame (or) Fire.
The detected flame depends on the installation.
We will also include sounding an alarm.
Where We Can Fix
Schools/Colleges
Transport
Industrial Furnaces etc
Part Of List:
Arduino Uno
Flame Sensor
Jumper Wire
USB Cable
Bread Board.
Connection:
Flame Sensor to Arduino:
Step 1:
Vcc =Postive voltage input 5v
Step 2:
A0 =Analog input pin to Arduino
Step 3:
Gnd =Gnd to Gnd.
Buzzer:
Figure 2:
Buzzer.
Step 1:
Fix the buzzer on the breadboard.
Step 2:
Connect the positive pin to digital pin 9.
Step 3:
Connect the negative pin to Gnd.
LED:
Figure 3:
LED
Step 1:
Fix the led in the breadboard.
Step 2:
Connect the positive pin to digital pin 2.
Step 3:
Connect the negative pin to Gnd.
Program:
#include < SoftwareSerial.h >
int
sensorPin = A0;
// select the input pin for the LDR
int
sensorValue = 0;
// variable to store the value coming from the sensor
int
led = 2;
// Output pin for LED
int
buzzer = 9;
// Output pin for Buzzer
void
setup()
{
// declare the ledPin and buzzer as an OUTPUT:
pinMode(led, OUTPUT);
pinMode(buzzer, OUTPUT);
Serial.begin(9600);
}
void
loop()
{
Serial.println(
"Welcome to c#corner"
);
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
if
(sensorValue < 100)
{
Serial.println(
"Fire Detected"
);
Serial.println(
"LED on"
);
digitalWrite(led, HIGH);
digitalWrite(buzzer, HIGH);
delay(1000);
}
digitalWrite(led, LOW);
digitalWrite(buzzer, LOW);
delay(sensorValue);
}
Explanation:
This
fire
can be lightly
spread
and it will
produced a sound
.
Then automatically
emergency light
also gets
ON.
The value of the sensor can be see in the serial monitor.
When
Fire is detected
the led can be on
(HIGH).
Output
Figure 5:
Output
Arduino
fire decting
IoT
sensor
Up Next
Ebook Download
View all
Raspberry Pi -Sensorial Symphony of Connectivity
Read by 704 people
Download Now!
Learn
View all
Membership not found