Fire detection system controlled by ESP32

ESP32 12-11-24
180 0

Tutorial plan

1- How the fire detection system ordered by ESP32 board works ?

2- Fire detection system components

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

4- Program ESP32 with Micropython to control the system

 

 

How the fire detection system ordered by ESP32 board works ?

A fire detection system using an ESP32 board, KY-026 Flame Sensor, and a buzzer works by detecting the presence of a flame and activating an alarm to alert people nearby. This setup is simple and effective for fire detection in small areas, thanks to the ESP32's ability to process sensor data and trigger actions.

The KY-026 Flame Sensor is connected to one of the digital input pins on the ESP32. This sensor has both analog and digital outputs, though typically, the digital output is used for simple fire detection.

When a flame is detected, the KY-026 outputs a low digital signal (logic 0) to the ESP32. This signal change is what the ESP32 monitors.

The ESP32 continuously checks the sensor’s output. When it detects a signal indicating the presence of a flame, it triggers the buzzer to alert people in the area.

 

Fire detection system components

ESP32 Board:

ESP32 card

The main controller that reads the sensor data from the KY-026 Flame Sensor and activates the buzzer.

KY-026 Flame Sensor:

Detects infrared light emitted by flames. The sensor outputs a digital signal to the ESP32 when it detects a flame or high heat source.

Buzzer:

Acts as an alert mechanism, producing a loud sound when a flame is detected.

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 fire detection system:

Explanation of the Code

The flamePin is defined for reading the KY-026 output, while the buzzerPin is for controlling the buzzer.

The ESP32 initializes the flame sensor as an input and the buzzer as an output.

In the while function:

The ESP32 continuously reads the digital state of the flame sensor.

If the sensor reads flame_value < 4095 (indicating a flame), the ESP32 turns on the buzzer. If the sensor reads flame_value > 4095 (no flame detected), the buzzer is turned off.

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