loading
Last month, Elecrow have left from the original office and moved to a new office. We will miss our original office where we worked so hard for more than two years, we will miss everything here, the desks, the windows, and those potted plants, that we cared for more than two years with our neighbor.
  Our neighbor, a design team, led by a man named Kimi, we had so many memories together in the difficult early days. Together we planted some potted plants in the balcony, to help us release when tired after a whole day hard working. But as we leave, Kimi team are so careless and they often go out for some shows, we all worry about that these plants will be thirsty as we leave.
  So, We decided to design an automatic watering system to ensure that these plants are still alive when we come back here the next time. It monitor the soil humidity of each potted plant, if the humidity too low, the pump automatically start to spray, in this way, Kimi team do not need to water those plants every day.

I have recorded a video for reference: http://v.youku.com/v_show/id_XNjQwNDk0ODg4.html

First, we prepared the following modules(all parts can find in www.elecrow.com):
1. Soil Moisture Sensor. Each flowerpot need such a soil moisture sensor to collect the humility data. the best advantage of this kind of sensor is, it is really cheap, while the disadvantage is that it may corrode after long-term usage. Of course, you can also use a better humidity sensors, such as the capacitive soil moisture sensor, but you may need to pay ten times the price.

2. A small pump plus a driver. A driver is to provide enough current for the pump, my application needs a spray distance about one meter, so this pump is enough. But if you need to make a system that needs a large spray range, you may need a larger pumps, or even a pressurized device to make the projectile even farther, such as the watering system in a tea garden.

3. Servo and Rotating Platform, to take the water pipe to water the target plot. In order to control the spray distance and angle, 2 servo wold be necessary.

4. Of course, the controller is a must, i use the Crowduino platform, plus anExpansion Board for easy connection.

5. Water pipes and the power supply is essential too, and, some wires would also be help.

OK, all things prepared, then let's get started.

Step 1: Install the Soil Moisture Sensor

First, we connect the humidity sensors to the Crowduino via the expansion board. Plug the expansion board to Crowduino, and connect the sensors to the analog ports A0~A2 as the image. Each pot needs such a sensor to collect the moisture information, in my project, i use 3 pcs of this sensor. If you need more, connect the other sensors to the Crowduino analog ports too. You can use 5 sensors at most.

  Note that if you found the cables too short, you can use the extension cable to extend the length. Notice that you should ensure the connection right, just as the third image.

Plug the sensor into the soil, the sensor would report the moisture information to Crowduino: Hey, this pot is too dry, you need to do something! This kind of soil moisture sensor is cheap and stable, but it may corrode after a long-term usage such as one year, you can also use other soil moisture sensor such as the capacitive moisture sensor, but it may cost you much more.

Step 2: Build the Servo Rotating Platform

  In this step , i need to installed the servos onto the rotating platform, this platform can take the sprinkler pipe to rotate 160 degrees in horizontal and vertical direction.

  When installing the servo and bracket, in order to locate the pot location, you need to adjustment the "zero" position. First install the  program MedianValueSetting  to your Crowduino and make it run. And then install the servo_1 (the servo to control the horizontal position ) to the same direction of the base,  and the servo_2(the servo to control the vertical position) vertical to the base bracket as the image.

Step 3: Install the Pipe & Pump.

  Two pipes are needed in this application, one for the water output and the other one for water input. First, plug one end of the water output pipe to the outlet of the pump, and fix the other end onto the rotating platform, i use the bonding cable to fix it, you can use any thing such as glues.  And then, plug the water input pipe to the inlet of pump, and the other end to a water tank, such as a mineral water bottles.

  Then, connect the power supply of the pump to the outlet of the driver board, Note that connect the “+”pole(with red mark) to “OUTC” of the driver, and “-” to “OUTD”.

Step 4: Connect Pump Driver to Crowduino

  Connect the inputs and power supply ports of the driver to Crowduino, connect these pins as following:
  Driver     <--> Crowduino
  INC        <-->  D6
  IND        <-->  D7
  VCC       <-->  VIN
  GND       <-->  GND

  Power the Crowduino via the DC Jack, connect a 9v power supply to this port. Up to here, the hardware of this automatic watering system has been created.

Step 5: Fix the Watering System Onto a Platform and Place It

  To fix this system. I mounted the whole system onto a paper box that we used to packaging our products. Of course, with screws or glues, you can install them onto any platform you want. But you need to adjust the distance and location in order to make it works with the firmware. In my application, i put the system with my pots as on the image, to make sure that the 3 plot plants can be all sprayed (Max Distance<30cm, and Angle <160 degree). 

Step 6: Adjust the Parameters Depending on the Application

  Then we wrote the firmware, you can directly download the firmware: AutomaticWatering.zip . After downloading the program, open the soucecode, we need to set three main parameters:
