ESP32-Controlled Soil Moisture Monitoring and Water Pump System
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit is designed to control a water pump based on soil moisture levels. It consists of a power source (9V Battery), a microcontroller (ESP32 Devkit V1), a relay module (Wemos D1 Mini Relay Shield) to switch the water pump, a soil moisture sensor module (Soil Moisture Module with YL-69 Sonda), and the water pump itself. The ESP32 reads the moisture level from the soil sensor and controls the relay, which in turn powers the water pump.
Component List
9V Battery
- Description: Provides the power source for the circuit.
- Pins:
-(negative),+(positive)
Wemos D1 Mini Relay Shield
- Description: Acts as an interface to control high power devices like the water pump.
- Pins:
RST,5V,GND,D4,D3,D2,D1,RX,TX,A0,3V3,D8,D7,D6,D5,D0,NO,COM,NC
ESP32 Devkit V1
- Description: The main microcontroller unit that processes the sensor data and controls the relay.
- Pins:
3V3,GND,D15,D2,D4,RX2,TX2,D5,D18,D19,D21,RX0,TX0,D22,D23,EN,VP,VN,D34,D35,D32,D33,D25,D26,D27,D14,D12,D13,VIN
Soil Moisture Module
- Description: Measures the moisture level in the soil.
- Pins:
positive,negative,Analog,Digital,Ground,VCC
YL-69 Sonda
- Description: The probe that interfaces with the Soil Moisture Module to detect moisture levels.
- Pins:
+(positive),-(negative)
Water Pump
- Description: Pumps water when activated by the relay.
- Pins:
VCC,GND
Wiring Details
9V Battery
+connected to Wemos D1 Mini Relay ShieldNO-connected to Water PumpGND
Wemos D1 Mini Relay Shield
5Vconnected to ESP32 Devkit V1VINGNDconnected to ESP32 Devkit V1GNDD1connected to ESP32 Devkit V1D2COMconnected to Water PumpVCC
ESP32 Devkit V1
VINconnected to Wemos D1 Mini Relay Shield5VGNDconnected to Wemos D1 Mini Relay ShieldGNDand Soil Moisture ModuleGround3V3connected to Soil Moisture ModuleVCCD2connected to Wemos D1 Mini Relay ShieldD1D34connected to Soil Moisture ModuleAnalog
Soil Moisture Module
VCCconnected to ESP32 Devkit V13V3Groundconnected to ESP32 Devkit V1GNDAnalogconnected to ESP32 Devkit V1D34positiveconnected to YL-69 Sonda+negativeconnected to YL-69 Sonda-
YL-69 Sonda
+connected to Soil Moisture Modulepositive-connected to Soil Moisture Modulenegative
Water Pump
VCCconnected to Wemos D1 Mini Relay ShieldCOMGNDconnected to 9V Battery-
Documented Code
No code was provided for the microcontrollers in the circuit. The expected behavior is that the ESP32 Devkit V1 would run a program to read the analog value from the Soil Moisture Module, process the moisture level, and control the Wemos D1 Mini Relay Shield to turn the Water Pump on or off accordingly. The code would be responsible for initializing the hardware interfaces, reading sensor data, implementing control logic, and driving the relay.