ESP32-Based Smart Irrigation System with Soil and Weather Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit designed for environmental monitoring and control. The circuit includes sensors for soil moisture, rain, light, and temperature/humidity, as well as a relay-controlled water pump. The central controller is an ESP32 microcontroller, which interfaces with various sensors and a display module.
Component List
Soil Moisture Sensor
- Pins: VCC, GND, SIG
- Description: Measures the moisture level in the soil.
- Purpose: Provides soil moisture data to the ESP32.
RAIN SENSOR
- Pins: AO, DO, GRD, VCC
- Description: Detects the presence of rain.
- Purpose: Provides rain detection data to the ESP32.
ESP32 (30 pin)
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, Vin, D23, D22, TX0, RX0, D21, D19, D18, D5, TX2, RX2, D4, D2, D15, 3V3
- Description: A powerful microcontroller with Wi-Fi and Bluetooth capabilities.
- Purpose: Central controller for the circuit.
DHT11
- Pins: DATA, GND, VCC
- Description: Measures temperature and humidity.
- Purpose: Provides temperature and humidity data to the ESP32.
16x2 I2C LCD
- Pins: GND, VCC, SDA, SCL
- Description: A 16x2 character LCD with I2C interface.
- Purpose: Displays sensor data and system status.
Relay module 5v-30v
- Pins: common contact, normally open, normally closed, trigger, V-, V+
- Description: Controls high voltage devices like a water pump.
- Purpose: Controls the water pump based on sensor data.
Light Sensor
- Pins: GND, UCC, NC, SIG
- Description: Measures ambient light levels.
- Purpose: Provides light level data to the ESP32.
Water Pump
- Pins: +, -
- Description: A pump for watering plants.
- Purpose: Waters plants based on soil moisture levels.
12v power supply
- Pins: +, -
- Description: Provides 12V power to the circuit.
- Purpose: Powers the water pump and other components.
NPK Soil Sensor (mini)
- Pins: VCC, GND, A, B
- Description: Measures soil nutrient levels.
- Purpose: Provides soil nutrient data to the ESP32.
RS485
- Pins: VCC, RO, RE, GND, B, A, DE, DI
- Description: A communication module for RS485 protocol.
- Purpose: Facilitates communication between the NPK Soil Sensor and the ESP32.
Wiring Details
Soil Moisture Sensor
- VCC connected to VCC (common power net)
- GND connected to GND (common ground net)
- SIG connected to D13 on ESP32
RAIN SENSOR
- VCC connected to VCC (common power net)
- GRD connected to GND (common ground net)
- AO connected to D32 on ESP32
ESP32 (30 pin)
- Vin connected to VCC (common power net)
- GND connected to GND (common ground net)
- D13 connected to SIG of Soil Moisture Sensor
- D32 connected to AO of RAIN SENSOR
- D26 connected to SIG of Light Sensor
- D27 connected to RO of RS485
- D14 connected to DI of RS485
- D22 connected to SCL of 16x2 I2C LCD
- D21 connected to SDA of 16x2 I2C LCD
- D4 connected to DATA of DHT11
- D2 connected to trigger of Relay module
- 3V3 connected to VCC (common power net)
DHT11
- DATA connected to D4 on ESP32
- GND connected to GND (common ground net)
- VCC connected to 3V3 (common power net)
16x2 I2C LCD
- GND connected to GND (common ground net)
- VCC connected to 3V3 (common power net)
- SDA connected to D21 on ESP32
- SCL connected to D22 on ESP32
Relay module 5v-30v
- trigger connected to D2 on ESP32
- V- connected to GND (common ground net)
- V+ connected to 3V3 (common power net)
- common contact connected to + of 12v power supply
- normally open connected to + of Water Pump
Light Sensor
- UCC connected to VCC (common power net)
- GND connected to GND (common ground net)
- SIG connected to D26 on ESP32
Water Pump
- + connected to normally open of Relay module
- - connected to - of 12v power supply
12v power supply
- + connected to common contact of Relay module
- - connected to - of Water Pump
NPK Soil Sensor (mini)
- VCC connected to 3V3 (common power net)
- GND connected to GND (common ground net)
- A connected to A of RS485
- B connected to B of RS485
RS485
- VCC connected to VCC (common power net)
- GND connected to GND (common ground net)
- RO connected to D27 on ESP32
- DI connected to D14 on ESP32
- A connected to A of NPK Soil Sensor
- B connected to B of NPK Soil Sensor
Code
No code provided.