Arduino Garden Controller – Automatic Watering and Data Logging

Arduino Garden Controller – Automatic Watering and Data Logging


I like fresh herbs I’m not a picky eater otherwise but add in some fresh basil cilantro rosemary or thyme to a meal and it just makes a huge improvement to any recipe so I pay for this stuff at the grocery store and some of it is expensive like two to four bucks for a few stems so I got that thinking this spring hey I’ve got a backyard on the south side of my house I’ve got the Internet to read up on how to grow things I can do this myself and save some money and then the engineer and me realized hey have you made the garden automatically water itself that could save some work and if you collected all sorts of different data you could analyze that and get a sense of the health of the garden without any guesswork well here’s a tip if you spend a lot of time and money complicating your garden with a bunch of sensors and electronics it ends up being more worth it just to buy fresh herbs from the grocery store my brother bought me an Arduino for Christmas last year saying it was right up my alley I guess he thought I could do with a few more ones and zeros in my life and being a cat owner myself I have to admit that it might be nice to have something that does what I tell it to well I went through the tutorials and I honestly had a lot of fun with this thing the gratification that comes from combining a working circuit and a working program is a little bit addicting very much like golf these moments of Eureka occur in between long bouts of failure disappointment and constant hazards but you get something right just frequently enough to keep you from giving up on it altogether and I’m almost as nervous as they come for an electrical hobbyist not to mention as a gardener so if you’re treating this as a how-to guide don’t sign up for a booth at the farmers market just yet in the interests of keeping this video interesting I’m gonna try and keep most of the technical jargon and minutiae of the project out of the narration and in the description below if you have specific questions that don’t get addressed I’d love to answer them in the comments let’s jump right into this building I’ll go through all the individual parts as if an Arduino isn’t complicated enough there are a whole host of shields which are just boards you can put on top of an Arduino that add additional functionality like Mario power-ups I’m using this data logging shield which allows you to save to an SD card now it is completely possible to automatically water a garden without any data login whatsoever but then again none of this is really necessary and I’m starting to realize already that the plants themselves are becoming secondary to the garden data in my mind because if I don’t have a heavily instrumented garden I might not be able to see how sunlight illuminance correlates with soil temperature or how soil moisture changes with relative humidity and air temperature or how far out of phase and soil temperature in air temperature are from one another and I certainly wouldn’t be able to take all that data and make cool graphs and if I’m being honest now I’m realizing this is truly what’s important to me I want to make cool graphs this shield comes 95% assembled but the headers are left off and this is allegedly so you can choose which headers you want but I have an inkling that this is kind of like a mini gauntlet for an electrical hobbyist like Adafruit saying only after you can solder on these headers will you be ready for whatever it is you’re planning to do with this board and as someone who uses their $10 soldering iron primarily for burning their initials into the bottom of wooden bowls this was a disaster of a soldering job and I won’t show any close-ups of it because I’m embarrassed but I somehow finished it without ruining the board let’s talk about sensors I wanted a good mix of data so I chose a suite of several different kinds of sensors first and foremost I wanted a soil moisture sensor because I needed to know when to water the garden now I did a lot of research on soil moisture sensors and I won’t bore you with the details because there’s a lot of discussion out there so let me save you some trouble in the simplest way I can think of you get what you pay for there’s more on this in the description below if you’re interested I bought a capacity of soil moisture since from veget Ronix and i couldn’t resist getting their soil temperature sensor while I was at it these sensors are quite a bit more expensive than the typical stuff you can find on sparklin or Adafruit but again you really get what you pay for these are well-built well calibrated and very simple to use here I’m testing the soil temperature sensor I also tested the soil moisture sensor in lots of different conditions including dry air potting soil and this cup of water apparently what’s in this cup is 98% water by volume which is pretty good honestly as a civil engineer that would have been happy with anywhere between 80 and 120 my sunlight sensor is a cheap and simple photoresistor it’s resistance changes based on intensity of light and you can put together a simple circuit which allows the arduino to read this as an input actually made an attempt to calibrate the sensor based on the known brightness of this flashlight i have no idea if it’s even close to correct button i have the code reporting this data in lux which is the SI unit for illuminance finally I got the sensor which measures both air temperature and relative humidity this is the only digital sensor I’m using it’s really easy to use since all the electronics are on board and the code is already written so I just end up with nicely scaled readings problem with a digital sensor is that my multimeter can’t talk to it so if there’s any need for troubleshooting I don’t really have a lot of options luckily this one worked just fine for the actual watering of the garden I’ve got a cheapo solenoid valve from Adafruit I built a little circuit with a transistor which allows the Arduino to switch the valve on right now I have the code check the water level once a day in the evening and switch on a soaker hose for a set amount of time if it’s below a certain threshold from what I’ve read it’s actually better for the plants and herbs especially to have some cyclical nature to the wetness and dryness of the soil rather than just being constantly well watered this scheme also reduces the duty cycle on the valve and if a sensor goes bad there’s a chance of flooding the yard since all these electronics are going to be sitting out in the Sun I’m building a crude version of a Stevenson screen which is really just a louvered box that lets weather instruments be out in the open without exposure to direct sunlight or rain I’m using the plywood dregs of my scrap bin so this is LEED Silver accredited to get the gold I think you have to use pallet wood and have a Pinterest account the enclosure goes together with a tin soffit vent glue and finished nails a nice coat of white latex paint will hopefully help reflect the Sun well it wouldn’t be a hobbyist project without at least one big gob of electrical tape and some questionable troubleshooting but I finally got this thing working I’ve had it running for just a few days now and it’s actually working really well the garden is happily watered with no intervention from me even though I check on it now more often than before it had the Gard Ueno here’s a quick look at some of the data I’m collecting combining microcontrollers and gardening is a really popular idea I think that’s because Gardens have very simple inputs and outputs that are easy to wrap your head around soil plus water plus light equals delicious herbs and vegetables I guess people myself included see a notoriously simple and relaxed hobby and can’t help but feel compelled to over complicate it and there’s a growing market of products out there geared towards quote unquote makers which are really solutions looking for problems or at the very least things which we’d like to try and use but just for the sake of using them and for me at least the Arduino probably falls into that category but just about anyone can connect the dots between garden needs water and I am NOT a responsible human being who is capable of remembering to water a garden every day and realize hey I can use technology to overcome my personal shortcomings and more than that I can bend technology to my will and that will feel good to my ego and my sense of self-worth after all no one’s hobby is to buy an irrigation controller off the shelf of a hardware store thanks for watching and let me know what you think

