Soil moisture sensor with Arduino ( Automatic watering plant)
Soil moisture sensor with Arduino( Automatic watering plant)
- Hello guys, Here we show you how to make "Water Irrigation System Using Arduino". As we see during summer season, most of the peoples are too lazy to water potted plants every day and plant will eventually wither if people go out on vacation
- or If there is too much water or the soil is constantly wet, there is not enough air pockets. This results in a limited oxygen supply and plants are not able to breathe. So Here is automatic plant watering system that can water plant in your absence using Arduino.
- This project is about building up a Automatic plants water irrigation whenever the soil moisture sensor sense soil is under watered/over watered then pump start/stop automatically and watering to plant.
What is Soil moisture sensor?:-
Soil moisture sensors measure
the volumetric water content in soil. Since the direct gravimetric measurement
of free soil moisture require removing, drying, and weighing of sample, soil
moisture sensors measure the volumetric water content indirectly by using some
other property of the soil, such as electrical resistance, dielectric constant,
or interaction with neutrons, as a proxy for the moisture content.
In soil moisture sensor we can detect moisture level of soil. so here we show that pins of sensor
1) VCC- +5 V 2) A0- Analog Pin 3) D0- Digital pin 4) GND - GND
Also we have Output LED if we detect over moisture than we see output LED is on. and potentiometer is changing a sensitivity of sensor.
Connection of Soil moisture sensor to Arduino UNO.
1) VCC- +5 V 2) A0- Analog Pin 3) D0- Digital pin 4) GND - GND
LCD display status of soil :-
Here, now we saw in LCD status of soil moisture sensor.
1.) When your plant thirsty than display on LCD that " I am Thirsty. I need a Water." after than water pump automatically start.
2.)When your plant have enough water than display on LCD that " I am Happy. My Tummy is full now." after that water pump automatically stop.
Connection of LCD to ARDUINO with I2C Module :-
Water pump needed for giving a water to plant according sensing data by sensor.
As we shown connection of Soil moisture sensor and relay module with ARDUINO UNO now we connect all components as figure shown.
Relay connection:- | Soil moisture sensor connection :- |
Input:- pin D4 of ARDUINO UNO | Output:- pin D3 of ARDUINO UNO. |
GND:- Ground | GND:- Ground |
VCC :- +5v | VCC :- +5v |
The connections for the relay is simple. We take a wire from the Water pump and cut it so that we have two separate wires just like it is shown in the picture above. Then we put one wire into the NO (normally open) pin of the relay, and the other wire into the COM (common) pin of the relay.
Description :-
As we show circuit diagram we connect all components and now your hardware is done and ready for uploading code How to upload a code as here provide siple code to you so u can do it by your selfđ
//put this code in the ide of arduino from this line
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
int val = 0 ;
void setup()
{
Serial.begin(9600);
lcd.init();
lcd.backlight();
pinMode(3,INPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
pinMode(6,OUTPUT);
digitalWrite(4,HIGH);
lcd.setCursor(0,0);
lcd.print("Irrigation System ");
}
void loop()
{
val = digitalRead(3); // soil moisture sensor output pin connected
Serial.println(val); // see the value in serial mpnitor in Arduino IDE
delay(1000);
if(val == 1 )
{
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,HIGH);
lcd.setCursor(0,1);
lcd.print(" PUMP ON ");
}
else
{
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,LOW);
lcd.setCursor(0,1);
lcd.print(" PUMP OFF ");
}
}
for any query Email to Innovativethnings@gmail.com
Comments
Post a Comment