There are many such instructable created. But the problem is with getting the materials. I am creating this so that people get to know what equipment to buy in India and how to connect them and make them work.

Problem Statement -

1. Can we automatically water the plants when i am going on vacation or do i have to bother my neighbors? Sometimes the neighbors do too much of watering and the plants end up dying anyway. There are timer based devices available in India which water the soil on set interval. They do not sense the soil moisture and the ambient temperature to know if the soil actually needs watering or not.

2. Can we know if the soil actually needs to be watered? Irregular watering leads to mineral loss in the soil and might end up rotting the plants.

3. Can we manually water the soil from remote location?

Solution -

The answer is "Yes, we can" to all the above problem. The solution provided is simple and economical. It requires you to know little bit of electrical and electronics but i feel it is similar to having so much of electrical knowledge so that you can change a bulb. Let me know if you feel any step is complicated. I will try to add more information so that it becomes easy.

Step 1: Materials Needed

1. Soil moisture sensor - (You can search for similar item on ebay)


2. Small pump - Toy pump working on 5-6V is enough. Few options available in India are -

http://hacktronics.co.in/home/418-rs-360-small-wat...( this should not be submerged in water)

http://hacktronics.co.in/home/721-small-water-pump...(this should be submerged in water)

3. Arduino -


4. Pump Controller - (You can make your own circuit with little knowledge of soldering or you can go to shops who sell these electronic equipment and they can point you to people who can help you to solder)

a) Transistor - 2N2222A

b) Resistor - 1K ohm

5. Drip Irrigation Kit - (You can choose depending on how many plants you want to water).


