Arduino UNO and ESP32-Based Gas Detection and Alert System with GSM and LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino UNO, various sensors, relays, fans, a siren, a GSM module, and other components. The circuit is designed to monitor environmental conditions and control actuators based on sensor inputs. The Arduino UNO serves as the central microcontroller, interfacing with various components to perform the desired operations.
Component List
Arduino UNO
- Description: 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
MQ-5
- Description: Gas sensor for detecting LPG, natural gas, and coal gas.
- Pins: VCC, GND, Digi Out, Analog out
120 Fan 12V
- Description: 12V cooling fan.
- Pins: 12V+, GND
12V 200Ah Battery
- Description: High-capacity battery for power supply.
- Pins: GND, 12V
Siren
- Description: Alarm siren for alerting.
- Pins: Positive, Ground
Relay 4 Channel 5V
- Description: 4-channel relay module for switching high-power devices.
- Pins: GND, IN1, IN2, IN3, IN4, VCC, COM1, COM2, COM3, COM4, NO1, NO2, NO3, NO4, NC1, NC2, NC3, NC4
Rocker Switch
- Description: On/Off switch.
- Pins: output, input
GSM SIM900
- Description: GSM module for communication.
- Pins: A5, A4, A3, A2, A1, A0, 5V, GND, 3.3V, RESET, D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, AREF
12V Pneumatic Solenoid Valve
- Description: Solenoid valve for controlling air flow.
- Pins: VCC, GND
LCD Screen 16x2 I2C
- Description: 16x2 character LCD with I2C interface.
- Pins: SCL, SDA, VCC, GND
12V Power Supply
- Description: Power supply unit providing 12V output.
- Pins: +, -
ESP32
- Description: Wi-Fi and Bluetooth microcontroller.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, VIN, 3V3, D15, D2, D4, RX2, TX2, D5, D18, D19, D21, RX0, TX0, D22, D23, BOOT
48V to 5V Converter
- Description: Voltage converter from 48V to 5V.
- Pins: out+, out--, in+, in--
Wiring Details
Arduino UNO
- 5V connected to VCC of LCD screen 16x2 I2C, Relay 4 Channel 5V, and MQ-5.
- GND connected to input of Rocker Switch, GND of MQ-5, Relay 4 Channel 5V, GSM SIM900, and LCD screen 16x2 I2C.
- A0 connected to Analog out of MQ-5.
- A4 connected to SDA of LCD screen 16x2 I2C.
- A5 connected to SCL of LCD screen 16x2 I2C.
- D10 connected to IN2 of Relay 4 Channel 5V.
- D9 connected to IN1 of Relay 4 Channel 5V.
- D8 connected to D8 of GSM SIM900.
- D7 connected to D7 of GSM SIM900.
MQ-5
- VCC connected to 5V of Arduino UNO.
- GND connected to GND of Arduino UNO.
- Analog out connected to A0 of Arduino UNO.
120 Fan 12V
- 12V+ connected to NO1 of Relay 4 Channel 5V.
- GND connected to Ground of Siren and GND of 12V Pneumatic Solenoid Valve, 48V to 5V Converter, and 12V 200Ah Battery.
12V 200Ah Battery
- GND connected to GND of 120 Fan 12V, Siren, 12V Pneumatic Solenoid Valve, and 48V to 5V Converter.
- 12V connected to in+ of 48V to 5V Converter and COM1 of Relay 4 Channel 5V.
Siren
- Positive connected to NO1 of Relay 4 Channel 5V.
- Ground connected to GND of 12V 200Ah Battery.
Relay 4 Channel 5V
- VCC connected to 5V of Arduino UNO.
- GND connected to GND of Arduino UNO.
- IN1 connected to D9 of Arduino UNO.
- IN2 connected to D10 of Arduino UNO.
- NO1 connected to 12V+ of 120 Fan 12V and Positive of Siren.
- COM1 connected to 12V of 12V 200Ah Battery.
- NO2 connected to VCC of 12V Pneumatic Solenoid Valve.
Rocker Switch
- input connected to GND of Arduino UNO.
- output connected to COM1 of Relay 4 Channel 5V.
GSM SIM900
- GND connected to GND of Arduino UNO.
- D8 connected to D8 of Arduino UNO.
- D7 connected to D7 of Arduino UNO.
12V Pneumatic Solenoid Valve
- VCC connected to NO2 of Relay 4 Channel 5V.
- GND connected to GND of 12V 200Ah Battery.
LCD Screen 16x2 I2C
- VCC connected to 5V of Arduino UNO.
- GND connected to GND of Arduino UNO.
- SDA connected to A4 of Arduino UNO.
- SCL connected to A5 of Arduino UNO.
ESP32
- D34 connected to Analog out of MQ-5.
- GND connected to GND of MQ-5 and out-- of 48V to 5V Converter.
- VIN connected to VCC of MQ-5 and out+ of 48V to 5V Converter.
48V to 5V Converter
- in+ connected to 12V of 12V 200Ah Battery.
- in-- connected to GND of 12V 200Ah Battery.
- out+ connected to VIN of ESP32.
- out-- connected to GND of ESP32.
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)