You are on page 1of 48

A Project Report

On

SMART PLANT MONITORING


SYSTEM
By

SUMEDH S. UGARKAR & KSHITIJ N. SINGH

Submitted in partial fulfillment of the


Requirements for the award of the Degree of

BACHELOR OF SCIENCE
In
COMPUTER SCIENCE

Under the esteemed guidance of


Mrs. Rashmi Varade
Head of Department

DEPARTMENT OF COMPUTER SCIENCE

SONOPANT DANDEKAR ARTS, V.S. APTE COMMERCE & M.H.


MEHTA SCIENCE COLLEGE
Sem V
(2023-2024)
SONOPANT DANDEKAR SHIKSHAN MANDALI’S
SONOPANT DANDEKAR ARTS, V.S. APTE COMMERCE & M.H.
MEHTA SCIENCE COLLEGE
(Affiliated to University of Mumbai)
PALGHAR MAHARASHTRA 401404

DEPARTMENT OF COMPUTER SCIENCE

CERTIFICATE

This is to certify that Mr. Sumedh S. Ugarkar & Kshitij N. Singh of T.Y.B.Sc. (Sem V) class has
satisfactorily completed the Project “Smart Plant Monitoring System”,to be submitted in the partial
fulfillment for the award of Bachelor of Science in Computer Science during the academic year 2023–
2024.

Date of Submission:

Project Guide Head / Incharge,


Department Computer Science

College Seal Signature of Examiner


DECLARATION

I, Mr. Sumedh S. Ugarkar & Kshitij N. Singh, hereby declare that the project
entitled, “Smart Plant Monitoring System”, submitted in the partial fulfillment for the
award of Bachelor of Science in Computer Science during the academic year 2023 – 2024
is my original work and the project has not formed the basis for the award of any degree,
associateship, fellowship or any other similar titles.

Signature of the Student:

Place:

Date:
ABSTRACT

The "Plant Monitoring System" project is an in-depth investigation of the Internet of Things (IoT)
technology's application in plant care and agriculture. Recognizing the importance of plants in preserving
ecological balance, improving air quality, and contributing to human well-being, this project aims to
provide a cutting-edge, adaptive, and easily accessible solution for plant enthusiasts, gardeners, and city
inhabitants alike.

This extensive project report chronicles the Plant Monitoring System's inception, design, development,
deployment, and evaluation. The system provides real-time plant health monitoring and care management
capabilities through a strong architecture of IoT sensors, microcontrollers, and user interfaces, attempting
to bridge the gap between technology and nature.

The Plant Monitoring System project exemplifies the revolutionary potential of IoT in supporting the
green world through an exceptional marriage of technology and ecology. This comprehensive project
report serves as a comprehensive guide for people interested in reproducing or further developing the
concept, ultimately promoting sustainable and ethical plant care methods in an increasingly
interconnected world.
ACKNOWLEDGEMENT

The successful completion of any task would be incomplete without mentioning all those
people who made it possible, the constant and encouragement, crowns the effort with
success. I wish many thanks to our Head of Department Mrs. Rashmi Varade for providing
guidance throughout the course and all those who have indirectly guided and helped us in
preparation of this project. I express my thanks to my project guide [ ] for this constant
motivation and valuable help through the project work.
I am indebted to my well-wishers and friends who encourage me in successful completion of
the project.

SUMEDH.S UGARKAR
KSHITIJ. N SINGH
TABLE OF CONTENTS

1 INTRODUCTION 6

1.1 Background 6

1.2 Objectives

1.3 Purpose, Scope, Applicability

1.3.1. Purpose

1.3.2 Scope 7

1.3.3 Application 7

1.4 Achievement 7

1.5 Organization of report 8

2 SURVEY OF TECHNOLOGIES 9

3 REQUIREMENTS AND ANALYSIS 10

3.1 Problem Definition 10

3.2 Requirements Specification 10

3.2.1 Node MCU ESP8266 10

11
3.2.2 Soil moisture Sensor

3.2.3 PIR Motion Detector Sensor 11

3.2.4 Relay Module 12

3.2.5 Jumpers 13
3.2.6 Water pump

3.2.7 Battery 13

3.3 PLANNING AND SCHEDULING 14

3.4 SOFTWARE AND HARDWARE REQUIREMENTS 15

3.4.1 Hardware

3.4.2 Software 15

3.5 PRELIMINARY PRODUCT DESCRIPTION 15


3.6 CIRCUIT DIAGRAMS
3.7 CONCEPTUAL MODELS

4 SYSTEM DESIGN 19

4.1 BASIC MODULES 19

4.1.1 Collect the required resources:

4.1.2 Node Mcu:

4.1.3 Realy:

4.1.4 Make a connection:

4.2 DATA DESIGN 19

4.2.1 Schema Design 19

4.2.2 Data Integrity

4.3 PROCEDURAL DESIGN


4.3.1 Data Structures
4.3.2 Logic diagram

4.4 ALGORITHM DESIGN

4.5 SECURITY ISSUES

4.6 TEST CASES DESIGN

5 IMPLEMENTAION AND TESTING


5.1 Implementation Approaches 23

5.2 Coding Details and Code Efficiency 23

5.3 Code for Node MCU ESP8266

5.4 Code Efficiency

5.5 Testing Approach 25

5.5.1 Unit Testing 25

