This is highly experimental
But of course, once the soil moisture is read out, it’s only a matter of time before automatic watering has to happen.
Add one beefy (..ish) MOSFET and a small pump
You get one basil with automatic watering. The setup now looks like this
The watering algorithm
Is very simple: I wait until the moisture level drops under a low threshold. Then I go into water mode: as long as the sensor reads below the high threshold, I water it for a few seconds. Once it hits the high threshold, it stops watering. This means that the watering happens bit by bit, with the pump running for 2 seconds every 5 minutes while the moisture is brought from the low threshold to the high threshold. Then the plant it left to mind its business until the moisture drops below the low threshold again. The goal of this approach is to not waste water by running the pump too long and to allow the water to diffuse in the soil so I don’t read less humidity than there is water in the soil.
Behold some basic implementation:
The resulting soil moisture over the last 7 weeks looks like this
The algorithm seems to work at maintaining the moisture between 80% and 50%. Yes, there are some weird values read out by the sensor on the right side, where moisture appears over 100. I am checking those. Another thing to see on the graph is that the last 7 days on the right the time resolution is higher, while the left part is down sampled. Due to that, it is possible that the 80% peak is lost.
Where to?
This is just a hacked together test. I am clearly interested in watering the plants automatically, but I have no experience with how to water them. There are quite a few ways:
- Bring the moisture from low to high when the low threshold is reached (like I do here)
- If so, what should be the two thresholds?
- Put a fixed quantity of water at a fixed interval and let the extra overflow back in the tank
- What should that interval be?
- Put a fixed quantity of water when a specific moisture is reached
- If so, what should that moisture level be and how much water to put?
Any advice from plant experts out there? About any plants, not just the basil.
Pingback: The Basil Speaks to Me – soil moisture readings #Sensors #Automation @electr_bob « Adafruit Industries – Makers, hackers, artists, designers and engineers!
Pingback: The basil speaks to me – Electro Bob