1.servoPosition_x:
  The servoPosition_x  tells the servo how to rotate when spraying water to the flowerpot, it represents the pots coordinate positions relative to the “zero position” of the servo as in the image;
   In my application, i set 3 flowerpot, the servoPosition of flowerpot_1  is 20, it means the flower_1 center position is 20 degree relative to the "zero position", In this way, i set the flower_2 and flower_3 to 60 and 105 degree.

2 .Watering humidity threshold.
  The humidity sensor reports to humidity information of each plot to Crowduino in analog data range from 0 to 1023. greater data means the plot more moist . So we set the threshold to determine when to watering.  For example, i sent the threshold_1 to “105”, that means if the sensor reported data lower than 105 for some time, this Crowduino would think ”plot_1 needs some water, i should control the pump to watering the plot.” 
  As my test , Set the humidity threshold to 100~400 would be good, you can also determine the threshold depends on what kind plants, that is, for those plants that prefer a moist environment, a greater threshold number would be better, for those plants that prefer dry, such as the cactus, a litter threshold number would be better . If you want to get the current sensor reported data for your soil, there is also a moisture monitor program to help you.

3. Watering time
    This parameter tells the Crowduino how long to watering that pot. that is, if this is a large pot, you would need the pump watering this pot for a relative long time, if it is a small pot,  a short time would be OK. 

        

Step 7: Download the Firmware and Have a Try!

  After setting these parameters, upload  the firmware to Crowduino and have a try, maybe you would need to modify the parameters some times to make the system perfects works with your application.
       Have a Nice time !
