DIY Automatic Plant Watering System with ESP32 and Blynk

DIY Automatic Plant Watering System with ESP32 and Blynk

By Jaychouu

Story

Most people enjoy having green plants in their homes or offices as they can brighten the living space, reduce fatigue and stress, improve moods and productivity, and clean indoor air. However, caring for them can be challenging. The author experienced a potted plant suffering from water shortage, leading to yellow and dead leaves. To prevent this, an automatic plant watering device was developed.

Thoughts

The device comprises a water storage container, an electric valve to control water flow, a soil humidity sensor to determine when to water plants, and a liquid level sensor to detect low water levels in the container. A notification is sent when the container is nearly empty, prompting a refill.

Supplies

  • 1 × ESP32-E IoT Microcontroller
  • 1 × Non-contact Capacitive Liquid Level Sensor
  • 1 × Gravity: Analog Waterproof Soil Moisture Sensor
  • 1 × Adjustable DC-DC Boost Converter
  • 1 × Relay Module
  • 1 × Solenoid Valve
  • 1 × 3D Housing
  • 1 × Acrylic Sheet
  • 1 × Water Container
  • 1 × Irrigation Nozzle
  • Nylon Cable Ties

YouTube Video: https://youtu.be/eqhAlgh_mZU

Step 1: Connection Diagram

Connect the liquid level sensor to the main controller's D7/D9 with an adapter. The soil moisture sensor connects to the controller's A0, and the relay module connects to the controller's D12.

[Diagram Description: A wiring diagram illustrates the connections between the ESP32 microcontroller, relay module, DC-DC boost converter, solenoid valve, liquid level sensor, and soil moisture sensor.]

Step 2: Assembly

  1. Design the 3D model of the housing and container holder using SolidWorks and print it.
  2. Verify that the ESP32 main controller, relay module, and DC-DC boost converter fit into the housing before installation.
  3. Connect the components together with cables according to the connection diagram.
  4. Connect the solenoid valve, liquid level sensor, and soil moisture sensor to the ESP32 as per the diagram.
  5. Install the transparent acrylic cover.
  6. Design a 550mm×250mm background board with holes for fixing hardware using AutoCAD.
  7. Laser cut the board using a black acrylic sheet of 8mm thickness according to the drawing. A wooden board of the same size is also suitable.
  8. Fix the prepared holder for the container onto the black board with screws.
  9. Secure the electric valve onto the board using nylon cable ties.
  10. Attach the main controller box to the board with hot glue.
  11. Mount the water container to the holder. Drill a hole in its bottom for adding water and equalizing air pressure, then secure it to the board with nylon cable ties.
  12. Install the liquid level sensor outside the container. The device is now ready for use.
  13. Fix the entire device on the wall, position the irrigation nozzles evenly around the plants, and insert the soil moisture sensor into the soil. The hardware assembly is complete.

[Image Description: Various images showcase the assembly process. This includes 3D models of the device housing and a component holder, close-ups of the electronics within the 3D printed enclosure, and photos of the physical assembly steps such as mounting the water container, solenoid valve, and liquid level sensor.]

Step 3: Connect the Device to Blynk

  1. Sign up for a Blynk account and log in. Create a new template, selecting ESP32 as the hardware and WiFi as the connection type.
  2. Create a new device and choose the "From template" option.
  3. Select the template that was just created.
  4. Access the device details to retrieve the template ID, device name, and AuthToken.
  5. Edit the dashboard to configure the gauge for soil moisture.
  6. Drag and drop a Gauge widget to set it up.
  7. Create a datastream and select a virtual pin.
  8. Set the Gauge TITLE, UNITS, and MAX value. The author selects PIN V6, ensuring consistency with the program.
  9. The soil moisture gauge setup is now complete. Repeat these steps to configure the settings for the other two required gauges.

[Screenshot Description: The Blynk platform interface is displayed, illustrating the steps for creating a new device template for the ESP32. This includes a dialog box for "Create New Template" and subsequent steps for device creation.]

Step 4: Upload Codes

Change the content in the box to yours.

[Screenshot Description: The Arduino IDE is shown with the code structure for the ESP32. Key lines are highlighted, indicating where users must input their specific Blynk template ID, device name, and authentication token. The code also defines input pins and initial sensor values.]

[Image Description: Screenshots of the Blynk Web Dashboard illustrate the process of adding and customizing a "Gauge" widget to display real-time soil moisture data. This includes detailed views of the "Gauge Settings" dialogs for configuration.]

Step 5: Function Test

  1. Add water to the container through the top hole.
  2. When the soil humidity drops below the threshold, the valve opens to water the plants via drip irrigation. For demonstration purposes, the author switches the gauge to open/close the valve.
  3. When the liquid level falls below the sensing point, a water shortage prompt appears on Blynk.

The plant-watering device has been in use for some time and proves very effective. It alleviates concerns about plants dying from water shortage or overwatering.

Thank you for reading. Feel free to share your opinions about this project.

Codes: https://github.com/DFRobot/SmartWateringDevice


File Info : application/pdf, 24 Pages, 1.43MB

PDF preview unavailable. Download the PDF instead.

Saving-Plants-DIY-Plant-Watering-Device

References

wkhtmltopdf 0.12.6 Qt 4.8.7

Related Documents

Preview DIY ESP32 Soil Moisture Sensors and Automatic Watering System
Learn how to build a DIY automatic plant watering system using ESP32 soil moisture sensors and Home Assistant. This guide covers sensor setup, software configuration, and automation for efficient water usage.
Preview Smart Home Automation System using ESP32, Blynk, and IR Remote
Research paper detailing the design and implementation of an IoT-based smart home automation system using ESP32, Blynk, IR remote, and manual controls for efficient appliance management.
Preview Smart Home Automation with Blynk and ESP32: WiFi and Manual Control Guide
Learn to build a smart home automation system using an ESP32 microcontroller and the Blynk app for WiFi control. This guide covers integrating manual switches for backup, monitoring relay status, and setting up the project step-by-step.
Preview Build an ESP32 Pool Thermometer for HomeKit and Alexa
A comprehensive DIY guide to creating an ESP32-based pool thermometer that seamlessly integrates with Apple HomeKit and Amazon Alexa. Learn how to build a low-power, solar-charged device with deep sleep functionality for real-time pool temperature monitoring.
Preview ESP32 Practical Guide: Projects and Applications
A comprehensive guide to the ESP32 microcontroller, covering its fundamentals, installation, and practical application through various projects. Learn about GPIO, sensors, Bluetooth, web servers, MQTT, and more.
Preview DIY Weather Station with ESP32: Build Your Own Smart Weather Monitor
Learn how to build a DIY smart weather station using the ESP32 microcontroller. This guide covers sensor integration, 3D printing, and connecting to Home Assistant for real-time data and forecasting.
Preview ESP32 Solar Power System Diagram
Diagram illustrating a solar-powered system for an ESP32 microcontroller, featuring a battery, a 'Babysitter' power management unit, and a buck converter for voltage regulation.
Preview 2.8inch ESP32-32E Display Module User Manual
User manual for the 2.8-inch ESP32-32E Display Module, covering resource description, software and hardware instructions, and precautions for use. Details include ESP32-WROOM-32E module, ILI9341 LCD controller, SPI communication, USB-to-serial conversion, and various circuit diagrams.