5.5.2 Integrated Testing 27

5.6 Modifications and Improvements 29

5.7 Blynk IOT 30


6 RESULTS AND DISCUSSION 31

6.1 Test Reports 31

6.1.1 Problematic situation and Solutions 32

6.2 User Documentation 32

7 CONCLUSIONS 34

7.1 Conclusion 34

7.1.1 Significance of the System 35

7.2 Limitations of the System 35

7.3 Future Scope of the Project 36


Chapter 1

INTRODUCTION
1.1 Background

In an era of extraordinary technical developments and growing worldwide


awareness of environmental sustainability, the development of novel solutions for
effective plant management is becoming increasingly important. Climate change,
urbanization, and population increase are all influencing fast changes in the
world's ecosystems and agricultural landscapes. As a result, there is an urgent need
to use current technologies to improve plant health, production, and resource use.
In response to this demand, our project focuses on "Plant Monitoring Systems."
The importance of plants in our everyday lives is enormous. They are the
principal source of food for humans and countless other species, as well as
contributing to air cleaning, climate management, and biodiversity preservation.
Plants are also important components of agriculture, horticulture, and forestry, which
together create the foundation of our global food supply, economic success, and
ecological stability. Plant management, on the other hand, faces a variety of obstacles.
Providing optimal growth circumstances, identifying early symptoms of sickness or
stress, and properly managing resources like water and nutrients have all become
increasingly difficult tasks. Traditional plant monitoring approaches frequently lack
the precision, scalability, and real-time capabilities required to successfully address
these concerns. The "Plant Monitoring System" comes into action here.
Our project aims to bridge the gap between changing plant management needs
and modern technology capabilities.
We intend to provide growers, agriculturalists, researchers, and conservationists with
the tools they need to monitor and manage plants more effectively than ever before by
developing a sophisticated and integrated Plant Monitoring System.
This system combines sensors, data analytics, and remote monitoring techniques to pr
ovide real-time insights into plant health, growth, and environmental conditions.
The Plant Monitoring System project emerges from the growing need to
optimize plant care in both residential and agricultural contexts. As urbanization
continues, plant enthusiasts and professionals require innovative solutions to ensure
plants receive the ideal growing conditions. Traditional methods of plant monitoring
often prove to be insufficient, leading to suboptimal growth, resource wastage, and
plant stress.
This project was conceived to leverage modern technology and address these
challenges. By integrating sensors such as the DHT11 temperature and humidity
sensor, a soil moisture sensor, a relay module, and the Nodemcu ESP8266-12 CH340
microcontroller, this system aims to provide real-time data on environmental
conditions that are crucial for plant growth. The system will also enable remote
control of watering mechanisms, ensuring the maintenance of ideal soil moisture
levels. Additionally, it will offer an intuitive mobile application powered by the Blynk
platform, allowing users to monitor and manage their plants with ease.
1.2 Objective:
➢ To provide a real-time plant monitoring system capable of tracking and recording
environmental factors such as temperature, humidity, and soil moisture content in real
time.
➢ To develop an intelligent irrigation system that modifies watering schedules based on
real-time soil moisture data, preventing plants from being over- or under-watered.
➢ To provide a user-friendly interface that allows customers to remotely monitor and
operate their plants' irrigation systems using the Blynk IoT platform.
➢ Implement a low-cost, energy-efficient solution suited for a variety of indoor and outdoor
plant situations.

1.3 Purpose, Scope, Applicability:

⮚ Purpose:
The Plant Monitoring System was created to give plant lovers, gardeners, and com
mercial horticultural enterprises with an innovative and automated plant care soluti
on.This system is designed to provide ideal growth conditions and effective water
management, resulting in healthier and more vibrant plants.
1.3.2 Scope
The goal of this project is to design, develop, and implement a hardware and software
system. The Blynk platform, DHT11 temperature and humidity sensors, a soil moisture
sensor, a relay module, and the NodeMCU ESP8266-12 CH340 microcontroller will all
be included in the system. It will allow users to remotely monitor and adjust plant
conditions, making it appropriate for both domestic gardens and agricultural settings.

The Plant Monitoring System project's scope covers the following elements:

• Temperature and humidity levels are monitored in real time to ensure ideal
growth conditions.

• Continuous soil moisture content measurement to avoid over- or under-watering.

• Irrigation systems may be controlled remotely using soil moisture data.

• Alerts and warnings for anomalous environmental conditions are generated.

• The Blynk IoT platform was used to provide a user-friendly interface for data
visualization and remote control.

• Implementation of a low-cost, energy-efficient system suited for indoor and


outdoor use.

1.3.3 Application

The Plant Monitoring System is adaptable and may be used in a variety of plant
situations, including:
Residential Gardens: It may be used in houses to manage gardens, lawns, and outdoor
plant beds.

Indoor Plants: It is appropriate for monitoring and caring for indoor potted plants, such as
maintaining proper environmental conditions and watering.

Greenhouses & Nurseries: By maintaining perfect conditions, the system helps improve
plant development in greenhouses and nurseries.

It may also be scaled up to cater to bigger agricultural enterprises and horticulture firms.
Because of its versatility and scalability, the technology is appropriate for both individual
plant enthusiasts and large-scale agricultural applications.
1.4 Achievement
Throughout the development and implementation phases of the Plant Monitoring
System project, major milestones and objectives were met. These accomplishments
demonstrate the attainment of the project's aims and objectives. In this part, we will
detail and examine the Plant Monitoring System project's major accomplishments.

1. Construction of a Functional Plant Monitoring System

The successful construction of a fully working Plant Monitoring System is the project's
most significant accomplishment. This system combines a variety of hardware and
software components to enable full plant health monitoring and management. A user-
friendly interface allows users to remotely monitor soil moisture levels, temperature,
humidity, and light conditions.

2. Data Monitoring and Alerting in Real Time

One of the key aims of the project was to provide real-time data monitoring and
alerting capabilities. This accomplishment guarantees that customers receive
immediate information when vital plant metrics go outside of established thresholds.
This function aids with timely and effective plant care by preventing concerns such as
overwatering and neglect.

3. Watering System Remote Control

The Plant Monitoring System enables customers to regulate watering systems remotely
based on real-time data. This accomplishment enables users to manage water resources
more effectively and maximize plant health. When soil moisture levels are low, the
device may automatically engage water pumps, ensuring plants receive adequate water.

4.Contribution to Long-Term Plant Care

This research adds to sustainable plant care methods by offering an intelligent and
automated plant monitoring system. It enables users to preserve resources, cut down on
plant waste, and encourage healthy and robust plant life.

Finally, the Plant Monitoring System project has made substantial progress in
developing a viable, user-friendly, and intelligent system for plant monitoring and care.
These accomplishments demonstrate the successful completion of the project's
objectives and lay the path for future advances in plant management and environmental
sustainability.
1.5 Organization of report
The project discusses the overview of the project including background, objectives,
achievements, etc. of the project. The project focuses to provide mentioned objectives and
goals. The survey of technology from various research papers and projects already
existing is done. The project defines the study of existing system and identifying the
problems in existing system and requirement analysis to implement new functional
requirements of the project.
Providing the extra features like replacing the pump with solenoid valve which connect to
the water filter inlet pipe for input of the water. Which save the electricity i.e. pump run
on the AC (220volts) Power which take more energy and solenoid valve run on DC power
of 24 volts. So solenoid valve if efficient any more compatible
There are various test case designs to enhance the system performance and minimize
security issues.
Chapter 2

SURVEY OF TECHNOLOGIES
[1] D. K. Fisher and H. A. Kebede, ―A low-costmicro controller-based system to
monitor crop temperature and water status,ǁ Compute. Electron. Agricult., vol. 74, no. 1,
pp. 168–173, Oct. 2010.
[2] O. Mirabella and M. Brischetto, A hybrid wired wireless networking infrastructure
for greenhouse management,ǁ IEEE Trans. Instrum. Meas.,vol. 60, no. 2, pp. 398–407,
Feb. 2011. [18] I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E.
Cayirci, ―A surveyon sensor networks, ǁIEEE Commun. Mag., vol. 40, no. 8, pp. 104–
112,Aug. 2002.
[3] J. Yick, B. Mukherjee, and D. Ghosal, ―Wireless sensor network survey,ǁComput.
Netw., vol. 52, no. 12, pp. 2292–2330, Aug. 2008.
[4] M. Winkler, K.-D. Tuchs, K. Hughes, and G. Barclay, ―Theoretical andpractical
aspects of military wireless sensor networks,ǁJ. Telecommun.Inf. Technol., vol. 2, pp.
37–45, Apr./Jun. 2008.
[5] M. P. Durisic, Z. Tafa, G. Dimic, and V. Milutinovic, ―A survey ofmilitary
applications of wireless sensor networks,ǁ inProc. MECO,Jun. 2012, pp. 196–199.
[6] M. C. Rodríguez-Sánchez, S. Borromeo, and J. A. Hernández-Tamames, ―Wireless
sensor networks for conservation and monitoring cultural assets, ǁIEEE Sensors J., vol.
11, no. 6, pp. 1382–1389, Jun. 2011.
[7] Y. Kim and R. G. Evans, ―Software design for wireless sensor-based site-specific
irrigation, Compute. Electron. Agriculte., vol. 66, no.2,pp. 159–165, May 2009.
[8] K.Srikar ,M.Akhil ,V.Krishna reddy,” Execution of Cloud Scheduling
Algorithms”,International Innovative Research Journalof Engineering and Technology,
vol 02, no 04,pp.108-111,2017.
[9] Y. Kim, J. D. Jabro, and R. G. Evans, ―Wireless lysimeters for realtime online soil
water monitoring,ǁ Irrigation Sci., vol. 29, no. 5,pp. 423–430, Sep. 2011.
Chapter 3

REQUIREMENTS AND ANALYSIS

3.1 Problem Definition


In an increasingly urbanized world where green areas are disappearing and environmental
concerns are mounting, the demand for efficient and effective plant monitoring has never
been greater. The Plant Monitoring System (PMS) tackles this crucial issue by offering a
comprehensive system for tracking and controlling plant health and development in a variety
of situations, ranging from urban gardens to large-scale agricultural areas. Limited Resources
and Environmental Concerns, Inefficient Traditional Monitoring, Climate Change and
Weather Variability, Resource Optimization, Urban Gardening and Green Spaces, Data-
Driven Decision-Making.

3.2 Requirements Specification


3.2.1 Node MCU ESP8266