<p>I managed to assemble the plant watering robot. some questions hope you can help me.</p><p>Regarding the hardware,</p><p>I'm using the arduino uno. For ind and inc connection to D6 and D7, there are three D7 three 3 D6 pins in a single white cluster, i'm using a female to female jumper wire connection, which pin of the 3 should i connect to or it doesn't matter. </p><p>Regarding the code, i'm uploading using the arduino IDE and the USB connection to load the program. </p><p>When loading the programs , i get the following errors: </p><p>1) automatic watering<br></p><div>Error:<p>exit status 1</p><p>'pos' was not declared in this scope</p><p>2) Moisture monitor program</p><p>Cannot create sketch</p><div>File name moisture monitor program.ino is invalid: ignored<p>java.io.IOException: No valid code files found</p><p>Thank you!</p><p>Sze Chong</p></div></div>
<p>Sharing the reply from elecrow here for the benefit of others:</p><p>Regarding the programs, add int pos ; on the top of void setup() ,like as bellow:</p><p></p><p> And I attached a new moisture monitor program code file to you.</p><p>Regarding the hardware:</p><p>The white cluster have three pins of D6 or D7:</p><p></p>
<p>May i know to which port should i connect the servo motors from the rotating platform</p>
<p>Can you please send me the code ? i do a research on this topic so please if you can send me the code via email , its better and very thankful to you .</p><p>e-mail- rizwanzubair36@gmail.com</p>
<p>H&iacute;,</p><p>Could you please send me the code. Very nice project.<br>cbarneaud@outlook.com</p>
<p>can you send me the code</p><p>email: jamalh34@icloud.com</p>
<p>Can you please send me the code ? i do a research on this topic so please if you can send me the code via email , its better and very thankful to you .</p><p>e-mail- shehanpalihawadana2@gmail.com</p>
Could you send me the code? Please<br>Victor.b.r.2.4@gmail.com
<p>can you send me code pls?<br>antonio.bartolic@gmail.com</p>
<p>can you send me code plsss</p><p>tamilarasank96@gmail.com</p>
the links to the required material on the escrow sites seems to be all broken when i click on them return a 404 error. Anyway i can get escrow to deliver the entire pack of required materials to me?<br>Otherwise i have a few question. What are the actual search keywords for each of the items. Especially the small servo is it es08a mini?<br>What is the version of the crowduino if not what are other micro controller we can use that will be compatible with the code. <br>Is the code everyone referring to same the zipfiles in the documentation or have to request from author separately?
<p>can u send me code</p><p>vamsibv4@gmail.com</p>
<p>can you send me code please? <br>areej-anani@hotmail.com<br>I need it very fast as you can</p>
<p>send me the code jayesh.koli9@gmail.com</p>
<p>can someone please send me the code </p><p>suryatejdatla96@gmail.com</p>
<p>i need some help. I'm making this project using Arduino uno and breadboard. Can someone help</p>
<p>can you please sent me the code.</p><p>saruhasan1998@gmail.com</p>
<p>Is there any way to prevent the sensor from corroding?</p>
.
<p>Can u please send me the code</p><p>uka_040184@yahoo.com</p>
<p>can u help us out..?we are using an arduino,2n5551 transistor,1kohms resistor,12 volts water pump, 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>thiis is my email addresses:</p><p>gina.henoguin143@gmail.com or ginahenoguin@yahoo.com</p><p>thanks..</p><p>hoping for your response...</p>
<p>we also use breadboard</p>
<p>Just want to say thank your code. I used part of it and created my own. (Mainly the average sampling.)</p><p>This one is to only control solenoid valves and water based on moisture of each plant.</p><p>Anyway, here it is: <a href="https://github.com/oleost/WaterSystemArduino" rel="nofollow">https://github.com/oleost/WaterSystemArduino</a></p>
Can u please send me the code​<br>Jo-oody15@hotmail.com
<p>Hi , I like this project so can you send me code PLEAS ?!</p>
<p>my emil :</p><p>sumayah.monti@gmail.com</p>
<p>The moisture monitor program is not opening...</p>
<p>Hi. Can I add a LED Shield to monitor the moisture level? Also, can I use Arduino Uno for the sketch?</p>
<p>Of course, Crowduino is an Arduino compatible board.<br>add a Led shield/bar to show the moisture level is a good idea.</p>
'Pos' was not declared in the scope there is a error ...what should i do...
<p>I had the same problem. Seem to be a firmware issue. Try downloading Arduino version 1.0.2 and try again. Did the trick for me</p>
<p>I have problems with corrosion with this type of sensor. Is possible to get capacitive sensor somewhere? Also in my case happened after some time of use that gear pump stopped working because plastic gear get lose between shaft motor and gear. I could hear the motor running but there was no water flow. I replaced pump with submersible brushless from ebay and works fine. Next time I'm gonna make similar automatic watering system like this: http://daisy.si/</p>
<p>Hi, can I change the program to make it face only one plant, having only 1 soil moisture sensor and not have the servo rotating platform? If its possible, can you please help to send the changed code to my email thank you, i am doing a similar project like this, would really appreciate your help.</p><p>my email is shrixd@gmail.com</p><p>Thanks!</p>
<p>shricharan if u get the code pls forward to me also.....</p><p>mail: senthilsarves@gmail.com</p>
<p>hey Shricharan , does the admin sent you the codes for 1 soil moisture sensor ?? can i also have that one ?? thanks</p>
Unfortunately I have yet to receive it, I'll send it to you if I get it
<p>Hi userph and Shricharan.. can anyone of you send me the codes for 1 soil moisture without the servo to my email ovuegbec@gmail.com</p>
<p>Hi</p><p>Can you please send me the codes for this project at</p><p>nikita01saxena01@gmail.com</p>
<p>can i get the image for the connection?</p><p>emunz07@gmail.com</p>
<p>can we use this for a garden istead of indiviual pot plants???</p>
<p>hello. i want to do this as my project can u help me???plz can u send me the codes and project details to my mail.plzzzz</p><p>mail id:thanoojarao@gmail.com</p>
<p>Hi ,I want to try this system . Can somebody send me the codes ?anaflores012.af@gmail.com</p><p>Thanks for the help !</p>
I am weak in coding , really need the code . Please anyone send me the code . Thank you ! <br>My email id - vatsasayali@gmail.com
<p>Hi I'm interested in this project. Is it possible to change the codes to face only one plant without the servo. If possible can i get the codes to my email. ovuegbec@gmail.com Thanks.</p>
<p>Hi. Can you send me the codes?</p><p>Here's my e-mail.</p><p>yahgumi@gmail.com</p><p>Good day :)</p>
<p>please, can i ask for the codes? heres my email...</p><p>renz_nangkil@yahoo.com</p>
Hi i am interested with this project .. can you email me the codes ? thanks .<br>jazz.recupero@gmail.com
<p>hi. i am interested on this project can i ask for the code of this project? can you send it to my gmail? my gmail is joanna.zubiaga@gmail.com</p><p>thank you! :)</p>
<p>sir,in my project of smart sprinkler ,the sprinkler should automatically get on for a set duration(for ex- if i set the timer on for 5-6 am everyday the sprinkler should get on automatically on the assigned days.)So, can it be done using this project or i have to separetely use a RTC(real time clock module for arduino.)??Pls reply to my mail namorohan@gmail.com</p>
<p>anyone got the code? if so please send it to nicosaga@gmail.com thanks!</p>

About This Instructable

262,799views

971favorites

Bio: Elecrow is an open hardware facilitation company based in Shenzhen. We integrate resources to serve new era of innovation. To make your making and innovation ... More »
More by Elecrow:DIY Halloween Haunted House (Arduino Project) Arduino sunflower - An electronic sundancer Electric fingerprint lock- Arduino compatible 
Add instructable to: