I developed this project for my coursework in EECS 1011 using the Seeeduino Beginner kit.
The problem#
One fixed watering amount either drowns a plant that's slightly dry or under-waters one that's very dry. I wanted the response to scale with how dry the soil actually is.
Three-state control#
| Soil reading | State | Action |
|---|---|---|
| Wet | Idle | No pump |
| Slightly dry | Top-up | Small pump |
| Very dry | Recover | Big pump |
There is a small cooldown between each pump (around 1 second), and threshold values were based on experimental testing with a real plant. The moisture sensor provided the Arduino with a value between 1-1000, where 1000 is dry and 1 is wet. Therefore, my thresholds were anything above 620 was dry and needed significant water, between 620 and 580 just needed a little bit of water to top it off, and above 580 did not need water, so no pumping was required.
Live monitoring#
Moisture readings are plotted on a live Java chart, so you can watch each watering event pull the moisture level back up.
Challenges
- Choosing thresholds, and avoiding rapid on/off switching right at a boundary
- Calibrating the sensor between dry air and a cup of water