Raspberry Pi Zero waters your plants and records growth timelapse
We’re not going to lie — the thing we like most about this automated plant watering project is the timelapse at the very end of the build video. But we also thought now might be a good time to show you another Raspberry Pi project for keeping an eye on your plants, since some of us are getting back to something more like our usual routines and our houseplants are no longer our best friends, so they might need a little extra automated attention.
Maker Christopher Barnatt chose Raspberry Pi Zero for this project because although Raspberry Pi Pico could handle it, he needed a camera connector to record timelapse video of his plants’ growth.
Hardware

Christopher is a gem and has included links to all the hardware he used. There are also some cheaper, smaller alternatives listed in the info section of his build video.
Kit list:
- Raspberry Pi Zero
- Solenoid valve
- Relay HAT
- Resistive moisture sensor
- ZeroCam for Raspberry Pi Zero
- 12V battery to power everything

How does it work?
The moisture sensor checks every half hour to determine whether or not the plant has enough water, and communicates with the Raspberry Pi. Water flow is controlled by the solenoid valve, and if the Raspberry Pi finds the soil is too dry, it opens the valve for a set amount of time to let water out.
Code your own plant watering machine
Christopher has shared all the code you need to make your own plant watering system:
- Moisture_Test.py — the code to test the moisture sensor
- Valve_Test.py — the code to test the solenoid valve
- Watering.py — the final watering system and timelapse code
Check out Christopher’s YouTube channel Explaining Computers where he posts new videos every week on topics like PC hardware, single board computers such as Raspberry Pi, AI, Big Data, and quantum computing.
8 comments
Alan
I’ve been watching Chris’ channel for a couple of years – absolutely brilliant content and well worth a follow :)
Jonaz Thern
I have 5 Raspberry Pi 3B I don’t use. Does it work with these, or does it have to be a Zero?
Carlos Luna
This should work with your Pi 3Bs without any changes.
Carlos Luna
Except for the camera. I see the camera has a flex cable that fits the connector on the Zero. You’ll have to get a replacement cable, or use another camera. The rest can stay the same.
Tom Blevins
In St. Louis we have a place named the Donald Danforth Plant Science Center and they use raspberry Pi’s to do this very thing. To release very specific amounts of water or nutrients, and then to take pictures of the plants and how they are growing.
https://www.danforthcenter.org/
shrish sunder
We can also add some auto cutting extra grown plants😁
Laserskæring
looking great
Hope our camera works in our project. We want to film while we laser cut for our customers
Endrit
Haha this is such a cool project. I need to do something like this to wash my car when i’m not in mood to do it :D