Introduction: Arduino Automatic Watering System for Plants Sprinkler
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.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
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:
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 !
Second Prize in the
Hydroponics and Indoor Gardening Contest
Participated in the
Participated in the
Build My Lab Contest
1 Person Made This Project!
- ginSlaw06 made it!