Arduino Automatic Watering System for Plants Sprinkler

314,095

1,007

169

Published

Introduction: Arduino Automatic Watering System for Plants Sprinkler

About: 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 easier, we offer various development platform, mo...
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 !

Hydroponics and Indoor Gardening Contest

Second Prize in the
Hydroponics and Indoor Gardening Contest

Share

Recommendations

  • Clocks Contest

    Clocks Contest
  • Creative Misuse Contest

    Creative Misuse Contest
  • Oil Contest

    Oil Contest

169 Discussions

No. Powerbanks can only provide 5V. The pumps require between 9V to 12V to run properly.

0
user
TheS56

7 months ago

Hi, What language did you use? And do you have the schematic diagram of the project, i would like to see :)

1 reply

The code is written in C. The Arduino compiler/IDE accepts C and C++ as-is.

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

2 replies

This can be done with a single RTC. You can do this by having separate pumps for each pot OR one pump with separate solenoid valves for each pot. You can even use a multiport valve with a single pump. Chose the best setup based on cost & availability of the parts.

hi

i work in this project and i do simulation in proteus program after connect it with arduino .. so who i can found the library of proteus to soil mature sensor ...

i hope t solved my problem please ....

2 replies

Replace the soil moisture sensor with a variable DC voltage input(0-5V) in the Proteus simulation.

hello sir
sir unfortunately i selected this project for my final year i just saw your comment for help did you get the code of this project if yes then please help me please sir


please sir send me the code of this project its my final year project pleaseeeee sir please

hello sir

sit unfortunately i selected this project for my final year i just saw your comment for help did you get the code of this project if yes then please help me please sir

please sir send me the code of this project its my final year project pleaseeeee sir please

And one more thing. Does the code need changing if I use a different motor driver ???? Please answer. Its an emergency!!

Hello, you can using Arduino official board or other Arduino compaible mainboards. Thank you.

I Made This and added a few tweaks to it including Bluetooth Control.

DIY Arduino Automatic Plant Watering System

https://www.instructables.com/id/Sprout-Modern-Indoor-Self-Watering-Planter/

1. Instead of a L293D you can also use a MOSFET as a switch. L293D's are used for Bi-directional motor control & are more expensive than MOSFETs. Since the pump needs to turn in only one direction, a MOSFET is a better & more cost effective solution.

2. You can reduce the circuit size by using a smaller microcontroller like the Arduino Nano, Pro Mini,etc.

IMG_9914.CR2.jpgIMG_9744.CR2.jpgIMG_9771.CR2.jpg