Smart Plant Watering System Using ESP32

In this project, smart plant watering system using an ESP32 microcontroller is created. The ESP32 will generate its own access point, allowing users to access a web-based dashboard by simply entering an IP address in their smartphone’s browser.

Advertisements

This system does not require any external IoT applications or an internet connection. The setup includes a capacitive moisture sensor, temperature and humidity sensor (DHT11), an OLED display, and a 12V DC pump or solenoid valve for water control. The ESP32 monitors soil moisture and automatically turns the pump on or off based on predefined thresholds.

The device is working in two modes, auto and manual. In auto mode, the ESP32 continuously monitors soil moisture. If the moisture percentage falls below 20%, the pump turns on to water the plant. Once the soil moisture reaches 80%, the pump automatically turns off. The user can also manually control the pump using a toggle button on the dashboard or a physical push button. The dashboard displays real-time readings of moisture, temperature, and humidity. A buzzer alerts the user when the moisture level is high but the pump remains on.

Advertisements

To build the circuit, a 12V power supply is connected to the ESP32 through a 7805 voltage regulator, which converts the voltage to 5V. The capacitive moisture sensor and OLED display operate at 3.3V. The ESP32 acts as a Wi-Fi access point, enabling wireless monitoring and control via a smartphone or computer. The system is designed on a custom PCB for better compactness and efficiency. Users can also assemble it on a zero PCB using a printed circuit layout.

The code for the ESP32 is written in Arduino IDE. The first step is to calibrate the moisture sensor by obtaining its maximum (dry) and minimum (wet) values. Using these values, the system calculates moisture percentage dynamically. The HTML-based dashboard is built into the ESP32’s firmware, enabling real-time updates of sensor readings. The program also defines GPIO pins, access point credentials, and control logic for both auto and manual modes. The full source code and required library versions are available on iotcircuithub.com.

This smart plant watering system is an excellent DIY project for electronics and IoT enthusiasts. It is useful for home gardens, greenhouses, and automated irrigation systems. By utilizing the ESP32’s built-in Wi-Fi capabilities, it eliminates the need for additional IoT services, making it a cost-effective and efficient solution. Students can further enhance their PCB design skills using Altium 365, which offers a cloud-based PCB design platform with team collaboration, automatic backups, and online courses. This project demonstrates how IoT can be applied in agriculture and smart home automation, making plant care easier and more efficient.

Akhil Satheesh

Akhil Satheesh

Akhil Satheesh is an electronics expert and the Founder and CEO of Soldering Mind. He specializes in designing innovative electronic circuits and custom, high-performance PCB layouts. Every project he shares on solderingmind.com is rigorously bench-tested to ensure accuracy for makers and hobbyists alike.

Leave a Reply