Introduction: Automatic Irrigation System Using Arduino

Picture of Automatic Irrigation System Using Arduino

Hello Everybody! I am Back with another Instructables!!

In this project i will be demonstrating Automatic Irrigation System with integrated temperature sensor which irrigates or waters your plants automatically. This system is best suited for drip irrigation technique.

A Moisture sensor is used to read the Moisture content of the soil. The LM35 Temperature Sensor reads the ambient temperature.

This System will help you to irrigate your backyard Garden or your Indoor Garden automatically and you need not worry about watering your favorite plants in your busy schedule.

An LCD is provided to monitor the Soil Status, Ambient Temperature and Status of Water supply(Water Pump).

Arduino UNO is the brain of this system and all the sensors and display devices are controlled by it.

I basically got the Idea of this project from Teacher in my University and could bring the Idea to Reality with the help of these Guys. I am really thankful to them.

http://www.electroschematics.com/6519/simple-soil-...

https://www.instructables.com/id/ARDUINO-TEMPERATUR...

https://www.instructables.com/id/Soil-Moisture-Sens...

https://www.instructables.com/id/Connect-A-16x2-LCD...

https://www.arduino.cc/en/Reference/LiquidCrystalS...

Step 1: COMPONENTS USED

Picture of COMPONENTS USED

The following Components are used in this project__________________________________________

* Arduino UNO

* Soil Moisture Sensor ( with LM393 Driver)

* LM 35 Temperature Sensor

* 16x2 LCD Display

* Water level Switch

* Speaker

* 5V Relay

* BC547 or similar NPN Transistors

* Resistors ( Refer Circuit Diagram)

* Potentiometer ( 10Kohm )

* 5mm LED

* 1N4007 Diode

* Terminal Strips and Screw Terminals

* PCB

Step 2: Understanding the Working....

Picture of Understanding the Working....

The Soil Moisture Sensor values depends on the resistance of the soil. The LM393 Driver is a dual differential comparator which compares the sensor voltage with fixed 5V supply voltage .

The value of this sensor varies from 0- 1023. 0 being most wet condition and 1023 being very dry condition.

The LM35 is a precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius temperature. The LM35 is operates at -55˚ to +120˚C.

The Water level Switch Contains a Reed-Magnetic Switch surrounded by a floating magnet. When water is available it Conducts.

The Arduino reads the status of the soil using Soil Moisture Sensor. If the Soil is DRY it does the following Operations....

1) Checks for the availability of water using water level sensor.

2) If the water is available, the Pump is turned ON and is automatically turned OFF when sufficient amount of water is supplied.

The Pump is Driven by a Relay driver circuit.

3) If the Water is Unavailable, you will be notified with a sound.

The Status of soil( Dry, Moist ,Soggy) , the temperature and the status of Pump is displayed on the LCD Screen.

Step 3: Building Up the System( Circuit Construction)

Picture of Building Up the System( Circuit Construction)

Pleas refer the circuit diagram and build the circuit accordingly.

The Arduino Connections are given below._________________________________________________________

ARDUINO PINS

0______________________________N/C

1______________________________N/C

2______________________________LCD-14

3______________________________LCD-13

4______________________________LCD-12

5______________________________LCD-11

6______________________________N/C

7______________________________WATER_LEVEL_STATUS_LED

8______________________________N/C

9______________________________SPEAKER

10_____________________________N/C

11_____________________________LCD-6

12_____________________________LCD-4

13_____________________________PUMP_STATUS_LED)_AND_TO_RELAY

A0_____________________________SOIL_MOISTURE_SENSOR

A4_____________________________LM35_(TEMPERATURE_SENSOR)

LCD-1_____________GND

LCD-5_____________GND

LCD-2_____________+Vcc

LCD-3_____________LCD_BRIGHTNESS

___________________________________________________________________________________________

I have built this project on the Printed Circuit Board. It can also be constructed on Breadboard.

