Table of Contents
As I am writing these lines the parts needed to build the plant watering slowly come in.
For the moisture sensors, I choose the cheap “Capacitive Soil Moisture Sensor v1.2” from DIY More. I don’t know if these are the original manufacturer of these devices but they were cheap and work great.
The advantage of these is that because they operate at 3.3V internally the output ranges between 0V and about 3V. In contrast to the output, they can be fed by a 5V supply voltage because they have an internal 3.3V regulator. That way 8 of them won’t stress out the internal 3.3V regulator on the ESP32 board.
The pumps are also the most generic 3-6V water pump you can find on your trusty DIY stores. They come in a few different layouts in terms of where the hose will attach to. I choose this style because it allows the pump to suck most of the water out of the reservoir and the hose can be routed directly up.
With a 3D printed rig, these can be put into the reservoir in and ordered manner.
Water Level Sensor
These pumps don’t like to run dry because they eventually heat up and destroy themselves or at least wear out much quicker. The water level sensor will prevent these pumps from running dry. It attaches to the side of the reservoir right where the pumps will start to run dry.
I don’t know the exact inner workings but I could imagine a reed switch inside the base and a magnet inside the floating part.
Now comes the heart of the project: The ESP32 Module. I had this one laying around but a slightly smaller module with less flash and without SRAM would work fine as well.
The decision to use the internal ADC struck me later in the built. For this reason, I recommend you to get two 4 Channel ADC Modules as well. While in theory, the ADC0 has 8 analog inputs two of them are not exposed to the outer copper pads. So you can only use 6 sensors.
In the final assembly, the internal ADC of the ESP32 will be replaced by two external 4 channel ADCs which are on their way to me right now.
The second most essential part is the relay module. This will turn the pumps on and off for us. You might ask yourself why I choose a relay module over transistors for that task. Well, there are no ready-made transistor or MOSFET modules with 8 channels. Also, this completely isolates the pumps from the other electronic stuff. So if I need a larger pump for one flower pot I could just use a separate power supply for that one.
These are designed to work with 5V supply and input voltages. But I found that they also work reliably with 3.3V (They trigger on a low level and perhaps pull the input high on their own; even if not 3.3V should be high enough to be interpreted as HIGH).
I quickly wired together a small prototype for one flower pot I have in my windowsill. It doesn’t look pretty but it is just a proof of concept and a test for the software.
The prototype will now run for a few days or weeks until I think it is reliable enough and my external ADCs come in.
Right now it seems to work if the sensor and water outlet is placed precisely. Sometimes the water will flow away from the sensor and it won’t read a proper moisture level for the whole plant. If that occurs one must place the sensor closer to the plant.