Sensing and IoT Plant Watering Predictor
Reducing water waste by automatically dispensing lower bound water amounts, calculated using a ML Model using present weather data

This project aims to integrate hardware IoT sensors (some RPi Zero's with I2C probes) and a Deep Neural Network to predict how much water an outdoor garden will need every day.

The ML Model uses the last 24hrs of collected weather data to make a prediction around mow much water needs to be dispensed to keep the plants alive.

This approach hopes to reduce the overall water use by preventing excessive watering.

How it works

The project uses three Raspberry Pi’s in this configuration to collect and store data. The Master and Satellite Pi nodes are in charge of collecting local garden data. The internet enabled master Pi runs an http server and collects data from the distant satellite Pi via a LoRa command to return to the client. The DC Pi runs API calls every 60 minutes to the OpenWeather API and the master Pi to collect air temp and humidity, rain, wind, cloud and soil temp and humidity.

Every 24 hours, the master Pi requests the latest water prediction from the DC Pi, the DC Pi uses the latest collected data and a trained Machine Learning model to predict the last day’s watering needs.

For more information on the process flow, visit this project’s GitHub page.

Real time collected data (last 10 days)
Data overview
Hours recorded
Today's watering index
Predictor status
Days of data
Current soil temp
Probe status
The plant watering index.

The basic watering index can be calculated with a weighted equation considering all the factors affecting plant evapotranspiration we dropped soil humidity because the sensor was not working correctly:

\(watering\_bias = w_1air\_temp + w_2wind + w_3soil\_temp \\- w_4air\_hmdt - w_5cloud - w_6rain\)

Balancing these weights is a challenging process, approaching basic linear regression, and not all relationships here are guaranteed to be linear!

Instead, a deep neural network was created in tensorflow to simplify training and account for any nonlinearities.

The model follows a simple sequential construction with two hidden layers of 14 and 7 neurons respectively. The model was trained until an acceptable MSE was obtained, then saved and loaded into the DC Pi predictor API.

Predicted watering pattern
Garden area
Average water/m2
Freeze detection
Current watering bias
Today's watering vol
Plant health
↑ Back to top ↑