As I was trying to put together a simple automated plant watering solution, I figured that having the amount of water be driven by a soil sensor would be a good idea. So I tried the default cheap capacitive moisture sensors, but had several of them fail on me after only a few weeks. While looking for better solution I ran over a different technique call Time Domain Reflectometry that could be used to make that measurement. How hard could it be to make one of those?
![](https://cdn.hackaday.io/images/1787151698205803715.jpg)
Many hours of debugging, a few failed designs later and I have a working prototype based on a Time of Flight sensor and a Raspberry Pi Pico W that can log to a central server.
Using a PCB sensor that is inserted in to the soil of a plant, it is able to see the change in moisture content in the soil over time. It's sensitive enough that it can see the change in moisture over a single day. This allowed me to set a level that triggers watering and have small amount of water dispensed with a pump to keep the moisture level fairly consistent.
![](https://cdn.hackaday.io/images/8116001697431385589.png)
This is a sensor log of a plant. The green vertical lines are when watering was triggered and the red line is the average detected moisture level. Each dose of water is pretty small, but shows up as a huge spice of moisture that then drops quickly as it spreads more evenly thru the plant pot.
The test plant isn't dead after a few months, so by at least that metric, the project has achieved it's goal. However, there are still some things that need to be done:
- Design/create an enclosure
- Finish rewrite to Rust
- Create single PCB with integrated antenna
I'm going back and writing build logs to document some of the steps I did, which is really more of the point of this whole process. But if you want to jump ahead and see some of the results the KiCad and RP2040 CircuitPython code can be found at: https://github.com/theblinkingman/plant-waterer
Can anybody tell me, what was the reference voltage set to the comparator using 10k fixed and 10 variable resistors?