ESP32-Based Solar-Powered Environmental Monitoring and Water Management System
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question appears to be a solar-powered system with various sensors and actuators controlled by an ESP32 microcontroller. The system includes a Maximum Power Point Tracking Solar Charge Controller (MPPT SCC) to optimize the power output from a solar panel to charge a 12V battery and power a load. The circuit features sensors for rain detection, water flow measurement, ultrasonic distance measurement, pressure sensing, and temperature and humidity sensing. Additionally, there are relay modules to control plastic solenoid valves, likely for fluid control.
Component List
MPPT Solar Charge Controller (MPPT SCC)
- Function: Optimizes the power from the solar panel to charge the battery and power the load.
- Pins: SOLAR+, SOLAR-, BATTERY+, BATTERY-, LOAD+, LOAD-
12V Battery
- Function: Stores electrical energy for use by the circuit.
- Pins: VCC, GND
Solar Panel
- Function: Converts sunlight into electrical energy.
- Pins: +, -
Rain Sensor
- Function: Detects rainwater.
- Pins: AO (Analog Output), DO (Digital Output), GRD (Ground), VCC (Power Supply)
ESP32 Wroom Dev Kit
- Function: Microcontroller for controlling the circuit's sensors and actuators.
- Pins: Multiple GPIOs, 3V3, EN, GND, etc.
Water Flow Sensor
- Function: Measures the flow rate of water.
- Pins: Signal, Vcc, GND
Relay Module
- Function: Electrically operated switch to control high power devices.
- Pins: NC (Normally Closed), COM (Common), INPUT, GND, VCC
Plastic Solenoid Valve
- Function: Controls the flow of liquid.
- Pins: pin1, pin2
HC-SR04 Ultrasonic Distance Sensor
- Function: Measures distance using ultrasonic waves.
- Pins: VCC, TRIG, ECHO, GND
SparkFun Pressure Sensor Breakout - MS5803-14BA
- Function: Measures pressure.
- Pins: GND, 3.3V, SDA/SDI, SCL/SCLK, SDO, AD/CS, PS
DHT22 Temperature and Humidity Sensor
- Function: Measures ambient temperature and humidity.
- Pins: +, Out, -
Wiring Details
MPPT Solar Charge Controller
- SOLAR+ connected to Solar Panel +
- SOLAR- connected to Solar Panel -
- BATTERY+ connected to 12V Battery VCC
- BATTERY- connected to 12V Battery GND
- LOAD+ connected to Relay Module NC (both relay modules)
- LOAD- connected to Plastic Solenoid Valve pin2 (both valves), Relay Module GND (both relay modules)
12V Battery
- VCC connected to MPPT SCC BATTERY+
- GND connected to MPPT SCC BATTERY-
Solar Panel
-
- connected to MPPT SCC SOLAR+
-
- connected to MPPT SCC SOLAR-
Rain Sensor
- VCC connected to ESP32 3V3
- GRD connected to ESP32 GND
- DO connected to ESP32 GPIO 25
ESP32 Wroom Dev Kit
- 3V3 connected to Rain Sensor VCC, HC-SR04 VCC, MS5803-14BA 3.3V, Water Flow Sensor Vcc, DHT22 +
- GND connected to Rain Sensor GRD, HC-SR04 GND, Water Flow Sensor GND, DHT22 -, MS5803-14BA GND
- GPIO 25 connected to Rain Sensor DO
- GPIO 26 connected to Water Flow Sensor Signal
- GPIO 27 connected to Relay Module INPUT (one relay module)
- GPIO 14 connected to Relay Module INPUT (another relay module)
- GPIO 23 connected to MS5803-14BA SDA/SDI
- GPIO 22 connected to MS5803-14BA SCL/SCLK
- GPIO 21 connected to HC-SR04 ECHO
- GPIO 19 connected to HC-SR04 TRIG
- GPIO 15 connected to DHT22 Out
Water Flow Sensor
- Signal connected to ESP32 GPIO 26
- Vcc connected to ESP32 3V3
- GND connected to ESP32 GND
Relay Module
- NC connected to MPPT SCC LOAD+
- COM connected to Plastic Solenoid Valve pin1 (each valve to its respective relay)
- INPUT connected to ESP32 GPIO 27 or GPIO 14 (each relay to its respective GPIO)
- GND connected to MPPT SCC LOAD-
- VCC not directly connected in the provided net list
Plastic Solenoid Valve
- pin1 connected to Relay Module COM (each valve to its respective relay)
- pin2 connected to MPPT SCC LOAD-
HC-SR04 Ultrasonic Distance Sensor
- VCC connected to ESP32 3V3
- TRIG connected to ESP32 GPIO 19
- ECHO connected to ESP32 GPIO 21
- GND connected to ESP32 GND
SparkFun Pressure Sensor Breakout - MS5803-14BA
- 3.3V connected to ESP32 3V3
- GND connected to ESP32 GND
- SDA/SDI connected to ESP32 GPIO 23
- SCL/SCLK connected to ESP32 GPIO 22
- AD/CS connected to ESP32 3V3
DHT22 Temperature and Humidity Sensor
-
- connected to ESP32 3V3
- Out connected to ESP32 GPIO 15
-
- connected to ESP32 GND
Documented Code
No code was provided for the microcontroller. Typically, the code would be documented here, including setup routines, main loop, and functions for handling sensor readings, actuator control, and any communication protocols used.
Please note that the VCC connections for the relay modules are not specified in the net list provided. It is assumed that they would be connected to a suitable power supply, possibly the MPPT SCC LOAD+ or another regulated power source appropriate for the relay coil voltage.