How to Build an IoT Smoke & Fire Alarm with SMS Alerts (ESP32 + SIM800L)

Опубликовано: 16 Июнь 2026
на канале: IoT Bhai
1,460
36

Build your own industrial-grade Fire and Gas Alarm System using the ESP32 and SIM800L GSM module! In this tutorial, we create a smart safety device that detects smoke (MQ-2) and fire (Flame Sensor) and instantly sends SMS alerts to your phone. It also features a "Status Check" command to remotely monitor system health.

I also added a cool "Two-Way" feature: you can text the device "status" and it will reply with the current sensor readings and signal strength!

What you will learn:
How to interface the SIM800L with the ESP32.
Reading Analog (MQ-2) and Digital (Flame) sensors.
Sending SMS alerts only when necessary (Spam logic).
Parsing incoming SMS to reply with system status.

*Key Features:*
🔥 Real-time Fire & Smoke Detection
📩 Instant SMS Alerts
📶 Remote System Status Check
⏱️ Smart Cooldown Logic (No SMS Spam!)
━━━━━━━━━━━━━━━━━━━━━━━━
🛒 All my recommended parts in one place:
👉 amazon.com/shop/iotbhai
━━━━━━━━━━━━━━━━━━━━━━━━
📌 Components Used:
ESP32 Development Board (Amazon: [https://amzn.to/493Wv5A]/AliExpress: [https://s.click.aliexpress.com/e/_c2I...])
SIM800L GSM Module (Amazon: [https://amzn.to/45AKIcy]/AliExpress: [https://s.click.aliexpress.com/e/_c3z...])
MQ-2 Gas/Smoke Sensor (Amazon: [https://amzn.to/45beLrh]/AliExpress: [https://s.click.aliexpress.com/e/_c4t...])
Flame Sensor Module(Amazon: [https://amzn.to/3NMCZSB]/AliExpress: [https://s.click.aliexpress.com/e/_c3F...])
Power: 18650 Li-Ion Battery + Holder (Amazon: [https://amzn.to/4jlN0Cf]/AliExpress: [https://s.click.aliexpress.com/e/_c3O...])
Voltage Regulation: MT3608 DC-DC Step Up (Boost) Module (Amazon: [https://amzn.to/4aYVm0z]/AliExpress: [https://s.click.aliexpress.com/e/_c3L...])
Stability: 470uF 25V Capacitor (Crucial for SIM800L peaks!) (Amazon: [https://amzn.to/3LapSdg]/AliExpress: [https://s.click.aliexpress.com/e/_c4V...])
Breadboard, Connecting Wire, MicroUSB Cable
Micro SIM Card

⚡ Circuit & Wiring:
Power: 18650 Battery → MT3608 Boost Converter → Power Rails (providing stable voltage).
Capacitor: Placed across the power rails (VCC/GND) close to the SIM800L.
ESP32 Pin 26 → SIM800L TX
ESP32 Pin 27 → SIM800L RX
ESP32 Pin 25 → SIM800L RST
ESP32 Pin 34 → MQ-2 Analog Out (A0)
ESP32 Pin 35 → Flame Sensor Digital Out (D0)

*⏱️ Timestamps:*
[00:00] Intro & Project Animation
[01:02] Components List
[02:52] Wiring the ESP32 & SIM800L
[06:33] Connecting MQ-2 Gas Sensor
[07:45] Connecting Flame Sensor
[09:12] Powering Up & Network Check
[10:33] Code Logic & Configuration
[13:28] Uploading & Live Testing
[16:29] SMS Status Check Demo

Download the diagram & Code: https://github.com/ittipu/ESP32-SIM80...

*Related Video*
Setup SIM800L with ESP32 :    • How to Connect SIM800L to ESP32 | GSM Setu...  
SIM800L Troubleshooting:    • SIM800L Not Connected to Network? Ultimate...  

[Contact Me]
Website - https://iotbhai.io/
Facebook - https://www.facebook.com/profile.php?...
Email - [email protected]
GitHub - https://github.com/ittipu
WhatsApp +8801715497977

Like, comment, and subscribe for more Raspberry Pi, Arduino, ESP32, GSM, GPS, Embedded System & IoT tutorials!

#esp32 #ota #github #iot #microcontroller #electronics #firmwareupdate #embeddedsystems #esp32projects #arduino #arduinoproject #arduinoprogramming #esp32ota #iotbhai #esp32wifi #raspberrypi #ESP32 #SIM800L #IoT #ArduinoProject #SmartHome #electronics #ESP32 #IoT #SIM800L #ElectronicsProject #Arduino #FireAlarm #GasSensor #DIYElectronics #embeddedsystems