loading

Ever wanted to keep your precious plants watered and know when they need water, when you are on a vacation or so?

This project uses and Arduino with Ethernet shield, to check the soil moisture level and when to water the plant.
The program measures the moisture level every 3 second and check it it is under a chosen threshold. If it is above, it measures 10 more time at find the mean along with the standard deviation to check if the plant needs to be watered. The current moisture level along with last calculated mean and standard deviation will be send to a web server, so it is possible to follow the plant.

Step 1: Parts List

These are the components needed for the project:

  • 1 x Arduino Uno
  • 1 x Ethernet Shield
  • 1 x RJ45 cable
  • 1 x Breadboard
  • 1 x External power source (9-12V)
  • 1 x MOSFET transistor
  • 1 x Diode
  • 1 x 9V battery
  • 1 x Peristaltic pump
  • 1 x Soil moisture kit (something like this)
  • Jump wires

Note that the different components can be of different types and working range. Make sure that yours work safely together (Though in this case, most does).

Step 2: Circuit Overview

Here is the overview of the system.
Please note that the Arduino and the 9V battery is on common ground.

Step 3: Configure the Program

Download the attached .ino file and open it.
Here you should note 2 key variables.

  • UPPER_TH
  • mac[ ]

UPPER_TH is the threshold which decides when the plant gets water. The higher the threshold the dryer the soil. the range goes from 0 to 1023 because of the A/D converter build into the Arduino. This sketch where build for a chiliplant, which does not need to much water. Thus, you might want to lower the threshold according to your plants need.

mac[ ] This is what your MAC adresse is for your Ethernet shield. You should change it to what i printed onto your board. If your board does not have one, simply make one up, as long it is not the same as some other device on you LAN.

Feel free to modify other parts of the program, like the MAX_DEVIATION, WATER_SECor other parts if needed.

Step 4: Configure the Router.

This step can be made into a big one and be a lot different depending on the manufacturer for the router, but i will try to keep it as short and simple as possible.
NB: connect you Arduino with your router and power before proceeding.

  1. Go to your browser and type in your routers IP-adresse (Typically 192.168.1.1 or 192.168.0.1) otherwise use google. The normal log in for a router is name: admin password: admin. Otherwise it should be printed on the router or in the manual.
  2. Go to your LAN settings and find something with DHCP Server and reserver a IP-adresse for your Arduino. You know you are dealing with the right device if your Mac adresse there is the same one found on the Arduino.
  3. Go to your WAN settings and the Port Forwarding settings. Here we port forward the port the Arduino is listing to (12345). Give it a name and select the port to be 12345 and the IP-adresse to be the one we reserved just above.
  4. You might want to disable your Firewall on the router for this to work.
  5. Now go to your browser and type http://"Your Reserved IP":"Port" (e.g. http://192.168.1.50:12345). Now you should see the webserver from the Arduino. Now find you WAN IP-adresse (can be done here) and paste that in, instead of your local IP-adresse. Note: Test this on a device that is not connected to your LAN.
  6. Note that something, like double NAT, will make it impossible to see the webserver outside of the LAN.

Step 5: Sum Up

You are now done. Hope it was useful to some, if you have any question will free to leave a comment.
I strongly recommend you to test it for a few days before going on a vacation or so, for safety reasons.

Have a good day and happy watering ;)

Blixt Development

<p>Hi,</p><p>I'm not able to upload the program to the Arduino when the Ethernet shield is connected....but when I tried it without Ethernet shield I was able to upload but the watering system is not functioning. The connections are done as per the circuit diagram. Can you please help me solve this?</p>
<p>Hi Swathimurali<br>Sorry for the late answer. <br>About uploading the program while the Ethernet shield is connected, you should be able to do it if disconnect the shield from the router while the program is uploading. </p><p>If i remember correct the watering system will not work unless it is connected to a router (but I may be wrong). Otherwise try to check some of the following: <br>1. Make sure your MAC address is configured to yours.<br>2. Make sure that the pump is connected correct and the 9V battery is charged<br>3. Try to lay the moisture sensor on the ground to see if it is the Standard Deviation function the keeps it from watering. <br></p><p>Otherwise try running in connected to the PC and write with the serial connection gives as output. <br><br>Best Regards<br>Blixt Development</p>
<p>This makes going on vacation so much easier!</p>

About This Instructable

862views

18favorites

License:

More by Blixt Development:Automated Watering System 
Add instructable to: