ESP32-Based Smart Irrigation System with Soil Moisture Sensing and Temperature Monitoring
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question is designed to monitor and control a water system, which includes a temperature sensor, a water level sensor, a soil moisture sensor, and a water pump. The ESP32 Devkit V1 microcontroller serves as the central processing unit, interfacing with the sensors and controlling a relay that powers the water pump. The relay ensures that the pump is only activated when certain conditions are met, as determined by the sensor readings. The circuit is powered by a 5V battery, which supplies power to the microcontroller, sensors, and relay.
Component List
ESP32 Devkit V1
- Microcontroller with WiFi capability.
- 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.
5V Relay
- Electromechanical switch used to control high power devices.
- Pins: Normally Open, Common terminal, Normally Closed, In, GND, VCC.
5V Mini Water Pump
- A pump for moving water.
- Pins: Positive pin, Negative pin.
MKE-S15 DS18B20 Waterproof Temperature Sensor
- Digital temperature sensor.
- Pins: SIG, 5V, GND.
Water Sensor
- Sensor for detecting the presence of water.
- Pins: -, +.
Soil Moisture Interceptor
- Sensor for measuring the moisture content in soil.
- Pins: AO, DO, GND, VCC.
5V Battery
- Power source for the circuit.
- Pins: +, -.
Wiring Details
ESP32 Devkit V1
- D2 connected to Temperature Sensor (SIG)
- D22 connected to Relay (In)
- D32 connected to Soil Moisture Interceptor (AO)
- GND connected to Temperature Sensor (GND), Soil Moisture Interceptor (GND), Relay (GND)
- VIN connected to Temperature Sensor (5V), Soil Moisture Interceptor (VCC), Relay (VCC)
5V Relay
- Normally Open connected to Water Pump (Positive pin)
- Common terminal connected to Battery (+)
- In connected to ESP32 Devkit V1 (D22)
- GND connected to ESP32 Devkit V1 (GND)
- VCC connected to ESP32 Devkit V1 (VIN)
5V Mini Water Pump
- Positive pin connected to Relay (Normally Open)
- Negative pin connected to Battery (-)
MKE-S15 DS18B20 Waterproof Temperature Sensor
- SIG connected to ESP32 Devkit V1 (D2)
- 5V connected to ESP32 Devkit V1 (VIN)
- GND connected to ESP32 Devkit V1 (GND)
Water Sensor
-
- connected to Soil Moisture Interceptor (GND)
-
- connected to Soil Moisture Interceptor (VCC)
Soil Moisture Interceptor
- AO connected to ESP32 Devkit V1 (D32)
- DO not connected
- GND connected to ESP32 Devkit V1 (GND), Water Sensor (-)
- VCC connected to ESP32 Devkit V1 (VIN), Water Sensor (+)
5V Battery
-
- connected to Relay (Common terminal)
-
- connected to Water Pump (Negative pin)
Documented Code
No code has been provided for the microcontroller. The documentation of the code would typically include a description of the functionality, setup, and loop routines, along with any functions used to read sensors, control the relay, and manage the water pump. Since no code is available, this section cannot be completed.