The ESP8266 NodeMCU CH340 board has ESP8266 which is a highly integrated chip designed for
the needs of a new connected world. It offers a complete and self-contained Wi-Fi networking
solution, allowing it to either host the application or to offload all Wi-Fi networking functions from
another application processor.

ESP8266 has powerful on-board processing and storage capabilities that allow it to be integrated
with the sensors and other application-specific devices through its GPIOs with minimal development
up-front and minimal loading during runtime. Its high degree of on-chip integration allows for
minimal external circuitry, and the entire solution, including the front-end module, is designed to
occupy minimal PCB area.

The ESP-12 Lua NodeMCU WIFI Dev Board Internet Of Things with ESP8266 is an all-in-one
microcontroller + WiFi platform that is very easy to use to create projects with WiFi and IoT
(Internet of Things) application.
Fig 3.2.1: Node MCU ESP8266

3.2.2 Soil moisture Sensor


The volumetric water content of soil is measured by soil moisture sensors. Because direct
gravimetric measurement of free-soil moisture requires removing, drying, and weighing a
sample, soil moisture sensors indirectly measure the volumetric water content by using
another property of the soil as a proxy for the moisture content, such as electrical resistance,
dielectric constant, or interaction with neutrons.

Fig 3.2.2: Soil Moisture Sensor


3.2.3 PIR Motion Detector Sensor

The HC-SR501 PIR Motion Detector Sensor Module is a pyroelectric device that detects motion by
measuring changes in the infrared levels emitted by surrounding objects. This motion can be detected by
checking for a high signal on a single I/O pin.

The module has an onboard pyroelectric sensor, conditioning circuitry, and a dome-shaped Fresnel lens.
It has a delay time adjustment Potentiometer and sensitivity adjustment Potentiometer.

It is used to sense the movement of people, animals, or other objects. They are commonly used in burglar
alarms and automatically-activated lighting systems. Compatible with ARDUINO, RASPBERRY PI,
AVR, PIC, 8051, etc.

Fig 3.2.3: PIR Motion Detector Sensor


3.2.4 Relay Module
A power relay module is an electromagnetically driven electrical switch. A separate low-
power signal from a microcontroller activates the electromagnet. The electromagnet pulls to
open or close an electrical circuit when energized.

A basic relay is made up of a wire coil wrapped around a soft iron core, sometimes known
as a solenoid, an iron yoke that provides a low reluctance route for magnetic flux, a
moveable iron armature, and one or more sets of contacts. The moveable armature is hinged
to the yoke and is connected to one or more sets of moving contacts. When the relay is de-
energized, the armature, which is held in place by a spring, leaves a gap in the magnetic
circuit. One of the two sets of contacts is closed when in this position, while the other
set is open.

Fig 3.2. 4: Relay Module


3.2.5 DTH 11 Temperature And Humidity Sensor
The DHT11 is a popular temperature and humidity sensor that includes a dedicated
NTC to detect temperature and an 8-bit microprocessor to output temperature and
humidity measurements as serial data.

Fig. 3.2.5 Dth 11 Temperature And Humidity Sensor

3.2.6 Jumpers

For uniformity, different colored cables and color-coding discipline are frequently used.
The number of possible hues, on the other hand, is often significantly less than the
number of signal kinds or pathways. Typically, a few wire colors (e.g., red, blue, black)
are designated for supply voltages and ground, while others are reserved for primary
signals and the remainder are just utilized where convenient.

Fig 3.2. 5: Jumpers


3.2.7 Water Pump

This DC 3-6 V Mini Submersible Water Pump is a low cost, small size Submersible Pump Motor
which can be operated from a 2.5 ~ 6V power supply. It can take up to 120 liters per hour with a very
low current consumption of 220mA. Just connect tube pipe to the motor outlet, submerge it in water,
and power it.

Make sure that the water level is always higher than the motor. The dry run may damage the motor due
to heating and it will also produce noise.

Fig 3.2.6: Water pump


3.2.8 Battery
This is a generic 9v battery that may be used for a variety of projects and applications. Whether you
need a new battery for your applications such as a flashlight, portable phone charger, wireless
doorbell, wireless audio transmitter-receiver systems, or your children's toys, or if you want a long-
lasting, dependable option for your sensor devices such as a smoke detector, everyone requires a
good 9-volt battery from time to time. It's also a good idea to maintain a supply of 9-volt batteries on
hand in case of an emergency. That is why we have discovered one of the greatest 9-volt batteries
available.

Fig 3.2.7: Battery


3.3 PLANNING AND SCHEDULING
A Project Schedule is sometimes mistaken with or confused with a Project Plan. The figure
shows that, while the Project Schedule is an important deliverable, it is only one component
of a Project Plan. The Project Plan helps a Project Manager communicate with corporate
work streams and achieve project support. A business manager with minimal technical skills
should be able to grasp the substance of the project by listening to the project leader,
understanding the project concept, and following the project plan.

Fig 3. 3: Gantt chart


3.4 SOFTWARE AND HARDWARE
REQUIREMENTS
3.4.1 Hardware:
• Node MCU ESP8266

• Soil moisture Sensor


• PIR Motion Detector Sensor

• Relay module

• Jumpers

• Water Pump

• Battery

3.4.2 Software:
• Arduino IDE.
• Programming language: C++

3.5 PRELIMINARY PRODUCT DESCRIPTION


