Skip to main content

Plant watering automation

This is a prototype of a solar-powered plant watering machine and weather station that I worked on. I will probably redesign it at some point as this was just a prototype, and I learned quite a bit while putting it together about solar powered projects and properly managing battery usage (especially with pumps). If I were to do it again I would probably redesign the power supply so that there is a separate battery for the pumps, and I would use an external voltage supervisor IC, since the brownout detection in the ESP32 seems to have issues (I discovered that it would trigger the brownout detector at dawn).

You can find all of the source code written in C for this project here. It is programmed against the ESP-IDF framework which uses FreeRTOS. I programmed it to have a REST API which controls the pumps, and allows you to schedule times of the day it will run. The software is pretty agnostic about what hardware is being used for the pumps, since they're just controlled via MOSFETs anyway, so you could use whatever power source you wanted.

Here is a picture of the solar panel I used which I got from adafruit


Here is a picture of everything put together and pumping water (it's a bit hard to see since I intentionally reduce the flow rate). For future versions I would also consider using some sort of feedback to have better control over the level of moisture in each plant, or I would use a sprinkler system instead of pumps.