I have designed the Arduino shield for this project and all the components like Led, relay, etc are embedded in the shield itself.

You can refer to my video and instructables on how to make a PCB in this link..

https://www.instructables.com/id/PCB-ETCHING-TONER-...

Step 4: Upload the Code to Arduino

Picture of Upload the Code to Arduino

The Arduino Code is written by me for the specific task of Automatic Irrigation.

This Software is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Procedure

1 Connect the Arduino to your computer.

2 Download the attached code and open it.

3 Select your COM Port and your Arduino Board from Tools Option.

4 Click Upload Botton.

____________________________________________________________________________________

The temperature id calculated using the following formula
X = ((Sensor value) * 1023.0)/ 5000

Temperature in Celsius =( X/10)

If you want to change the sensitivity of the sensor for different soil conditions alter the values of the 3 conditions commented in the Code.

Step 5: Testing and Implimentation

Picture of Testing and Implimentation

The following steps can be followed to test the project.

1) Connect the Arduino to power supply (5V) via USB or External power source.

2) Dip or bury the moisture sensor in the soil. Better place the sensor near the roots of plants for accurate measurements. Do not short the terminals.

3) Connect the Water pump to the Relay (N/O and Common terminals) and switch ON the mains. Refer the Circuit for connection details and pin out. WARNING: HIGH VOLTAGES . UNDERSTAND THE WIRING BEFORE YOU PROCEED.

4) The temperature sensor can be placed on the PCB itself or on the soil. Do not immerse the sensor in water.

Congratulations!!! You have successfully set up the system for irrigating your plants automatically!!!.

5) The potentiometer can be varied to adjust the LCD brightness.

If you come across any doubts feel free to let me know in the comments section.

THANK YOU

HS Sandesh (a.k.a THE TECHNOCRAT)

Comments

AnjaliK13 (author)2017-09-08

what is use of LM35 Temperature sensor

AnjaliK13 (author)2017-08-15

which motor is used in this project

The_Technocrat (author)AnjaliK132017-08-15

You can Connect any motor to the relay.
Make Sure your relay is Rated for the Power Rating of your Motor Pump.

ii_DiGital_ii (author)2017-07-16

another question where is the water level switch, and where can I get the switch and the pump from?

U can get the pump from aquarium shop.. or any hardware store..Ask for fountain pump.

ii_DiGital_ii (author)2017-07-14

I have read your instructables and I really thank you for this great effort.

Just one question that I wanna raise: Why do we need LM393?

Hello,
Lm393 is a op amp comparator. It is used to measure the sensor resistance and output the proportional voltage (between 0v-5v). This output is fed to analog input of arduino.

"The Soil Moisture Sensor uses capacitance to measure dielectric permittivity of the surrounding medium. In soil, dielectric permittivity is a function of the water content. The sensor creates a voltage proportional to the dielectric permittivity, and therefore the water content of the soil."
I am sorry . I mentioned resistance instead of capacitance in other comment.

Thanks.

Just one more thing: so the moisture sensor output is voltage, right???

then can`t send the signal directly to the arduino without using LM393

since Arduino itself has ADC in the analog pins???

Sorry for troubling you ^_^

Not exactly.. the moisture sensor does not output any voltage.. it's capacitance varies with moisture..
Depending on that capacitance, The lm383 output voltage varies.
The ADC on Arduino can read voltage.. so the lm393 is used.

No troubles..U can leave a reply anytime.

Thanks.!

Finally ( ^_^) I understood it, thanks man.

cobraking1223 (author)2017-02-20

please give me coding and connections

Please look for the code in step 4. The file name is " automatic_irrigation_system.ino"
Circuit connections are given in step 3.
Any doubts reply .
Thanks.!!

About This Instructable

3,141views

29favorites

License:

More by The_Technocrat:POWERFUL ELECTROMAGNET (5KG LIFTING)LED CUBE 4X4X4 USING ARDUINO UNOMake a Fidget Spinner!
Add instructable to: