Description: In this project we are handling Water pump through Soil Moisture Sensor.When Soil is wet pump is OFF and when Soil becomes dry then your water pump is ON and your field is now wet.Here we show very Basic Explanation of Smart Irrigation System or can see our video as well for Better understanding.This could be your very first step to start with Smart Irrigation System project understanding and more.It is assumed that you already have downloaded latest version of Arduino IDE. If not , you can download it from here .Click For Downloading- > Arduino IDE.
Components: Arduino -UNO,Soil Moisture Sensor,Relay Module,Water Pump,Battery(9V).
Pin Diagram: Do the following connection which is shown in the image and also we had provided a chart for a better understanding.
Step 2:Open Arduino.ide and copy paste the below code
Step 3:After copy paste. Select right Board that is Arduino-UNO and right com Port which you have plug in and then compile and Upload code to arduino.
Step 4: Dip your Soil Sensor in wet soil first and after that open your Serial Monitor for your output.Along with that just notice your water pump which will be OFF.
Output on Serial Monitor will appear as shown in the Image and it will be negative because we have set output value <0 when output pin which is pin 4 is high.
Step 5: Now remove soil moisture sensor from wet soil and dip it into dry soil and after that open your serial monitor and you will see the readings and it will be opposite of the previous reading.Along with that you will notice that water pump which was off is now ON automatically.
Your Output value will turn to positive when you execute Step 5.