AI-Based Smart Fire & Smoke Detection and
Prevention System
Using ESP32, Blynk & IFTTT
Category: Local Community Problems / Aatmanirbhar Bharat
Introduction
This project presents an intelligent, IoT and AI-powered Fire and Smoke Detection
System. It automatically senses fire or smoke, activates preventive actions, and sends
real-time alerts via the internet. It aims to protect homes, businesses, and communities
from fire hazards.
Problem Statement
Fire accidents in homes, offices, and industries often cause severe damage due to
delayed detection and slow response. Traditional systems only sound alarms locally but
cannot alert users remotely or take preventive actions automatically.
Causes of the Problem
• Faulty electrical wiring and short circuits
• Lack of early detection and monitoring systems
• Absence of automation
• High cost of commercial safety systems
• Low awareness of fire safety measures
Effects of the Problem
• Loss of life and property
• Heavy financial and environmental damage
• Slow emergency response
• Increased fear and insecurity among citizens
Real Incidents in Nabarangpur, Odisha
• 2025: Pujariguda CHC Fire due to short circuit; oxygen cylinders exploded.
• 2024: Umerkote house fire injured a youth while stopping it.
• 2023: Commercial shop fire in Nabarangpur town caused heavy loss.
• 2022: Forest fires destroyed over 4,000 acres in Chandahandi and Jharigaon.
Proposed Solution
The system uses ESP32 NodeMCU and ESP32-CAM to detect smoke and flames using
MQ2 and flame sensors. When fire is detected, it activates a buzzer and water pump
automatically, while sending instant alerts through Blynk and IFTTT. The AI camera
confirms fire or human presence for accurate detection.
Block Diagram
The system includes sensors connected to ESP32 NodeMCU for monitoring, an LCD
display for status, and an ESP32-CAM for AI detection. The controller sends data to Blynk
and triggers the pump via relay. It forms a real-time closed-loop IoT safety system.
Flowchart
1. Start and initialize sensors
2. Read MQ2 and flame sensor data
3. If smoke/flame exceeds threshold → Trigger buzzer and pump
4. Send alert via Blynk and IFTTT
5. ESP32-CAM AI verifies fire/human presence
6. Continue monitoring in loop
Circuit Explanation
MQ2 sensors connect to analog pins of ESP32, flame sensors to digital pins, and the relay
controls a mini water pump. The LCD (I2C) displays readings. Blynk and IFTTT handle
Wi-Fi alerts, while ESP32-CAM performs on-device AI detection.
Components Used
• ESP32 NodeMCU
• ESP32-CAM
• MQ2 Smoke Sensor
• Flame Sensor
• Relay Module
• Mini Water Pump
• LCD Display (I2C)
• Buzzer
• Jumper Wires
• Power Supply
• Blynk & IFTTT Apps
Prototype
The prototype includes all sensors, relay, LCD, buzzer, and pump connected to ESP32
boards. It demonstrates early detection, automated prevention, and mobile alerts in real
time.
Prototype Image
Project Cost (Approximation)
• ESP32 NodeMCU – ■400
• ESP32-CAM – ■500
• MQ2 Sensors (x3) – ■300
• Flame Sensors (x3) – ■200
• Relay Module – ■150
• LCD Display (I2C) – ■250
• Buzzer & Pump – ■300
• Miscellaneous – ■200
Total Estimated Cost: ■2,300 – ■2,500
Applications
• Home fire and smoke detection
• Commercial building safety automation
• Industrial fire monitoring
• Smart city safety systems
• Forest fire detection and disaster management
Advantages
• Early detection and instant alerts
• Automated fire control with water pump
• Remote monitoring via Blynk and IFTTT
• Low-cost, easy-to-build, and scalable
• Supports Aatmanirbhar Bharat initiative
Future Scope
• Integration with fire departments and emergency services
• Cloud-based data analysis for risk prediction
• Mobile app dashboard for real-time monitoring
• Enhanced AI model for multi-class detection
Conclusion
This AI and IoT-based Smart Fire and Smoke Detection System provides an effective,
affordable, and reliable solution for community safety. It empowers individuals and
industries to prevent fire-related disasters, aligning with India's vision of Aatmanirbhar
Bharat.