Forests are essential natural resources on Earth. To sustain life on Earth, we must conserve these forests. This project will use an Arduino UNO, a flame detector, and an MQ-2 gas sensor. These devices can be installed at strategic locations all over the forest along with a water reservoir at that location to extinguish in case of a fire.
- Arduino UNO R3 - 1
- Flame Sensor - 1
- MQ-2 Gas Sensor - 1
- Piezo Buzzer - 1
- Red LED - 1
- Resistors - 3
The sensors in the flame detector will sense the radiation emitted by the flame, the sensor of the flame detector would be a photoelectric sensor. This sensor would convert the radiant intensity signal of the flame to a relevant voltage signal, which would then be processed in a single chip microcomputer and converted as output. Therefore, the high-speed response of these sensors can prove critical in case of a fire.

The wavelengths corresponding to the peak emissions of the Sun (5777 K), the Earth's surface (300 K) and forest fires (600 to 1000 K).
The MQ-2 gas sensor has a high sensitivity to propane and smoke. It can detect natural gas and other flammable gases as well. In case of dense smoke, the IR flame sensor may not be able to detect the flames. Additionally, smoke travels and spreads faster than heat. Therefore, we use the MQ-2 Sensor to detect smoke to detect forest fires at the earliest.
/*
Forest Fire Sensor- Detects the presence of a flame and the presence of smoke
*/
const int flameSensor = 11; //Defining the pin for the Flame Sensor
const int smokeSensor = A0; //Defining the pin for the MQ2 smoke sensor
const int buzzer = 5; //Defining the pin for the buzzer
const int led = 4; // Defining the pin for the LED
int thresholdSmoke = 175; //Threshold for sensing smoke
int Flame= HIGH; // Initial value of Flame
void setup()
{
//Setup the functions of the various pins
pinMode(buzzer,OUTPUT);
pinMode(smokeSensor,INPUT);
pinMode(led,OUTPUT);
pinMode(flameSensor,INPUT);
delay(500);
}
void loop()
{
int smoke = analogRead(smokeSensor); //Read the value from the MQ-2 sensor
Flame = digitalRead(flameSensor); //Read the value from the Flame Sensor
if(smoke>thresholdSmoke || Flame==LOW) // If smoke value exceeds the threshold or if a flame is detected
{
//Buzzer needs to beep
tone(buzzer, 2000); // Send 1KHz sound signal
digitalWrite(led,HIGH); // Turns on the LED warning
}
else
{
//Buzzer needs to stop beeping
noTone(buzzer); // Stop sound
digitalWrite(led,LOW); // Turns off the LED warning
}
}
https://www.tinkercad.com/things/8bv7PSLWi2L-forestfiresensorsystemfinal
The following improvements can be made with this project:
- The Sensor System can be powered with the help of solar cells, making it a sustainable project.
- A machine learning algorithm can be trained in order to classify and predict areas of the forest that are frequently affected by forest wildfires and these systems can be installed at those places.






