Fire and Smoke Detection System with Alarm Using Arduino: A Smart Safety Project for Schools
Fire and smoke accidents can occur unexpectedly and often cause severe damage to property, infrastructure, and human life. Traditional alarm systems rely mainly on local alerts, which may not be effective if no one is present at the location. To overcome this limitation, IoT-based safety systems are becoming increasingly popular.
In this blog, we explore how to build a Fire and Smoke Detection System using Arduino UNO R4 WiFi that not only triggers a local alarm but also sends instant SMS notifications to a registered mobile number. This ensures that the user is alerted in real time, even when they are far away from the site.
Introduction to the Project
This project demonstrates how an Arduino-based system can continuously monitor fire and smoke conditions and respond immediately when a hazardous situation is detected. By integrating flame and smoke sensors with WiFi connectivity and a cloud-based SMS API, the system delivers fast and reliable alerts without using a GSM module.
The project is designed to be low-cost, easy to build, and highly effective, making it suitable for homes, offices, laboratories, and small industrial environments. It also serves as an excellent learning project for students interested in IoT, embedded systems, and safety applications.

How the Fire and Smoke Detection System Works
The working principle of this system is based on real-time sensing, decision-making by the microcontroller, and cloud communication.
Initially, the Arduino UNO R4 WiFi connects to an available WiFi network using predefined credentials. Once connected, it continuously monitors the environment using two sensors: an MQ2 smoke sensor and a flame sensor. The MQ2 sensor detects smoke and flammable gases, while the flame sensor detects infrared radiation emitted by fire.
When either smoke or fire is detected, the Arduino immediately processes this input and triggers two actions simultaneously. First, it activates a local alarm using a buzzer and LED indicators. Second, it sends an HTTP request to a cloud SMS API, which delivers an alert message to the user’s mobile phone. This cloud-based approach allows SMS transmission without any GSM hardware.
System Architecture and Communication Flow

The system follows a simple, yet effective communication flow. The Arduino acts as the central controller, interfacing with sensors, output devices, and the cloud server. Sensor data is continuously evaluated, and once threshold conditions are exceeded, the alert mechanism is activated.
The SMS delivery is handled entirely by the cloud API. After receiving an HTTP request from the Arduino, the SMS service processes the message and delivers it through the mobile network. This architecture ensures reliable notification of delivery while keeping hardware complexity minimal.
Components Used in the Project

To build this Fire and Smoke Alarm System, the following components are required:
- Arduino UNO R4 WiFi Development Board
- MQ2 Smoke Sensor
- Flame Sensor
- 5V Active Buzzer
- Red and Green LEDs
- 220-ohm resistors
- Breadboard and connecting wires
These components are commonly available and ideal for rapid prototyping and educational projects.
Circuit Design Explanation

The circuit is designed with the Arduino UNO R4 WiFi as the main controller. The MQ2 smoke sensor is connected to the Arduino to provide real-time smoke and gas concentration data. The flame sensor is connected to a digital input pin to detect the presence of fire.
The output section consists of a buzzer and two LEDs. Under normal conditions, the green LED remains ON, indicating a safe environment. When smoke or fire is detected, the green LED turns OFF, while the red LED and buzzer are activated to alert nearby individuals.
All connections are made using a breadboard, allowing easy testing and modifications. This modular setup is ideal for learning and experimentation.
SMS Notification Using Cloud API

One of the key highlights of this project is the use of Circuit Digest Cloud SMS APIs. These APIs provide predefined SMS templates that prevent spam and ensure reliable message delivery.
For this project, the Device Status Alert template (ID: 101) is used. The template contains customizable placeholders that allow users to define meaningful alert messages. By assigning custom values to these placeholders in the code, the system can send clear and actionable emergency alerts such as a fire warning at a specific location.
Software Logic and Program Structure
The Arduino program is designed to be robust and efficient. It starts by initializing the serial monitor, LED matrix, WiFi connection, and GPIO pins. Once the setup is complete, the system enters a continuous monitoring loop.
The program constantly checks WiFi connectivity and automatically reconnects if the network is lost. Sensor readings are evaluated in real time, and if fire or smoke is detected, the SMS alert function is triggered. At the same time, a non-blocking alarm function activates the buzzer and LEDs until the system is manually reset.
The onboard LED matrix provides visual feedback by displaying WiFi connection status and alert symbols, enhancing the user experience.
Uploading and Testing the System
After completing the hardware connections, the code is uploaded to the Arduino UNO R4 WiFi using the Arduino IDE. Once powered on, the board attempts to connect to the WiFi network and displays a connection animation on the LED matrix.
After successful connection, the system begins monitoring the sensors. During testing, triggering either the flame sensor or smoke sensor results in immediate alarm activation and SMS delivery. In case of WiFi disconnection, a network error symbol is displayed, and the system attempts to reconnect automatically.
Applications of the Fire and Smoke Detection System
This Arduino-based system can be used in a wide range of real-world scenarios, including residential fire safety, office monitoring, server room protection, industrial safety systems, and smart IoT-based alert solutions. It also serves as a strong foundation for advanced projects such as cloud dashboards and mobile app integration
Conclusion
The Fire and Smoke Detection System using Arduino with SMS Notification demonstrates how modern IoT technologies can significantly enhance safety and responsiveness. By combining sensors, WiFi communication, and cloud-based SMS services, this project delivers real-time alerts without complex hardware requirements.
This system is not only practical but also highly educational, offering valuable insights into embedded programming, sensor interfacing, and cloud communication. It is an excellent project for students, makers, and anyone interested in building smart safety solutions using Arduino









