Background
This whole project started because I decided I needed a hobby. I like to work with my hands but I don't have space for something like a full woodworking workshop. So I thought about what I could do that didn't require a lot of large machines and would be relatively inexpensive to get into. I have a degree in electronics (that I haven't used for 30 years) and a career as a programmer. That being said, I realized that the world of Arduino/Raspberry Pi could be interesting to investigate. I started watching videos about projects I could try and I ended up here. A fully-automated garden watering system. The main difference is that this one takes it a step farther by refilling the reservior with collected rainwater from a rain barrel without any intervention. I've attempted to make this a "set it and forget it" system.
Maybe this year I won't eventually kill any plants I try to grow.
Concept
- Rain fills rain barrel
- If reservoir is low, motorized ball-valve opens allowing reservoir to refill from rain barrel
- Motorized ball-valve closes when reservoir is full
- Soil moisture sensors test moisture levels in each container every 5 minutes
- If moisture is below a pre-defined threshold, turn on appropriate pump
- Continue pumping until moisture level reaches a pre-defined high threshold then turn off pump
- Upload values to ThingSpeak for monitoring
Hardware
I chose a Raspberry Pi Pico because they're:
- Inexpensive
- Perfectly suited to the task
- Readily available
The Chirp sensors (link available in the BOM) were purchased after much research and a disasterous first attempt with cheap capacitive moisture sensors. You get what you pay for.
The motorized ball valve was the final solution to refilling the reservoir from the rain barrel. A low power solenoid didn't have enough water pressure (via gravity feed) to actuate. A pump didn't have any way to actually stop the flow of water when the bucket was full. I suppose I could have used a combination of the two but I just didn't want to. The ball valve also served the function of turning the reservoir off if power was lost to prevent overfilling/flooding.
For this prototype, I'm also using a breakout board from AliExpress for the Pico and a 4-channel I2C relay board from Tindie.com (link in the BOM) for the relays.
Communication
I'm using I2C to communicate with the Chirp sensors as well as the relay board. The advantage of this is that the system could be expanded up to 100+ containers with appropriate power supplies, I2C MUXes and relay boards. As this is still a prototype, I'm only using 2 containers. If everything works the way I'm hoping it will, I'll be expanding to more containers next spring.
Suggestions and recommendations are greatly welcomed.