A fire detection system is a group of devices and equipment that are used to detect the presence of a fire and to alert people to evacuate. These systems can be used in residential, commercial, and industrial settings to improve safety and reduce the risk of injury or damage.
There are several types of fire detection systems, including:
Fire detection systems can be standalone devices or part of a larger fire alarm system, which can include smoke detectors, heat detectors, manual pull stations, audible warning devices and a control panel that sounds an alarm and alerts the fire department.
Additionally, some fire detection systems can be integrated with other systems such as building automation systems, security systems, and sprinkler systems to provide a complete fire protection solution.
When using a fire detection system, it’s important to ensure that the system is properly installed, configured, and maintained to ensure proper operation and to prevent false alarms. Additionally, it’s important to ensure that the system is compliant with local laws and regulations, and that it meets safety standards.
An ESP32 microcontroller can be used to build a fire detection system by connecting it to various sensors such as smoke detectors, heat detectors, flame detectors, or carbon monoxide detectors. The ESP32 can be programmed to read the data from these sensors, analyze the data and detect the presence of a fire.
When a fire is detected, the ESP32 can be programmed to sound an alarm, send a notification to a remote location, and trigger other actions such as activating sprinklers or notifying the fire department.
The ESP32 can also be connected to other devices such as LEDs, speakers, or buzzers to provide visual and auditory alarms. The ESP32 can also be connected to a Wi-Fi network to send notifications to a remote location, such as a smartphone or a control center, and also can be connected to other systems such as building automation systems, security systems, and sprinkler systems.
In this project we will realize a fire detection system with the ESP32 card. It mainly uses a KY-026 flame sensor, and a buzzer.
When the flame sensor detects a fire, the ESP32 board instructs the buzzer to sound.
ESP32
The ESP32 is a low-cost, low-power microcontroller with built-in Wi-Fi and Bluetooth capabilities. It is a popular choice for IoT projects and is commonly used for a variety of applications such as home automation, wireless control, and sensor data logging. The ESP32 features a dual-core processor, a rich set of peripherals, and support for a wide range of protocols. It can be programmed using the Arduino IDE and various other programming languages such as C, C++, and MicroPython.
Additionally, the ESP32 has a wide range of features including:
The ESP32 is often used in projects where a low-cost, low-power device with Wi-Fi and Bluetooth capabilities is needed, and it is commonly used with other sensors and devices to build IoT projects, home automation systems, wireless control systems, and data logging systems.
KY-026 sensor
The KY-026 sensor is a flame sensor module that can be used to detect the presence of a flame or fire. It consists of a phototransistor and an infrared emitting diode (IRED) which work together to detect changes in the amount of infrared light in the environment. When a flame is present, the sensor detects the infrared light emitted by the flame and sends a signal to the connected device, such as an ESP32 microcontroller.
The sensor is typically connected to a microcontroller or other electronic device using its three pins: VCC, GND and Signal. The signal pin outputs a digital signal that can be read by the microcontroller to determine if a flame is present.
This sensor can be used in a variety of applications such as fire alarms, flame detection in industrial processes, and monitoring of fireplaces, stoves, and other heating systems.
The KY-026 sensor can be used in combination with an ESP32 microcontroller to detect the presence of a flame or fire. The sensor can be connected to the ESP32 using its three pins: VCC, GND and Signal. The VCC and GND pins provide power to the sensor and the signal pin outputs a digital signal that can be read by the ESP32.
The ESP32 can be programmed to read the signal from the sensor and determine if a flame is present. If a flame is detected, the ESP32 can be programmed to trigger an alarm, send a notification to a remote location, or trigger other actions such as activating sprinklers or notifying the fire department.
Buzzer
A buzzer can be used in combination with an ESP32 microcontroller to provide an audible alarm for a fire detection system. A buzzer is an electronic device that generates a loud sound or tone when activated. It can be used as an audible indicator for a fire detection system to alert people to evacuate.
The buzzer can be connected to the ESP32 using its two pins: VCC and GND. The ESP32 can be programmed to send a signal to the buzzer when a fire is detected, activating the buzzer and generating an audible alarm.
Connecting wires
Connecting wires refers to the process of physically connecting wires or cables to a device or circuit in order to establish an electrical connection. This can be done by using various connectors such as plugs, sockets, or terminal blocks. The wires are typically color-coded to indicate their function, such as red for power, black for ground, and yellow for signals.
Test plate
A test plate is a type of circuit board that is used to test electronic components. It typically consists of a flat board made of a non-conductive material, such as plastic or fiberglass, with a number of holes or pads that are used to connect electronic components. The test plate allows you to connect electronic components and test them easily.
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
Here is the program of the fire detection system:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
from machine import Pin, ADC from time import sleep flamme = ADC(Pin(34)) flamme.atten(ADC.ATTN_11DB) #Full range: 3.3v buzzer=Pin(4,Pin.OUT) while True: flamme_value = flamme.read() print(pot_value) sleep(0.1) if (flamme_value<4095): #if the sensor detects a flame buzzer.value(1) #the buzzer sounds else: buzzer.value(0) #the buzzer stops ringing |