6. Connecting Pipe (i used 0.4" pipe) to connect the pump and the drip irrigation main line.

Step 2: Connect the Soil Sensor to the Arduino

I have color coded the wires for easy understanding of how to connect the soil sensor with the arduino.

a. Red wire - Connect the Vcc pin on soil sensor to the +5V pin on arduino

b. Green wire - Connect the Gnd pin on soil sensor to the Gnd pin on arduino

c. Orange wire - Connect the A0 (Analog) pin on soil sensor to the A0 (Analog) pin on arduino

Step 3: Connect the Pump Controller Board to the Arduino

The Pump Controller Board comprises of -

1. 1k ohm resistor

2. 2N2222A transistor

3. 5V Pump Motor

Step 4: The Code to Be Uploaded to Arduino

Copy the code from Code.txt to the .ino file on arduino and upload the code to the arduino.

Step 5: Setup the Drip Irrigation Kit

There is enough information on the web on how to setup the drip irrigation kit. I am not getting into details of this.

The point to note here is that there are 6 analog pins on arduino that can be used to sense soil moisture. At the very minimum, one can use the same setup to sense 6 plants. But if designed in a better way, one can use the same setup to sense as many plants in multiple of 6.

I am not going into details of this as this is not the objective of this instructable. I will try to publish another instructable for a better design of the drip irrigation kit so that maximum number of the plant soil moisture can be sensed.

Step 6: Connect the Pump to the Drip Main Line

Step 7: Demonstration of the Full Setup

Step 8: Next Steps

  1. Create an Internet of Plants - Create a IOT framework which will help connect plants of similar variety across the world to get connected.
  2. Connect the arduino wirelessly with the raspberry pi home server so that the plants can be monitored remotely.
  3. Remote Monitoring and Watering of plants - Use GSM based add on board for remote operation
  4. Power Supply - Use solar power as the power need is low. Currently i am using a power bank to power the arduino and the pump motor.
  5. Weatherproof case - Since the device will be used outside, we need to have a weatherproof case to house the electronics.
  6. Add more sensors - Temperature sensor, Humidity sensor.

Do let me know if you think anything else needs to be done as part of this project.

<p>We are modifying this system to include an Individual pump for each plant with sensors, this way each plant can be sent the water it needs.</p><p>I'm also adding a Solar panel to charge a Battery that will operate the pumps.</p><p>My current system will include 5 pumps, 2 sensors for each plant, Solar Panel and a Rechargeable battery.</p>
<p>And we added a Distance Measuring Transducer Sensor to monitor the Water level from our source, this way the pumps don't run if we don't have water.</p>
<p>This is amazing. Will you be updating the instructable with these changes?</p>
<p>My friends have changed MOISTURE LEVEL from 255 to 550 work with me Try this suggestion and tell me the result</p>
<p>Hi! Can You please explain how the Motor will be used to Pull the Water. The Photo of Motor with Irrigation kit will be more helpful. How the Motor output to connect to pipe for pulling the water.</p>
<p>How to create the Internet of Plants??</p>
Hii sir i want to do this project so what i have to do can u help me sir.
<p>Isn't the point of instructables to provide instructions on how to do the project? What part are you stuck on? Do you already have all the hardware?</p>
<p>This is one of the most interesting project. It is very similar to an arduino project &quot;Un Arrosage Automatique&quot;. in a french translation , Dunod, Paris, 2011,2013, 2015, &quot;D&eacute;marrez avec Arduino&quot; by M Banzi and M Shiloh pp 77-142. I will try to combine the best of the 2 projects and let you know. </p><p>We want to make a system able to optimise the individual plant potential in a permaculture environment. Any comment is welcome here or at johnold2@gmail.com </p><p>Jean Pierre </p>
hii sir i&acute;ḿ doing project in automation of drip irrigation using soil moisture, 12 V relay, 12V solenoid valve, and an LCD. Can u send me the program required to get the output @ nivethan38@gmail.com
<p>will you please send me the complete code at :</p><p>sushmita.sapkota33@gmail.com</p>
<p>it would be nice if u could immediately response</p><p>plssssss</p>
<p>sir i am using a 12 v water pump. so how can i program the arduino or modify your program</p>
<p>@AmitabhS Sir can you share the complete code ....am using Arduino Uno board...... satyartha95@gmail.com</p>
Hi sir did u get the code?
<p>Is the code complete? Sir could you mail me the full code . I am a new one to electronics ..... if anyone else has received the code from the author please mail me as soon as possible .</p><p>mail me at ... - multitaskerr21@gmail.com </p>
Hi sir did u get the code?
<p>I have already shared every information (including the code) that i have. </p>
Hello sir could you mail me the full code. I am your number 1 fan. Thanks you . please sir we really need your help. roycechristianibay@gmail.com
<p>hello good morning....</p><p>can u help us out?</p><p>for the sake of our project?</p><p>we are using an arduino, 2n5551 transistor,1kohms resistor,12 volts water pump, breadboard and we need to supply 12 volts battery, we also use soil moisture sensor.......</p><p>we had search on the net program...but it seems it dont fit the program coz we are using 12 volts battery while on the link we searched they are using 5 volts water pump......</p><p>this our connection..can u help us the coding...pls....</p><p>our system is automatic plant watering system wherein....the moisture sensor itself will detect if the soil of the plant is wet or dry,,,,,if the sensor detect the soil of the plant is dry ....the water pump will water the plants and if the sensor detects the soil is wet,,,,,,the water pump will stop and will not water the plants....</p><p>can u help us out a complete program....</p><p>thanks....</p><p>this my link addresses:</p><p>gina.henoguin143@gmail.com</p><p>ginahenoguin@yahoo.com</p>
<p>Do you have the specifications for the fly back diode needed? Thank you!</p>
<p>project is nice. i wanna do this as my project can you send me block diagram and details about the project in detail to my mail </p><p>mail id:thanoojarao@gmail.com</p><p>plzzz sir.send me</p>
<p>dear all ,</p><p>The &ldquo; smart garden&rdquo;uses the most advanced Internet, cloud and mobile technologies to intelligently manage garden's irrigation and lighting scheduling. In a typical garden, the system can save up to 50% of the irrigation water.&quot;www.rabbithomes.com.<br>please visit our website for more information , Smart garden PRO ..<br>www.rabbithomes.com</p>
<p>Sir, I am doing a project on automatic soil moisture sensing and irrigating for a single pot. Can you please send me complete circuit and block diagram and also specifications of pump ,relay and FPGA (xillinx) programming code. Can we use submersible pump for this project?.</p><p>iitianayushbakliwal@gmail.com</p><p>please mail to this as early as possible...</p>
<p>Nice project, have you ever though of putting the system &quot;in line&quot; so that you do not need a resevoir, it comes straight from the hose?</p>
<p>Ok, to control six individual plants, I should use six pumps connected to six different out ports, am i right?<br>Also, what platform do you think is better for this, arduino, raspberry...?</p>
<p>when i connect the negative terminal of battery to the ground my transistor starts heating intensly..... where is the mistake plz help</p>
<p>What mpotor are you using? could it be that it just draws too much current for the transistor?</p>
<p>Hey guys, just one clarification - You connect the positive terminal of the battery to the motor and the negative terminal of the battery to the ground port. I am new to arduinos so could someone just confirm this. Thanks</p>
<p>Well, yes, but the Arduino still needs 5 Volt as well</p>
<p>please someone help watever i do motor not turning on ???? how to control moisture sensor ?</p>
<p>thats kind of a broad question, could be your connections, could be the software, could be the motor.<br>Lets do some fault finding:<br>if you remove the sensor board and alternatively connect A0 with +Vcc or Ground, does the motor turn on?<br>If you just write a HIGH to D7, does the motor turn on?<br>btw, add a fly back diode over teh motor or it may burn out yr transistor, maybe it already did</p>
<p>I would definitely add a fly back diode over the motor to prevent your transistor from being destroyed</p>
<p>Sir, I am doing a project on automatic soil moisture sensing and irrigating for a single pot. Can you please send me complete circuit and block diagram and also specifications of pump ,relay and Arduino programming code. Can we use submersible pump for this project?. </p><p>poojasgaler@gmail.com </p><p> please mail to this as early as possible......</p>
<p>Hi. Can anyone send me the coding for this? Thank you very much nicholsonkong@gmail.com</p><p>I'm using timer and the moist sensor for this project. </p>
We facing problem during proteus simulation and programming.<br>Please help us.<br>We use same moisture sensor that u use.<br>Please send me email my email id is<br>Siddheshg780@gmail.com<br>Please rply in 1,2days<br>Thank u sir
We facing problem during proteus simulation and programming.<br>Please help us.<br>We use same moisture sensor that u use.<br>Please send me email my email id is<br>Siddheshg780@gmail.com<br>Please rply in 1,2days<br>Thank u sir
Sir please provide c code and hex file of same project but gsm based with atmega32
<p>Hi everbody, after playing around with the code a little I made some progress towards haveing the sensor OFF every X amount of time :). at first I tried using delay function although it worked, it also kept the pump ON for the same amount of time as OFF (even after the moisture /water level was full) So basically I swapped the order in which things happen, so it will read the input from the sensor, then if water/moisture is high, it will power down the sensor for X amount of time, otherwise it will turn the pump on and keep it powered until the moisture level is high again. I also made a slight change and hooked up the positive pin of the sensor to PIN13 OUT instead of the +5V PIN. this way I have control of the sensor to turn it off and on. Please forgive me for my ignorance /bad codeing, but so far it seems to work :). Just play around with the values to understand how it works so you can suite it to how you want it. Hopefully someone who knows what they are doing can make this even better! thanks and T.C!<br></p><p>const int VAL_PROBE = 0; //Analog pin 0<br>const int MOISTURE_LEVEL = 450; // the value after the LED goes on<br><br>void setup()<br>{<br> Serial.begin(9600);<br> pinMode(13, OUTPUT);<br> pinMode(7, OUTPUT);<br><br>}<br><br>void loop()<br>{<br> digitalWrite(13,HIGH);<br> delay(2000);<br> int moisture = analogRead(VAL_PROBE);<br> <br> Serial.print(&quot;Moisture = &quot;);<br> Serial.println(moisture);<br> <br> if(moisture &lt; MOISTURE_LEVEL)<br> {<br> digitalWrite(7,LOW);<br> digitalWrite(13,LOW);<br> delay(10000);<br> }<br> else<br> {<br> digitalWrite(7,HIGH);<br> }<br>}</p>
<p>Look at this for more power saving better than delay</p><p>http://www.rocketscream.com/blog/2011/07/04/lightweight-low-power-arduino-library/</p>
<p>Sir is it possible to have multiple pots of plants and each pot have independent sensors which will trigger according to the different water needs of each pot.example i have pot A B C D and if B needs water it is only the B water tube that will have water in it.Are we required to use one pump per pot or one or two pumps will do.coz its very costly.thanks..<br><br>hoping for your reply sir.thank you</p>
<p>It is possible of course but you would need to use more than one pump (pump for each sensor) or use electrically controlled valves to open and close the water tube to each pot independently </p>
<p>I am not an expert so please do not take my word for it, but I believe that you should be able to have one pump supply all of the water, and have a splitter at the end. You will need individual water controllers for each &quot;pot&quot;. As long as all the pots are not all being water at once, as the one pump would not be able to supply enough water, I think you would be fine.</p>
<p>Hi, There is another good modification that you should add. Imagine the case where the reservoir goes empty, your system would still run the pump and it would run indefinitely and eventually burn out (no water in the reservoir and the soil is dry so it will stay dry). A water sensor in the reservoir would be the idea and checking through the code. </p>
<p>Good to see jaykid that you came up with a solution of your own. I am happy to see people are taking the concept forward and trying to implement it in their own way. You should find out what is the current capacity of the sensor since the arduino pins are rated at 40mA only. Ideally the power circuit should be separated from the logic</p>
<p>Thank you very much for this tutorial! this is my first project I have built it and works great :) by far the easiest build from all the others!</p><p>I only had to adjust the MOISTURE_LEVEL part of code so it works to my needs. However I am a complete amateur in coding and have been trying with no success so far, but I am wondering if anybody could help with &quot;how to power the probe down&quot; because it could save alot of power if we only take a reading every few hours instead and would also stop the probes from creating electrolysis. Thank you everybody! I will keep trying!</p>
Hello sir , we are working on the same project. This article is a huge boost to our project. We would be very grateful if you could mail me @ sanketsir10@gmail.com all the details as in code and all the minor details as well. Thank you.
<p>Is the pump controller just your basic timer controlled water regulator?</p>
PLC am doing a project using moisture sensor, arduino uno, motor pump, 4 leds as the level indicator and buzzer to indicate the soil dryness. Please sir can you help me with the code and circuit diagram. My email is wizardmohammed@yahoo.com
PLC am doing a project using moisture sensor, arduino uno, motor pump, 4 leds as the level indicator and buzzer to indicate the soil dryness. Please sir can you help me with the code and circuit diagram. My email is wizardmohammed@yahoo.com

About This Instructable




More by AmitabhS:Automatic Plant Watering and Soil Moisture Sensing Arduino Projects 
Add instructable to: