Auto-Watering with Grow

Automatic, systematic and hydromatic, Grow is a smart modular monitoring system designed to help you take the best possible care of your plants. It will tell you how well they're hydrated, attract your attention when they need water and, if you want to go a step further, even give them water!

Our first Grow tutorial shows you how to attach Grow HAT Mini and its moisture sensors to your Raspberry Pi, how to install the software and how to calibrate the values for your pots and soil. In this tutorial we're going to show you how expand your system to let it water your plants automatically! We'll assume you've got a Grow monitoring system (like the one below) already up and going.

Grow monitoring setup

Please excuse the droopy chilli, it perks up by the end of the tutorial.

What you’ll need

As well as a Grow monitoring setup from the previous tutorial, you'll also need:

  • Three suitable pumps.
  • Silicone tubing (1m should be enough to connect all three pumps unless you're planning a particularly expansive setup.)
  • A water reservoir (we've gone for a small plastic storage box with a lid, but there's lots of containers you could use - read on for more suggestions!)
  • A way to fasten the ends of your tubes securely over your plant pots (we used thin gardening wire).
  • A drill, Dremel, craft knife or some other means of making holes in your water reservoir.

Caution - please read first!

A few quick safety notes before we begin, as we are playing with water and electricity which (as we know from Pokemon) do not traditionally mix very well. You'll want to position your auto-watering system as far away from plugs and mains power as you can and it's a good idea to put the whole thing on a tray or something similar, so if you get any water escaping it won't get anywhere dangerous. Getting the settings right might take a bit of adjustment, so don't leave your system unsupervised until you're sure that the auto-watering is behaving as expected - maybe turn it off overnight for the first few nights?

Another thing you'll want to avoid is inadvertently starting a siphon with your pumps - this could result in your entire water reservoir emptying into your pots quite quickly, which your plants won't appreciate. If you always make sure that the plant ends of your tubes are higher than the water level in your water reservoir they should be safe!

Selecting a water reservoir

The plastic box we

We've selected this 1.5L Whambox as our water reservoir as we had it lying around from back when we were allowed to go to shops, but we'd encourage you to use whatever suitably sized plastic box you have to hand. Ice cream boxes, the tall plastic boxes laundry pods and dishwasher tabs come in, or Really Useful Boxes (Reight Useful Boxes if you're from Yorkshire) would all be good candidates - you'll want something big enough for all your pots to stand comfortably on top of, and at least 3 inches deep. In a pinch (or while you're prototyping) mugs would also work as your water reservoir though you might need more than one to make room for all your pumps.

Making holes in your reservoir

After peeling off (or covering up) any unsightly labels, you're ready to make some holes for your tubes. An 8mm drill bit (or a step drill bit) is probably the neatest way of doing this, but you can also use a dremel to make the holes, or a soldering iron or hot skewer to melt them (if you choose the last option, make sure to do it in a well ventilated area).

Assuming you've got three pots and three pumps, you'll need three holes - we made ours about an inch down from the lid and spaced out them out so they'd line up with the pots once we sat them on top, and we drew on the hole placements with marker pen before we started drilling in case we forgot what we were doing halfway through.

Plastic box with holes drilled for tubes

You'll also need a hole for the wires that connect the pumps to Grow HAT Mini to go through. We're planning on putting our Pi in front of our pots, so we made another 8mm hole near the front of the lid.

Hole drilled in lid for pump wires

If you've got room, you could also make another larger hole in the lid so you could fill up the reservoir without taking the lid off.

Connecting the pumps

Locate your tube and chop it into three equal lengths. Depending on how you're positioning things, the tubes might end up being a bit long, but you can always adjust them later. Poke the three lengths of tube through the holes in the back of your water reservoir, and then plug the ends of the tube into the outlets on the pumps.

All three pumps in the box with tubes attached

We then threaded the pump wires through the hole in the top, and popped the lid on. You could fill up the water reservoir here if you wanted to avoid having to backtrack later on.

The pumps connect to Grow HAT Mini via two pin Picoblade compatible connectors. These plug into the back row of ports which are slightly squarer than the ones for the moisture sensor wires. You'll want to make sure the pumps are plugged in to the HAT so that they match with the correct moisture sensor for the pot they'll be watering (so the pot containing the sensor attached to S1 should be watered by the pump connected to P1) . It could be helpful to draw coloured dots on the connectors and the sensors themselves so you can keep track of which one is which and match them up correctly.

The connectors on the pumps

The connectors will only go in one way round, so if they don't fit, try rotating them. If you need to remove them, make sure to pull on the plug rather than the wires so you don't detach the wires from the connector.Plugging the pump connectors into Grow HAT Mini

Once you've plugged them all in, you can poke the pump wires back down into the water reservoir so they're out of the way.

Attaching the tubes to the pots

When figuring out how to attach the watering end of the tubes to your pots, you'll want to consider two things!

Firstly, you should make sure the tube end is securely fastened in place over the pot - if it comes adrift, water is likely to go places it shouldn't. Secondly, you should aim to have the tube end positioned well away from the surface of the soil to avoid soil being sucked back down the tube at the end of a watering 'pulse' - if soil gets inside the pump it could jam or damage it.

We're making a loop out of gardening wire to hold the end of the tube in place, you could also use craft wire or even electrical wire if it's the kind that holds its shape. Something galvanised or plastic coated is better so that it doesn't rust. Cut a length of wire about 10" long, find the middle and twist it into a loop around the tube.

Twisting the wire round the tubeTwist the 'stem' a few more times, then wrap the ends around the pot and twist to secure.

Using the wire to attach the tube to the plant pot

Alternatively, if you've got access to a 3D printer you could give these little custom widgets a go!

All three tubes attached to plant pots

Once you've anchored the tubes to the pots, you'll probably find that you'll need to rearrange the pots and adjust the angle of the tube to find a position that they sit nicely in - the tube is quite springy. We ended up adjusting the tube on the left so it pointed more towards the middle of the pot.

You can now plug the moisture sensors back in to the top row of connectors (remember to make sure they're plugged into the correct connectors). When positioning the moisture sensors you'll get more consistent readings from the sensors (and more consistent watering) if the water's running on to the soil rather than hitting the sensor itself. You can trim the length of the tubes if necessary once you're happy with their position.

Now is a good time to fill up the water reservoir, if you haven't already.

Once everything's securely attached and suitably positioned, you should have something like this:

Finished setup with all the pumps and moisture sensors plugged in

Enabling auto-watering

Once the Pi's all powered up, and the Grow service has started, you'll need to turn on auto-watering (it's disabled by default). Before doing this, it's worth quickly double checking that all your tube ends are positioned over your plant pots, just in case.

Enabling auto-watering using Grow

You can find the setting to turn on auto-watering in the channel settings menu - press the > button to cycle through the channels, and then the cog button to change settings for that channel. Press the 'Next' button to cycle through the settings until you get to 'Auto Water', and 'Change' to set it to 'Yes'. You'll need to enable watering for each channel individually. There's also options in the channel menu to change the pump time, pump speed, auto-watering level and auto-watering delay via the HAT- more about what those do later on.

If you don't see any of the auto-watering options in the menus, you will probably need to update your Grow software to the most recent version. This will reset your settings to the defaults, if you've got wet and dry points you're happy with make sure to note them down first so you can re-enter them after you've updated. You can grab the latest version of the software by entering the install command again in the terminal - you'll want to stop the service first if you have it running.

sudo service grow-monitor stop
curl -sSL https://get.pimoroni.com/grow | bash

Configuring auto-watering

We've provided some reasonable defaults for the auto-watering settings, but you'll probably want to tailor them to your own setup. If you haven't already, we'd strongly suggest revisiting the calibration section of the previous tutorial and setting up custom wet and dry points - this will make getting the auto-watering settings right much easier.

There are five water related values you can change via the menus in the Grow monitor. Whilst adjusting these settings, it's worth bearing in mind that Grow will work best if it gradually, gently dispenses water - you'll want to aim for the smallest trickle being dispensed from the end of the tube, that way Grow will be able to maintain the moisture level with the greatest precision (and hopefully avoid unwanted flooding). We'd suggest starting with low values for pump speed and pump time, and only turning them up if you need to.

Auto Water: Yes/No - turns auto-watering on and off

Auto-watering level - this is the saturation level at which Grow will provide water to your plants. Setting it as 0.8, for example, will mean waterings will be triggered when the soil is below 80% saturation.

Auto-watering delay - the time between waterings, in seconds. Setting it at 30 or 60 secs is a good idea as it means the water has time to permeate through the soil and be measured accurately by the moisture sensor.

Pump speed - the power at which the pump runs. We'd suggest using 0.3 or 0.4 to start with, and only adjusting it up if the pulses of water are not making it from the reservoir to the end of the tube. 1 is full power.

Pump time - how long the pump stays on for (in seconds) and thus how long a watering 'pulse' will be. The default is 0.5, which seems like a reasonable pulse length for most purposes.

There will likely be some adjustment required to find the right levels for your setup! As we said at the beginning of the tutorial, we'd suggest not leaving your setup unattended or overnight until you've monitored it for while and are happy it's working as intended.

As well as changing these values from Grow HAT Mini's menus, you can also edit the settings file directly from your Pi's terminal (or over SSH, if your Pi is set up headlessly) with

sudo nano /etc/default/grow

Screenshot showing how to edit the settings file directly

It's Ctrl-X to exit Nano when you're done, and if you're editing the settings file directly you'll need to restart the service afterwards for it to use the updated settings:

sudo service grow-monitor restart

Next steps

Hopefully that will help you get started with the basics of an auto-watering plant monitoring system - as always, tweet us @pimoroni and let us know how you're getting on. We've tried to keep this tutorial straightforward and only use basic supplies, but it would be very possible to build elaborate setups with bigger pots, trays, or even 3D printed pots or mini greenhouses (and maybe even introduce some plant lights or a water sensor to tell you when the reservoir is empty). We'd love to see what you come up with!

Here's what our little Grow setup eventually morphed into - we told you the chilli perked up :)

A custom Grow setup with 3D printed pots

That's all folks!

Search above to find more great tutorials and guides.

Plasma 2040

Swathe everything in rainbows with this all-in-one, USB-C powered controller for WS2812/Neopixel and APA102/Dotstar addressable LED strip.