Software apps and online services
I can't be the only one that keeps forgetting to water the plants... How many plants died because you forgot you even had them at home?
I'm one of those persons and for this reason I decided to create a hack that would let me know when I haven't been watering my avocado plant.Goal
The goal is to know when I need to water the plant. But since I'm developing this tool why not add some extra options like being able to check how the avocado is doing on demand.Hardware
I used an Arduino-compatible board "WeMos D1 NodeMcu Lua V3 CH340G ESP8266" which can be bought on eBay (sent from China) for around 2,20 € ($ 2,70).
I chose an "ESP8266 board" because of the built-in wifi functionality and the cheap price. We don't need much power so there is no point of using an ESP-32 board.
To know whether the avocado needs watering, I use a soil moisture sensor YL-69 (or YL-39). Through its electrode we can determine how dry the soil of the plant is. This sensor costs around 1,10 € ($ 1) and is available on eBay as well.
The sensor has a potentiometer which allows calibrating the value returned.
The board will be powered with a 9V battery using VIN and GND pins.
Be careful, depending on the board you are using, the input voltage may vary. In some cases the input allowed is written on the board.
Arduino IDE is used for this project.
First step is to create a Telegram bot. Since there are already lots of tutorial online on how to do this, I won't explain it. See links below for getting started.
If you do not wish to use a Telegram bot, you can use IFTTT.
To communicate with the bot, I used the "ESP8266-TelegramBot" library developed by Giancarlo Bacchio, which is available on GitHub.
To be able to receive notifications when I need to water the plant, I setup a Telegram bot to send me a notification. Every 24 hours, the system will check the status and notify me if the critical limit was reached.
Since the Telegram bot allows us quite some freedom, I implemented an extra command to read the sensor value at any time.
Depending on the soil, the value read from the sensor can vary from my example. Here are the values returned with the potentiometer turned completely anti-clockwise (minimum).
- Right after watering: 460
- After 24h: 420
- After 48h: 380
I usually water my avocado every 2 days, so I decided to use 400 as critical value. Once the value read is below this value, I will get a notification.Caution
To avoid damaging the sensor, we power it up only when reading the soil moisture. Therefore, it is not connected directly to the 3.3V pin but on one of the digital pin.Useful linksGoing further
An improvement of this project would be to add some visual effects, maybe a led that would give you the status by changing color from green to yellow to red.
Another option is to increase the battery life, by using an Arduino Pro Mini running on 3.3V/8MHz with an ESP-01.
If you want to go a big step further you could also build an automatic watering system using a water pump!