Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

ESP32-Based Automated Plant Watering System with Soil Moisture Sensing

Image of ESP32-Based Automated Plant Watering System with Soil Moisture Sensing

Circuit Documentation

Summary of the Circuit

This circuit is designed to control a water pump using an ESP32 Devkit V1 microcontroller, which interfaces with a soil moisture sensor module (YL-83 Module LM393) and a soil moisture probe (YL-69 Sonda). The system is powered by a series-parallel configuration of 18650 Li-ion batteries, which provide power to the ESP32 and the relay module through a step-down buck converter. The relay module controls the power to the water pump, and its activation is determined by the moisture level detected by the sensor. A pushbutton is included to manually trigger the relay.

Component List

ESP32 Devkit V1

  • Microcontroller with WiFi and Bluetooth capabilities.
  • It has a variety of digital and analog pins for interfacing with other components.

YL-69 Sonda

  • Soil moisture probe that detects the moisture level in the soil.

YL-83 Module LM393

  • Soil moisture sensor module that works with the YL-69 Sonda.
  • It has both analog and digital outputs.

18650 Li-ion Battery

  • Rechargeable battery providing the power source for the circuit.

Step-down Buck Converter

  • Voltage regulator that steps down the input voltage to a lower, stable output voltage.

Pushbutton

  • A manual switch that can be used to trigger an action in the circuit.

5V Relay

  • An electromechanical switch used to control the water pump.

Water Pump

  • An electric pump that moves water when powered.

Wiring Details

ESP32 Devkit V1

  • VIN connected to the output of the step-down buck converter.
  • GND connected to the ground net of the circuit.
  • 3V3 connected to the VCC of the YL-83 Module LM393.
  • D34 connected to the A0 pin of the YL-83 Module LM393.

YL-69 Sonda

  • + connected to the + pin of the YL-83 Module LM393.
  • - connected to the - pin of the YL-83 Module LM393.

YL-83 Module LM393

  • VCC connected to the 3V3 pin of the ESP32 Devkit V1.
  • GND connected to the ground net of the circuit.
  • A0 connected to the D34 pin of the ESP32 Devkit V1.

18650 Li-ion Battery

  • The batteries are connected in a series-parallel configuration to provide the required voltage and current.

Step-down Buck Converter

  • IN + connected to the positive terminal of the 18650 Li-ion batteries.
  • IN - GND connected to the negative terminal of the 18650 Li-ion batteries.
  • OUT + connected to the VIN pin of the ESP32 Devkit V1 and the VCC pin of the 5V relay.
  • OUT - GND connected to the ground net of the circuit.

Pushbutton

  • Pin 1 (in) connected to the output of the step-down buck converter.
  • Pin 3 (out) connected to the In pin of the 5V relay.

5V Relay

  • Common terminal connected to the positive terminal of the 18650 Li-ion batteries.
  • Normally Open connected to the VCC pin of the Water Pump.
  • In connected to the Pin 3 (out) of the Pushbutton.
  • GND connected to the ground net of the circuit.
  • VCC connected to the output of the step-down buck converter.

Water Pump

  • VCC connected to the Normally Open pin of the 5V relay.
  • GND connected to the ground net of the circuit.

Documented Code

Since no code was provided, this section is left blank. The code for the ESP32 Devkit V1 would typically include the logic for reading the soil moisture level from the YL-83 Module LM393, controlling the relay to power the water pump, and possibly handling the manual override from the pushbutton.