ESP32-Based Automated Soil Moisture Monitoring and Watering System
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to monitor soil moisture levels and control a water pump based on the moisture readings. The system uses an ESP32 microcontroller to read data from a soil moisture sensor and a soil moisture module. Based on the readings, the ESP32 controls a 5V relay to activate or deactivate the water pump.
Component List
SparkFun Soil Moisture Sensor
- Pins: VCC, GND, SIG
- Description: Measures the moisture level in the soil.
- Purpose: Provides soil moisture data to the ESP32.
ESP32 Wroom Dev Kit
- Pins: 3V3, EN, VP, VN, GPIO 34, GPIO 35, GPIO 32, GPIO 33, GPIO 25, GPIO 26, GPIO 27, GPIO 14, GND, GPIO 13, SD2, SD3, CMD, V5, GPIO 23, GPIO 22, TXD, RXD, GPIO 21, GPIO 19, GPIO 18, GPIO 5, GPIO 17, GPIO 16, GPIO 4, GPIO 0, GPIO 2, GPIO 15, SD1, SD0, CLK
- Description: A powerful microcontroller with Wi-Fi and Bluetooth capabilities.
- Purpose: Reads data from the soil moisture sensor and module, and controls the relay.
Vcc
- Pins: Vcc
- Description: Provides a 5V power supply.
- Purpose: Supplies power to the relay.
GND
- Pins: GND
- Description: Ground connection.
- Purpose: Provides a common ground for all components.
Water Pump
- Pins: VCC, GND
- Description: A pump used to water the soil.
- Purpose: Waters the soil when activated by the relay.
5V Relay
- Pins: Normally Open, Common terminal, Normally Closed, In, GND, VCC
- Description: A relay that can be controlled by the ESP32 to switch the water pump on and off.
- Purpose: Controls the power to the water pump based on the ESP32's signal.
Soil Moisture Module
- Pins: positive, negative, Analog, Digital, Ground, VCC
- Description: A module that provides both analog and digital outputs for soil moisture levels.
- Purpose: Provides additional soil moisture data to the ESP32.
Wiring Details
SparkFun Soil Moisture Sensor
- SIG is connected to VN on the ESP32 Wroom Dev Kit.
- GND is connected to negative on the Soil Moisture Module.
- VCC is connected to positive on the Soil Moisture Module.
ESP32 Wroom Dev Kit
- VN is connected to SIG on the SparkFun Soil Moisture Sensor.
- EN is connected to In on the 5V Relay.
- GPIO 34 is connected to Analog on the Soil Moisture Module.
- GPIO 35 is connected to Digital on the Soil Moisture Module.
Vcc
- Vcc is connected to VCC on the 5V Relay.
GND
- GND is connected to:
- GND on the 5V Relay
- GND on the Water Pump
- Ground on the Soil Moisture Module
Water Pump
- VCC is connected to Normally Open on the 5V Relay.
- GND is connected to GND.
5V Relay
- In is connected to EN on the ESP32 Wroom Dev Kit.
- VCC is connected to Vcc.
- GND is connected to GND.
- Normally Open is connected to VCC on the Water Pump.
Soil Moisture Module
- negative is connected to GND on the SparkFun Soil Moisture Sensor.
- positive is connected to VCC on the SparkFun Soil Moisture Sensor.
- Analog is connected to GPIO 34 on the ESP32 Wroom Dev Kit.
- Digital is connected to GPIO 35 on the ESP32 Wroom Dev Kit.
- Ground is connected to GND.
Code
There is no code provided for this circuit.