Arduino Garden Controller – Automatic Watering and Data Logging

Gardening in the modern age means making things more complicated and arduous, with electrons, bits, and bytes. Behold: the garduino. My brother got me an arduino microcontroller board for Christmas, which to me was a solution looking for a problem. I finally found the problem: fresh herbs are expensive at the grocery store. But apparently not as expensive as adding a bunch of sensors and electronics to your garden.

Build one yourself or just poke around in the code: https://github.com/gradyh/GradyHillhouseGarduino.git

Thanks to my brother, Graham, for the Arduino board and editing the narration. Thanks to Chris from YouTube channel AvE (https://www.youtube.com/user/arduinoversusevil) for the tips on soil moisture sensors and water hammer. Most of the parts in this build came from http://www.adafruit.com.

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. I guess people (myself included) see a notoriously simple and relaxed hobby and can’t help but feel compelled to overcomplicate it. 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.

A few technical details below… If there’s anything I didn’t address, feel free to shoot me a question in the comments.

Moisture sensors that measure the resistance or conductivity across the soil matrix between two contacts are essentially junk. First of all, resistance is not a very good indicator of moisture content, because it is highly dependent on a number of factors which might vary from garden to garden including soil ph, dissolved solids in the water, and temperature. Second, most of them are of poor quality with contacts that easily corrode. For the most part you’d be lucky to get one to last through an entire season. Capacitive sensors are generally more accurate because they are just measuring the change in dialetric properties of the soil which is less sensitive to other environmental factors. They also don’t require any exposed conductive surfaces which means they can last a bit longer in the harsh environment of your backyard. My soil moisture sensor (and soil temperature sensor) came from http://www.vegetronix.com.

The arudino’s analog inputs read voltage, so to use a resistive sensor (like the photoresistor I used to measure sunlight), you have to set up a voltage divider. This is just a really simple circuit which divides the voltage drop between your sensor and a known resistor. You know the current is the same for both, so you can calculate the resistance of your sensor using ohm’s law. The only problem here is that a photoresistor’s relationship to illuminance is log-log, that is to say it spans several orders of magnitude. So if you use a big resistor (5k – 10k ohm) in your voltage divider, your sensor will be sensitive to low light levels, but you won’t be able to tell the difference between a sunny day and an overcast one. Since this thing’s going outside, I used a 100 ohm resistor, which should hopefully give me good differentiation between levels of brightness in the daylight.

Music from incompotech.com

50 Comments

  1. Graham Nichols on February 17, 2021 at 9:04 pm

    Who else smiled to themselves and went "Oh, yeah" when he said ".. the gratification that comes from combining a working circuit and a working program is a little bit addictive"?

  2. Italo on February 17, 2021 at 9:06 pm

    OMG 1 second into the video and i’m having a heart attack over your cutting technique. you’re gonna chop a finger off dude!

  3. นาย ชิว on February 17, 2021 at 9:07 pm

    Please sup thai

  4. Harveys RC on February 17, 2021 at 9:10 pm

    Make more videos like this 👍👍

  5. rushi yelane on February 17, 2021 at 9:11 pm

    that cat jokes hits differently….

  6. The Science Rocker on February 17, 2021 at 9:13 pm

    How u made graphs with arduino?

  7. Minh Chien Official on February 17, 2021 at 9:14 pm

    the cat is boss… he is looking for him.

  8. Matthew VanDam on February 17, 2021 at 9:17 pm

    I’ve watched tons of your more recent video and now I stubbled across this one. You have a lot of skills, woodworking, programming, gardening, engineering. Thanks for the video!

  9. Abdul Haseeb on February 17, 2021 at 9:18 pm

    TBH it’s very impressive you got it working with a cheapo soldering iron

    Coz trust me I have tried

  10. Yannick 73 on February 17, 2021 at 9:18 pm

    I somehow missed the disclaimer about moisture sensors. It was said, you get what you paid for, fair enough.
    But if you use the real cheap electrode resistive sensors, not only does your sensor destroy itself in use, it might poisen you in the process. As copper or worse even lead (from solder) salts are highly toxic in miniscual quantities.

    But the capacitive ones are fine, I think. You can watch about that topic on Andreas Spiess channel, he explained it very well.

    So either just take your time in the garden (it can be a very relaxing pasttime for stressed ppl afterall) or buy the “real“ stuff (or alternatively just buy your groceries, I suppose).

  11. husplus on February 17, 2021 at 9:19 pm

    Nice Project
    Practical Engineering. For potted plants you can also check out our new developed plant sensor which also integrates plant irrigation: https://www.kickstarter.com/projects/husplus/hus-flower

  12. Olivier Paillé on February 17, 2021 at 9:19 pm

    Wow. I would like you to keep going …very nice

  13. GeeGee on February 17, 2021 at 9:19 pm

    we love graphs, we should marry them… oh wait

  14. Nose Dice on February 17, 2021 at 9:21 pm

    Awesome dog

  15. Beetle on February 17, 2021 at 9:22 pm

    howd you generate the graph

  16. BVLVI on February 17, 2021 at 9:23 pm

    HAHAh I like you.

  17. Michael Ainsworth on February 17, 2021 at 9:24 pm

    Love the accurate sarcasm on human nature.

  18. Bharadwaj Giridhar on February 17, 2021 at 9:28 pm

    wow, I’ve been thinking of doing this in my backyard for the past 2 days and then boom this pops up on my youtube feed.

  19. Dj KiZo on February 17, 2021 at 9:29 pm

    Hi there, I really like how thought through your design is- good work. Would you be interested in designing an automation unit for my Aquaponics set up?
    Please message me on beatskizo@gmail.com or send me your contact info.
    Thanks.

  20. Buck Starchaser on February 17, 2021 at 9:30 pm

    Why aren’t you nearly this entertaining anymore?

  21. Eric Cornell on February 17, 2021 at 9:30 pm

    Hilarious commentary

  22. Nicolás Álvarez López on February 17, 2021 at 9:32 pm

    Hi dude, the link on the github it’s in not found

  23. Steve Anderson on February 17, 2021 at 9:34 pm

    has someone already noted that the data collection shield (without a battery – shown at ~ 2:27) looks like a cat? we have 4 cats, so i may just see them everywhere.
    one is obviously on my lap right now.

  24. John Tarbox on February 17, 2021 at 9:36 pm

    I would love to see a follow up. Are you still growing plants? Have you learned anything? Have you made any improvements?

  25. Aarslikker Danny on February 17, 2021 at 9:36 pm

    Neeto

  26. Luke John Potosky on February 17, 2021 at 9:37 pm

    I would love to have one of these. I also typically forget to water my small garden and everything dies. This sounds like a product that you could sell on Amazon or somewhere similar.

  27. Sialsh on February 17, 2021 at 9:39 pm

    Hey,man..I wanna make this project.But I wanna make it so that it can water multiple plants in different vases whenever a vase needs water..How do I go about doing that?Can you help?Thanks in advance.

  28. CANER BAYDUR on February 17, 2021 at 9:39 pm

    you need communication modules because cable always cause problems

  29. Ernesto Maguiña on February 17, 2021 at 9:39 pm

    One question , How many sensors moisture soil should I use in my crop ?

  30. Klinton famou on February 17, 2021 at 9:40 pm

    Liked for the Goodest boy.

  31. yat fung chan on February 17, 2021 at 9:41 pm

    0:43 may i ask what is DHTZZ?

  32. DriveAndMaintain on February 17, 2021 at 9:41 pm

    I’ve studied irrigation science and this is very similar to how real crop irrigation works, although real irrigation is less automated. Crop evapotranspiration (which is the water consumed and released by the crop) is modelled to predict the rate of water consumption and irrigation frequency required to prevent crop damage. The bigger a crop grows, the more water is consumed in the root zone. One of the major factors influencing crop yield is actually the irrigation application uniformity, which is why sprinkler spray patterns and distribution methods are so highly researched. It’s an interesting topic.

  33. FOSALGO on February 17, 2021 at 9:43 pm

    Mantappu Ganu… I Like this tutorial…

  34. Melissa Harland on February 17, 2021 at 9:43 pm

    Thank for your time n your cat🐈
    U must keep it simple for folks that ain’t as engineer-ic as your talents, thx again 🤜🤛☮

  35. chat rick on February 17, 2021 at 9:46 pm

    sweet

  36. Mauro Duarte on February 17, 2021 at 9:47 pm

    now with marihuana

  37. Shounak Katyayan on February 17, 2021 at 9:49 pm

    I too like sensors and graphs. Got one measuring the temperature of my refrigerator and it’s awesome.

  38. Ean Erickson on February 17, 2021 at 9:49 pm

    Put the Arduino on your network and run a daemon on one of your computers. No SD card required.

  39. Dusty Thatcher on February 17, 2021 at 9:51 pm

    "Wife’s make-up casing" and "pallet boards and a Pinterest account" 😄

  40. Tawanda Abraham Makunike on February 17, 2021 at 9:53 pm

    This video was more than just eye opening but very funny. Loved it, thanks even if its 5 years later, still relevant.

  41. Sumith Korakoppula on February 17, 2021 at 9:53 pm

    goodwork man

  42. Tefans97 on February 17, 2021 at 9:54 pm

    I have thought about doing pretty much exactly this, just haven’t got a garden yet, or ever used an arduino. That’ll be fun someday

  43. brad ford on February 17, 2021 at 9:55 pm

    My man. Sharpen your kitchen knives. Please.

  44. Nathan King on February 17, 2021 at 9:55 pm

    1:09: I love that cute cat.

  45. Yagnesh Patel on February 17, 2021 at 9:55 pm

    What happened if water in tank is empty?? Then ur water pump may burn in dry run conditions… You should embedd two project in a single project.. I. E.
    Smart irrigation system with automatic water level control using ultrasonic sensor.. So it gives sustainable solutions zero maintenance…

  46. kryzium on February 17, 2021 at 9:58 pm

    "https://github.com/gradyh/GradyHillhouse" please reload the link! D: this video are awesome! I need to build one for my self (srry my english is bad, im from Mexico!)

  47. Edward Mallon on February 17, 2021 at 9:59 pm

    The Vegetronix sensor looks pretty solid but they are also a bit on the expensive side. If you don’t mind doing the encapsulation yourself then TLC555 based capacitive soil sensors work well with Arduino’s ADC, and even more so if you spend another buck to monitor them with an ADS1115.

    https://thecavepearlproject.org/2020/10/27/hacking-a-capacitive-soil-moisture-sensor-for-frequency-output/

  48. Reza Khanahmadi on February 17, 2021 at 10:02 pm

    Came for the engineering, stayed for the humour 🙂

  49. Balazs Csibi on February 17, 2021 at 10:03 pm

    As someone into Biology. Plants also need iron and nitrates, just saying 😀

  50. whitefields5595 on February 17, 2021 at 10:03 pm

    Not happy until it’s over complicated …… me too!

Leave a Comment