Internet of Things Connected Fire Alarm System Controlled by ESP32

ESP32 19-11-24
59 0

Tutorial plan

1- Presentation of the fire alarm system connected to the Internet of Things

2- How does the ESP32 board control the system ?

3- Necessary components of system

4- Mounting ESP32 with KY-026 sensor, and Buzzer

5- Program ESP32 with Micropython to control the system

 

 

Presentation of the fire alarm system connected to the Internet of Things

A fire alarm system integrated with IoT represents a smart approach to fire detection, combining traditional fire alarms with advanced communication technologies to enhance safety, real-time monitoring, and control. Here's a comprehensive presentation of such a system:

1. System Components

An IoT-enabled fire alarm system typically includes:

Sensors: Smoke, heat, flame, and gas detectors to identify fire or hazardous conditions.

IoT Controller: A microcontroller (e.g., ESP32 or Raspberry Pi) to process data from sensors and send it to the cloud.

Connectivity Module: Wi-Fi, Zigbee, LoRaWAN, or cellular for data transmission to cloud platforms.

Cloud Platform: IoT services (e.g., AWS IoT, Google Cloud IoT) for data storage, analysis, and notifications.

User Interface: Smartphone apps, dashboards, or web portals for remote monitoring and alerts.

Actuators: Fire suppression systems, alarms, and sprinklers that respond automatically to detected hazards.

2. Features

a. Real-Time Monitoring

The system continuously monitors the environment for potential fire hazards and updates users via the cloud.

b. Remote Alerts

Notifications (SMS, email, or app alerts) are sent to authorized users when a fire is detected.

c. Data Logging and Analytics

IoT platforms log sensor data, enabling post-event analysis and predictive maintenance of devices.

d. Integration with Smart Home/Building Systems

The fire alarm system can connect with other IoT devices, like smart thermostats or security systems, for coordinated responses.

e. Automatic Fire Suppression

In critical conditions, actuators can trigger sprinklers or fire extinguishers automatically.

3. Operation Workflow

1. Detection: Sensors detect smoke, heat, or gas.

2. Processing: The IoT controller evaluates sensor data to identify potential fire hazards.

3. Alert Transmission:

If a fire is detected, the system sends alerts via IoT networks to connected devices or emergency services.

It may activate local alarms and display warnings on a dashboard.

4. Advantages

Early Detection: IoT allows for quicker identification of fire hazards compared to traditional systems.

Remote Accessibility: Users can monitor and control the system from anywhere via smartphones or computers.

Scalability: Easy to expand the system by adding new sensors or integrating with other IoT devices.

Cost Efficiency: Reduces false alarms through precise detection and advanced analytics.

5. Applications

Residential: Smart homes with integrated fire detection.

Commercial: Offices, malls, and warehouses where fire safety is critical.

Industrial: Factories and plants with high-risk operations.

Public Spaces: Schools, hospitals, and transportation hubs.

 

How does the ESP32 board control the system ?

To create a system where the ESP32 uses the KY-026 flame sensor, a buzzer, and sends alert emails, the ESP32 monitors the sensor for fire, triggers the buzzer as an alarm, and uses Wi-Fi capabilities to send notifications via email.

1- Fire Detection:

The KY-026 flame sensor outputs a signal (LOW on the digital pin) when it detects a flame or infrared light.

The ESP32 reads this signal through a GPIO pin.

2- Triggering the Buzzer:

If fire is detected, the ESP32 sends a HIGH signal to the buzzer's control pin, producing a sound alarm.

3- Sending Email Alerts:

The ESP32 connects to a Wi-Fi network.

An SMTP library (like ESP-Mail-Client) is used to send an email containing details of the fire alert.

4- Reset for Next Detection:

After sending the email and sounding the alarm, the system resets to monitor for new fire incidents.

 

Necessary components of system

ESP32:

ESP32 card

Microcontroller with integrated Wi-Fi for system control and email notifications.

KY-026 Flame Sensor:

Detects flames or infrared light from a fire.

Buzzer:

Emits an audible alarm when fire is detected.

Email Service:

Sends alerts via SMTP protocol.

Jumper Wires:

Jumper wires

For making temporary connections and wiring between components.

Breadboard:

Test plate

A breadboard is a useful tool for creating temporary electronic circuits. It allows you to connect components without soldering.

 

Mounting ESP32 with KY-026 sensor, and Buzzer

To perform the assembly, you can connect :

the buzzer terminal (+) to pin D4 of the ESP32 board

the buzzer terminal (-) to the GND pin of the ESP32 board

pin DO of the flame sensor to pin D34 of the ESP32 board the VCC

pin of the flame sensor to the 3.3V pin of the ESP32 board

the GND pin of the flame sensor to the GND pin of the ESP32 board

 

Program ESP32 with Micropython to control the system

Here is the program of the intelligent fire detection system connected to the Internet:

Note: you must import the two libraries: ConnectWifi.py et umail.py .

How the Code Works

Initialization:

The ESP32 connects to Wi-Fi and initializes the flame sensor and buzzer.

Flame Detection:

When the flame sensor detects fire, it triggers the buzzer and sends an alert email.

Email Notification:

The ESP32 uses SMTP to send an email with details of the fire incident.

0 comment

Leave a comment

Veuillez noter s'il vous plaît*

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Purpose of this website

Educational robotics refers to the use of robots and robotics technology to promote learning in educational settings. It involves the integration of technology, engineering, and computer science into the classroom, allowing students to engage in hands-on, project-based learning experiences.
In this context, our website represents an excellent resource for parents, teachers and children who wish to discover robotics.

Contact details

Zaouiet Kontech-Jemmel-Monastir-Tunisia

+216 92 886 231

medaliprof@gmail.com

Pictures of the articles

Robotic site created by MedAli-Teacher info