Efficient Plant Care: Arduino-Based Automatic Watering System

Hello everyone, welcome back to our website! This time, we’re presenting an excellent project: the automatic plant watering system. Through this project, we employ technology to nurture plants automatically. After a month of implementation, we observed noticeable improvements in the plants’ growth.

Here, we’ll be presenting our comprehensive research process, detailing how we developed and achieved our results. If you’re interested in creating your own smart irrigation system using the Arduino platform, follow along with our article. We’ll provide all the necessary information, from the construction phase to the coding aspect. Let’s dive right in without any delay and get started.

Automatic plant watering System Introduction

Below are a selection of plants housed in pots equipped with sensors and a water dispensing mechanism. These sensors monitor soil moisture levels and ensure an optimal water supply within the pots. When the plants necessitate water in this intelligent irrigation setup, a water pump activates, delivering precise amounts of water. Once the plants receive the appropriate water volume, the water pump automatically turns off.

This system functions as an automated watering system for plants, utilizing soil moisture sensors capable of detecting moisture levels in the soil. These sensors are linked to a relay mechanism, activating the water pump as needed to maintain ideal moisture levels in the soil.

The smart irrigation system represents an innovative and advanced approach to irrigation, significantly reducing the need for manual labor and saving time among other benefits. In this system, we’ve selected three distinct plants, each with varying water requirements. The “snake plant” is one of the chosen plants, known for its minimal water needs – it can thrive without daily watering and can survive for over two months even in winter without water.

Another plant under consideration is the “sadabahar” (periwinkle), necessitating daily watering. The third plant, the cordyline, falls between these two extremes in terms of water requirements.

For the water source, we’ve incorporated a water pump within the system. Additionally, we’re developing a water level detector for the reservoir, displaying the remaining water volume on the screen we’ve integrated into the setup.

Presently, we are in the process of calibrating all the sensors based on specific requirements. Each plant sensor has distinct threshold values, providing varying readings depending on the soil conditions. The system will display essential information such as soil conditions for all sensors and the water level of the water source on the 16X2 display.

Construction of Automatic plant watering system

In order to create this remarkable Smart Irrigation project, specific components need to be connected and assembled in a particular configuration. To begin, we’re sharing the list of required components.

Components Required

Arduino Nano – 1 unit
Three soil moisture sensors – 3 units
Three 5V water pumps – 3 units
Wires
Universal prototype PCB board
Water pump compatible piping
Three plant pots
16×2 Display
Ultrasonic sensor
10k Potentiometer
Berg strip

Construction:

Initially, produce a PCB using zero PCB following the provided circuit diagram.

Subsequently, attach all the soil moisture sensors. Once the sensors are connected, monitor their output through the serial monitor. You should observe varying values ranging from 0 to 1000.

Following this, proceed to link the display and the relay that will activate the pump. Connect the mini water pump to the relay according to the circuit diagram.

Automatic plant watering Circuit Diagram

Smart irrigation Code / Automatic plant watering Code


const int trigPin = 9;
const int echoPin = 10;
long duration;
int distanceCm, distanceInch;
#include // initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs =8 , en = 7, d4 = 3, d5 = 4, d6 = 5, d7 = 6;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
// put your setup code here, to run once:
pinMode(A0, INPUT);
pinMode(A1, INPUT);
pinMode(A2, INPUT);
Serial.begin(9600);
pinMode(2, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
lcd.begin(16, 2);

}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distanceCm= duration*0.034/2;
distanceInch = duration*0.0133/2;
int soil_moisture = analogRead(A0);
int soil_moisture_2 = analogRead(A1);
int soil_moisture_3 = analogRead(A2);
Serial.print(soil_moisture);
Serial.print(” “);
Serial.print(soil_moisture_2);
Serial.print(” “);
Serial.println(soil_moisture_3);

int z= map(soil_moisture, 0, 1023, 100, 0);
int z_2= map(soil_moisture_2, 0, 1023, 100, 0);
int z_3= map(soil_moisture_3, 0, 1023, 100, 0);
//Serial.print(z);
//Serial.print(” %”);
//Serial.print(” “);
//Serial.print(“Distance: “);
int a = map(distanceCm, 0, 17, 20, 0);
//Serial.print(distanceCm);
//Serial.println(” Cm”);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(“SM1”);
lcd.setCursor(0, 1);
lcd.print(z);
lcd.setCursor(3, 1);
lcd.print(“%”);
lcd.setCursor(6, 0);
lcd.print(“SM2”);
lcd.setCursor(6, 1);
lcd.print(z_2);
lcd.setCursor(9, 1);
lcd.print(“%”);
lcd.setCursor(13, 0);
lcd.print(“SM3”);
lcd.setCursor(12, 1);
lcd.print(z_3);
lcd.setCursor(15, 1);
lcd.print(“%”);
delay(300);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(“WATER LEVEL”);
lcd.setCursor(12, 0);
lcd.print(a);
lcd.setCursor(14, 0);
lcd.print(“Cm”);
delay(300);
if(soil_moisture>500)
{
digitalWrite(2,LOW);
}
else
{
digitalWrite(2,HIGH);
}
if(soil_moisture_2>280)
{
digitalWrite(11,LOW);
}
else
{
digitalWrite(11,HIGH);
}
if(soil_moisture_3>700)
{
digitalWrite(12,LOW);
}
else
{
digitalWrite(12,HIGH);
}
}

Before establishing the connection, ensure that the provided code is uploaded to the Arduino. Making the connection prior to uploading the code might cause damage to the GPIO pins.

Working on automatic plant watering system project

The functionality of this smart irrigation system is both straightforward and fascinating, divided into three key segments: input, processing, and output. For input, we utilize a soil moisture sensor and an ultrasonic sensor. The soil moisture sensor’s role is to identify the moisture content in the soil, while the ultrasonic sensor is employed to gauge the water level within the reservoir, enabling us to efficiently water the plants.

We’ve conducted research on three distinct plants, each with unique water needs:

1. Periwinkle (sadabahar) requires daily watering. It’s a small plant with green leaves and purple-pink flowers.
2. Cordiline needs watering twice a week, but this frequency may vary based on weather conditions. In winter, it can survive with just one watering per week.
3. Snake plants’ water needs change with the seasons. During summer, they can thrive with watering once every four weeks, while in winter, they can survive for 2-3 months without water.

Based on these varying water requirements, we’ve programmed sensors and an Arduino to cater to each plant’s specific needs. For instance, if a snake plant needs less water, we’ve adjusted the sensor to detect the lowest moisture level for it. Similarly, we’ve calibrated the sensors for the other two plants according to their individual water requirements.

The subsequent step involves integrating the ultrasonic sensor, which serves the purpose of detecting water levels within the reservoir and displaying notifications on the LCD screen. In our automated plant watering system, we aim for complete automation to minimize human intervention. The ultrasonic sensor consistently checks the tank’s water levels and relays this information to the LCD display. Additionally, a buzzer can be connected to this setup. If you’re interested in incorporating IoT features, we have several other projects related to smart irrigation. You can refer to these projects for ideas on adding IoT functionalities to enhance the system.

PCBWay PCB Prototyping Services

The complete circuit has been constructed on a breadboard. As you’re aware, a breadboard setup isn’t optimal for this particular project. Hence, PCBWay provides a Rapid PCB Prototyping service designed for research endeavors. I advocate for PCBWay based on the ability to swiftly deliver your initial boards within a 24-hour timeframe, allowing for a faster project initiation.

The phase of prototyping stands as a pivotal period for engineers, students, and enthusiasts alike. PCBWay doesn’t just accelerate the production of your boards; it ensures accuracy and cost efficiency. This significantly cuts down costs and streamlines the development timeline for your electronic projects.

From 2 Layer PCBs to cutting-edge HDI and flex boards, PCBWay offers a wide range of PCB variations tailored to diverse functionalities and application domains. I’m truly impressed by the board quality, the prompt delivery, and the cost-effectiveness of PCBWay’s services.

Advantages of smart irrigation / Automatic plant watering project

This system eliminates the need for daily manual plant watering, saving you time. The project autonomously waters the plant, reducing human effort.

Significantly conserving water, the smart irrigation setup delivers precise amounts required by the plant, avoiding excess water usage. It extends its utility to farming practices, presenting potential use at a corporate farming level.

Disadvantages of smart irrigation / Automatic plant watering project

It requires a constant power supply; it cannot operate without electricity.

Over time, the soil moisture sensor tends to corrode.

If the system malfunctions, it could potentially harm the plant.


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top