An easy way to conserve water is Agriculture sector is to install soil moisture sensor so we decided to implement an Automatic Plant Watering using Soil Moisture Sensing technique as implemented by Amitabhs over here in the instructable article. Solved one error & presented over here a working tested code.
Water harvesting is the backbone of farming industry. As per India is censured lot of water gets wasted due to many regions .So the requirement of water for farm can’t get fulfill. Due to the improper maintenance and wrong water harvesting plan the irrigation of water is also the main problem. Day by day the rain percentage is also becoming less and so a very small amount of water is available for the farming. Most of water percentages also get wasted due to lack of proper attention by farmer. - Read more regarding water irrigation system http://www.dnatechindia.com/Projects/Synopsis-and-Abstract/Automatic-Irrigation-System.html
Circuit Diagram for Automatic Plant Watering using Soil Moisture Sensing |
Over here we have implemented a low cost solutions without LCD. We have used Arduino Uno as the heart of the circuit.
A soil moisture sensor detects the percentage of water in the soil and accordingly turns ON/OFF the pump. We have used a relay over here the relay can then be used to turn ON/OFF any pump or motor that you require. The output of the soil moisture sensor is analog so it is given to analog pin i.e. A0 pin of the arduino which then compares internally with the set level & then accordingly turns ON/OFF the relay.
In the project implemented by Mr Amitabh he has set the level to 250 i.e. if the soil moisture percent goes below 25% the pump will turn ON & will turn OFF once it goes above 25%.
Components Used
- Arduino Uno
- Soil Moisture Sensor
- 30 Ampere Relay Board
- 12V/1Ampere Adaptor
- 1:1 Female to Female wire
Relay is off when Water is present in Soil |
Relay is on when water is not present in Soil |
You can Download the code from Here
/*
Automatic Plant Watering using Soil Moisture Sensing Technology
Tested By Amol Shah from DNA Technology : http://www.dnatechindia.com/
For https://makeelectronicprojects.blogspot.com
*/
const int VAL_PROBE = 0; //Analog pin 0
const int MOISTURE_LEVEL = 250; // the value after the LED goes on
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
pinMode(7, OUTPUT);
}
void LedState(int state)
{
digitalWrite(13,state);
}
void loop()
{
int moisture = analogRead(VAL_PROBE);
Serial.print("Moisture = ");
Serial.println(moisture);
if(moisture > MOISTURE_LEVEL)
{
LedState(HIGH);
digitalWrite(7,LOW);
}
else
{
LedState(LOW);
digitalWrite(7,HIGH);
}
delay(500);
}
I would like to meet Arduino Followers at Trivandrum , Kerala . Pls call 09496366484
ReplyDeletehow can i get the lm69 soil moisture sensor library for proteus please help me.
ReplyDeleteHello,
ReplyDeleteHow could i print on/off on display using your code.
Could I get your entire code.
This code is not understandable for me.
I'm looking forward to it.
Thanks.