Introduction: Saving Plants - DIY Plant Watering Device

About: Empowering Creation for Future Innovators; Our mission is to form a community with easy access to whether hardware, software and ideas that allow makers and younger generation to achieve their goals and realiz…

Story

Most of us like having green plants in our homes or offices because they can brighten up our living space, reduce fatigue and stress, improve our moods and productivity, and clean indoor air. However, taking care of them is no easy feat. I grew a potted plant but it ended up with yellow and dead leaves due to water shortage. To avoid following the same old disastrous road, I decided to make an auto plant watering device to save my new plants.


Thoughts

The device mainly includes a water storage container, an electric valve to control water flow, a soil humidity sensor to determine whether the valve will open to water plants, and a liquid level sensor installed outside the container to detect if the liquid level falls under the threshold, which means the container is nearly empty. And I only need to refill it when I receive the water shortage prompt.

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

Step 1: Connection Diagram

Connect the liquid level sensor to the main controller's D7/D9 with an adapter.

The soil moisture sensor goes to the controller's A0 and the relay module to the controller's D12.

Step 2: Assembly

1.Design the 3D model of the housing and container holder on SolidWorks, and print it out. 

2.Check if the ESP32 main controller, relay module, and DC-DC boost converter fit into the housing before installation.

3.Connect them together with cables according to the connection diagram.  

4.Then, connect the valve, liquid level sensor, and soil moisture sensor to ESP32 according to the diagram.

5.Install the transparent acrylic cover.

6.Design a 550mm×250mm background board with holes for fixing hardware on AutoCAD.

7.Laser cut the board with a black acrylic sheet of 8mm thickness according to the drawing. A wooden board of the same size is also suitable for the project.

8.Fix the prepared holder for the container on the black board with screws.

9.Fix the electric valve on the board with nylon cable ties.

10.Attach the maincontroller box to the board with hot glue.

11.Attach the water container to the holder and drill a hole in its bottom for adding water and equalizing air pressure. Then fix it on the board with nylon cable ties.

12.Install the liquid level sensor outside the container. Then the device is ready to use.

13.Fix the whole device on the wall, put the irrigation nozzles around plants evenly, and insert the soil moisture sensor into the soil. Then, all done with the hardware assembly. 

Step 3: Connect the Device to Blynk

1.Sign up Blynk account and log in, then create a new template (select ESP32 as hardware and WiFi as connection type).

2.Create a new device and choose "From template".

3.Select the template we just created.

4.Enter the device to see template ID, device name and AuthToken.

5.Edit the dashboard to configure the gauge of soil moisture.

6.Drag and drop Gauge to set up.

7.Create datastream and select virtual pin.

8.Set the Gauge TITLE, UNITS & MAX. For PIN, I select PIN V6 here (just keep it consistent with that in the program).

9.Now the setting of the gauge of soil moisture is done. Repeat the steps above to complete the settings of the other two.

Step 4: Upload Codes

Change the content in the box to yours.

Step 5: Function Test

1.Add water to the container through the top hole.

2.When the soil humidity is lower than the threshold, the valve opens to water our plants through drip irrigation(Here for the convenience of demonstration, I switch on/off the gauge to open/close the valve).

3.When the liquid level falls under the sensing point, a water shortage prompt will appear on Blynk.

The plant-watering device has been used for some time and it really helps a lot. Now I can stop worrying that my plants will die from water shortage or drowning. 

Thanks for reading, feel free to leave your opinion about this project.

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

Anything Goes Contest

Participated in the
Anything Goes Contest