ESP32-Based Environmental Monitoring and Alert System with Solar Charging
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to integrate various sensors, power management modules, and communication devices with an ESP32 Devkit V1 microcontroller. The circuit includes environmental sensing through an MQ-2 gas sensor and a DHT11 temperature and humidity sensor. It features a WS2812 RGB LED strip for visual output and a Piezo Buzzer for audio output. Power management is handled by a UPS module, two 12v to 5v step-down power converters, and a solar charge controller connected to a solar panel and a 12v 7ah battery. The SIM900A module provides GSM communication capabilities. A switching power supply and a circuit breaker are included for safety and power regulation.
Component List
Microcontroller
- ESP32 Devkit V1: A microcontroller with Wi-Fi and Bluetooth capabilities, featuring multiple digital and analog pins for interfacing with various sensors and modules.
Sensors
- MQ-2 Gas Sensor: A sensor for detecting flammable gases and smoke.
- DHT11 Sensor V2: A sensor for measuring ambient temperature and humidity.
Power Management
- UPS Module: An uninterruptible power supply module for power backup.
- 12v to 5v Step Down Power Converter: Two converters to step down voltage from 12v to 5v.
- 12v 7ah Battery: A rechargeable battery providing 12v output.
- Solar Charge Controller: A device that controls the charging of the battery from the solar panel and provides load output.
- Solar Panel: A photovoltaic panel for converting solar energy into electrical energy.
- Switching Power Supply: A power supply unit for converting AC to DC voltage.
- Circuit Breaker: A safety device to prevent overcurrent by breaking the circuit.
Output Devices
- WS2812 RGB LED strip: An addressable LED strip for visual signaling or decoration.
- Piezo Buzzer: An electronic buzzer for audio signaling.
Communication Module
- SIM900A: A GSM/GPRS module for cellular network communication.
Wiring Details
ESP32 Devkit V1
- GND: Connected to the ground pins of MQ-2 Sensor, DHT11 Sensor, Piezo Buzzer, and both 12v to 5v Step Down Power Converters.
- D18: Connected to the DIN pin of the WS2812 RGB LED strip.
- TX0: Connected to the 5VR pin of the SIM900A module.
- D34: Connected to the A0 pin of the MQ-2 Sensor.
- D27: Connected to the DAT pin of the DHT11 Sensor.
- D13: Connected to pin 1 of the Piezo Buzzer.
- VIN: Connected to the VCC pins of the MQ-2 Sensor, DHT11 Sensor, and the 5v OUTPUT of one of the 12v to 5v Step Down Power Converters.
MQ-2 Gas Sensor
- GND: Shared ground connection.
- A0: Connected to D34 of the ESP32 Devkit V1.
- VCC: Connected to the 5v OUTPUT of one of the 12v to 5v Step Down Power Converters.
DHT11 Sensor V2
- GND: Shared ground connection.
- DAT: Connected to D27 of the ESP32 Devkit V1.
- VCC: Connected to the 5v OUTPUT of one of the 12v to 5v Step Down Power Converters.
WS2812 RGB LED strip
- DIN: Connected to D18 of the ESP32 Devkit V1.
- 5V: Connected to the 5v OUTPUT of the other 12v to 5v Step Down Power Converter.
- GND: Shared ground connection.
Piezo Buzzer
- pin 1: Connected to D13 of the ESP32 Devkit V1.
- pin 2: Shared ground connection.
SIM900A
- 5V: Connected to the 5v OUTPUT of the other 12v to 5v Step Down Power Converter.
- GND: Shared ground connection.
- 5VR: Connected to TX0 of the ESP32 Devkit V1.
Power Management Components
- 12v to 5v Step Down Power Converters: Both converters share VIN+ and VIN- connections with the UPS Module's OUT+ and OUT- respectively. Their 5v OUTPUT pins provide power to the ESP32 Devkit V1, MQ-2 Sensor, DHT11 Sensor, WS2812 RGB LED strip, and SIM900A module.
- UPS Module: DC+ and DC- are connected to the +V and -V of the Switching Power Supply. BAT+ and BAT- are connected to the 12v + and 12v - of the 12v 7ah Battery. OUT+ and OUT- are connected to the VIN+ and VIN- of both 12v to 5v Step Down Power Converters.
- Solar Charge Controller: Solar Cell + and Solar Cell - are connected to the + and - of the Solar Panel. Battery + and Battery - are connected to the 12v + and 12v - of the 12v 7ah Battery.
Documented Code
No code has been provided for the microcontroller. When code is available, it should be documented here with explanations for each function and routine, including setup and loop functions, interrupt service routines, and any communication protocol implementations.
Please note that the actual implementation of the code will depend on the specific requirements of the circuit's operation, such as sensor data processing, communication handling, and output device control.