Raspberry Pi Plant Watering (& Time Lapse)
HTML-код
- Опубликовано: 26 июн 2024
- Raspberry Pi Zero plant watering system using a resistive moisture sensor, solenoid valve and relay HAT. And there’s also a camera for recording a time lapse movie of the plants growing!
You can download the code used in the video from this page:
www.explainingcomputers.com/p...
IMPORTANT NOTE:
On October 30th 2021, a new version of Raspberry Pi OS was released known as “Bullseye”. This has new camera drivers that are not compatible with the Python camera code included in this video. Sorry. If you are running the version of Raspberry Pi OS known as "Buster", or an earlier version, things should work just fine. I discuss the matter in depth in my video here: • Video
My previous “Raspberry Pi Battery Power” video is here:
• Raspberry Pi Battery P...
And the video where I first use the relay HAT is here:
• Raspberry Pi Automatio...
The moisture sensor I used is here:
thepihut.com/products/soil-mo...
The FPD-270A solenoid valve I used is here:
www.amazon.co.uk/dp/B07RX1KRG... (affiliate link).
But the price has increased, and a cheaper equivalent is here:
www.amazon.co.uk/dp/B07PDLLCZ... (affiliate link).
And an alternative on Amazon.com is here: amzn.to/3xKxgjF (affiliate link).
Note that different FPD-270A valves have different diameter inlets and outlets, so make sure you know what you are getting and what pipe will be required! :)
The two-relay Pi Zero relay HAT I showed in the video is here:
www.amazon.co.uk/dp/B084ZLMVP... (affiliate link).
The three-relay HAT I actually used is no longer available in the UK, but is listed on Amazon.com here: amzn.to/2TgHKrZ (affiliate link).
More videos on SBCs and broader computing and related topics can be found at:
/ explainingcomputers
You may also like my ExplainingTheFuture channel at: / explainingthefuture
Chapters:
00:00 Introduction
00:35 Hardware
04:26 Moisture sensor test
06:56 Solenoid valve test
09:18 A Cunning Plan
10:50 Test System
18:24 In the Wild
20:38 Biology in Action
20:59 Wrap - Наука
I've never seen a clearer explanation of what someone was doing with setting up, programming and implementing a computer project and never one that was as entertaining. Excellent as always.
I wonder if presentations you've seen are including One Lone Coder's, Bisqwit's, LiveOverflow's or Retro Game Mechanics Explained's videos for example. I am not saying Christopher's presentations are not exceptional, I just wanted to mention a few that are worth checking.
"I have a cunning plan"
As a Blackadder fan I couldn't help smiling at that particular expression.
Baldrick
@@billpay6896 yep 😄
I love cunning plans.
More cunning than a weasel?
@@alexlandherr A plan so cunning, that if you put a tail on it, you could call it a weasel.
This time lapse video is possibly one of the most beautiful I've ever seen. Specifically because the effort to make it is the single most well explained Rpi project I've ever seen. It sure made this old computer nerd smile. If I had stuff like this when I first tried to understand programming 30 years ago, I would likely be doing that instead of music production and 3d art with my computer. Truly inspiring
Well done Percy RPI Thrower. Just love watching time-lapse to show what's happening when we're not not looking! Fantastic -Thank you.
I've been watching for a couple of year now since high school and I've gotta say to this content is pure gold it's always presented in a way anybody can understand super appreciate it!
lovely how Chris devotes the dedication explain every single thing, makes me wish to come across more teachers like him
I love this video! I'm an amateur gardener myself, and have recently thought about doing something like this. It looks like a really interesting experiment, thank you for running through it with us!
This is great timing for this video. My mother started growing blueberries this year and I have been wanting to set up a watering system for her. Now I don't have any excuses left (other than lack of time) for not completing my project.
Another fantastic video, I must say this is one of my favorites. I’ve been thinking of similar ideas for some time. I am a water manager for large scale park irrigation, controlling millions of gallons a night. A couple of your ideas were intriguing, especially how you limit the corrosion on the sensor. Thank you for always making Sunday special. Your videos are the only scheduled program I look forward too.
These Pi videos are far and away my favorite on the channel!
I am loving this, but there is a slight control engineering problem in it: The soil will absorb the moisture from below, which takes time. This may result in multiple releases of water while the sensor is still not indicating the soil is wet... There is a slight risk of overflowing the container. I would reduce the release time and make sure the interval is not too short.
This may only really really be a problem for taller pots as the moisture would not reach the bottom of the sensor quickly enough. I would adapt the system to get those to work. I am currently growing some venus fly traps with my 8 year old daughter. She loves it, but the seeds have to be kept moist for 3-5 weeks. That is hard to do in hot weather, so I could definitely see us building a similar setup that waters from above.
Thanks for another quality video!
Perfect timing - I decided to do a project like this just today!
Excellent!
What project ? Is it going good ? Making progress ?
@@Winnetou17 a few plant monitors around the house and garden, though I'll use ESP32 boards so I can connect them to Home Assistant :)
@@MagicMoose14587 are you going to use esphome?
@@Leonvolt28 Yep, I've already got it running some other things
Chris' cunning plans are always a great learning experience 😊
I always really enjoy your real world computing projects Chris. Thanks again for a great piece of education.
Love your content and style of presenting, Chris, thanks for being there!
I really enjoyed this video. I'm going to attempt to make the same watering system as you did. You are a great teacher. There are hundreds of thousands of us who watch your channel to learn programming skills and ways to use what we learn. Thank you very much sir!
I’ve been eagerly anticipating this video since you teased it in the battery test video.
Hi Chris, this is a really good example of real-time feedback control. Thanks a lot.
This is pretty deep. Computer recording its self directly causing organic growth.
Bravo Christopher, well thought out, well put together, informative and interesting...smashed it out of the park in my book! Cheers!
I liked watching this video. Amazing how you got all of these items to work. Great gardening system. Thanks Chris.
Simply amazing. I have wanted to do a nearly identical project and had purchased a relay board and some solenoids over a year ago, but when I looked at the moisture sensors, I knew there would be a corrosion issue with them and I never did think of a way or type of sensor that would not have the problem. It never occurred to me to simply use one of the relays to turn the sensor off to mitigate. You're a hero. I also hadn't thought of attaching a camera which would be nice as well after thinking about it. I had, however, thought about the configuration necessary or advisable on the solenoids - You'd want to be sure to have "normally-closed" without voltage to avoid flooding issues during a power interruption. I think that is what you have on your setup, but perhaps worth mentioning to others wanting to do a similar project. Thanks as usual. I do enjoy your channel.
Thanks for this -- my solenoid valve is indeed normally closed. :)
Thank you for the time and effort you put into these videos. The clear explanation and structure to them make them entertaining and educational. A lot of other instructional videos are just a big ego trip for the presenter and frustrating for the viewer.
I've seen a few time lapse videos of plants growing. Always find it enjoyable to watch.
Planted six raspberry plants, got lots of raspberries second year. There were fat birdies. Still had enough berries to give to neighbours, friends and family. My raspberry pies didn't do anything except be delicious.
That's a great project for schools.
They can learn about technology and see the results of their project on the time-lapse video.
Very nice implementation Chris
I don't even have a garden but this video has been pretty enlightening. Yet another magnificent use of the Raspberry Pi. Thank you.
This is super cool! Would love to see more practical appliances like this. Some power generation with a propeller? Some more timelapse videos. Thanks a bunch for this video. Really inspiring.
his style never changed
Now THAT'S the video I was hoping for a long while. Thanks for uploading this!
I love your videos and the fact that you make wonderful things that don't cost a lot of money is part of the reason. You 'inventions' can be made with just a small amount of money and the 'free' knowledge that give so generously dispense. Thank you!
Thank you so much!
Here, as promised! The 17th gold! Thank you! The best tech stuff on youtube is on this channel! FIRST
17th Gold indeed! A very impressive medals table. :)
This channel is just becoming my go to for procrastinating
:)
ah... I have been neglecting some plants in my garden recently. I absolutely will do this when I find the time so they don't die on me, thanks for the video! it'll help me out a lot
Can definitely see myself setting this up here. A very practical use of a Raspberry Pi Zero.
I know nothing about them, but watching these videos convinces me that these Raspberry pi's are amazing devices. Very interesting video! 👍👍👍
There will be a devastating shortage of raspberries this year, as the berries were baked on the bush before they could be harvested. Next year I will grow my own, watered by Christopher Barnatt's patented Raspberry Pi automatic watering system.
Chris is a nice guy, he would make the project FOSS. :)
Brilliant, great idea with the time lapse camera. I’m glad you did what I mentioned in a comment . I set up my own with the pi pico, though I used a submersible pump and and capacitive moisture sensor in a plastic bag. I am considering switching to a solenoid. I just wanted to try using a motor. Your code is much more efficient than mine ;)
Another excellent video.
Your step by step explanation means that now I have to go out and buy all the parts (x3) so my grandsons and I can create automatic cress growing ‘robots’. I hope at least one of my grandsons likes cress! I’m certain they’ll like building the project together.
Awesome video. Always showing us how amazing raspberry Pi can be!
Wonderful video. Very interesting indeed! Looking forward to your next Pi time lapse video, when you make it. Can’t wait to see what you have for us next week! I appreciate all the work you put into your videos.
Pleasing to watch as always. Nicely done.
Awesome! I really enjoy all of your videos! Keep up the good work "ExplainingComputers"!
Thanks. :)
I think it's high time Mr. Scissors got his own RUclips channel.
I'm sure that one day he will branch out on this own . . .
i think this is the most useful thing i have watched on RUclips this year
I love these type of coding/hardware based projects!
When you put music on timelapse, it somehow instantly reminded me the old VHS videos that we watched as a students in primary & secondary school during our biology classes. :) Same stuff was also going on the national TV during the educational block back in a days.
Other that that, it's a very good video. Glad you make it work & keep on updating us on your 'smart greenhouse' project. ;)
What a fantastic little project.
Great video! I'm looking forward to seeing what you do with more time-lapse!
Awesome project and bid, Chris! Very inspirational
The ZeroCam packaging is like a meme.
Thanks Christopher for that great project video !...
I like this setup because it uses a solenoid valve. I am designing a circuit with one water source, one pump, and multiple solenoid valves to direct the water to the individual plants.
I want to do something like this as well. Were you able to get it to work? I would like an automated system to water multiple plants instead of just one
That was so much work. Brilliant Christopher!
I must say, you're a great gardener! Great job👍!
I find myself spending over two hours a week watering all the plants in my garden. Using a system similar to this in even a few of my raised beds would be a great labor saver.
Thanks again for another PI video--always interesting and inspired me to a just confirmed purchase of a PI Zero W starter kit. Thanks again, look forward to next Sunday's video--keep up the good work!
"I suspect it is already a better gardener than I am." 😃😃😃👍👍👍
Thank you very much, this has motivated me to get on with my experiment
Update July: Starting my own build now, will be modified for longer drip irrigation on a balcony, wish me luck!
Excellent! Good luck.
Thanks for showing people what I've been working on for the last 2 years of covid lockdown. By the way solenoid valves usually require maintenance to prevent build up of nutrient salts. They need to be serviced to remove the salts. So don't be surprised when you return to the plant and it's dry.
Sounds about right. If you run the water through a filter or if you use a water softener at the house presumably there that should virtually alleviate those problems. A cool addition might be to actually run a system as you did before and make use of a flow sensor with some sort of data readout (4 digits)? Then at the time of failure the routine activates a buzzer. Then you won't lose the plants and you can ask the municipal water company if they can describe the process and why they don't filter the minerals out. Kindly of course! Certainly they could appreciate the data...
You could use a submersible pump they seem to be quite tolerant to salts.
@@cliverutherford5836 The solenoid valve closes and causes nutrient salt to build up inside it, causing anaerobic bacteria build up and salt lining the inside of the solenoid valve. Therefore, it requires maintenance and cleaning every couple of weeks or less, unless you flush it with water after a feeding. I'm strictly referring to hydroponics. Submersible pumps also collect salt if you use hydroponics, and really require flushing with fresh water after a feed cycle.
I’ve been wondering about this and you’ve released a very good quality video about it!!! Thank you!!!😊
wonderful video, you are a multi-talented man. really appreciate that you showed the code and how you developed it.
Excellent video Christopher!
You could add a temp/ humidity sensor some 12v halogen lights and a fan to control the temperature and humidity inside your greenhouse and make good use of the last two relays ! I would use a small logic level mosfet to turn the board for the moisture sensor on and off as it will have a longer life than a relay and use less power - you can get small mosfet modules for the Pi and arduino very cheaply and possibly one that is in a hat format to replace the relays altogether.
I had contemplated something like this for a cutting raising setup. To automate the watering, but use a humidity sensor to open and shut the container. This gives me a great start cheers.
I love the clear explanation! Cheers from México
Christopher, I love your chapter titles.
Excelent video. Loved the timelapse. Cant wait to see what other uses you find for that little machine!
Thanks 👍
That was brilliant. A few more of these types of builds would be great addition utilising other SBCs (if able) to see how they fare.
How would other SBCs fare differently? The PiZero here is just running a script. Nothing other sbcs would do differently.
I wish I know this channel earlier.... but I'm glad to find it before it was too late!
Great project I'm liking the watering system with the time laps video brilliant job. Thanks for sharing the whole project with code.
Nice to see how you think outside the box
Excellent video as always have yourself a good day
My wife has an automatic plant
waterer. It's called me. She also
has an automatic dish washer :-)
I am familiar with that model. I know it also works with voice commands.
@@adistef Yes, it does work with voice commands. Lol :-)
Do either of those systems have any reliability problems?
Stars out of 5, and an outline of any glaring issues, to help the rest of the community ~ thanks.
@@adistef Ha ha. True :-)
Also you?
I must make sure I start off with a simple system like this, when I finally finish building my greenhouse. I get carried away with ideas for a whole greenhouse management system linked into Node-Red, so I get regular notifications, live video, and lots of pretty graphs!
It is always best to build things up in stages! :)
@@ExplainingComputers "crawl, walk, run" was the motto of my boss (the person who was responsible for software integration of a missile system on an actual robot, a robot that has been busy over the last 20 years).
IoP
I thought I'd have a *Robby the Robot* who could just be told to look after the plants by now...
...but this is great in its own way!
Great video! Very detailed and informative. Thank you for uploading!
WaterPi for the win! Well done!
Great video as always. Keep up the good work.
Beautiful Symbiosis of Technology and Nature.
I wish I had this video and a raspberry pi back when I actually had a huge garden in my front yard. I no longer live there and don't have a front yard to speak of so no garden for me. But I'll definitely be coming back to this video in the future when that changes. I used to live in Texas though, so this would have been REALLY helpful to avoid going outside in that oppressive heat to water some plants back then.
Perfect for holiday season. No coming home to dry plants.
I love making automation projects. My last project was my cat feeder.
This project will definitely be considered. I have a idea to modify it to add water to my aquarium. Just need to replace the water sensor for a float gauge. A Madison M8000 Liquid Level Sensor should work.
Thanks Chris for this wonderful weekend project.
Thank you for a excellent explanation. Working on the intermediate steps helps.
I really good example practical application. This provides the opportunity for a followup video. Possibilities include: Turn the sensor power off as soon as the moisture state is known. Use an analog sensor or two sensors to control water delivery off and eliminate calibration, which will vary with plants and conditions over time. You could use a small pump from a stored water supply. Sense the water supply and over-watering to raise an alarm. Look at power consumption vs battery capacity, alarm on low battery, maybe add a small solar panel to keep it topped up.
Love the Star Trek glass!
Great video and great example. Simple but clever.
A great video as always. Plant time-lapse is so interesting to watch. I await the release of your harmonica album.
Thank you, for taken my request up. Very inspirational.
No problem 😊
I love it!!! Awesome project involving mother nature and science. Thank you! I respect a lot your work and content , excellent quality! Greetings From across the Pond.🇲🇽🇲🇽
What great experiment :)
Thanks for this educational and encouraging work.
Amazing project and presentation!! ? Thanks much, Chris!
Very nice piece of work Chris! :)
i really enjoy your relaxing voice and videos thankyou
So many cool little gadgets! Very creative!
Thanks for this very interesting and useful video! What I would like to mention though is that a lot of plants don't like to have wet feet all the time, and therefor I would like to suggest to put the water sensor in the container rather than in one of the pots. You may need to increase the watering time, so it will fill to a certain level, let the plants suck it up and not rewater until it's dry enough for the sensor to ring the bell again. That would make for a more realistic scenario, suitable for more species. And don't get me wrong: it is absolutely a very useful video the way it is now and I appreciate your effort and explanation very much (indeed)! Keep up the good work!
Came here looking exactly for this comment. Maybe would it be better to drop the water above the plants? Requires raising the valve and reservoir, and some more complex tubing, but would also avoid keeping the roots too wet all the time.
Anyway, fantastic project indeed!
I would add a loop siphon (made with a loop of hose) to the watering pan so that each time the watering cycle occurs it completely fills the watering pan and then drains it once full. Also plants like to get their leaves wet, so a misting system would also be good for plant health.
Excellent STEM video.
Fantastic lesson Chris! Thank you and cheers.
Thank you very much for the video and a very useful project. I will implement this idea as a backup bilge pump system for my boat. I will also add a led light for the camera so I can view the innards of the hull. Best wishes.
now that's what I call green computing! Nice job.
Thanks!
Marijuana is legal here in Detroit. We can grow up to 20 plants for personal consumption. I'm gonna rig my Pi up like this! Awesome video! Cheers from Detroit, Motor City!
Brilliant! Party On!
Thanks for the project and clear explanation
Genius as usual. What an interesting use for modern electronics, taking care of and monitoring some of the oldest life on the planet.
Brilliant project done well. Thanks