100 thoughts on “Arduino Garden Controller – Automatic Watering and Data Logging

  1. Hehe, I love your commentary and wry wit. I am an avid gardener, and I live in a part of the world where some automated controls would be super useful. I've often considered some sort of analyzing automation like this, but instead just hooked up my garden soaker hoses to my underground sprinkler system on a timer. Works fine, and satisfies the irresponsible part of me.

    I also think your doge is a good doge. Such ball. Very fetch. WOW!

  2. I started off on this tack as well. Now I realize that good landscape design can do all of this passively. Simpler = more graceful = engineering win.

  3. Photo sensors for Arduinos are a giant pain in the ass. We used them in Robotics, and the issue with them is that they respond to several different stimuli.

  4. “I want to make cool graphs”
    As an engineer you should already know that is scientifically impossible.

  5. Super honest video and adorable pets! I was glued till the end…Solutions looking for problems, finally someone said it…☺️

  6. Robotizados todos por la baja autoestima.
    Magnífica venta del futuro humano. Van a caer millones.

  7. Robotized all by low self-esteem.
    Magnificent sale of the human future. Millions are going to fall

  8. You are hilarious. You put my own frustrations with technology into perspective. Suddenly I realize I LIKE this and that frustration is part of the process, just as I was liberated by hearing the joke about any project requiring MULTIPLE trips the hardware store. I should have learned long ago that frustration is part of what makes it FUN, not to mention worthwhile. Thanks for your epigrammatic lesson in useful ways to look at life. (I've been thinking about buying an Arduino! But I think I should check out a crystal set first.)

  9. Not only is it a really cool project, youre really funny too btw. Wasn't expecting this from my recommended but Ill take it. Entertaining!

  10. Great video. I am doing just a similar project in our greenhouse. I also love weather data collecting which will be part two of my project.

  11. Thanks for sharing your project! I'd like to throw one of these homeboys together myself. Would you be willing to share your circuit designs and explain how you set up the hose to irrigate your garden so nicely like that? As an EE with an interest in expanding into agricultural engineering, I think this'd be a good place to get my feet wet, so to speak. Eventually I'd like to take it a step further after I've got my hands on a server rack so that I can get some experience archiving and analyzing the data as well, but first thing's first: getting this embedded system up and running!

  12. Hi I can´t compile the code, can someone help me please? my IDE version is 1.8.9 and the error is Exit status 1, error compiling for arduino /genuino uno

  13. so you can tell he is a project manager because this project filled his desire to design something himself rather than seeing somebody else do it

  14. I'm not quite sure what led me to subscribe. Was it the clear, coherent explanations? The dry sense of humor? Either way, I'm hooked! Great videos.

  15. Low key have a bro crush on this project. LOL
    …I might be 600 hours of [procrastinating actual work] designing in sketchup a ridiculously complicated hopefully once a month effort garden/bog garden/aquaponic/rain capture/ wicking bed/ monsoon proof/ vines/ vegetables/ low allergen… I honestly don't know what it is anymore!
    Translation: I want to garden in the desert. So I wanted to put some plastic under the dirt. with vocanic gravel. With a recycling pump and some fish. But it's in the ground. And Monsoons can drop 2 inches of water in an hour. And electricity is expensive. And my landlord has allergies. And I'm extra so everything is designed to last 100 years. With laminated instructions in the control box. And the budget is $200… The garden is 25 feet by 5 feet to prep the area I removed the top 16 inches of soil… So 7 tons out and 10 tons back in.
    …Maybe I was better off going to the grocery store. I feel your over engineering pain.

  16. Hahaha very entertaining presentation 😂
    But nonetheless, my main drive to try out “Garduino” is that if I have to leave my home for several days ( job requirements ) , but my garden doesn’t have to die 😔🤔.. so it now has that part of me left home , taking care of those little helpless souls .. 😅

  17. Never do something the easy way if you can use a microcontroller, sensors, relays, motors and programming. I like your style sir!

  18. In the given project you use wiredsensor …so my question is can you use wireless sensor.

    how much money you rerured to complet this project.

  19. honestly i think this use case is actually pretty well suited for an IoT solution (e.g. using a cheap ESP8266 or similar platform). despite all the garbage that is put out in the IoT domain, this could come in really handy with remote monitoring if you're tending to a garden (or multiple) which might be in a remote spot or where there is a water tank to be monitored etc.

    plus you can make cool graphs from your chair in your office on the fly with real time data

  20. I'm hoping to build an aquaponics garden and would love to use it as a reason to get into some electronics along the way.

  21. I think you should use a illumination sensor for your indoor light so it doesn't have to be on the whole day 😆

  22. Normal people… believe that if it ain't broke, don't fix it. Engineers believe that if it ain't broke, it doesn't have enough features yet. -Scott Adams

  23. Thank you for showing me what not to do. It is nice when one can learn from others hardship and experiments 👍

  24. You are right about trying yourself in electronics. Also right about implementing electronics and having pleasure to see it working.
    But what you have done with your project is similar to a guy who invents the car tires 100% automatic inflator built into a car. The professional driver will not rush to use it. So the real gardener and especially a true gardener fan will rarely if at all use your product.
    Why?
    That is very long story. To put it short, risking that you would not get it: that is not how nature is dealt with, or more precise how plants should be treated. The similar logic analogy of yours was already implemented with devastating results: tables and books exist how to feed plants with artificial manure, how to implement pesticides, how to tile it, how to protect from frost, insects, fungi,… Now we have oncology institutions full of ill people.
    You have a beautiful self-proving project finished but for real valuable engineering project you should fulfill important human needs exactly where people badly need it. And that is not automatic watering. If you really want to contribute with electronics, at least learn much more about agriculture and then choose the (right) project in gardening.

  25. Stumbled upon this vid randomly and I am definitely subscribing! And to be honest if you were super pro at soldering I probably would not have subscribed. I like how casual the whole project is. This is my style as well 😀

  26. I like this guy a lot he’s realistic and truthful lol “gonna build a garden to save money”
    -spends at least $50 on garden and probly countless hours

    – could have bought life time supply of herbs for $50 lol

  27. For those who think you can just buy fresh basil and save the hassle, NO! Even the stuff that still seems to be growing that you buy hasn't got the flavor of something you have just picked. So, besides the advantage of making cool graphs, with this you get connoisseur grade basil.

  28. Brilliant video. I get the Rube Goldberg approach, a great example of a problem solving compulsion searching for an outlet.
    My spontaneous smile when counting your dogs legs and the joy in his heart was more than worth watching an already worthy video.

  29. I'm pretty sure that if you put the moisture sensor in pure water it would read zero percent water since water doesn't conduct electricity.

  30. how did you constantly record the data?

    Like the arduino is not constantly plugged into your computer sending data to your serial monitor right? Do you have some sort of set up where you send the data to an SD card?

  31. If the SD card had no more space to write, what would happen exactly? and how long would it take with these settings (writing an entry every 6 seconds)?

    source: GitHub code

  32. I hope you get your veggies growing before you finish off your dog … leave the poor guy alone and become a vegetarian!

Leave a Reply

Your email address will not be published. Required fields are marked *