0% found this document useful (0 votes)
24 views2 pages

The Iot Explanation

IOT.....

Uploaded by

jayasreepalani02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views2 pages

The Iot Explanation

IOT.....

Uploaded by

jayasreepalani02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Flame Sensor Module

The pin configuration of this sensor is shown below. It includes four pins which
include the following. When this module works with a microcontroller unit then
the pins are

A flame sensor is a crucial component used in fire detection systems to detect the presence of
flames. It is designed to sense the unique characteristics of flames, such as light, infrared radiation,
or ultraviolet radiation, depending on the type of flame sensor. The primary function of a flame
sensor is to trigger appropriate actions, such as sounding alarms, activating fire suppression
systems, or initiating emergency protocols, to mitigate the risk posed by a fire.

Flame sensors are commonly used in industrial settings, commercial buildings, and residential
properties to provide early detection of fires and help prevent potential disasters.

const int flamePin = 2; // Digital pin connected to the flame sensor


const int buzzerPin = 8; // Digital pin connected to the buzzer

int flameVal; // Variable to store the sensor reading

void setup() {
pinMode(flamePin, INPUT);
pinMode(buzzerPin, OUTPUT);
}
void loop() {
flameVal = digitalRead(flamePin); // Read the sensor value

if (flameVal == LOW) { // If flame is detected


digitalWrite(buzzerPin, HIGH); // Turn on the buzzer
} else {
digitalWrite(buzzerPin, LOW); // Turn off the buzzer
}
}

Explanation:

 The 10kΩ resistor is used to limit the current flowing through the piezo buzzer.
 The code initializes the digital pins connected to the flame sensor and buzzer as input and
output, respectively.
 In the loop, the code reads the value from the flame sensor and stores it in the flameVal
variable.
 If the flameVal is LOW, it means that a flame has been detected, and the code turns on the
buzzer.
 If the flameVal is HIGH, it means that no flame has been detected, and the code turns off the
buzzer.

DIY Fire Alarm with Arduino and Infrared Flame Sensor:

 Can be a learning experience but not a substitute for a certified fire alarm system.
 Infrared flame sensors only detect flames, not smoke or other signs of fire.

You might also like