Introduction: Arduino Automatic Watering System

Picture of Arduino Automatic Watering System

In this Instructables guide I will show you how to make your own - Arduino -automatic watering system for your "desk" flower (or plant). The whole procedure is very easy and you can complete this guide in about 30 min.

The goal is to automatically watered the plant when the soil moisture decreases, so we will use one "soil hygrometer" sensor for this measurement. For watering, we will use one small air-pump motor that will blowing air into the bottle from one small pipe! The pressure will throw the water from the other pipe to our plant.

I used the Adafruit Trinket Pro board for my system but if you want you can also use the Arduino uno, Arduino Pro mini or Arduino nano board.

So, let's get started!

Step 1: What You Will Need

Picture of What You Will Need

For this project you will need:

  • Adafruit Trinket Pro (or any other Arduino Board)
  • Soil hygrometer module (FC-28)
  • Air pump motor (i used 6V AM-265)
  • Pipe (you will need two small pieces)
  • NPN TR 2222A
  • Diode (e.g. IN4001)
  • Small/Tiny breadboard
  • Some breadboard wires

You will also need a hot melt glue gun to make sure that the bottle is airtight from the pipe holes.

You can buy them from, good prices and free shipping.

Step 2: The Pipes and the Bottle

Picture of The Pipes and the Bottle

Follow the steps below:

  • Make two holes in the cap of the bottle.
  • Take two pipe pieces
  • Now see the first image above, one pipe must be on the top of the bottle (this pipe will be connected to the air pump motor). Use some hot melt glue on both sides of cap.
  • The other pipe must be on the bottom of the bottle (this pipe will throw the water to our plant / see the second image above). Again, use some hot melt glue on both sides of cap.

Now make sure that the bottle is airtight, if you blow air (use your mouth) from the pipe (small one) you must see the water gets out from the other one.

The watering system is ready. Now lets make it automatic with the Arduino and the soil hygrometer module.

Step 3: The Circuit

Picture of The Circuit

The connections are pretty easy, watch the above image with the breadboard circuit schematic.

Useful notes:

Soil hygrometer module:

  • Vcc - 5V
  • GND - GND
  • AO - A0
  • DO - not connected

NPN Tr 2222A:

  • 1st pin - GND
  • 2nd pin - 9
  • 3rd pin - Motor negative pin (-)


  • Anode pin - Motor negative pin (-)
  • Cathode pin - Motor positive pin (+)

Step 4: The Code

Here's the code, embedded using Codebender!

Try downloading the Codebender plugin and clicking on the "Run on Arduino" button to program your Arduino board with this sketch. And that's it, you've programmed your Arduino board directly from your browser! It's really amazing.

Read the comments to understand how it works. If you want you can make your correction by clicking the "Edit" button, try for example to change the percentage that will activate the watering system from 20% to 50%.

Step 5: Well Done!

Picture of Well Done!

Now you have your own Arduino automatic watering system for your small plant or flower! Keep in mind that it will also need a sunlight to grow up, so place it near a window. Of course don't forget to refill your bottle with water after some days ;)

For more Arduino tutorials and cool projects you can visit our web page:

I would like to see photos of your plants!
I hope you liked this, let me know in the comments below.


lucrezia12 (author)2017-03-03

We have an Arduino UNO board and we don't know if the code will work. Can Anybody help us???

mglazewska (author)lucrezia122017-09-21

It will work with any Arduino, I used Arduino Uno to build mine.

germyvillamayor (author)2017-02-08

hi sir can i ask a question

JordanE24 made it! (author)2016-06-13

I'm having trouble getting the motor to spin fast enough to pump the water using just the 5v power from the Arduino (TinkerKit LCD Module - Leonardo Board). I added a 9v battery to the system just to run the motor, but it only lasted a day and still struggled to do the job. Any recommendations as to how best to power the motor? Do I need a whole 12v supply you think?

mspalluzzi (author)JordanE242016-06-17

still a budding electronics nerd world but here's some thoughts anyways:

1) What's your motor rated for? Mine is rated 6V and has no problem running off the arduino's 5v and can even push water under a good amount of load.

2) Do you know the operating current? I've had some motors where I've given plenty voltage but if the current is too low, you'll get nothing. Arduino gives you 40mA and i dont know how much 9V batteries give you off the bat but I know it's not relatively much.

3) Those red and black wires coming from the back of your set up are from the arduino i assume? looks to me they're going through quite a bit of other components before reaching your motor. You might want to check the actual voltage and maybe current value reaching the motor cause there may be a significant drop.

Hope something there helps and best of luck!

hayder ali (author)mspalluzzi2016-12-27

can i use 12 v moter pump

JordanE24 (author)JordanE242016-06-24

UPDATE: So I bought a 12v-5v DC/DC convertor and wired it up to a 12v power supply from an old broken Wii. I have the full 12v running to the DC/DC convertor and also split off to the motor via the breadboard. The 5v coming out of the DC/DC then got wired to a micro usb plug that I cut off of another cable and runs to the TinkerKit LCD Module (Arduino Leonardo) to power it. Everything is working great and I can power the whole system with one plug. No longer portable, but where would I take it anyway? Haha. Also, updated the LCD messages. When it's watered the LCD displays "Thx I'm Good" and when it's dry it displays "Feed me Seymour".

I did the same circuit with arduino uno and isn´t working the problema can be my diode because im using uno and my diode 18v 5w (1N5355) can be the problem the diode ?

zahedhoosen (author)2016-08-08

You guys are just to awesome on this site.I don't have an Arduino YET,but I have gotten the motivation needed to buy one immediately and to attempt being like you guys.This is so far the BEST website I have ever registered to.

Bruno.Castro.Fmc (author)2016-07-15

Can i use diod 1N5355B 18 V 5 W ?

mspalluzzi (author)2016-05-26

Very nice! I will be using this to keep my bonsai watered while im away from home. However, I was wondering if you could comment on the longevity of the hygrometer, as I plan on using this to maintain a plant over the span of 2-3 months and have heard most hygrometers dont like being kept in soil for prolonged periods.

I don't know... but I think that this varies depending the sensor and the quality of it. But thank you for comment because I didn't know that they have limited lifespan.

theredbryophyte (author)2016-05-21

Neat way of indirectly pumping water with air.

yuvallahav (author)2016-05-21

I love it! I mean, I've seen quite a few projects here, but when looking at things and thinking what I can actually use, yours is the best one yet :) I'm just a sucker for things you can actually use around the house.

Thank you Yuvallahav!!! :D

About This Instructable




More by Ardumotive_com:MIKE - Arduino Line Following Robot for Beginners "GRECO" - Arduino Object Avoiding Robotfor BeginnersArduino 3D Printed Digital Thermometer With DHT-22 Sensor
Add instructable to: