How to make an automatic irrigation and plant watering system using Arduino and soil moisture sensor | Step by step instruction
Automatic irrigation and plant watering system using Arduino and soil moisture sensor
Hello, welcome back. In this tutorial, I will show you how to make automatic irrigation and plant watering system using Arduino and soil moisture sensor. Also, we can control the water supply automatically through this system. This can be done in such a way that when the soil is dry, the motor automatically activates and when the soil gets wet, it becomes inactive again. Also, we can use this project for mainly Small gardens, flower gardens, or greenhouses. The soil moisture sensor is mainly used for this design. An LCD display is also used to monitor the soil moisture level. Also, you can also connect a motor pump or a buzzer to the relay here.
The process of this irrigation system
- Arduino UNO board x 1 — Amazon / Banggood
- Soil moisture sensor x 1 — Amazon / Banggood
- Relay module x 1 — Amazon / Banggood
- LCD display x 1 — Amazon / Banggood
- I2C module x 1 — Amazon / Banggood
- Battery holder x 1 — Amazon / Banggood
- Li-ion battery x 2 — Amazon / Banggood
- Jumper wires — Amazon / Banggood
- Foamboard — Amazon / Banggood
Step 1
Arduino UNO board
Soil moisture sensor

Relay module
LCD display
I2C module
Li-ion battery and Battery holder
Jumper wires
Foamboard
You can use foam board or cardboard.
Step 2

Step 3



Step 4


Step 5





Step 6




Step 7




Step 8



Step 9



Step 10
/*How to make an Irrigation system.
* This code creates by the SriTu Hobby team.
* http://srituhobby.com
*/
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C dis(0x27, 16, 2);
void setup() {
Serial.begin(9600);
dis.init();
dis.backlight();
dis.clear();
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);
delay(1000);
dis.setCursor(0, 0);
dis.print("IRRIGATION");
dis.setCursor(0, 1);
dis.print("SYSTEM IS ON ");
for (int a = 12; a <= 15; a++) {
dis.setCursor(a, 1);
dis.print(".");
delay(1500);
}
dis.clear();
}
void loop() {
int value = analogRead(A0);
Serial.println(value);
if (value > 950) {
digitalWrite(2, LOW);
dis.setCursor(0, 0);
dis.print("MOTOR IS ON ");
} else {
digitalWrite(2, HIGH);
dis.setCursor(0, 0);
dis.print("MOTOR IS OFF");
}
if (value < 300) {
dis.setCursor(0, 1);
dis.print("MOISTURE : HIGH");
} else if (value > 300 && value < 950) {
dis.setCursor(0, 1);
dis.print("MOISTURE : MID ");
} else if (value > 950) {
dis.setCursor(0, 1);
dis.print("MOISTURE : LOW ");
}
}
Code explanation
Step 11



Step 12




Enak main feel sama lihat history bang… biar menangnya konsisten.
Thank you
LCD display does not display anything, kindley help me.
Please check your jumper wires or LCD.
Is a nice project.
Can you a integratet DHT11 and a FAN please. This make it than compleet. Thanks friend
Ok sure
Thank you…
It’s working fine, can you please use esp8266 together with arduino and integrate DHT11 and Fan, rain sensor…..
This sounds great and I’m looking forward to making it for my plants. How would you add multiple sensors to the project so you can water more than a single plant? Thanks for the tutorial.