ESP32-Based Smart Irrigation System with Soil Moisture Sensor and I2C LCD Display
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. It uses an ESP32 microcontroller to read data from a soil moisture sensor and display the readings on a 16x2 I2C LCD. Additionally, the ESP32 controls a 5V relay to activate a 5V mini water pump when the soil moisture level falls below a certain threshold.
Component List
SparkFun Soil Moisture Sensor
- Pins: VCC, GND, SIG
- Description: Measures the moisture level in the soil.
ESP32
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, VIN, 3V3, D15, D2, D4, RX2, TX2, D5, D18, D19, D21, RX0, TX0, D22, D23, BOOT
- Description: Microcontroller used to read sensor data, control the relay, and display information on the LCD.
16x2 I2C LCD
- Pins: GND, VCC, SDA, SCL
- Description: Displays the soil moisture readings.
5V Relay
- Pins: Normally Open, Common terminal, Normally Closed, In, GND, VCC
- Description: Controls the power to the water pump based on the signal from the ESP32.
5V Mini Water Pump
- Pins: Positive pin, Negative pin
- Description: Pumps water to the soil when activated.
Connector 5V
- Pins: GND, VCC
- Description: Provides 5V power supply to the circuit.
Wiring Details
SparkFun Soil Moisture Sensor
- VCC: Connected to VCC of the Connector 5V.
- GND: Connected to GND of the Connector 5V.
- SIG: Connected to VP of the ESP32.
ESP32
- VP: Connected to SIG of the SparkFun Soil Moisture Sensor.
- GND: Connected to GND of the Connector 5V.
- VIN: Connected to VCC of the Connector 5V.
- D13: Connected to In of the 5V Relay.
- D21: Connected to SDA of the 16x2 I2C LCD.
- D22: Connected to SCL of the 16x2 I2C LCD.
16x2 I2C LCD
- GND: Connected to GND of the Connector 5V.
- VCC: Connected to VCC of the Connector 5V.
- SDA: Connected to D21 of the ESP32.
- SCL: Connected to D22 of the ESP32.
5V Relay
- Common terminal: Connected to VCC of the Connector 5V.
- VCC: Connected to VCC of the Connector 5V.
- In: Connected to D13 of the ESP32.
- Normally Open: Connected to the positive pin of the 5V Mini Water Pump.
5V Mini Water Pump
- Positive pin: Connected to Normally Open of the 5V Relay.
- Negative pin: Connected to GND of the Connector 5V.
Connector 5V
- GND: Connected to GND of the ESP32, 5V Mini Water Pump, 16x2 I2C LCD, and SparkFun Soil Moisture Sensor.
- VCC: Connected to VIN of the ESP32, 5V Relay, 16x2 I2C LCD, and SparkFun Soil Moisture Sensor.
Code
No code is provided for this circuit.