Automated chilli watering system part 1 - Overview

This post is part of a series

Overview

Over the next few articles I want to document the system Ive developed to water my chilies while Im away on a two week holiday. Those of you who grow chillies know that, in the height of Summer when temperatures are soaring, chilli plants require lots of water. That said, they dont like to have "wet feet" - if you over water them, they will be equally unhappy. This is all fine if your job permits you to be home each evening (mine doesnt) or you have an understanding partner who will look after them while you are away.

For the last few years, the later system has worked will, my wife is very good at keeping them happy - but this year we decided to take a holiday in the peak holiday season (which we dont usually do). So now I have a need or requirement for my chilies to be cared for while we are away. I guess a non-geeky person would just give the neighbor a key and ask nicely of they could look in every day but, being a geek at heart and not wanting to trouble or rely on others, my mind quickly turned to automation.

If you search the Internet for Raspberry Pi or Arduino based watering systems you will find many many such articles. I have a few additional requirements

  • Its got to be simple - bash and a little python

  • Not connected to mains water - this is a) too risky b) too hard to implement easily

  • Id like a page I can see all the relevant data and maybe some notifications

  • They need to be watered only when they require it, not every day, but also sometimes twice a day

The Basic System Summary

My system consists of

  • a raspberry pi

  • a couple (it started as one) 17L large plant pots from the local garden centre - these are the reservoirs that contain the water - remember no mains water.

  • four cheap usb water pumps and some Gardena drip system nozzles - more on these later

  • a few soil moisture sensors (three to be exact)

  • a couple of temperature sensors (these are totally optional, just wanted to be able to monitor air and soil temperature

  • a couple of ultra-sonic distance sensors - these are used to check the water levels in the reservoirs/buckets

  • an 8 port relay board - this might not be required but comes in useful

The entire system lives inside a largish Tupperware box on my balcony - my balcony is protected from direct rain, by the balcony above but can and does get a little rain blown in from the two exposed sides. While there is no water tap available there is, fortunately, a power point on the balcony. The balcony power point supplies power to a powered USB hub that lives in the Tupperware box, which in turn supplies power to all other devices - everything is 5 volts or less

With everything connected, a series of bash scripts are called by cron - some run every minute while some only run twice a day. The bash scripts call python scripts, to interact with the pumps and sensors and return values back to the bash script. The bash script, logs the relevant events to a log file and also pushes data into an InfluxDB container running on my home NAS. Another container (Grafana), reads that InfluxDB data and provides a visual representation on a webpage

As mentioned, each minute a cron job detects and records the temperature. Once an hour the soil sensors are probed and this data is also logged and pushed into InfluxDB and twice a day, the moisture probes are checked, and if found dry, they trigger the relevant water pump to run for a preset amount of time (2 to 3 mins) before stopping.

The last part of the project, checking water depth, was added to do two things

  • make sure to not run the pumps if the reservoir is empty

  • if first reservoir is empty and pump some water from the second one, if there is water available.

It might have been that one bucket/reservoir would have been enough but it would have been close so I took no chances

Over the next set of posts I will walk you through each part of the setup. There are almost certainly things that could have been done better or more efficient but I really wanted to keep it as simple as possible

See also