An automated irrigation system refers to the operation of the system with no or just a minimum
of manual intervention beside the surveillance. Almost every system (drip, sprinkler, surface)
can be automated with help of timers, sensors or computers or mechanical appliances. It makes
the irrigation process more efficient and workers can concentrate on other important farming
tasks. On the other hand, such a system can be expensive and very complex in its design and
may needs experts to plan and implement it.
3.6 Circuit Diagrams:
3.7 CONCEPTUAL MODELS
Use Case Diagram:

Fig 3.7 System flow chart


Activity Diagram:

Fig 3.9: Class diagram


Chapter 4

SYSTEM DESIGN

4.1 BASIC MODULES


4.1.1 Collect the required resources:
We have to collect required resources for the development of a project.

4.1.2 Node MCU ESP8266:


The NodeMCU ESP8266 is an open-source development board for creating Internet of Things (IoT)
projects. It is built on the ESP8266 microcontroller, a low-cost, low-power, highly integrated device
that can connect to Wi-Fi networks. The ESP8266 chip, as well as a USB-to-serial converter and a
voltage regulator, are all included on the NodeMCU board, making it simple to configure and utilize
for a wide range of IoT applications. Makers, hobbyists, and developers frequently utilize
NodeMCU ESP8266 boards to construct IoT projects, home automation systems, and a variety of
other applications that require wireless communication and control. Because they are inexpensive
and adaptable, they are a popular choice for DIY electronics projects that require Wi-Fi access.

4.1.3 Relay Module:


A relay module is an electrical device that consists of a relay (an electromechanical or solid-state
switch) and additional components arranged on a single circuit board, such as transistors, diodes,
and connections. A relay module's principal function is to regulate the flow of electrical current
between two or more circuits by using a low-power input signal to activate a high-power output.
Relay modules are extensively used in a number of applications to turn on and off electrical loads
remotely or automatically. In our system the input from Arduino is directly given to relay circuit.

4.1.4 Make a connection:


After Collecting the resources, we need to make proper connection between them and also need to
connect this system to the Arduino IDE. We will make the connection between IOT devices.
4.2 DATA DESIGN
In today's hectic environment, everyone requires simple strategies to do their tasks. In this section,
we suggest a home automation system based on an Arduino sensor that runs automatically by
delivering on/off instructions to a solenoid valve. To manage water flow, we usually go to Switch
and toggle the buttons on and off. Here, we suggest a project that automatically controls water flow
when it is needed.

4.2.1 Schema Design

In this project, we used soil moisture sensors and linked various devices such as sensors, solenoid
valves, and so on with jumper wires. When we start the software, it first asks the Sensor if water is
necessary or not. If water is required, the Sensor sends an instruction to the Arduino to turn on the
solenoid valve, allowing water to flow.

4.2.2 Data Integrity


In this project we are going to integrate Arduino IDE, Lines of C++ code implemented in the Arduino
IDE to make use of the Blynk software to control the sensor.

4.3 PROCEDURAL DESIGN

4.3.1Data Structure.

This project proposes the development of Automatic Plant Irrigation System (APIS) capable of
detecting loss of moisture in soil using the soil moisture sensor. Specifically, APIS utilizes the Soil
Moisture Sensor to detect water content level in soil and give appropriate responses to the system
based on detected condition. Using this response, APIS determines whether or not the land needs to be
irrigated.
4.3.2 Logic diagram:

4.4 Algorithm Design.


Step 1: Start the methodology.
Step 2: Check the moisture of soil.
Step 3: If moisture is below 50%, turn on water flow.
Step 4: Otherwise repeat the step 2.
Step 5: If moisture is above 50%, off the flow of water.
Step 6: Otherwise continue the flow of water.
Step 7: If moisture level is as required, then
Step 9: Stop the process.
Step10: Check Temperature and Humidity
Step11: Connecting the humidity sensor to
the board and initializing it.
Step12: Placing it in a sunny and dry
location. Obtain the readings. (Low
Humidity)
Step13: Placing it in indoors and
sprinkling some water to the air.
Obtaining the readings. (High Humidity)
Step14: Determining the high and low
values of humidityStep11.

4.5 SECURITY ISSUES:


Device failure:
The device we are using i.e. Node MCU ESP8266, Soil moisture Sensor and other stuff can get
damage or get stuck in loop easily.

4.6 TEST CASES DESIGN:


Connectivity Testing
In this we test connectivity of our component like Sensor testing.
Soil Moisture Sensor Testing
Based on the test results, the sensor can detect a Moisture level and help the Arduino Uno to
on/off the solenoid valve.

Integrated Testing:
In this section, we test every component utilized in the project together. Physical connections are
formed using jumper wires, and we test to see if our system is producing the desired output. The
waste collection service will not arrive. The second major issue is that the locking system is hacked
by regular people, who then throw all of their waste into the already full dustbin, causing it to
overflow and creating an unsanitary atmosphere.
Chapter 5

IMPLEMENTATION AND TESTING

5.1 Implementation Approaches


The "Plant Monitoring System" provides a variety of implementation techniques to meet the
various demands of plant lovers, farmers, and commercial producers. This system enables users
to improve plant health and development while minimizing the hazards associated with plant
care by merging IoT technology, data analysis, and user-friendly interfaces, eventually leading to
greener and healthier surroundings. The "Plant Monitoring System" is a cutting-edge technology
designed to revolutionize the way we manage and care for our plants, whether they are located in
households, farms, or commercial greenhouses. This system employs various implementation
approaches to provide users with real-time data on the health, growth, and environmental
conditions of their plants, ensuring optimal growth and reducing the risk of plant-related issues.
The matrix irrigation system is very efficient and saves both manual labor and water consumption.

5.2 Coding Details and Code Efficiency


Set up:
Step 1: Install the required software on machine like Blynk.
Step 2: Gather the all-hardware parts.
Step 3: Joint the all hardware properly.
Step 4: Node MCU ESP8266 connect to the PC and join to software.
Step 5: Write the code and give output to the machine.
5.3 Code for Node MCU ESP8266

/* Connections
Relay. D3
Btn. D7
Soil. A0
PIR. D5
SDA. D2
SCL. D1
Temp. D4
*/

//Include the library files

#define BLYNK_TEMPLATE_ID "TMPLBeEVdlU-"


#define BLYNK_TEMPLATE_NAME "Aniket Smart plant"
#define BLYNK_AUTH_TOKEN "MP7_vmvrTv0QfQVKZv8HU4xW3ZO2NMjw"

//Include the library files


#include <LiquidCrystal_I2C.h>
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <DHT.h>

//Initialize the LCD display


LiquidCrystal_I2C lcd(0x3F, 16, 2);

char auth[] = "MP7_vmvrTv0QfQVKZv8HU4xW3ZO2NMjw"; //Enter your Blynk Auth token


char ssid[] = "pixellhub"; //Enter your WIFI SSID
char pass[] = "596@pixim"; //Enter your WIFI Password

DHT dht(D4, DHT11);//(DHT sensor pin,sensor type) D4 DHT11 Temperature Sensor


BlynkTimer timer;

//Define component pins


#define soil A0 //A0 Soil Moisture Sensor
#define PIR D5 //D5 PIR Motion Sensor
int PIR_ToggleValue;

void checkPhysicalButton();
int relay1State = LOW;
int pushButton1State = HIGH;
#define RELAY_PIN_1 D3 //D3 Relay
#define PUSH_BUTTON_1 D7 //D7 Button
#define VPIN_BUTTON_1 V12
//Create three variables for pressure
double T, P;
char status;

void setup() {
Serial.begin(9600);
lcd.begin();
lcd.backlight();
pinMode(PIR, INPUT);

pinMode(RELAY_PIN_1, OUTPUT);
digitalWrite(RELAY_PIN_1, LOW);
pinMode(PUSH_BUTTON_1, INPUT_PULLUP);
digitalWrite(RELAY_PIN_1, relay1State);

Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);


dht.begin();

lcd.setCursor(0, 0);
lcd.print(" Initializing ");
for (int a = 5; a <= 10; a++) {
lcd.setCursor(a, 1);
lcd.print(".");
delay(500);
}
lcd.clear();
lcd.setCursor(11, 1);
lcd.print("W:OFF");
//Call the function
timer.setInterval(100L, soilMoistureSensor);
timer.setInterval(100L, DHT11sensor);
timer.setInterval(500L, checkPhysicalButton);
}

//Get the DHT11 sensor values


void DHT11sensor() {
float h = dht.readHumidity();
float t = dht.readTemperature();

if (isnan(h) || isnan(t)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
Blynk.virtualWrite(V0, t);
Blynk.virtualWrite(V1, h);

lcd.setCursor(0, 0);
lcd.print("T:");
lcd.print(t);

lcd.setCursor(8, 0);
lcd.print("H:");
lcd.print(h);
}
//Get the soil moisture values
void soilMoistureSensor() {
int value = analogRead(soil);
value = map(value, 0, 1024, 0, 100);
value = (value - 100) * -1;

Blynk.virtualWrite(V3, value);
lcd.setCursor(0, 1);
lcd.print("S:");
lcd.print(value);
lcd.print(" ");

//Get the PIR sensor values


void PIRsensor() {
bool value = digitalRead(PIR);
if (value) {
Blynk.logEvent("pirmotion","WARNNG! Motion Detected!"); //Enter your Event Name
WidgetLED LED(V5);
LED.on();
} else {
WidgetLED LED(V5);
LED.off();
}
}

BLYNK_WRITE(V6)
{
PIR_ToggleValue = param.asInt();
}

BLYNK_CONNECTED() {
// Request the latest state from the server
Blynk.syncVirtual(VPIN_BUTTON_1);
}

BLYNK_WRITE(VPIN_BUTTON_1) {
relay1State = param.asInt();
digitalWrite(RELAY_PIN_1, relay1State);
}

void checkPhysicalButton()
{
if (digitalRead(PUSH_BUTTON_1) == LOW) {
// pushButton1State is used to avoid sequential toggles
if (pushButton1State != LOW) {

// Toggle Relay state


relay1State = !relay1State;
digitalWrite(RELAY_PIN_1, relay1State);
// Update Button Widget
Blynk.virtualWrite(VPIN_BUTTON_1, relay1State);
}
pushButton1State = LOW;
} else {
pushButton1State = HIGH;
}
}

void loop() {
if (PIR_ToggleValue == 1)
{
lcd.setCursor(5, 1);
lcd.print("M:ON ");
PIRsensor();
}
else
{
lcd.setCursor(5, 1);
lcd.print("M:OFF");
WidgetLED LED(V5);
LED.off();
}

if (relay1State == HIGH)
{
lcd.setCursor(11, 1);
lcd.print("W:ON ");
}
else if (relay1State == LOW)
{
lcd.setCursor(11, 1);
lcd.print("W:OFF");
}

Blynk.run();//Run the Blynk library


timer.run();//Run the Blynk timer

}
5.4 Code Efficiency
The code is built in a way that allows us to simply alter the entire system. First, the soil moisture
sensor detects the moisture level and sends a signal to the Arduino, which is displayed on the
Blynk software. The Arduino then decides what to do with the relay module; if the moisture level
is sufficient, the Arduino sends a low signal to the relay module; if the moisture level is
insufficient, the Arduino sets the relay high and the solenoid valve is activated to supply the
water. This is how the entire system operates.

5.5 Testing Approach


In testing phase, we tested first each unit of the system separately such as soil moisture sensor,
Relay module, Solenoid valve etc. and then tested the whole system by integrating all the units of
the system.

5.5.1 Unit Testing

Unit testing is a system development technique that examines the smallest testable components
of an application, known as units, separately and independently for appropriate functioning. Unit
testing can be done manually, although it is more commonly automated.
For testing, our system consists of four pieces. First, we tested the soil moisture sensor, which
detects soil moisture, and then the relay module, which determines whether or not to start or stop
the relay. Finally, we tested our solenoid valve and implemented our project appropriately.
Fig 5.01: Soil moisture sensor Testing.

Then second is Relay module which “ON” and “OF” when the moisture level is low or high
accordingly through Blynk.

Fig 5.02: Relay Module Testing


Next part is solenoid valve which if turn ON and OF through the relay module to supply the water
whenever the water level or we can say moisture level goes down.

Fig 5.03: Solenoid valve Testing

Fig 5.04: Integrated system Testing


5.5.2 Integrated Testing
Integrated testing is a software testing level in which separate components are merged and tested as a
group. The goal of this level of testing is to identify flaws in the interaction of integrated parts.
Integration testing is aided by test drivers and test stubs.

5.6 Modifications and Improvements


A. Remote Control and Access:

• Implement more secure remote access authentication techniques.

• For secure connection between the NodeMCU and the Blynk server, configure a VPN or use
SSL/TLS.

• Allow the relay module to be controlled remotely to turn on/off watering systems or other
equipment.

B. Analytics and data logging:

• For trend analysis and historical monitoring, save historical data in a database (e.g., MySQL,
InfluxDB).

• Make graphs and data visualizations for temperature and soil moisture patterns over time.

• To detect uncommon situations in your plant environment, use anomaly detection.


C. Machine Learning (ML):

• Machine learning algorithms should be used to forecast plant health based on previous data and
sensor readings.

• Use artificial intelligence to recommend ideal watering schedules and climatic conditions for
certain plant kinds.

D. Weather Inclusion:
• Integrate weather data from external sources (e.g., APIs) to make more educated plant-
care decisions depending on local weather conditions.
• Weather forecasts should be used to adjust watering schedules and temperature control.
5.7 Blynk IOT:- www.blynk.io

Create New Template


>>>>>

Add Datastreams
>>>>>>
Create Events
>>>>>>
Create Web Dashboard

Add New Device -->> Use Template


>>>>>>
Create SmartPhone Dashboard on Blynk IOT Application
Chapter 6
RESULTS AND DISCUSSION

6.1 Test Reports

A test case is a set of circumstances or variables that a tester will use to assess if a system under
test meets requirements or functions properly. The process of building test cases can also aid in
the discovery of flaws in an application's requirements or design. Here, we test each unit that
makes up the system independently. During testing, we encountered many concerns with the
unit's operation. We are looking for methods to avoid similar problems.

6.1.1 Problematic situation and Solutions


After connecting the hardware and implementing the software, we discovered that the soil
moisture sensor detects moisture after some delay, which causes the relay module to turn on and
off after the delay, but after cross-checking faults in code, we ensured that everything was done
properly. We encountered several mistakes when integrating the whole coding of the system's
operation, but we resolved all of the faults and the system now functions properly.

6.2 User Documentation


This project aims to design and develop an automatic plant watering system that will water the
plant automatically. Normally, one person must devote time to physically watering the plant. It is
set up in such a manner that it detects the moisture level of the plants and supplies water as
needed. The main goal of this project was to use a microcontroller (Arduino Uno) to
automatically deliver water to plants or gardening. We can water the plants automatically while
we are on vacation, or we don't have to disturb my neighbors. Sometimes the neighbor’s
overwater, and the plants die anyhow. The system includes a soil moisture sensor that detects
moisture levels. When the water level falls below the preset limit, the solenoid valve opens to
deliver water. All of the components employed in the system perform distinct functions. The
sensor that detects moisture is utilized to turn on the solenoid valve, and then it will deliver
water.
Relay module that follows the Arduino signals according to the soil moisture sensor whenever
the moisture level is lower than the predefined limits soil moisture sensor passes the order to the
Arduino to turn on the relay for water delivery.
Solenoid valve that responds to relay module commands. When the relay signal from the
Arduino relay is high, the solenoid valve opens and supplies water.
Chapter 7
CONCLUSIONS

7.1 Conclusion
The "Automated Irrigation system based on soil moisture using Arduino" has been successfully
constructed and tested. It was created by integrating functionality from all of the hardware
components used. Every module's presence has been carefully thought out and arranged, adding
to the unit's optimal performance. As a result, the Arduino-based Automatic Plant Watering
System has been successfully constructed and tested. The system has been tested to ensure that it
operates automatically. The moisture sensors assess the moisture content (water content) of the
various plants. If the moisture level falls below the required and limited level, the moisture
sensors transmit a signal to the Arduino board, causing the Relay Module to switch on and deliver
water to the appropriate plant. When the necessary moisture level is attained, the system
automatically comes to a halt and the water pump is shut off. As a result, the complete system's
functioning has been carefully tested, and it is deemed to perform successfully.

7.1.1 Significance of the System


We live in a world that is constantly evolving, but there is one persistent problem that we have
yet to solve. The problem is that watering plants is important for farmers and gardeners, but if the
plant receives more water than necessary, the roots become infected with fungus and the plants
or crops do not survive for long. Alternatively, if they receive less water than is necessary, their
life span decreases and the plant becomes dry. So it's critical that plants get the right amount of
water, and for that we need an autonomous watering system to hydrate the plants efficiently. So
we designed an auto watering system utilizing an Arduino and a solenoid valve. This System will
allow you to automatically irrigate your backyard garden or indoor garden, eliminating the need
for you to worry about watering your favorite plants in your busy schedule. Components utilized.
Every module's presence has been carefully thought out and arranged, adding to the unit's
optimal performance. As a result, the Arduino-based Automatic Plant Watering System has been
successfully constructed and tested. The system has been tested to ensure that it operates
automatically. The moisture sensors assess the moisture content (water content) of the various
plants.
If the moisture level falls below the required and limited level, the moisture sensor sends a signal
to the Arduino board, causing the Relay Module to switch on and deliver water to the appropriate
plant. When the appropriate moisture level is attained, the system automatically comes to a halt,
and the water Pump is turned off. As a result, the complete system's functioning has been
carefully tested, and it is deemed to perform successfully.

7.2 Limitations of the System


To gain a large enough area to irrigate the crops, the system requires a greater number of soil
moisture sensors. As a result of the high cost of components, impoverished farmers are unable to
execute this sort of project in their farms to produce commodities.

It lessens the need for labor, resulting in a rise in unemployment for unskilled workers.

The individuals involved in the auto watering system must get training.

7.3 Future Scope of the Project


Integration of AI and Machine Learning:
Incorporating advanced AI algorithms and machine learning models can enhance the system's
ability to analyze and interpret data. This can lead to more accurate predictions, early detection
of diseases, and optimized resource management.
Sensor Technology Advancements:
Continued improvement in sensor technologies, such as hyperspectral imaging and advanced
spectrometry, can provide more detailed and specific information about plant health, nutrient
levels, and environmental conditions.
Autonomous Systems and Robotics:
Autonomous drones and robotic systems equipped with plant monitoring capabilities can be
employed for large-scale, efficient data collection. These systems can cover vast areas quickly
and provide a more dynamic and detailed view of plant health.
Customization for Different Crops:
Developing specialized monitoring systems tailored to the specific needs of different crops can
improve the accuracy of diagnostics and recommendations. Crop-specific data analytics and
models can help farmers make more informed decisions.
REFERENCES
[1] Abhishek Gupta, Shailesh Kumawat , Shubham Garg, "Automated Plant Watering System",
Vol-2, Issue-4, 2016 ISSN: 2454- 1362.
[2] Taylor Francis Group, "Automated Plant Watering System", LLC, pp.59-69, 16 September
2016.Taylor Francis Group, "Automated Plant Watering System", LLC, pp.59-69, 16 September
2016.
[3]T.Thamaraimanalan , S.P.Vivekk ,G.Satheeshkumar, P.Saravanan," Smart Garden Monitoring
System Using IOT",IEEE,pp.5- 10,2018.
[4]Arul Jai Singh, Raviram, Shanthosh Kumar, "Embedded Based Green House Monitoring system
using pic Microcontroller", IEEE Trans. Syst, Man, Cybern. Systems and Humans, vol. 41, no. 6,
pp.1064-1076, November 2011.
5]K.Lokesh Krishna ,J.Madhuri and Dr.K.Anuradha, "A ZigBee based Energy Encient
Environmental Monitoring Alerting and Controlling System",IEEE Trans.g,vol.3,no.1,pp.186-
190,2009.
[6]B. Shri Hariprasad,Dr.Vimalathithan Rathinasabapathy, "A smartIoT system for monitoring
solar PV power conditioning unit",World Conference on Futuristic Trends in Research and
Innovation for Social Welfare (WCFTR '16) Vol. 3,Issue 2, 2016.
[7]Boonsit Yimwadsana, Pichamon Chanthapeth, Chanyanuch Lertthanyaphan, Antika
Pornvechamnuay," An IoT Controlled System for Plant Growth", International Journal For
Technological Research In Engineering Volume 4, Issue 4,pp.668- 671,December-2016.
[8]Hemant Kuruva1 , Balumuri Sravani2,"Remote plant watering and monitoring system based on
IOT", International Journal For Technological Research In Engineering Volume 4, Issue 4,
,pp.668-671,December-2016
[9] Chat GPT

You might also like