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.
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.
- 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.