Automatic Plant Watering System With Arduino

78,350

655

30

Introduction: Automatic Plant Watering System With Arduino

About: The RobotGeek team is a 6-man operation that wants to make it even easier to use Arduino to make electronics and robots. Check out our instructables and robotgeek.com for all of our awesome kits.

Have trouble remembering to water those tomatoes? Want to go on vacation but fear the worst for your container garden if you do? Fear no more with an automatic plant watering system! With a little bit of preparation and arduino on your side, you can make a system that will make sure your plants are watered right, giving you freedom to tend to whatever you need to while still producing those healthy tomatoes.

Step 1: Project Parts List

  • Plants - Veggies, Flowers, whatever you're trying to grow, start the plants, pick out the strong ones and get them ready for transplant
  • Dirt - A good composition for growing veggies is Mel's Mix, but use what works for you
  • Grow Lights - We used LED grow lights because it's the future and why not, but you can use any full spectrum grow light you would like to, or rely on the sun if you have the window space.
  • Light Fixtures - Depending on the grow lights you get, you might need light fixtures. Scooting around Amazon or going to your local hardware store should net you what you're looking for.
  • 1 x Light Timer - For the grow lights. Simple, cheap, and effective.
  • 1 x Geekduino - or just about any Arduino will do.
  • 1 x Sensor Shield - For easy and quick wiring.
  • 1 x Duino Mount - To keep your arduino from running away
  • 1 x Large Workbench - For quickly and easily mounting electronic components
  • 1 x Liquid Pump
  • Silicone Tubing
  • 1 x 12V5A Power Supply
  • 1 x Relay
  • 1 x RobotGeek LED Driver
  • 1 x Power Squid
  • 1 x Barrel Jack Female Pigtail Lead
  • 1 x Pushbutton - For manually watering or priming the pump.
  • 1 x Grove RTC
  • 1 x Grove 4 Pin Connector to Female Jumper Wire Cable
  • 1 x CR1225 Battery
  • 3 x Moisture sensor - You can either use this one or make your own simple moisture sensor with Nails and a resistor!
  • Tube Splitters - We used several of these, but you can use any splitter compatible with the silicone tubing. (NOTE: These tube splitters have a high frequency of leakage around the cap ends. This can be remedied with the application of super glue, but please be advised of their quality and check for leaks before implementing them with your system)
  • Binder Clips - We used these as a super simple way to route and hold the feed tubes.
  • Zip Ties - These are handy for preventing leaks
  • Light fixtures - We used one that could hang 3 lights, but your choice of light will determine what sort of fixture you need.
  • Bucket - To hold the water our plants crave. Note: Do not feed plants Gatorade. They do not crave electrolytes.
  • Shelf - To put everything on and mount lights to

Step 2: Plan It Out!

To have a successful garden, planning is essential. We drafted some ideas out, decided on what we needed, and put the physical build together so that we could make sure that the pump was strong enough to deliver water to 12 different exit points we had planned. You might want a different set up, so make sure you give it some forethought before going out and buying a bunch of stuff.

Step 3: Physical Build and Planting

Everything is going on the shelf. If you're using a wire frame shelf, it's easy to set the heights optimally. Put the bottom shelf as low as possible for your bucket, set up the second shelf as low as possible while still leaving you room to access the bucket, so that the plants have as much room to grow as they can. Set the third shelf as high up as you can, giving you room to adjust your lights for optimal plant growth.

Fill the bucket with water, place on the bottom shelf.

Put your dirt in the planters, and introduce your plants to the new dirt.

Hang your lights however works best for the type of light. We just used some velcro straps to attach the cables to the wire frame shelf, but there are a ton of different styles of grow lights and fixtures, and there are a million ways to do it. Refer to the manual that came with your grow light for optimal positioning.

Plug your lights into the timer, and set your timer to a provide a reasonable amount of light for the plant. Ours are set to 12 hours on, 12 hours off, as that was suggested for the type of light and the tomatoes we're growing.

Find a good spot to place your electronics, and start running your tubes to where you're going to keep the pump. We used binder clips to hold the tubes where we wanted them, and they work phenomenally well. As far as positioning the pump, you should aim for putting it higher than the water reservoir and lower than the outlet tubes. This ensures proper operation of the pump. Position the end of the tubes near the base of the plant, allowing water to flow directly to the roots.

Now let's wire everything and start programming our microcontroller!

Step 4: Wiring and Programming

You will need to set up the RTC, which you can do by following this instructable.

Once your RTC is set, follow the diagram above to wire your system.

Duino PortSensor
AIO-0Moisture Sensor
AIO-1Moisture Sensor
AIO-2Moisture Sensor
DIO-4Relay
DIO-7LED
I2CRTC

You will need to grab the Automatic Plant Watering Sketch from HERE, and load it onto your ~duino through the Arduino IDE.

Step 5: Testing and Tweaking

Once you have everything hooked up, power it on, and watch it run! Well, don't literally sit there and wait for it to run. Use the test button to run and prime the pump, making sure the flow rate isn't so powerful that it is blasting the plants, and not so weak that you're only getting drips at each outlet. Plants are living things, so if you want to avoid damaging them when you're testing, put your outlets on a bucket and watch it go.

If the stream is too powerful, you can split the tube off to have more outlets or increase the length of the tube after the pump. If the stream is too weak, you can lower the length of the tubes or lower the amount of outlets in the system. Once you're satisfied that the flow rate is good, check back on your plants around the time you set to water to watch the system in action.

