ESP32-Based Automated Irrigation System with Soil Moisture Sensing and Temperature Monitoring
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to interface various sensors and actuators with an ESP32 microcontroller for monitoring and control purposes. The circuit includes soil moisture and temperature/humidity sensors for environmental data collection, IR sensors for object detection, a servo motor for actuation, a water pump for water delivery, and an LCD display for user interface. A 7805 voltage regulator is used to step down the voltage for the components that require 5V, and a TIP120 transistor is used to control the high-current water pump. The circuit is powered by a 12V battery.
Component List
Microcontroller
- ESP32 (30 pin): A 30-pin microcontroller with WiFi and Bluetooth capabilities, used as the central processing unit of the circuit.
Sensors
- SparkFun Soil Moisture Sensor: Measures the moisture level in the soil.
- DHT11 Humidity and Temperature Sensor: Measures ambient temperature and humidity.
- IR Sensors: Used for object detection.
Actuators
- Servo: A motor capable of precise position control.
- Water Pump: An actuator used to pump water.
Power Components
- 7805 Voltage Regulator: Steps down the voltage from 12V to 5V.
- TIP120 Hi-Current Darlington Transistor: Controls high-current loads like the water pump.
- Battery 12V: Provides power to the circuit.
Display
- LCD Display (16 pin): Displays information to the user.
- PCF8574 IO Expansion Board: Expands the number of I/O pins available to the microcontroller, used to interface with the LCD.
Miscellaneous
- Resistor (1k Ohms): Limits current, possibly used for the base of the TIP120 transistor.
Wiring Details
ESP32 (30 pin)
- D34: Connected to the SIG pin of the Soil Moisture Sensor.
- D33: Connected to the BASE pin of the TIP120 Transistor.
- D14: Connected to the DATA pin of the DHT11 Sensor.
- GND: Common ground with various components.
- Vin: Connected to the Vout pin of the 7805 Voltage Regulator.
- D23, D22, TX0, RX0, D21, D19, D18, D5, TX2, RX2: Connected to various IR sensors and the Servo.
- 3V3: Powers the IR sensors and the Servo.
SparkFun Soil Moisture Sensor
- SIG: Connected to D34 on the ESP32.
- GND: Common ground.
- VCC: Connected to the Vout pin of the 7805 Voltage Regulator.
DHT11 Humidity and Temperature Sensor
- VDD: Connected to the Vout pin of the 7805 Voltage Regulator.
- DATA: Connected to D14 on the ESP32.
- NULL: Not connected.
- GND: Common ground.
IR Sensors
- Out: Connected to various pins on the ESP32 (D23, TX0, RX0, TX2, RX2).
- GND: Common ground.
- VCC: Powered by the 3V3 pin on the ESP32.
Servo
- Pulse: Connected to D18 on the ESP32.
- GND: Common ground.
- VCC: Powered by the 3V3 pin on the ESP32.
7805 Voltage Regulator
- Vin: Connected to the + pin of the 12V battery.
- Gnd: Common ground.
- Vout: Powers the ESP32 Vin, Soil Moisture Sensor VCC, and DHT11 VDD.
TIP120 Hi-Current Darlington Transistor
- BASE: Connected to D33 on the ESP32.
- COLLECTOR: Connected to the Water Pump VCC through a 1k Ohm resistor.
- EMITTER: Connected to the - pin of the 12V battery.
Water Pump
- VCC: Connected to the COLLECTOR pin of the TIP120 Transistor.
- GND: Connected to the EMITTER pin of the TIP120 Transistor.
Battery 12V
- +: Powers the 7805 Voltage Regulator and the Water Pump through the TIP120 Transistor.
- -: Common ground.
LCD Display (16 pin) and PCF8574 IO Expansion Board
- VSS, VDD, VO, RS, R_W, E, DB0, DB1, DB2, DB3, DB4, DB5, DB6, DB7: Connected to corresponding pins on the PCF8574 IO Expansion Board.
- A, K: Not connected or not specified in the net list.
Resistor (1k Ohms)
- Pin1: Connected to the COLLECTOR pin of the TIP120 Transistor.
- Pin2: Connected to the Water Pump VCC.
Documented Code
No code was provided for the microcontrollers in the circuit. The code would typically include initialization and control logic for the sensors, actuators, and communication interfaces, as well as routines for data acquisition, processing, and display on the LCD.