Introduction: Automatic Plant Watering System With Arduino

Picture of Automatic Plant Watering System With Arduino

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!

Picture of 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

Picture of 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

Picture of 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

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

Picture of 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!

Picture of 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

Picture of 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!


Cheese Queen (author)2016-08-20

1007 internet points for the Idiocracy reference.

I concur! :)

TapNDie (author)2016-08-20

Your plants look droopy, I think they need water lol

Hatseflats (author)2016-08-20

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


VinitV (author)2016-08-20

How much total cost for it?

DonaldJOH (author)2016-08-20

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.

JibbletCity (author)2016-08-20

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 ;)

ed.alexander (author)2016-08-19

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.

jolshefsky (author)2016-08-11

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.

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!

domoking3 (author)2016-08-11

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.

ConnyJ1 (author)domoking32016-08-14

First thing I thought of too!

jʎɐɹ-ɾ (author)domoking32016-08-12

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

domoking3 (author)jʎɐɹ-ɾ2016-08-12

I'm flattered!

JimG50 (author)2016-08-12

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

ShawnE19 (author)2016-08-11

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

That aside, great Instructable. :)

BramS3 (author)2016-08-11

Funny Instructable, great job

BramS3 (author)2016-08-11

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

Zheka163 (author)2016-07-19

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?

jolshefsky (author)Zheka1632016-08-11

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

The sensors we're using are capacitive moisture sensors from DFRobot that do not have exposed metal like other sensors, meaning they are not subject to the same corrosion. We have experienced no corrosion or degradation in performance in the month we've had them exposed to the wet soil.

sriharshak1 (author)2016-07-15

what is the total cost for this apws

diy_bloke (author)2016-07-12

Just one more remark about your lights. Depending on your local circumstances it still might be a good idea to have your plants close to a window, for some extra light. Nevertheless running these lights with their odd purplish color may entice your neighbours to call the police, who no doubt will pay you a visit then :-)

If we had any spot in the office to put them where they could get some natural light, we would absolutely do that. We really only have the spot where they're presently at in the warehouse to spare at the moment. Either way, probably best we keep it away from the windows, so as to not give anyone reason to interrupt our work day abruptly demanding that we prove to them what a tomato looks like. :P


diy_bloke (author)2016-07-12

Though there are many arduino plant watering projects (heck, i did a couple myself), but they always spark my interest, especially the moisture sensors used. Yours looks pretty nifty and the dfrobot sensor is an interesting one. I have made both resistive and capacitive sensors and I dont want to go into the advantages of the one over the other, but the DFrobot one is inetersting as such that though it is a capacitive sensor (or at least claims to be) it seems a drop in replacement for a resistive sensor. As far as I can see they use an RC oscillator in which I presume the 470pF represents the soil (just guessing here) and the frequency output of the 555 then seems to be used to build up a voltage over C3. Nifty approach though I am not sure how accurate that is.

Just a question on your lamps: I cant really see the status of your plants after 3 weels, they might have grown tall desperately trying to get some light. Are you actually getting enough light with these to produce some healthy plants with sturdy stems? or are they just long with thin stems? I am asking coz I heard many different stories about LED lighst for plants

We picked out the DFRobot Capacitive sensor mostly due to its corrosion resistance (rather, the lack of corrosion resistance of other types of moisture sensors), and it has really exceeded our expectations. The entire Gravity Series can be straight dropped in to be used with the RobotGeek Sensor Shield, which we're obviously swimming in, and we've gotten steady performance for the weeks we've had it going. Your analysis is correct insofar as I can tell. As far as accuracy, the sensors react in the same range across the board when tested against completely wet/completely dry mediums, and have been functioning well in the system with that range in mind.

The lamps are working out better than expected. I was concerned about their height being a result of low light, but Matt (who provided them) has grown these heirlooms every year, and they're just always tall, bushing plants by his account. The stems are thick and sturdy, and actually doing much better than the ones he has growing outside in natural light right now. We didn't include pictures of those because we didn't want to oversell on the light, as it may not work this well for everything, and we're still testing it ourselves. My biggest issue right now is that the shadow cast from above leaves the lower shoots without proper light, which I've been considering adding a reflector to fix.

Well indeed that probe is a clever concept as it is in fact a drop in for a resistance probe. The sensitivity will be influenced by the input impedance of your analogue port. Hence I think the calibration for ones syetme as described in their Wiki.

Thanks for the info on the lamp. Useful.

DylanD581 (author)2016-07-11

Nice Auto-Watering Plant System

Thank you!

About This Instructable




Bio: 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 ... More »
More by robotgeek_official:Dropping Halloween SpiderJumping Halloween SpiderWater Monkeys
Add instructable to: