Arduino and ESP32-Based Smart Fire Detection and Control System with I2C LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that integrates various components including an Arduino UNO, an ESP32, sensors, a relay, a servo, a water pump, and a buzzer. The circuit is designed to perform multiple functions such as sensing gas and flame, controlling a water pump, and displaying information on an LCD screen. The Arduino UNO serves as the primary microcontroller, with additional functionality provided by the ESP32.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
16x2 I2C LCD
- Description: A 16x2 character LCD display with I2C interface.
- Pins: GND, VCC, SDA, SCL
ESP32 (30 pin)
- Description: A low-cost, low-power system on a chip microcontroller with integrated Wi-Fi and dual-mode Bluetooth.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, Vin, D23, D22, TX0, RX0, D21, D19, D18, D5, TX2, RX2, D4, D2, D15, 3V3
MQ-2
- Description: A gas sensor that can detect various gases including LPG, i-butane, propane, methane, alcohol, hydrogen, and smoke.
- Pins: GND, VCC, ANALOG, Digital
KY-026 Flame Sensor
- Description: A flame sensor module that can detect fire or other light sources in the wavelength range of 760nm to 1100nm.
- Pins: A0, GND, VCC, D0
Servo
- Description: A small motor with a feedback mechanism for precise control of angular position.
- Pins: gnd, vcc, pulse
1-Channel Relay (5V 10A)
- Description: A relay module that allows a microcontroller to control high voltage devices.
- Pins: NC, signal, C, power, NO, ground
Water Pump
- Description: A small water pump for liquid transfer.
- Pins: positive, negative
Buzzer
- Description: An audio signaling device.
- Pins: PIN, GND
Wiring Details
Arduino UNO
5V connected to:
- 16x2 I2C LCD (VCC)
- 1-Channel Relay (power)
- Servo (vcc)
- MQ-2 (VCC)
- KY-026 Flame Sensor (VCC)
GND connected to:
- 16x2 I2C LCD (GND)
- 1-Channel Relay (ground)
- MQ-2 (GND)
- Servo (gnd)
- KY-026 Flame Sensor (GND)
- Buzzer (GND)
- ESP32 (GND)
A4 connected to:
- 16x2 I2C LCD (SDA)
A5 connected to:
- 16x2 I2C LCD (SCL)
D12 connected to:
- KY-026 Flame Sensor (D0)
D9 connected to:
- Servo (pulse)
D7 connected to:
- Buzzer (PIN)
D5 connected to:
- MQ-2 (Digital)
D3 connected to:
- 1-Channel Relay (signal)
D1 connected to:
- ESP32 (RX0)
1-Channel Relay (5V 10A)
NC connected to:
- Water Pump (negative)
NO connected to:
- Water Pump (positive)
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Additional Documentation (documentation.txt)
This document provides a comprehensive overview of the circuit, including a summary, detailed component descriptions, wiring details, and documented code.