Another point to consider is in the code. You can set the watering times and moisture average to whatever works best for your plants! We've set it to always water once a day and check every minute that the value doesn't get drier than an average reading of 420, but you can set it to what works best for your plants or specific sensors. You can watch the sensor readings by hooking the USB port of the ~duino into your pc and opening the Arduino IDE's Serial Monitor. Every minute, the sensor readings will update. With the DFRobot Moisture sensor, a high reading is a dry reading. If you're getting a reading around 500, your soil is completely dry. A reading of about 300-400 is typical for reasonably wet soil.

Step 6: And You're Done!

Well, you're done building the system. It is advisable to keep an eye on it, even if you're getting good results. The water bucket will eventually need to be refilled, the plants will eventually need trimming and harvesting, the usual container gardening things still apply. Granted you now need to worry much less about water and ample light reaching your plants, things can still go wrong. Always check your lines for leaks, and keep the moisture away from the electronics as much as possible.

This system is inherently flawed in that it uses an average of the moisture between the 3 points to decide when to water beyond the daily watering cycle, which could result in the plants being unevenly watered. If you add more pumps to the system, you can use the individual readings from the sensors instead of the average to water each plant as necessary instead of the whole lot, possibly giving you better results! We've had fantastic results in the month that the plants have been in the system! We're looking forward to having some massive heirloom tomatoes at our next cookout, for sure.

Step 7: Update

Our tomato plants are doing very well, but they got way tall, forcing us to move the shelf down to the bottom. We added reflectors so that the light would hit the plants from the sides, as well. One of the reasons they grew so tall was to get closer to the single light source on all of them. Now they will hopefully start bushing out and producing tomatoes!

Share

    Recommendations

    • Creative Misuse Contest

      Creative Misuse Contest
    • Metalworking Contest

      Metalworking Contest
    • Fix It! Contest

      Fix It! Contest

    30 Discussions

    Your plants look droopy, I think they need water lol

    Nice project, i am going to try this in the coming winter.

    Thanks.

    0
    None
    VinitV

    1 year ago

    How much total cost for it?

    Great idea! I am not a techno geek so have no idea what an Arduino is or how to use one, but plan to use a submersible pump, timer, and a bucket to water my potted figs (outdoors) when I am not home. Thanks much for the info.

    I made one similar before holidays a month ago. I used 2 stainless steel plates for the moisture probes, covered with heat shrink for the first 100mm to take reading from deeper in soil. The tops fold back over the pot to keep them still, working well. I found a peristalsis pump to be best also ;)

    when I was growing tomatoes the advice was to pinch off the center lead stem after it had branched 3 times. this forces the plant to spend it's energy growing out versus up and move to flowering and fruiting. plus has a shorter more robust stalk.

    I went a different route and used a gravity-fed water bucket with valves to each individual plant since each one was different in different sized pots. I was in a bit of a rush and didn't add an option for moisture sensing. So yours has the advantage of moisture sensing but the disadvantage of collective watering, and mine's the opposite! :)

    I also looked into LED lights but thought the evidence wasn't conclusive, especially given the very specific wavelengths involved and the sheer amount of light power you need. So I went with long-life, high-efficiency T8 fluorescent bulbs: 2 cool white and 2 warm white for a total of 12,000 lumens and 128 watts.

    1 reply

    That's awesome! There were so many ways to skin this cat, and I think an approach combining the best aspects of both of our projects would really make this system something special.
    We ended up switching to T8's, not because the other lights weren't working, but because they were making the plants grow tall instead of fruiting. This was likely because of the spotlighting and lower lumens. Thank you for your input!

    A very simple approach is to use a light timer to run a submersible aquarium pump to pump the water to the plants. Make sure the plants have a very drainable mixture of vermiculite in the soil so that the roots don't ever become waterlogged. Select an appropriate drip head (or a loop of copper with tiny holes ringing the plant) and set the time accordingly. If you go with 100% vermiculite, or a simple pvc pipe with the plant suspended you have hydroponics for cheaper than buying the electronics needed to "sense" the moisture. I've grown lots of plants very successfully doing this on the cheap.

    The only trick is to eliminate/reduce the soil that becomes water-ladden when the pump is on too long. Roots only have to "dry out" for a few hours to remain healthy and draining through vermiculite (stone) is pretty quick.

    I admit that using a cheap light timer is not as much fun as programming and setting up an Arduino.

    3 replies

    First thing I thought of too domoking3..lol!

    Sounds like you should set up your own Instructable :D It sounds much easier.

    0
    None
    JimG50

    1 year ago

    Neat idea to use a bucket of water and a pump instead of using water mains. This way any problem will be limited to water in the bucket. A small amount of Miracle grow ought to be a great fertilizer too. I'm gonna try it next spring

    Everybody knows not to feed your plants Gatorade. Plants crave Brondo! ;-)

    That aside, great Instructable. :)

    0
    None
    BramS3

    1 year ago

    Funny Instructable, great job

    0
    None
    BramS3

    1 year ago

    I made a project very similar to this one minus the grow lights, a very good adition

    Hello, I understand that the soil moisture check occurs every 30 seconds? How long the soil moisture sensors are not destroyed due to the action of electrolysis?

    1 reply

    I have read that the sensors are corroded by electrolysis, so if you only apply power when doing a reading (e.g. using a free pin to turn on the moisture sensor) the sensor will last a long time. As a bonus, it'll save energy—important if you're electricity supply is fairly limited (e.g. batteries; remote solar-powered moisture sensor).