[[misc]](/)|[[TIL]](/content/TIL.html)
# DIY Vacation watering solution for aerogarden
## Problem
I recently ran into an issue while away from my home for a week: my aerogarden bounty needed watering. Though it holds almost 5 liters of water, it requires _some_ topping off each day, and after about 4 days I received a notification of low water.
## Solution
I had thought through a few different solutions to the problem, most centering around using a raspberry pi as a controller for fluid dispensing. Though I am already using a raspi for continuous remote pH monitoring, I wanted to get a solution in place more rapidly for testing. To that end, my solution was much simpler.
### What you need
- [peristaltic pump](https://www.amazon.com/gp/product/B00HLCOXFI) (doesn't have to be from amazon, can be had much cheaper on alibaba) - ~$7-15
- usb wall wart (had a bunch of these lying around)
- usb cord (who doesn't have a few lying around?)
- remote controllable plug (I went with [kasa](https://www.amazon.com/Kasa-Smart-Protector-Required-KP303/dp/B083JKSSR5) but anything could work) - $26 (or [$10](https://www.amazon.com/TP-Link-HS100-Required-Google-Assistant/dp/B0178IC734))
- water in a container near the aerogarden (I used a gallon water jug)
- airline tubing - [$2](https://www.amazon.com/gp/product/B0002563MM)
- tubing junction (came with air pumps I had)
**total: ~ $20/$35**
## Wire up the pump
1. Cut the end off the usb cord, exposing the red and black power wires
2. Wire up the cord to the pump (the wires can go on either terminal, it only impacts the direction of flow)
3. Plug in the pump cord to the usb block and plug in the usb block
4. Note the direction of flow and disconnect power
5. If you want the flow to be in the opposite direction, reverse the black and red wires
## Connect the water lines
1. Stick one end of airline tubing in the water container
2. Connect the other end of airline tubing to the junction
3. Stick the pump input line into the junction.
4. Ensure any other ports on the junction are closed.
5. Stick the output line of the pump into the aerogarden.
## Set a schedule
I used the Kasa app on google play to set up a schedule for the pump to run for 5 minutes each morning at 9:15am.
When run for 5 mins, the total volume of water transferred was just about 500ml, or roughly .13 gallons.
### misc
I had to put a tiny piece of rubber band between the pump face plate and each side of tubing to mitigate some instances where the pump would intake the length of tube while priming, causing the tubing to get lodged in the pump (and stop pumping water through).
For the water line from the jug to the aerogarden, I could not route the tubing through the tubing ports as they were each occupied with lines for air stones. Instead, I [3dprintd a custom cap](cover.stl) and ran the pump tubing through it.
For the water jug, I initially had some airline tubing just stuck down in a gallon of water. But to help keep the environment free of algae and bacteria growth I [3dprinted a custom lid](gallon-lid-airline.stl) and ran the tubing through it, then covered the jug in a blanket to block the light.
While I'm not in love with using proprietary software to controll the switches, a decent thing about the Kasa switches is that they can be toggled via API, so while I am using the proprietary app for now, eventually it can be controlled by my own software.
## demo
[](https://github.com/vagelim)