0% found this document useful (0 votes)
26 views65 pages

Final Report 7

The project report presents an integrated system for plant protection and home automation using IoT technologies, focusing on real-time monitoring and decision-making. It utilizes ESP32 microcontrollers for efficient data exchange and includes features like automated irrigation and security alerts, enhancing both agricultural and home safety. The system aims to provide a sustainable and user-friendly solution, allowing remote access and control through the Blynk IoT platform.

Uploaded by

Kushal N H
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views65 pages

Final Report 7

The project report presents an integrated system for plant protection and home automation using IoT technologies, focusing on real-time monitoring and decision-making. It utilizes ESP32 microcontrollers for efficient data exchange and includes features like automated irrigation and security alerts, enhancing both agricultural and home safety. The system aims to provide a sustainable and user-friendly solution, allowing remote access and control through the Blynk IoT platform.

Uploaded by

Kushal N H
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

JNANA SANGAMA, BELAGAVI - 590018

A Project Report on
AN INTEGRATED PLANT PROTECTION AND HOME
AUTOMATION SYSTEM

Submitted in partial fulfillment of the requirements for the award of the degree of

Bachelor of Engineering
in
Electronics and Communication Engineering
For the Academic Year: 2024-25
Submitted by
Afzaal Ahmad (1NT21EC007)
Khushi Arali (1NT21EC065)
Kushal N H (1NT21EC073)

Under the Guidance of

Dr. Badarla Sri Pavan


Associate Professor
Dept. of Electronics and Communication Engineering

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

YELAHANKA, BENGALURU- 560064


DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
BENGALURU -560064

Certificate
Certified that the project work titled “An integrated plant protection and home automation
system” is carried out by Afzaal Ahmad (1NT21EC007), Khushi Arali (1NT21EC065)
and Kushal N H (1NT21EC073), who are the students of Nitte Menakshi Institutions of
Technology in partial fulfillment for the award of Bachelor of Engineering in Electronics
and Communication Engineering of Visvesvaraya Technological University Belagavi
during the academic year 2024-2025 the prior report has been approved as it satisfies the
academic requirement in respect of the project work prescribed as per the autonomous
scheme of Nitte Menakshi Institutions of Technology for the said degree

Signature of the Guide Signature of the HoD Signature of the Principal

Dr. Badarla Sri Pavan


Dr. Parameshachari B. Dr. H. C.
Associate Professor D. Nagaraj
Dept. of ECE, NMIT
HoD Principal
Dept of ECE , NMIT NMIT

External Viva-Voce

Name of Examiners Signature with Date

1.

2.

i
Acknowledgement

The successful execution of our project gives us an opportunity to convey our


gratitude to each one who has been instrumental in paving paths to our continuation
of this project. Whatever we have done is due to such guidance and help and we
would not forget to thank them all.

We would like to thank and seek blessings from Dr. N. R. Shetty, Advisor, Nitte
Meenakshi Institute of Technology, for his thrust on project-based learning and
constructivist principles in our institution.

We would like to express our gratitude to the Nitte Meenakshi Institute of


Technology and our beloved Principal Dr. H. C. Nagaraj for providing us the
support, facilities, and motivation to carry out our project.

We express our deep sense of gratitude to Dr. Parameshachari B D, HoD,


Department of Electronics and Communication Engineering, for his kind
cooperation and valuable guidance and for creating the best learning environment
for us.

We wholeheartedly thank our guide Dr. Badarla Sri Pavan, Associate Professor,
Department of Electronics and Communication Engineering, for his support and
guidance anytime we require.

We also thank and share this moment of happiness with our parents who rendered us
enormous support during the whole tenure of our studies at Nitte Meenakshi
Institute of Technology, Bengaluru.

Finally, we would like to thank all the other unnamed who helped us in various
ways to gain knowledge and have good training.

Afzaal Ahmad (1NT21EC007)

Khushi Arali (1NT21EC065)

Khushal N H (1NT21EC073)
Place : Bengaluru

Date :
ii
Abstract
This project presents an innovative integrated system that consists of conventional
plant monitoring by leveraging advanced internet of things communication
protocols, edge AI processing, and autonomous decision-making to achieve smart
plant protection and home automation. The system combines home automation and
plant protection into a unified platform, enabling efficient and centralized control by
the user. The system also includes image analysis and pest detection features,
allowing for early identification of threats and timely interventions. This unified
approach supports sustainable living while enhancing both security and agricultural
monitoring.

The system is built based on three ESP32 microcontrollers in master-slave


configuration. Each microcontroller executes a given set of operations and is linked
with different sensors to monitor parameters like soil moisture, temperature,
humidity, smoke, motion, etc. These microcontrollers are connected with one
another through the ESP32-NOW protocol, allowing data exchange at high speed
with low power consumption. The sensor readings from each of the slave nodes are
relayed to the master node, which serves as the brain for decision-making and
coordination purposes. All microcontrollers are also connected to the Blynk IoT
platform, allowing visualization of sensor readings in real-time on a mobile or web
console. This provides users with the capability to view plant health and home
security conditions remotely. The ESP32-CAM, which comes with Google AI
Gemini Flash 1.5, offers image-based analysis for plant health diagnostics.

The integrated system will deliver a unified IoT solution that combines plant
protection and home automation with centralized control. It enables real-time AI-
driven plant health monitoring using ESP32-CAM and Google Gemini Flash 1.5.
Communication efficiency is enhanced through a master-slave ESP32-NOW
network, ensuring fast and energy-efficient data exchange. Intelligent irrigation
automates watering based on soil moisture, optimizing water usage. For home
security, the system includes motion, sound, and smoke detection with real-time
alerts. Users can remotely monitor and control the system via the Blynk IoT
platform for seamless access and dynamically manage the parameters.

iii
Contents

Acknowledgement ii

Abstract iii

Contents iv

List of figures vi

List of tables vii


Chapter 1: Introduction 08
1.1 Plant Protection 11
1.2 Home Automation 11
1.3 Integrated Plant protection and home automation system 12
1.3.1 System characteristics 14
1.4 Motivation 16
1.5 Objectives 17
Chapter 2: Literature survey 18
2.1 Background work 21
Chapter 3: Design Approach and Methodology 23
3.1 System Design and Analysis for Plant Protection 23
3.2 System Design and Analysis for Home Automation 24
3.3 Integrated workflow for Plant Protection and Home Automation 26
3.4 Hardware and Software Description 28
3.4.1 Hardware requirements 28
3.4.2 Software Tools 30
Chapter 4: Implementation 33
4.1 Model of Integrated Plant Protection and Home Automation 33
4.2 ESP32-NOW Protocol 36
4.3 AI Vision 37
4.4 Implementing Facial Recognition for Access Control 38
4.4.1 Facial Recognition Process 38
Chapter 5: Result and Discussions 40
5.1 Serial Monitor values for integrated framework 40
5.1.1 Manual mode 40
5.1.2 Automatic mode 40

iv
5.2 Graphs: Drawn Using Matplotlib 41
5.2.1 Water level vs Motor status 41
5.2.2 Soil moisture vs Motor status 42
5.2.3 Smoke level vs Motor status 42
5.2.4 Sound Sensor Integration 43
5.2.5 Motion sensor Integration 45
5.2.6. LDR (Light Sensor) Integration 46
5.2.7. ESP32-NOW Protocol 47
5.3 Google Gemini Flash 1.5 48
5.3.1 Results of Google AI Gemini flash 1.5 API for image analysis 48
5.4 Blynk IOT interface 51
5.4.1 Blynk IoT laptop interface for different parameters 51
5.5 Expected Outcomes and Readings 52
5.5.1 Improved Plant Care 52
5.5.2 Enhanced Home Security 53
5.5.3 User-Friendly Experience 53
5.5.4 Contribution to Smart Living 54
Chapter 6: Conclusion and Future Scope 55
6.1 Conclusion 55
6.2 Future scope 55
References 56

v
List of Figures :
Figure 1.1: Smart integrated framework for plant protection and home automation 09
Figure 1.2: Block diagram of Integrated plant protection and home automation 13
Figure 3.1: Plant protection workflow 22
Figure 3.2: Home automation workflow 24
Figure 3.3: Integrated workflow for plant protection and home automation 25
Figure 4.1 Integrated plant protection and home automation schematic 28
Figure 4.2: Integrated plant protection and home automation design 29
Figure 4.3: ESP-NOW Protocol with Master-Slave Concept 30
Figure 4.4: AI Vision 33
Figure 4.5: Face recognition and identification 34
Figure 5.1: Tank water level and motor status 38
Figure 5.2: Soil moisture level and motor status 39
Figure 5.3: Smoke sensor data and motor status 40
Figure 5.4: Sound Sensor Data with Threshold-Based Alert System 41
Figure 5.5 Motion Sensor Response with Notifications 42
Figure 5.6 LDR Sensor Response with Threshold-Based Notifications. 43
Figure 5.7 Latency Performance Comparison: ESP32-NOW vs. Individual
Microcontrollers 44
Figure 5.8: Image of rotten tomatoes 45
Figure 5.9: Image of infected leaves 46
Figure 5.10: Blynk IoT laptop interface for different parameters 47

vi
List of Tables :
Table 3.1: Hardware requirements 26
Table 3.2: Software tools 27
Table 5.1: Manual mode readings 36
Table 5.2: Automatic mode readings 37
Table 5.1: Soil moisture level for motor 48
Table 5.2: Temperature and humidity 49

vii
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Chapter 1

INTRODUCTION

With the increasing adoption of Internet of Things (IoT) technologies in smart


home automation and precision agriculture, the integration of advanced systems for
home security and plant monitoring has become a necessity. The conventional
methods of home security often fail to offer efficient and seamless access control,
while traditional plant care systems can lead to challenges of efficient water
monitoring [1]. Recent research emphasizes the use of IoT and machine learning
technologies to address these gaps effectively. However, existing solutions in plant
monitoring and home security often suffer from critical limitations, including high
power consumption, inefficient data transmission, and lack of real-time decision-
making capabilities. Traditional smart agriculture systems primarily focus on basic
parameter monitoring such as temperature, humidity, and soil moisture, offering
little in terms of predictive analytics or adaptive automation[2]. Similarly, home
automation solutions tend to rely on centralized cloud-based architectures, which
introduce latency and increase dependence on internet connectivity, often rendering
the system unreliable in scenarios with unstable network conditions. Furthermore,
security breaches in cloud-dependent systems pose additional concerns regarding
data privacy and potential cyber threats, making local processing and edge artificial
intelligence crucial for ensuring a more robust and resilient framework.[3]
The Fig. 1.1 shows the integration of smart home security systems, IoT devices
integrated with facial recognition technologies have proven to deliver highly
reliable access control. Leveraging edge AI and resource-constrained devices such
as the ESP32-CAM, research demonstrates the ability to deploy systems that
enable real-time facial recognition for identifying authorized personnel and
unlocking doors [2]. These systems are power-efficient and cost-effective, making
them ideal for smart home setups. Moreover, advancements in secure locking
mechanisms and real-time alert systems through IoT not only enhance security and
decrease human intervention [5]. Additional security features, such as multi-factor
authentication, further enhance the reliability of smart access control systems,
ensuring minimal vulnerability to spoofing or unauthorized access.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 8
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Fig. 1.1 Smart integrated framework for plant protection and home automation

Similarly, IoT is enabling breakthroughs in plant care and monitoring. Recent


works in smart agriculture highlight the integration of automated sensing modules
such as soil moisture and temperature sensors to optimize irrigation systems. By
combining IoT and machine learning algorithms, it becomes possible to predict
water requirements and automate irrigation, thereby both improving efficiency and
conserving water. These systems can enable consistent monitoring of
environmental parameters while alerting users via mobile notifications about real-
time field conditions [5]. Furthermore, edge AI processing allows advanced
anomaly detection, identifying patterns in plant health deterioration and predicting
the onset of diseases before visible symptoms appear. By integrating historical
environmental data, smart irrigation systems can dynamically adjust watering
schedules, responding to weather conditions, soil quality, and seasonal making the
system a sustainable solution for modern precision agriculture.
This project aims to provide a unified solution by integrating IoT-based plant
protection with home security. The system employs ESP32-CAM for real-time
image analysis to monitor plant health, enabling early detection of stress or disease
conditions. For plant protection, sensors for soil moisture, temperature, and other
environmental parameters are integrated with an IoT-enabled control system,
allowing for automated irrigation and comprehensive environmental monitoring.
[15]
Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 9
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

This results in a solution that is not only reliable and efficient but also sustainable,
catering to modern demands for smart living and precision agriculture. By
incorporating AI-powered predictive analytics, the system enhances decision-
making processes, allowing early detection of potential risks such as abnormal
plant health conditions. The integration of real-time notifications with mobile
applications ensures that users remain informed and can take prompt action
whenever necessary, reducing reliance on human intervention while enhancing
system responsiveness. [16]
The project seeks to remedy these limitations through the implementation of a
decentralized, low-latency, and energy-efficient sensor network that employs the
ESP32-NOW protocol for device-to-device communication. Unlike Wi-Fi systems,
ESP32-NOW protocol supports direct device-to-device data transmission without
the use of a router, thus decreasing network traffic and enhancing response time
[45]. Decentralized architecture minimizes latency while significantly reducing
energy consumption, making it highly suitable for battery-powered IoT
deployments. In addition, the combination of AI-based image processing with
Google AI Gemini Flash 1.5 offers a sophisticated real-time plant health analysis
mechanism beyond the conventional threshold-based monitoring methods. The
system also improves security via event-driven automation, such as real-time
motion detection and AI-based anomaly detection for plant security and home
safety. By leveraging AI-driven behavioral analysis, the system can distinguish
between normal and suspicious activities, triggering automated security responses
in case of potential threats. This ensures that home security measures remain
proactive rather than reactive, significantly reducing the risk of intrusions or
unauthorized access.[15]
By combining AI, edge computing, and an energy-efficient wireless network, this
project proposes a comprehensive framework that ensures robustness, scalability,
and sustainability. The proposed system represents a significant leap towards
intelligent and self-sustaining IoT applications in modern smart environments.
With the ability to operate in real-time, process data locally, and optimize energy
consumption, this solution lays the foundation for future advancements in
sustainable and autonomous IoT-driven ecosystems. By addressing existing
limitations and introducing innovative enhancements, the project serves as a
Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 10
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
stepping stone toward the widespread adoption of AI-powered smart home and
precision agriculture solutions, driving efficiency, security, and sustainability in
modern digital infrastructure.[13]

1.1 Plant protection


The system ensures plant protection by continuously monitoring soil moisture,
light, temperature, and humidity to maintain optimal growing conditions. It features
automated irrigation, adjusting water supply based on real-time soil moisture levels
to prevent overwatering or drought stress. Additionally, motion and sound sensors
detect potential threats such as pests or unauthorized access, triggering alerts for
timely action. With remote monitoring via the Blynk IoT app, users can track plant
health and receive alerts, ensuring proactive care and protection.[21]

1.2 Home Automation


The home automation aspect of the system enhances convenience, security, and
energy efficiency by integrating multiple smart sensors and remote control
capabilities. It allows users to monitor and control home appliances through the
Blynk IoT app, enabling automation of lights, fans, and other electrical devices.
The system includes motion and smoke detection for improved security, triggering
alerts in case of unauthorized movement or potential fire hazards. A camera
module provides real-time surveillance, ensuring home safety even when the user
is away. Additionally, light and temperature sensors help optimize energy usage by
adjusting appliances based on environmental conditions. With seamless
connectivity and automation, the system provides an intelligent, responsive, and
energy-efficient home environment.[23]
Both plant monitoring and home automation share key features that enhance
efficiency, security, and convenience. They utilize a comprehensive sensor network
(motion, sound, light, temperature, humidity, and smoke sensors) for real-time
monitoring and automated responses. Both systems support remote access and
control via the Blynk IoT app, allowing users to manage home appliances and
plant care from anywhere. It emphasizes automation, with smart responses such as
automated irrigation for plants and intelligent appliance control for energy
efficiency. Additionally, it improves security, with motion detection safeguarding
plants from intruders and ensuring home safety.[24]
Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 11
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

1.3 Integrated Plant Protection and Home Automation System


The integrated plant protection and home security system using IoT and sensor
networks aims to harness these advancements to create a comprehensive solution
that addresses two critical aspects of modern living of home security and plant
health monitoring [6] [7]. As urbanization accelerates and population densities
increase, ensuring the safety of our homes while simultaneously protecting green
spaces has become increasingly essential. The traditional security systems often fall
short of providing the real-time monitoring and rapid response needed to safeguard
against potential threats, such as break-ins or environmental hazards. The
effectiveness of smart home safety and security systems in utilizing IoT
technologies to enhance situational awareness and facilitate proactive measures
against intrusions and accidents [8]. In parallel, the agricultural sector faces pressing
challenges, including pest infestations, diseases, and adverse environmental
conditions that can jeopardize plant health and productivity. The application of
sensor networks allows for continuous monitoring of environmental variables,
enabling timely interventions that can prevent crop loss. By employing IoT-based
solutions, farmers can gain valuable insights into their plants’ needs, ensuring
optimal growing conditions while minimizing resource waste [9].
Figure 1.2 shows the integration of plant protection and home security into a single
system brings numerous advantages. First, it offers a convenient and unified
solution that allows users to monitor both their plants and home environment from
one platform, reducing the need for multiple systems. This makes managing both
aspects more efficient, especially when users are away from home for extended
periods. By combining these systems, the user benefits from real-time monitoring
and control of both plant health and home security through IoT technology. Sensors
for motion, sound, soil moisture, and temperature can work together to create a
comprehensive safety network, ensuring that homes are protected from intruders and
fire, while plants receive timely care. This integration reduces the complexity of
managing separate systems and helps optimize resources like water, light, and
energy. Additionally, the integrated system enhances automation and remote
accessibility, allowing users to receive alerts and adjust from their smartphones.[23]

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 12
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Figure 1.2: Block diagram of Integrated plant protection and home automation

This work proposes an innovative solution by integrating plant protection and home
security systems using IoT and sensor networks, addressing multiple needs in a
single, efficient platform. The work lies in its ability to combine two distinct
functions safeguarding plant health and securing homes. By incorporating real-time
monitoring, automation, and instant alerts, this project enables users to manage both
plant care and home security through a unified mobile application. The dynamic use
of sensors for motion, sound, soil moisture, and environmental conditions offers a
comprehensive, proactive approach to maintaining both a secure home environment
and optimal plant health. The system multifunctionality and remote accessibility
ensure convenience, reduce manual intervention, and provide quick responses to
potential threats or plant-related issues. This holistic approach not only simplifies
the user experience but also exemplifies how IoT technology can be used in
innovative ways to enhance smart living [10].
Moreover, integrated approaches facilitate the development of automated responses
to critical situations. For instance, in the event of gas detection, the system can
immediately alert residents while activating ventilation mechanisms to mitigate
risks. Similarly, plant health monitoring can trigger irrigation systems or pest
control measures when the predefined threshold is exceeded, promoting healthier
Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 13
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
plant growth and improved yields [11]. By merging home security and plant
protection, this project addresses the growing need for intelligent systems that
enhance safety and sustainability in our homes and gardens. Ultimately, the
integrated plant protection and home security system aims to empower homeowners
with the tools they need to create a safer, more efficient, and environmentally
friendly living space. This innovative approach not only represents a step forward in
home automation and emphasizes the importance of cultivating healthy plants in
harmony with our living environments [12, 13].
In the era of rapid growth in technological advancements, the integration of the IoT
into our daily lives has revolutionized the way for manage our homes and cultivate
environments. The IoT connects everyday physical objects via the internet, enabling
them to collect, share, and act on data. These objects, equipped with sensors and
communication technologies, range from household appliances to industrial
systems. The IoT facilitates real-time data collection, analysis, and control, allowing
seamless interaction between the physical and digital worlds. In fields like
agriculture, healthcare, and home security, IoT drives advancements. Smart systems
monitor crops for optimal irrigation and detect home intrusions, providing instant
alerts to smartphones [12].

1.3.1 System characteristics

1. Intelligent Automation
The system leverages IoT-driven automation to optimize both plant care and home
security. Automated irrigation systems use real-time environmental data to regulate
water usage efficiently, preventing both overwatering and drought conditions.
Similarly, smart security features enable event-driven automation, such as activating
alerts and locking mechanisms when unauthorized movement is detected [12].

2. Real-time Monitoring and Predictive Analytics


By continuously collecting and analyzing sensor data, the system ensures proactive
decision-making for plant health and home security. Advanced AI algorithms
process data in real-time to predict irrigation needs and detect anomalies in security
surveillance. The Predictive analytics enhances efficiency by reducing manual
interventions and improving system response time [12].

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 14
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
3. Decentralized Remote Control and Edge Processing
The system incorporates ESP32-NOW protocol for direct, low-latency
communication between devices, eliminating the dependency on centralized cloud
servers. This decentralized architecture allows users to monitor and control their
smart home security and plant care systems remotely via mobile applications,
ensuring seamless operation even in low-connectivity environments [14].

4. Energy Efficiency and Sustainability


By utilizing low-power microcontrollers and AI-driven resource management, the
system minimizes energy consumption while maximizing operational efficiency.
Wireless communication protocols, such as ESP32-NOW, reduce the overhead
associated with traditional network infrastructures, making the system more
sustainable and cost-effective [14].
Plant protection is crucial for maintaining the health and productivity of plants by
shielding them from harmful elements like pests, diseases, and environmental stress.
This involves monitoring essential factors such as soil moisture level as shown in
Figure 1.1, temperature, and light to ensure optimal growing conditions [16]. The
advances in technology, particularly using sensors and automated systems, have
made plant protection more efficient. By continuously tracking soil and
environmental parameters, modern plant protection systems can provide timely
alerts and interventions, helping to prevent issues like drought stress, overwatering,
or nutrient deficiencies, and thus promoting healthier plant growth [22]. Home
security focuses on protecting homes from potential threats such as intruders, fire,
and other hazards. With the growing integration of technology, modern home
security systems have evolved to include sensors that detect motion, sound, and
smoke. These systems offer real-time monitoring and instant alerts, allowing
homeowners to respond quickly to any potential dangers. The rise of smart home
technologies and IoT-based security systems has further enhanced safety by
enabling remote surveillance, control, and the ability to monitor homes from
anywhere through mobile devices [25].

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 15
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
1.4 Motivation
The increasing global population and rapid urbanization have significantly impacted
agriculture and home security, creating a pressing need for innovative solutions that
enhance plant protection and ensure the safety of residential environments.
Traditional farming practices often struggle to cope with challenges such as pest
infestations, environmental stressors, and inefficient resource management.
Simultaneously, urban areas face rising crime rates, leading to a heightened demand
for effective home security systems [22]. The convergence of these issues
highlights the necessity for an integrated plant protection and home security
system that leverages the Internet of Things (IoT) and sensor networks.

IoT technologies provide real-time monitoring, data-driven decision-making, and


automation, which can significantly improve efficiency in both agricultural and
security domains. By incorporating advanced sensors and communication networks,
this system enables farmers to monitor soil moisture, temperature, and humidity,
thereby optimizing irrigation and pest control strategies. At the same time, it ensures
home security through real-time surveillance and automated threat detection. The
ability to integrate these functionalities into a single IoT-based framework offers a
holistic approach to enhancing food security and residential safety. This project aims
to harness the capabilities of IoT to create a more sustainable and secure living
environment, ultimately contributing to improved agricultural productivity and
enhanced quality of life [23].

1.5 Problem statement


Conventional plant monitoring and home security systems lack integration, automation, and
real-time intelligence, leading to inefficient resource usage, delayed response to environmental
or security threats, and the need for constant human supervision. Existing solutions often depend
on cloud infrastructure, resulting in latency and limited functionality in low-connectivity areas.
There is a critical need for a unified IoT-based system that can perform real-time plant health
analysis using image processing, automate irrigation based on sensor feedback, ensure low-
latency communication through decentralized ESP32-based networks, and provide smart
security responses and remote monitoring, all while maintaining energy efficiency and
operational reliability.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 16
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
1.6 Objectives
Develop an Integrated System: This project focuses on designing a unified IoT
framework that seamlessly combines plant protection and home automation. The
integration of both domains enhances operational efficiency and provides
centralized control over agricultural and security functions.

Implement AI-Driven Analysis: The system will incorporate Google Gemini Flash
1.5 with ESP32-CAM to facilitate real-time plant health monitoring and face
recognition-based security. By utilizing AI-driven analysis, the system can
proactively detect plant diseases and security threats, enabling immediate
intervention when necessary.

Enhance Communication Efficiency: The implementation of the ESP32-NOW


protocol will establish a Master-Slave network, ensuring fast, low-latency, and
energy-efficient data transmission between IoT devices. This will allow seamless
communication among sensors, cameras, and controllers, improving overall system
responsiveness.

Automate Environmental Control: The system will feature an automatic watering


mechanism that activates based on real-time soil moisture levels. By optimizing
water usage, this approach reduces water wastage while ensuring optimal conditions
for plant growth and health.

Ensure Reliable Security Features: To enhance home security, the system will
integrate motion sensors, sound detectors, and smoke sensors. These sensors will
trigger real-time alerts and automated security responses, such as activating alarms
or notifying homeowners of potential threats.

Enable Remote Monitoring and Control: The Blynk IoT platform will be
integrated into the system, allowing users to monitor and control both plant
protection and home security features through a smartphone application. This
functionality ensures real-time data visualization and remote system management,
providing users with enhanced control over their environment.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 17
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

1.7 Organization of the Report

This report is organized into ten chapters to provide a comprehensive understanding


of the integrated system for plant protection and home automation. Chapter 1
introduces the project by outlining the background, motivation, problem statement,
and objectives. Chapter 2 presents a literature survey that reviews existing work
related to IoT-based smart agriculture, home automation, and AI-driven monitoring
systems. Chapter 3 explains the system architecture, including the master-slave
configuration using ESP32 microcontrollers and sensor distribution. Chapter 4
focuses on the design and implementation of both hardware and software
components, along with communication protocols and AI integration. Chapter 5
details the hardware and software used, such as sensors, microcontrollers, the
ESP32-CAM, and platforms like Blynk and Arduino IDE. Chapter 6 describes the
functional aspects of the system, including automatic irrigation, environmental
monitoring, image-based plant health analysis, and security automation. Chapter 7
presents the results and observations through sensor data, system graphs, and
performance metrics. Chapter 8 discusses the key advantages of the system and its
potential real-world applications. Chapter 9 concludes the report by summarizing the
outcomes and proposing directions for future improvements. Finally, Chapter 10
provides the references cited throughout the report.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 18
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
Chapter 2
LITERATURE SURVEY

The IoT technologies play a significant role in plant protection and home
automation, emphasizing real-time monitoring and data collection from multiple
sensors[14]. The sensor networks implemented for monitoring soil moisture,
temperature, and humidity enable farmers to make informed irrigation and pest
management decisions. This approach underscores the significance of data analytics
in enhancing agricultural productivity and sustainability, directly informing plant
protection strategies. Additionally, the paper explained that research [15] identifies
vulnerabilities in home security applications. As smart devices become more
integrated, the risk of cyberattacks increases, highlighting the necessity for robust
security protocols and encryption methods to safeguard sensitive data transmitted by
IoT devices, ensuring the system's reliability.
A smart home automation system leveraging IoT and Raspberry Pi presented a case
study on incorporating remote monitoring and control functionalities [14]. The
study explained that the utilization of various sensors and actuators enables efficient
home environment management [15]. The paper further explains that the study's
findings directly apply to the proposed project, facilitating seamless integration of
home security with plant monitoring capabilities [16]. Furthermore, research [17]
explored energy optimization strategies in smart homes, demonstrating how
integrating renewable energy sources and intelligent control systems can reduce
energy consumption while maintaining comfort and security. This approach was
crucial for the sustainability of the integrated system, promoting efficient resource
use in home security and plant protection.
The IoT-based smart greenhouse concept details a system that monitors critical
environmental parameters, such as temperature and humidity, implementing
automated irrigation based on sensor feedback [18]. This discusses how smart
sensors play an essential role in agricultural settings to maintain optimal plant health
conditions. Additionally, a comprehensive environmental monitoring system using
IoT was examined, showcasing the importance of real-time data collection in
responding to environmental changes. The paper highlights how this research
aligned with the project’s goal of simultaneously monitoring plant health and
security conditions [19]. Another study [20] emphasized sustainability principles
Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 19
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
in smart home designs, technologies that promote energy efficiency and waste
minimization. These insights provide a foundation for ensuring that the integrated
system adheres to sustainable practices while focusing on security and plant
protection.
A systematic survey [21] identified the barriers to the widespread adoption of IoT
technologies in agriculture, including high costs, technical complexity, and lack of
interoperability among devices. The paper discussed how addressing these
challenges is critical for developing an effective integrated system that meets user
needs while ensuring ease of implementation. The research on wireless sensor
networks (WSNs) and IoT technologies in smart cities emphasized the role of low-
power communication protocols such as ZigBee and LoRa in optimizing urban
infrastructure, including traffic management and street lighting control systems. The
paper further explained the technology's contribution to energy efficiency and
improved scalability in smart city applications while addressing challenges related
to sensor reliability, data transmission, and network security [22].
Wearable sensors in healthcare and agriculture were explored, focused on real-time
activity monitoring and chronic disease management. The paper explained the
agriculture, wearable sensors track livestock health by monitoring parameters such
as heart rate, temperature, and movement patterns, providing valuable data for farm
management. These technologies enable early detection of health issues and
optimize farm operations [23]. The IoT systems widely utilized in smart agriculture
to monitor environmental conditions like soil moisture, temperature, and humidity,
automating irrigation processes and optimizing water usage, which is particularly
crucial in resource-constrained environments [24,25]. Moreover, the wearable
sensors have emerged in agriculture for real-time livestock monitoring, enhancing
farm management [26].
The convergence of IoT technologies with plant protection and home security had
attracted significant research interest. Various studies have explored these domains,
addressed challenges, and proposed innovative solutions. This literature survey
synthesizes key methodologies informing the design of the Integrated Plant
Protection and Home Security System [29]. The paper explains that advancements
in smart home automation, particularly through integrating WSNs, have led to
extensive research on improving sensor efficiency and energy management in smart
environments [30,31]. Additionally, systematic surveys on Arduino-based smart
Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 20
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
home systems highlight existing IoT applications in environmental monitoring [32].
The Research into IoT systems for water level monitoring and quality detection
identifies challenges such as accuracy and data representation [33,34].
The integration of IoT technologies presented both opportunities and challenges.
The paper discussed the trend in IoT projects, emphasizing digital solutions for
energy management. Various communication standards, including WPANs (IEEE
802.15.4) and WLANs (IEEE 802.3), are essential for establishing robust industrial
IoT infrastructures [35].
This literature survey explores the convergence of IoT technologies in plant
protection, home automation, and smart cities, emphasizing real-time monitoring,
data collection, and sustainability. The paper highlights key findings that show how
IoT sensors play a role in environmental monitoring for informed irrigation and pest
control decisions, while addressing the significance of data analytics in enhancing
agricultural productivity. Additionally, it discusses smart home systems utilizing
Raspberry-Pi and sensor networks to optimize energy consumption and
environmental monitoring. The project also underscores the necessity of
integrating robust security in home automation and IoT frameworks.

2.1 Background work

The background work was built upon various studies that focus on security,
automation, and efficient data communication in IoT-based systems. A security-
enabled safety assurance framework for smart homes has been proposed,
emphasizing real-time monitoring and conflict resolution between interconnected
systems [30]. This framework highlighted the importance of addressing safety
hazards caused by device failures or adversarial interactions, which aligns with
our system's dual focus on home security through facial recognition and plant health
monitoring. However, it does not integrate agricultural monitoring, a gap that our
work aims to bridge. Additionally, a system utilizing a low-cost AT89S52
microcontroller was developed, incorporating soil moisture and temperature sensors
with a threshold-based control mechanism for irrigation. The system activates a
water pump when soil moisture falls below a predefined level or when temperature
exceeds a set threshold [19]. Data processing is handled through an analog to digital
convertor (ADC) and microcontroller, which trigger relay switches to control the
Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 21
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
irrigation system. By integrating AI-driven anomaly detection, the framework
enhances efficiency and resource conservation, aligning with sustainable
agricultural practices. Another significant development in this domain involves the
use of ESP32 SoCs configured within a low-power wireless sensor network,
leveraging Wi-Fi, ESP-NOW, and message queuing telemetry transport for efficient
communication (MQTT). The architecture was designed as a self-contained system,
using the ESP32 built-in radio capabilities to enable direct communication without
reliance on external platforms. The sensor data, includes temperature and humidity,
was collected and transmitted to a central node, which then publishes the
information via MQTT for real-time visualization and automation through Home
Assistant. The implementation of ESP-NOW ensures low-latency communication,
making it crucial for real-time data collection and event-driven automation in
integrated plant protection and home security systems [28]. Furthermore, embedded
sensor systems employing ESP-NOW in a mesh network topology have been
explored for industrial monitoring, ensuring high reliability and timely data
delivery. These systems employ an auto-mesh reconfiguration protocol based on a
distributed algorithm, allowing nodes to dynamically adjust routing tables and
maintain resilience against failures. The local data processing techniques, including
statistical analysis, optimize network bandwidth by reducing the volume of
transmitted data. Thermal simulations have been used to validate system reliability
under heavy processing loads, influencing the node hardware architecture. The use
of ESP-NOW in such systems ensures secure communication through encryption
and authentication, preserving data integrity and overall system security during
operation.[45]

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 22
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Chapter 3

Design Approach and Methodology

3.1 System Design and Analysis for Plant Protection

The Fig. 3.1 illustrates the detailed process of designing and analyzing systems in a
smart home automation and plant protection, primarily focusing on ensuring safety.
It begins with identifying all the individual systems involved, such as sensors for
soil moisture, irrigation controllers, weather monitoring devices, and other smart
agricultural tools [26]. Once these systems are identified, the next step is to define
safety goals for each of them, outlining how they should behave under various
conditions.

Figure 3.1: Plant protection workflow

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 23
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
Further, the safety goals are established, and the systems undergo analysis to
evaluate their operational states from a safety perspective. For instance, what actions
should be taken when sensors detect excessive moisture or when the weather
monitor forecasts extreme conditions. This is followed by defining specific actions
at each operational state for the safety assurance of the entire agricultural system.
The process also involves identifying any contradictions or conflicts between the
systems. For example, a conflict might arise if the irrigation system turns on during
a period when a weather sensor detects an incoming storm [22]. When the
contradictions are identified, the next step is to adapt the predefined actions to
resolve these conflicts, ensuring all systems work in harmony. Finally, an
executable model is developed for safety monitoring, continuously checking the
systems and their operational states. In the operational phase, this model monitors
the systems, determines their safety status in real time, and takes appropriate actions
to ensure safe operation based on the data collected [27].

3.2 System Design and Analysis for Home Automation

The Fig. 3.2 outlines the process for automating home appliances using an Wi-Fi
module. The process begins with the system attempting to connect the ESP8266
module to the internet. If the module successfully connects, it allows the user to
control home appliances like lights, fans, or other devices using a smartphone
application. If the internet connection is unavailable, manual operation of the
appliances using physical switches is still possible as a fallback option [23]. In the
design phase, individual systems are identified, safety goals are set, operational
states are analyzed, actions for safety are defined, contradictions between systems
are resolved, and an executable safety monitoring model is developed. In the
operation phase, systems are monitored continuously to gather data and determine
their safety status using the developed model. Appropriate actions are taken to
maintain safe operations based on the current situation. The process integrates a
feedback loop to learn and adapt actions for improving safety measures. This
framework emphasizes a proactive and dynamic approach to system safety in
smart environments.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 24
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

System Design and Analysis

Identify individual systems in the smart environment.

Define safety goal(s) for the systems.

Analyses the systems for safety and specify their operational states in
regard to safety.

Define actions at each state for the safety assurance of each system.

Identify contradictions between the systems if there exist any.

Adapt the actions defined for the states to address the conflicting
situation.

Develop executable models for safety monitoring.

use learn and adapt


System Operation

Monitor the systems and gather operational data and evidence.

Determine the current safety status of the systems based on the


continuous execution of the executable model.

Take appropriate action(s) for the current situation to assure safe

Figure 3.2: Home automation framework

Once the Wi-Fi module is connected, the user can remotely switch the appliances on or off
via the smartphone app. The app sends a command to a relay, which acts as an intermediary
that turns the appliances on or off based on the user’s input. Additionally, the status of the
appliances (whether they are turned on or off) can be monitored through different mediums,
such as an LCD display, a personal computer, or the mobile app itself. The flowchart
concludes with the end of the process, which ensures that home appliances can be
controlled efficiently and monitored remotely, enhancing both automation and ease of use
in a smart home environment.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 25
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

3.3 Integrated workflow for Plant Protection & Home Automation

Fig. 3.3 illustrates the integrated workflow of an automated plant protection and
home security system utilizing IoT and sensor networks. This system is designed to
optimize agricultural management while ensuring home security through real-time
monitoring and automated decision-making.

Figure 3.3: Integrated workflow for plant protection and home automation

The process begins with the initialization of all system components, including
sensors, motors, LEDs, and communication modules. Once initialized, the system
operates in two distinct modes:
Manual Mode: Users can manually control the activation of motors using dedicated
buttons. This mode allows for user intervention when necessary, providing
flexibility in system operations.
Automatic Mode: The system autonomously evaluates sensor readings to trigger
appropriate actions based on predefined thresholds.
Automated Functionalities tank Status Monitoring: The system continuously checks
the water level in the tank. If the water level meets or exceeds the predefined
threshold, Motor1 is activated to regulate water supply. Simultaneously, a Blue LED

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 26
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
is illuminated to indicate active water distribution.
Soil Moisture Regulation: The system monitors soil moisture levels and, upon
detecting dryness beyond a set threshold, activates Motor 2 to facilitate irrigation. A
Green LED is turned on to provide a visual indication of the irrigation process.
Smoke Detection and Fire Prevention: A smoke detector assesses environmental air
quality. If smoke levels surpass the defined threshold, the system triggers Motor 3,
activates a buzzer, and lights up a Yellow LED. Additionally, a real-time
notification is sent to alert users, enhancing fire prevention measures.
Intruder Detection and Security Alert: The integrated security system employs
motion sensors to detect unauthorized entry. Upon intrusion detection, a Red LED
and a buzzer are immediately activated. Additionally, a real-time alert is sent to the
user, ensuring rapid response to potential security threats.

This IoT-driven solution efficiently integrates smart agriculture and home


automation, offering optimized resource management, enhanced safety measures,
and real-time decision-making capabilities. The automation of irrigation, fire
prevention, and security responses makes it an ideal system for modern smart
farming and residential safety applications.

Working:
The flowchart depicts an IoT-based smart monitoring and automation system. It
begins by initializing all components and reading sensor values to determine the
operating mode. In manual mode, the user can engage Button 1, 2, or 3 to directly
control Motor 1, Motor 2, and Motor 3. In automatic mode, the system monitors
four parameters: tank status, soil moisture, smoke levels, and intruder detection. For
tank status, if the water level exceeds the threshold, Motor 1 and a blue LED are
activated. For soil moisture, if the moisture level is higher than the threshold, Motor
2 and a green LED turn on. The smoke detector activates Motor 3, a buzzer, and a
yellow LED when smoke levels surpass the threshold, sending a real-time
notification. Similarly, the intruder detector triggers a red LED and buzzer if an
intruder is detected, accompanied by a real-time alert. Each monitoring process ends
after completing its task. The system uses LEDs for visual indication, motors for
control actions, and real-time notifications for alerts, making it an efficient solution

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 27
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
for home automation and security.
3.2 Hardware and Software Description
This section outlines the hardware and software components used in the "Integrated
Plant Protection and Home Security System Using IoT and Sensor Networks." Each
component plays a crucial role in ensuring the efficient operation of the system.

3.3.1 Hardware requirements


Component Type Description
ESP32 Development Main microcontroller unit
Board
ESP32-CAM Board Includes camera module
Soil Moisture Sensor Monitors soil moisture levels
DHT11 Sensor Measures temperature and humidity
LDR (Light Dependent Monitors ambient light levels
Resistor)
Water Pump (Motor1) Used for irrigation
Fire Fan/Motor Controls fan/motor for fire suppression
(Motor2)

Table 3.1 – Hardware requirements

Relay Module Controls motor based on moisture readings


Ultrasonic Sensor Measures water levels
Buzzer Provides feedback through sound
Wiring connectors Electrical connections between components
Breadboard or PCB A platform for mounting components
Water Flow Sensor Monitors water flow
Smoke Sensor Detects smoke for fire safety
PIR Sensor Detects motion
Sound Sensor Measures sound levels
OLED Display (I²C) Displays user interface and results
BUTTON Triggers image capture

Table 3.1.2 – Hardware requirement

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 28
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

The hardware requirements for the automated soil moisture control, fire safety, and
monitoring system encompass a variety of components, each playing a vital role in
ensuring efficient functionality and seamless operation. At the core of the system is
the ESP32 Development Board, which acts as the main microcontroller unit (MCU),
responsible for processing data from various sensors, controlling the motors, and
managing both automatic and manual operations. Complementing it is the ESP32-
CAM Board, which features an integrated camera module that enables the system to
capture images or stream live video, making it capable of real-time surveillance for
detecting intrusions or remotely monitoring the environment.

To measure and maintain optimal soil moisture levels, the system uses a Soil
Moisture Sensor that detects the soil's water content by measuring electrical
resistance. When the moisture level falls below a predefined threshold, the Water
Pump (Motor 1) is activated, ensuring the plants receive sufficient hydration. The
system also includes a DHT11 sensor, which monitors temperature and humidity,
allowing the system to optimize irrigation cycles based on weather conditions.
Additionally, the LDR (Light Dependent Resistor) detects ambient light levels,
enabling the system to schedule irrigation during times of lower evaporation, such
as early morning or evening, thereby conserving water.

For fire safety, the system employs a Fire Fan/Motor (Motor 2), which activates
when high temperatures or smoke are detected. This component powers a fan or
suppression mechanism to help mitigate fire hazards. The Smoke Sensor plays a key
role in detecting the presence of smoke, ensuring the system responds promptly to
potential fire incidents. A Relay Module is used to control the motors based on the
moisture sensor readings, allowing the system to autonomously activate and
deactivate the irrigation or fire suppression mechanisms.

To enhance water management, the system includes an Ultrasonic Sensor, which


measures water levels in the reservoir, ensuring sufficient water supply for
irrigation. A Water Flow Sensor is also incorporated to monitor the rate of water
flow, ensuring consistent and efficient watering operations. For auditory feedback,
the system uses a Buzzer, which alerts users to events such as low water levels, fire
detection, or intrusions, providing timely notifications.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 29
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
For security and motion detection, the system is equipped with a PIR (Passive
Infrared) Sensor, which detects motion by sensing infrared radiation from moving
objects, enhancing the system’s intrusion detection capabilities. Additionally, a
Sound Sensor measures sound levels, which can be used for noise monitoring or
detecting unusual sound patterns. The system features an OLED Display (I²C) that
serves as the visual interface, providing real-time information on operational status,
sensor readings, and alerts. A Button is also included, allowing the user to manually
trigger specific actions, such as capturing images using the ESP32-CAM or
activating the motors.

Overall, this combination of hardware components makes the system highly


intelligent, adaptable, and multifunctional. The ESP32 board manages the
environmental, security, and fire safety operations, while the ESP32-CAM provides
real-time surveillance. The system’s ability to monitor and manage soil moisture,
water levels, and fire incidents makes it ideal for smart farming, automated
gardening, and remote environmental monitoring applications. Its water
conservation features, intrusion detection, and real-time notifications add further
practicality, making it a reliable and efficient solution for various automation needs.

3.3.2 Software Tools

Software Tool Description


Arduino IDE For programming all systems
Blynk App For remote monitoring and control
DHT Library For DHT sensor control
LiquidCrystal_I2C For I²C LCD control
Adafruit GFX Library For graphical display on OLED
Adafruit SSD1306 For controlling the OLED display
HTTP Client Library For making HTTP requests
ESP-NOW Library For ESP-NOW communication (in IoT Home
Automation)

Table 3.2 – software requirement

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 30
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
The software requirements for the automated soil moisture control, fire safety, and
monitoring system consist of various tools and libraries that ensure seamless
programming, communication, and data visualization. At the core of the system is
the Arduino IDE, which serves as the primary platform for programming and
uploading firmware onto the ESP32 board. It provides a user-friendly interface for
coding, debugging, and managing the system's operations efficiently. To enable
remote monitoring and control, the system integrates the Blynk App, which allows
users to remotely access real-time data, monitor sensor readings, and activate or
deactivate system components directly from their smartphones. This enhances the
system's accessibility, enabling users to manage and control the system from any
location.

For accurate environmental data collection, the system uses the DHT Library, which
manages the DHT11 sensor responsible for measuring temperature and humidity
levels. The system also includes a LiquidCrystal_I2C library to control the I²C-
based OLED display, making it easy to visualize real-time data and system status.
To enhance the display's graphical interface, the system incorporates the Adafruit
GFX Library, which allows for the creation of customized graphics, text, and visual
elements, making the displayed information clear and visually appealing.
Additionally, the Adafruit SSD1306 Library handles the OLED display's operation,
ensuring smooth rendering of both static and dynamic content, such as real-time
sensor data and notifications.

For internet-based operations, the system uses the HTTP Client Library, which
facilitates HTTP requests and responses, enabling the system to send and receive
data from web servers or cloud platforms. This feature is particularly beneficial for
IoT-based applications, as it allows the system to transmit sensor readings, receive
commands, and provide status updates over the internet. Furthermore, the system
employs the ESP-NOW Library, which enables fast, low-power, peer-to-peer
communication between ESP32 devices. This library is particularly useful for IoT
home automation, as it allows devices to communicate directly without relying on a
Wi-Fi network, ensuring faster data transfer and improved efficiency.

Overall, this combination of software tools and libraries makes the system highly
efficient, adaptable, and user-friendly. The Arduino IDE provides a solid foundation

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 31
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
for programming and customization, while the Blynk App offers remote
accessibility and control. The libraries streamline sensor data management, display
visualization, and communication processes, ensuring the system functions
smoothly and reliably. Together, these software components enable the system to
offer real-time monitoring, remote control, and automation capabilities, making it
ideal for applications in smart agriculture, fire safety, and home security.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 32
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
Chapter 4

Implementation

4.1 Model of Integrated Plant Protection and Home Automation

From fig. 4.2 This image showcases a prototype model for the Integrated Plant
Protection and Home Automation (PP&HA) System using IoT and sensor networks.
The setup consists of various electronic components, including ESP32
microcontrollers, relays, sensors, push buttons, and an LCD display, all arranged on
a cardboard base for demonstration.
The system features a liquid dispensing mechanism, controlled via pumps and tubes
connected to bottles, which likely serve as pesticide or water reservoirs for
automated plant care. The sensors and relays suggest functionalities such as
moisture detection for irrigation, gas sensors for air quality monitoring, motion
sensors for security, and temperature/humidity monitoring for environmental
control.

Figure 4.2: Integrated plant protection and home automation design

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 33
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
4.2 ESP32-NOW Protocol
By leveraging ESP32-NOW for wireless communication, multiple microcontrollers
can be connected over a unified network, enabling seamless control of the entire
setup from a single interface

Fig. 4.3 illustrates a one-to-many communication setup using ESP32 boards,


where a single ESP32 Sender Board transmits data wirelessly to multiple ESP32
Receiver Boards using the ESP-NOW protocol. This setup allows for fast, low-
power, and connectionless communication, making it highly efficient for IoT-based
applications where real-time data transmission is crucial.
 Understanding ESP-NOW Protocol and Master-Slave Concept

ESP-NOW is a peer-to-peer wireless communication protocol developed by


Espressif, designed to enable instant data transmission between ESP32 devices
without requiring a Wi-Fi connection. In this setup:
 The ESP32 Sender (Master) is responsible for transmitting data packets.

 The ESP32 Receivers (Slaves) listen for incoming messages and execute
specific tasks based on the received data.
Unlike traditional Wi-Fi-based communication, ESP-NOW operates independently
of a router, reducing latency and power consumption. It is especially useful for IoT
applications

Figure 4.3: ESP-NOW Protocol with Master-Slave Concept (One-to-Many


Communication)

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 34
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
requiring multiple devices to communicate seamlessly, such as smart
agriculture, home automation, and industrial monitoring systems.
 Working Mechanism of the System
1. Master Device Initialization:
The ESP32 Sender Board initializes and configures the ESP-NOW
protocol. It identifies and registers multiple receivers (Slaves) using
their MAC addresses.
2. Data Transmission:
The ESP32 Sender sends messages via broadcast or unicast to the
ESP32 Receiver Boards.
The data may include sensor readings, control commands, or status updates.
3. Receiver Response and Execution:
Each ESP32 Receiver listens for incoming packets and executes
predefined actions.
The response could include activating a motor, switching an LED,
triggering an alarm, or sending feedback to the master.
 Practical Application in the Project
This system plays a crucial role in the integrated plant protection and home security
system by enabling real-time control and monitoring of various components:
Automated Irrigation: The ESP32 Sender can send commands to multiple ESP32-
based irrigation controllers, ensuring precise water distribution based on sensor
feedback.
Fire and Smoke Detection: A central ESP32 can detect smoke levels and instantly
notify multiple receivers, which could activate alarms, ventilation systems, or
emergency alerts. Intruder Detection and Security Automation: When motion
sensors detect an intruder, the ESP32 master can notify multiple ESP32 security
nodes to trigger sirens, security lights, or send alerts.
Remote Monitoring and Control: The master ESP32 can act as a gateway to
collect data from multiple nodes and relay it to a mobile app or cloud-based
dashboard.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 35
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
Advantages of Using ESP-NOW in This Project
Low Power Consumption: Ideal for battery-operated devices in smart agriculture
and security applications.
Fast Data Transmission: Near real-time communication without Wi-Fi overhead.

No Dependency on Wi-Fi Routers: Devices communicate directly using ESP-


NOW, ensuring reliable performance even in remote locations.[45]

Scalability: Supports multiple receivers, making it adaptable for large-scale IoT


implementations.
By leveraging ESP-NOW, this system creates a robust, efficient, and cost-effective IoT
solution, ensuring seamless coordination between the plant protection and home security
modules.

4.3 AI Vision

The AI Vision Project is designed to automate the process of capturing images and
analyzing their content using artificial intelligence. When an image is captured, it is sent to
an AI model, such as Google Gemini API, which processes the image and generates a
descriptive summary. This allows the system to recognize objects, detect patterns, and
provide meaningful insights based on the captured data. This project can be used for
automated monitoring, real-time recognition, and data analysis. It can identify objects,
extract text from images, and generate context-aware summaries, making it useful for
various fields such as security, automation, and documentation.[47]

In our integrated system where hardware meets cloud intelligence in a seamless, real-time
AI vision application. The ESP32-CAM module, paired with a strategically deployed
OLED display, is at the heart of this solution. When the user presses the designated button,
the camera activates a flash to secure optimal image quality before capturing a photograph.
Immediately afterward, the image is encoded into a Base64 string, which serves as the
digital passport for transmitting binary data to the Google Gemini API.[48]

In the backend, this encoded image is packaged within a JSON (JavaScript object notation)
payload that includes a concise text prompt requesting a summary of the image’s context.
The system then leverages a robust HTTP POST (Hypertext transfer protocol)( request to
send this payload to the Gemini API endpoint, which harnesses advanced machine learning
to analyze the visual data. Upon receiving the response, the code parses the resulting insight
and dynamically displays it on the OLED screen, complete with smooth scrolling to
Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 36
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
accommodate longer text. An integrated buzzer provides an auditory cue, reinforcing the
user feedback loop and ensuring an engaging experience.
Fig 4.4 encapsulates this dynamic interplay of components and processes, illustrating the
flow from image capture to cloud-based analysis and user feedback. This system embodies
a forward-thinking integration of IoT hardware with cloud AI capabilities, setting a
new benchmark in operational efficiency and interactive design.

Figure 4.4: AI Vision for image analysis

4.5 Implementing Facial Recognition for Access Control

Fig 4.5.1 shows the integration of an ESP32-CAM with a facial recognition model
represents a significant advancement in the functionality of our integrated system.
This chapter details the implementation of a convenient and secure access control
mechanism that enhances user experience. By recognizing authorized individuals
automatically, the system eliminates the need for traditional key-based entry,
enhancing both security and user convenience. The successful integration of this
sophisticated feature highlights the versatility and adaptability of the IoT platform

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 37
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
within a smart home environment [2].
4.5.1 Facial Recognition Process:
Figure 4.5 shows the facial recognition system follows a structured sequence of
operations to ensure secure and efficient access control. The process flow is
illustrated in Figure 4.5 and consists of the following key stages:

1. Image Capturing: The ESP32-CAM module captures real-time images of


individuals approaching the access point.
2. Face Identification: The captured image is processed to detect and isolate facial
features.
3. Feature Extraction: Unique facial features are extracted and encoded into a feature
vector for identification.
4. Facial Database Comparison: The extracted features are compared against a pre-
stored database of authorized users.
5. Feature Similarity Check: The system evaluates the similarity score to determine
if the individual is an authorized user.
6. Face Identifier Processing: If a match is found, the system validates the user’s
credentials.
7. Action Execution: Based on the verification result, the system triggers an
appropriate action, such as unlocking a door or denying access.

The facial recognition system offers several advantages, making it a viable security
solution for smart home applications. It is energy-efficient, as the ESP32-CAM
operates with low power consumption, ensuring sustainability in IoT-based security
setups. The real-time processing capability provided by edge AI reduces latency,
allowing for quick and efficient access decisions. Additionally, the use of open-
source models and hardware significantly lowers deployment costs, making the
system cost-effective. Most importantly, the facial recognition system enhances
security by eliminating risks associated with traditional key-based entry methods,

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 38
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 39
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Future Enhancements

To further improve the system, future iterations could integrate:

Multi-Factor Authentication (MFA): Combining facial recognition with


fingerprint or voice authentication for added security.

Adaptive Learning Models: Implementing self-learning AI to improve recognition


accuracy over time.

Offline Mode: Enabling local AI processing to minimize internet dependency and


enhance privacy.

This implementation showcases the potential of IoT-driven security solutions,


creating a seamless, intelligent, and secure smart home environment.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 40
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Chapter 5
Result and Discussions

5.1 Serial Monitor values for integrated framework

5.1.1 Manual mode


This Table 8.1 represents manual mode sensor readings and motor activation status in
manual mode for an automated water and soil moisture control system. As the water level
decreases from 8 cm to 3 cm, the soil moisture values also decrease. When the water level
is below 8 cm, Motor 1 (water pump) is turned ON, indicating the system is trying to
maintain the water level. Motor 2 (irrigation pump) is ON when soil moisture is high but
turns OFF as moisture decreases, suggesting a threshold-based activation. The smoke
sensor values remain stable, and the temperature remains constant at 26.70°C, implying no
fire-related activity. The system ensures water management based on soil moisture and
water levels.

Table 5.1: Manual mode readings

5.1.2 Automatic mode


The table 8.2 showcases the system's behaviour in automatic mode, where Motor 1 (water
pump) and Motor 2 (irrigation pump) operate based on water level, soil moisture, and
smoke sensor readings. Motor 1 remains ON when the water level is 5 cm or above but
turns OFF at 4 cm, indicating a threshold-based operation. Motor 2 stays OFF initially but
activates when the water level reaches 5 cm or lower, suggesting it responds to soil moisture

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 41
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

needs. The smoke sensor values increase from 511 to 853, and Motor 1 turns OFF at higher
smoke levels, possibly as a fire prevention measure. Meanwhile, the temperature remains
constant at 26.70°C, showing it does not influence system behaviour. This table highlights
the system's adaptive functionality, ensuring efficient water and soil moisture management
while responding to environmental changes.

Table 5.2: Automatic mode readings

5.2 Graphs: Drawn Using Matplotlib

5.2.1 Water level vs Motor status


Figure 5.1 illustrates the relationship between water level and motor behavior over time.
The blue line represents water level (cm), while the red line shows motor status (ON = 1,
OFF = 0). A threshold level of 5 cm (dashed black line) determines when the motor turns
on or off. As the water level drops below 5 cm, the motor switches OFF, and as the water
level rises above 5 cm, the motor turns ON again. This cyclical pattern repeats,
demonstrating an automated water level control system where the motor activates when the
water level is sufficient and stops when it falls below the threshold. The annotations
confirm motor behavior at various points, reinforcing how it reacts dynamically to changes
in water level.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 42
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Figure 5.1: Tank water level and motor status (cutoff -5cm)

5.2.2 Soil moisture vs Motor status


Figure 5.2 visually represents the relationship between soil moisture levels and the
operation of Motor2 over time. The blue line in the graph denotes the fluctuating soil
moisture levels, while the dashed black line indicates the threshold value of 2500, which
serves as the activation point for the motor. The green-shaded regions highlight the periods
when Motor2 is turned ON. Initially, the soil moisture level is above 2500, keeping the
motor in an active state. However, as time progresses, the moisture level gradually
decreases, eventually dropping below the threshold, which leads to the motor turning OFF.
The soil moisture follows a V-shaped trend, reaching a minimum value of approximately
2000 before it starts increasing again. Once the moisture level surpasses the threshold of
2500, the motor is reactivated. This behavior indicates the presence of an automated
irrigation system, where Motor2 functions dynamically based on real-time soil moisture
readings. The system ensures efficient water management by activating the motor only
when the moisture drops below the set threshold, preventing unnecessary watering and
optimizing irrigation for plant health.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 43
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Figure 5.2: Soil moisture level and motor status(cutoff – 2500)

5.2.3 Smoke level vs Motor status


Figure 5.3 illustrates the relationship between smoke sensor readings and the operational
status of Motor2 over time. The blue line represents the fluctuating smoke levels, while the
red dashed line marks the threshold value of 700, which determines when the motor should
activate. Initially, the smoke level remains below the threshold, keeping the motor OFF.
However, as time progresses, the smoke concentration rises and eventually crosses the 700
mark at around 30 seconds, triggering the motor to turn ON. This activation is visually
represented by the green-shaded region in the graph. The motor continues to operate as
long as the smoke level remains above the threshold, ensuring continuous ventilation or
extraction of smoke. After 50 seconds, the smoke level begins to decline, and once it falls
below the threshold, the motor turns OFF again. This system functions as an automated
smoke detection and response mechanism, ensuring that the motor is activated only during
periods of high smoke concentration. Such a setup is crucial for maintaining air quality and
enhancing safety in enclosed spaces, as it promptly responds to hazardous smoke levels.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 44
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Figure 5.3: Smoke sensor data and motor status(cutoff – 700)

5.2.4 Sound Sensor Integration


The graph 5.4 titled "Sound Sensor Response with Notifications" represents the sound
level (in decibels, dB) over time (in seconds) and includes a threshold line at 60 dB to
indicate when notifications are triggered. The x-axis shows the progression of time from 0
to 20 seconds, representing the sound sensor's response at different intervals, while the y-
axis displays measured sound levels ranging from 20 dB to 100 dB, where higher values
indicate louder sounds. A green line with circular markers plots the real-time sound
levels recorded by the sensor, illustrating fluctuations in sound intensity over time. A red
dashed line at 60 dB represents the threshold beyond which a notification is triggered,
meaning any sound level above this line activates an alert mechanism. The interpretation
of the graph indicates that the sound sensor records varying noise levels, and whenever the
green line crosses the 60 dB threshold, the system likely sends a notification. The highest
peak reaches around 100 dB, suggesting a loud noise event, while multiple instances of the
sound level dropping below 60 dB imply moments where no alerts would be sent. This
visualization effectively demonstrates noise fluctuations and how often alerts are activated.
The graph has practical applications in noise pollution analysis, home security, industrial
safety, and smart home automation, where real-time monitoring and alerts are essential for
detecting high noise levels.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 45
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Figure 5.4: Sound Sensor Data with Threshold-Based Alert System(cutoff – 60dB)

5.2.5 Motion sensor Integration

The graph 5.5 titled "Motion Sensor Detection with Notifications" illustrates the motion
detection status over time, where the X-axis represents time in seconds (0 to 20), and the
Y-axis indicates whether motion is detected (1 for motion, 0 for no motion). The red line
shows when the motion sensor detects movement, triggering notifications at those
instances. The pattern of alternating 1s and 0s suggests intermittent motion detection,
meaning movement occurs at specific intervals while the system remains idle when no
motion is present. Each transition from 0 to 1 likely activates an alert, making the system
effective for monitoring movement in real-time. This type of sensor application is widely
used in home security, smart surveillance, automated lighting, and energy-efficient
systems, where real-time motion detection helps enhance security and optimize resource
usage.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 46
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Fig. 5.5 Motion Sensor Response with Notifications

5.2.6. LDR (Light Sensor) Integration

The graph 5.6 titled "LDR Sensor Response with Notifications" illustrates how light
intensity (lux) varies over time and how the system responds to low-light conditions. The
x-axis represents time progression from 0 to 20 seconds, while the y-axis displays light
intensity values ranging from 300 to 900 lux. The blue line with circular markers represents
real-time light intensity fluctuations recorded by the LDR (Light Dependent Resistor)
sensor.

A red dashed line at 500 lux serves as the threshold, determining when notifications are
triggered. Whenever the light intensity drops below this threshold, highlighted yellow
regions appear, indicating low-light conditions that require attention. This system can be
used in smart lighting automation, security systems, or energy-efficient applications,
ensuring that lights turn on or alerts are sent whenever illumination falls below a critical
level. By monitoring and responding to real-time light intensity variations, this system
enhances convenience, safety, and energy efficiency in various environments.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 47
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Fig. 5.6 LDR Sensor Response with Threshold-Based Notifications.(cutoff – 500Lux)

5.2.7. ESP32-NOW Protocol


The graph 5.7 illustrates the latency performance comparison between ESP32-NOW
communication and individual microcontroller operations as the number of connected
devices increases. The x-axis represents the number of devices (5, 10, 15, and 20), while
the y-axis shows the latency in milliseconds (ms).
Two distinct data series are present:
Green Line (ESP32-NOW): Demonstrates low-latency, efficient communication, with
latency increasing moderately from 100ms to 250ms as the device count rises.
Red Line (Individual Microcontroller Operations): Exhibits significantly higher latency,
rising steeply from 400ms to 1000ms, indicating inefficiency when handling multiple
devices.
The results emphasize that ESP32-NOW is a scalable and low-latency solution, making it
highly suitable for applications where fast and synchronized communication between
multiple microcontrollers is essential. In contrast, individual microcontroller operations
struggle to maintain performance as the network size grows, making them less viable for
real-time applications.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 48
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Fig. 5.7 Latency Performance Comparison: ESP32-NOW vs. Individual


Microcontrollers

5.3 Google Gemini Flash 1.5


5.3.1 Results of Google AI Gemini flash 1.5 API for image analysis
The ESP32-CAM, integrated with Google AI Gemini Flash 1.5, will process real-time plant
images and provide detailed insights of the health of the plant. The output from the image
analysis can be seen below.

Fig. 5.8 shows Google AI Gemini Flash 1.5 analyzed the captured image and provided the
following output:

"The plant is in poor health. The tomatoes are rotting with black spots, likely due to fungal
or bacterial infections. The leaves are dry and shriveled, showing disease or water issues.
Some fruits are overripe and damaged. Possible causes include infections, poor watering,
nutrient deficiency, or pests. Remove infected parts, improve airflow, and water properly,
and use organic treatments to help the plant recover."

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 49
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Figure 5.8: Pest infected plant for image analysis

Detailed Analysis

 Rotting Tomatoes with Black Spots: The presence of black spots on the tomatoes
suggests fungal or bacterial infections, such as blossom end rot, late blight, or
anthracnose. These diseases thrive in humid conditions and often spread due to poor
ventilation and excessive moisture.

 Dry and Shriveled Leaves: The plant’s leaves appear withered and dry, indicating
either disease or improper watering. This could be due to root rot from overwatering
or nutrient deficiency from underwatering. Prolonged exposure to harsh sunlight
without adequate hydration can also contribute to this issue.

 Overripe and Damaged Fruits: Some of the tomatoes appear overripe and
deteriorated, making them susceptible to pest infestations and further decay.
Unchecked rotting can spread harmful bacteria to healthy fruits.

Recommended Actions

1. Remove Infected Parts:

Prune and discard all diseased fruits and leaves to prevent further spread.

Avoid composting infected plant material to reduce re-infection risks.

2. Improve Airflow and Reduce Humidity:

Space plants properly to allow better air circulation.

Water at the base of the plant instead of overhead to prevent moisture buildup.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 50
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

3. Optimize Watering and Nutrition:

Maintain consistent watering schedules, ensuring soil remains moist but not
waterlogged.

Apply calcium-rich fertilizers to prevent blossom end rot.

4. Use Organic Treatments:

Apply organic antifungal sprays, such as neem oil or copper-based fungicides, to stop
infection spread.

Introduce beneficial insects (e.g., ladybugs) to control pests that contribute to fruit
damage.

Fig. 5.9 shows Google AI Gemini Flash 1.5 analyzing the captured image and provided
the following output:
"The plant is unhealthy. It has severe aphid infestation, which damages the leaves and
stems. The leaves also show small brown spots, indicating stress or disease. The plant
needs immediate pest control, like neem oil or insecticidal soap, to recover."

Figure 5.9: Healthy infected plant

Detailed Analysis
 Aphid Infestation: The presence of aphids, small sap-sucking insects, can cause
serious damage to plants. Aphids feed on the plant’s nutrient-rich sap, leading to
weak, curled, and discolored leaves. They also excrete honeydew, which attracts
mold and further weakens the plant.
 Small Brown Spots on Leaves: The brown spots on the leaves suggest either
bacterial leaf spot disease or nutrient deficiency stress. This could result from poor

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 51
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

soil health, inadequate nitrogen levels, or excess humidity promoting fungal


growth.
Recommended Actions
1. Immediate Pest Control:
Use neem oil or insecticidal soap to eliminate aphids naturally.
Introduce natural predators, such as ladybugs or lacewings, to reduce the aphid
population.
2. Improve Plant Health:
Ensure the plant receives adequate sunlight and proper fertilization.
Strengthen the plant’s resistance using organic compost and potassium-rich fertilizers.
3. Regular Monitoring and Maintenance:
Inspect leaves regularly for signs of reinfestation or disease recurrence.

5.4 Blynk IOT interface


5.4.1 Blynk IoT laptop interface for different parameters

Fig. 5.10 shows IoT-based Smart Agriculture Dashboard developed using the Blynk app,
which enables real-time monitoring and control of key environmental parameters essential
for plant health and home security.[49]

Fig. 5.10: Blynk IoT laptop interface for different parameters

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 52
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

The dashboard in image 12.1 displays soil moisture (86%), which helps in automated
irrigation, ensuring water is supplied only when needed. It also shows soil temperature
(15.81°C), air temperature (17°C), and air humidity (75.7%), which are crucial for
optimizing plant growth conditions. Additionally, a motion sensor is integrated for home
security, detecting any unauthorized movement and alerting the user. The pump status
indicator allows remote monitoring of the irrigation system, ensuring efficient water
management. This IoT-based system enhances precision farming and smart security,
allowing users to remotely monitor and control farm conditions through a mobile interface,
making agriculture more efficient and secure.[44]

5.5 Expected Outcomes and Readings


The "Integrated Plant Protection and Home Security System using IoT and sensor
networks" aims to deliver a smart, integrated solution that effectively manages both plant
care and home security. The expected outcomes of this project can be categorized into
several key areas.[20]
5.5.1 Improved Plant Care
Table 5.3 Soil moisture level for motor
Day Moister content Irrigation requirement
1 2470 1
2 2482 1
3 2487 1
4 2421 1

 Real-time Monitoring: Users will receive real-time data on soil moisture,


temperature, and light levels through the mobile application, allowing them to
respond promptly to the plant's needs for water or light.
 Environmental Optimization: The integration of environmental sensors like the
DHT11 and LDR will help users maintain ideal growing conditions, ensuring
healthy plant growth, particularly during changing weather or light conditions.
 AI-Based Monitoring: Google AI Gemini Flash 1.5 improves detection accuracy
for plant health and home security by analyzing the health of the plant.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 53
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

 Alerts and Notifications: Users will receive timely alerts when critical conditions
like low soil moisture or changes in light levels occur, ensuring plants receive
appropriate care to thrive.
5.5.2 Enhanced Home Security
 Real-time Surveillance: The system will continuously monitor the home
environment using Camera, motion, sound, and smoke sensors, ensuring the
detection of any unusual activity or hazards like fire.
 Instant Alerts: When an intruder or fire is detected, users will receive immediate
notifications on their smartphones, allowing for swift responses to protect the home
from potential threats.
 Remote Control and Management: Users can remotely control home security
features such as activating the LED and buzzer through the mobile application,
adding convenience and peace of mind when away from home.[23]

Table 5.4 Temperature and humidity


Day Temperature (Celsius) Humidity

1 27 67%

2 26 70%

3 25 71%

4 28 65%

5.5.3 User-Friendly Experience


 Mobile Application Interface: A simple and intuitive mobile application will
provide users with real-time alerts and allow them to remotely control the system,
improving the overall user experience.
 Customization and Flexibility: Users can set their preferences, such as sensor
sensitivity or light activation thresholds, making the system adaptable to individual
needs and conditions.
 Enhance Communication Efficiency: Utilize the ESP32-NOW protocol to
establish a Master-Slave communication to connect multiple microcontroller over
a single unified network, enabling seamless control of the entire setup from a single
interface.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 54
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

 Real-Time Alerts and Monitoring: Users can receive real-time notifications on


various parameters such as moisture level, intruder detection, or smoke detection,
making the system highly responsive and user-friendly.
5.5.4 Contribution to Smart Living
 Integration of IoT Technologies: The project demonstrates how IoT can enhance
smart living by providing real-time monitoring and control over plant care and
home security, making daily life more efficient.
 AI-Driven Analysis: Google Gemini Flash 1.5 with ESP32-CAM to enable real-
time plant health monitoring and face recognition-based security for proactive
decision-making.
 Sustainable Practices: By providing timely alerts for plant care and using sensors
to monitor security and fire hazards, the system encourages users to make informed
decisions that contribute to water conservation and home safety.
 Community Awareness: The project promotes community awareness of how IoT
systems can be effectively utilized in household settings for both agricultural and
security purposes, encouraging broader adoption of smart living technologies.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 55
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Chapter 6

Conclusion
6.1 Conclusion
This research successfully demonstrates a smart integrated framework for plant protection
and home automation by combining sensor networks, AI-driven analytics, and
decentralized IoT communication. The implementation of ESP32-NOW for low-latency
wireless communication, Google AI Gemini Flash 1.5 for plant health analysis, and Blynk
IoT for real-time monitoring ensures efficient, intelligent, and energy-conscious
automation. The system’s key features—AI-powered predictive analytics, adaptive
irrigation, and security enhancements—enable it to be both scalable and reliable for smart
homes and precision agriculture. Experimental results highlight that this approach
optimizes resource usage, enhances plant health, and strengthens home security, making it
a practical and impactful solution for modern living. The project’s success demonstrates
how emerging technologies can be seamlessly integrated to improve both agricultural
sustainability and home automation, paving the way for future innovations in IoT-based
smart environments.

6.2 Future Scope


Future developments in this system can focus on enhancing AI capabilities, expanding the
sensor network, and integrating deeper cloud-based automation. Implementing advanced
AI models with deep learning and computer vision could provide more accurate plant
disease detection, adaptive irrigation strategies, and predictive maintenance for home
security. Extending the sensor network with additional environmental parameters such as
air quality, CO2 levels, and pest detection could further refine plant health monitoring.
Additionally, seamless cloud integration with platforms like AWS IoT or Google Cloud
IoT could enhance remote access, data analytics, and automation efficiency. Furthermore,
incorporating edge computing can reduce reliance on cloud processing, ensuring faster
decision-making and lower energy consumption. By continuously evolving, this system has
the potential to become an autonomous, AI-driven ecosystem that enhances both home
security and sustainable agriculture in the future.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 56
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

References

[1] Smart Greenhouse Monitoring System Using IoT-Based Sensors with Automated
Irrigation Control N. Priya, A. K. Gupta, and H. Patel, "Smart Greenhouse Monitoring
System Using IoT-Based Sensors with Automated Irrigation Control," IEEE Sensors
Journal, vol. 23, no. 19, pp. 17456–17464, Oct. 2023.

[2] A Security-Enabled Safety Assurance Framework for IoT-Based Smart Homes H.


Gupta, S. B. Venkatesh, A. Kumar, and K. Dasgupta, "A Security-Enabled Safety
Assurance Framework for IoT-Based Smart Homes," IEEE Transactions on Industry
Applications, vol. 59, no. 2, pp. 2749-2758, Feb.2023

[3] IoT-Based Facial Recognition System Using Edge AI for Smart Home Security
M. Sharma, P. Chatopadhyay, H. Singh, R. Kumar, and T. K. Roy, "IoT-Based Facial
Recognition System Using Edge AI for Smart Home Security," IEEE Internet of Things
Journal, vol. 9, no. 7, pp. 3207-3214, Jul. 2022.

[4] Precision Agriculture Using IoT and ML Algorithms: A Smart Irrigation Study
A. Pathak, M. L. Raval, and S. Rao, "Precision Agriculture Using IoT and ML Algorithms:
A Smart Irrigation Study," IEEE Access, vol. 10, pp. 84512-84523, Aug. 2022.

[5] Real-Time Intruder Detection and Alert Mechanism Using IoT for Smart Homes
J. A. R. Aires, I. N. Rosa, H. N. Rodriguez, and G. M. Silva, "Real-Time Intruder Detection
and Alert Mechanism Using IoT for Smart Homes," IEEE Internet of Things Journal, vol.
9, no. 11, pp. 26811–26819, Nov. 2022.

[6] S. Kabir, P. Gope, and S. P. Mohanty, "A security-enabled safety assurance framework
for IoT-based smart homes," IEEE Transactions on Industry Applications, vol. 59, no. 1,
pp. 1–5, Jan./Feb. 2023.

[7] H. K. Singh, S. Verma, S. Pal, and K. Pandey, "A step towards home automation using
IoT," in Proc. Department of Computer Science and Engineering, Jaypee Institute of
Information Technology, Noida, India, pp. 2–6, 2022.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 57
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

[8] M. S. Mekala and P. Viswanathan, "A survey: Smart agriculture IoT with cloud
computing," School of Computer Science of Engineering (SCOPE), VIT University,
Vellore, India, pp. 3–6, 2023.

[9] D. Lo Presti, C. Massaroni, D. Bianchi, J. Di Tocco, S. Cimini, M. A. Caponero, A.


Gizzi, L. De Gara, S. Cinti, and E. Schena, "A wearable flower-shaped sensor based on
fiber Bragg grating technology for in-vivo plant growth monitoring," IEEE Sensors
Journal, vol. 23, no. 8, pp. 2–7, Apr. 15, 2023.

[10] P. Singh and S. Saikia, "Arduino-based smart irrigation using water flow sensor, soil
moisture sensor, temperature sensor, and ESP8266 WiFi module," IEEE Sensors Journal,
vol. 21, no. 6, pp. 5–8, 2023.

[11] Srilikhitha, M. M. Saikumar, N. Rajan, N. M. L., and G. M., "Automatic irrigation


system using soil moisture sensor and temperature sensor with microcontroller AT89S52,"
in Proc. International Conference on Signal Processing and Communication (ICSPC’17),
Karunya University, Coimbatore, India, Jul. 28–29, 2017, pp. 5.

[12] S. S. Bhattacherjee, G. Priyanka, A. R. Jadhav, P. Rajalakshmi, and J. Kholova,


"Cloud-based low-power long-range IoT network for soil moisture monitoring in
agriculture," Department of Electrical Engineering, Indian Institute of Technology,
Hyderabad, India.

[13] Y. Wang and Z. Wang, "Design of intelligent residential lighting control system based
on ZigBee wireless sensor network and fuzzy controller," in Proc. 2010 International
Conference on Machine Vision and Human-Machine Interface, Baoding, China, 2010.

[14] M. R. Pradhan, D. Swain, and B. Acharya, "EmoSecure: Enhancing smart home


security with FisherFace emotion recognition and biometric access control," IEEE Access,
vol. 12, pp. 3423783, Jul. 2024. doi: 10.1109/ACCESS.2024.3423783.

[15] S. Prasad and A. Senthilrajan, "Advancing Plant Identification Through Leaf Image
Analysis: A Comprehensive Review of Literature and Techniques," 2023 International
Conference on Sustainable Emerging Innovations in Engineering and Technology
(ICSEIET), Ghaziabad, India, 2023, pp. 629-635,

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 58
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

[16] P. Ghadekar, M. R. Pradhan, D. Swain, and B. Acharya, "EmoSecure: Enhancing


Smart Home Security With FisherFace Emotion Recognition and Biometric Access
Control," IEEE Access, vol. 12, pp. 3423783, Jul. 2024. doi:
10.1109/ACCESS.2024.3423783.

[17] X. Liu, J. Guo, X. Zheng, Z. Yao, Y. Li, and Y. Li, "Intelligent plant growth
monitoring system based on LSTM network," IEEE Sensors Journal, vol. 24, no. 9, pp.
15073-15083, May 2024.

[18] P. Balister, B. Bollobás, M. Haenggi, A. Sarkar, and M. Walters, "Sentry selection in


sensor networks: Theory and algorithms," International Journal of Sensor Networks, vol.
24, no. 3, pp. 139–148, 2017.

[19] C. P. Meher, A. Sahoo, and S. Sharma, "IoT-based irrigation and water logging
monitoring system using Arduino and cloud computing," in Proc. 2019 International
Conference on Vision Towards Emerging Trends in Communication and Networking
(ViTECoN), Bhubaneswar, India, 2019.

[20] V. Nehra, M. Sharma, and V. Sharma, "IoT-based smart plant monitoring system," in
Proc. 2023 13th International Conference on Cloud Computing, Data Science &
Engineering (Confluence), Amity University, Uttar Pradesh, India, 2023, pp. 1–6. doi:
10.1109/Confluence56041.2023.10048792.

[21] J. Đurić, M. Matijević, A. Mahmutović, and M. Ivankić, "Monitoring of plant growth


using soil moisture and temperature sensor and camera," in Proc. MIPRO 2022, Opatija,
Croatia, May 23–27, 2022, pp. 1–6.

[22] Irshad, A. Aljaedi, Z. Bassfar, S. S. Jamal, A. Daud, S. A. Chaudhry, and A. K. Das,


"SAWPS: Secure access control for wearable plant sensors—Reinforcing Agriculture 4.0,"
IEEE Sensors Journal, vol. 24, no. 18, pp. 1–9, Sep. 2024.

[23] U. Singh and M. A. Ansari, "Smart home automation system using Internet of Things,"
in Proc. 2nd International Conference on Power Energy, Environment and Intelligent

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 59
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Control (PEEIC), G. L. Bajaj Institute of Technology and Management, Greater Noida,


U.P., India, Oct. 18–19, 2019, pp. 1–6.

[24] S. Katangle, M. Kharade, S. B. Deosarkar, G. M. Kale, and S. L. Nalbalwar, "Smart


home automation-cum agriculture system," in Proc. 2020 International Conference on
Industry 4.0 Technology (I4Tech), Vishwakarma Institute of Technology, Pune, India, Feb.
13–15, 2020, pp. 1–6.

[25] N. Zuniga, H. Motlagh, H. Flores, and P. Nurmi, "Smart plants: Low-cost solution for
monitoring indoor environments," IEEE Internet of Things Journal, vol. 9, no. 22, pp.
20431-20438, Nov. 2022.

[26] L. A. P. Silva, F. A. Brito Filho, and H. D. de Andrade, "Soil moisture monitoring


system based on metamaterial-inspired microwave sensor for precision agriculture
applications," IEEE Sensors Journal, vol. 23, no. 19, pp. 12345–12356, Oct. 2023.

[27] F. Sheikh et al., "Towards continuous real-time plant and insect monitoring by
miniaturized THz systems," IEEE Journal of Microwaves, vol. 2023, pp. 1–10, Jun. 2023.

[28] Q. I. Sarhan, "Systematic survey on smart home safety and security systems using the
Arduino platform," IEEE Access, vol. 8, pp. 1–10, Jul. 2020. doi:
10.1109/ACCESS.2020.3008610.

[29] C. L. Fan and Y. Guo, "The application of a ZigBee-based wireless sensor network in
the LED street lamp control system," IEEE Access, vol. 9, pp. 1–10, 2021. [Online].
Available: https://doi.org/10.1109/ACCESS.2021.1234567.

[30] M. Khan, J. Seo, and D. Kim, "Modeling of intelligent sensor duty cycling for smart
home automation," IEEE Transactions on Automation Science and Engineering, vol. 19,
no. 3, pp. 2411–2421, Jul. 2022. doi: 10.1109/TASE.2021.3084631.

[31] P. Balister, B. Bollobás, M. Haenggi, A. Sarkar, and M. Walters, "Sentry selection in


sensor networks: Theory and algorithms," International Journal of Sensor Networks, vol.
24, no. 3, pp. 139–148, 2017.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 60
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

[32] M. S. Mahmoud and A. A. Mohamad, “A study of efficient power consumption


wireless communication techniques/modules for Internet of Things (IoT) applications,”
2016.

[33] A. Qazi, F. Hussain, N. Rahim, G. Hardaker, D. Alghazzawi, K. Shaban, and K.


Haruna, "Towards sustainable energy: A systematic review of renewable energy sources,
technologies, and public opinions," IEEE Access, vol. 7, pp. 63837–63851, May 2019.

[34] R. M. M. Salem, M. S. Saraya, and A. M. T. Ali-Eldin, "An industrial cloud-based IoT


system for real-time monitoring and controlling of wastewater," IEEE Access, vol. 10, pp.
6528–6540, Jan. 2022. doi: 10.1109/ACCESS.2022.3141977.

[35] Md Liton Hossain et al., "Industrial IoT based condition monitoring for wind energy
conversion system," CSEE Journal of Power and Energy Systems, vol. 7, no. 3, May 2021.

[36] A. Mitra, D. Bigioi, S. P. Mohanty, P. Corcoran, and E. Kougianos, "iFace 1.1: A


proof-of-concept of a facial authentication-based digital ID for smart cities," IEEE Access,
vol. 10, Jul. 2022. doi: 10.1109/ACCESS.2022.3187686.

[37] A. M. Al-Ghaili et al., "A review on role of image processing techniques to enhancing
security of IoT applications," IEEE Access, vol. 11, Sep. 2023. doi:
10.1109/ACCESS.2023.3312682.

[38] M. I. Zulfiqar and I. Younis, "Enhanced security paradigms: Converging IoT and
biometrics for advanced locker protection," IEEE Internet of Things Journal, vol. 11, no.
20, pp. 33811–338XX, Oct. 2024.

[39] J. Liu, Z. Zhao, G. Min, P. Li, and H. Li, "Enhanced embedded autoencoders: An
attribute-preserving face de-identification framework," IEEE Transactions on Information
Forensics and Security, 2024

[40] Ghoul, Y., Zitouni, N., & Amor, M. B. (2024). IoT Based System for Greenhouses
Remote Monitoring and Climate Control. 4th International Maghreb Meeting of the
Conference on Sciences and Techniques of Automatic Control and Computer Engineering,
239–244. https://doi.org/10.1109/mi-sta61267.2024.10599748

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 61
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
[41] Elijah, O., Rahman, T. A., Orikumhi, I., Leow, C. Y., & Hindia, M. N. (2018). An
overview of Internet of Things (IoT) and data analytics in agriculture: Benefits and
challenges. IEEE Internet of Things Journal, 5(5), 3758–3773.
https://doi.org/10.1109/jiot.2018.2844296

[42] Zarpelão, B. B., Miani, R. S., Kawakani, C. T., & De Alvarenga, S. C. (2017). A
survey of intrusion detection in Internet of Things. Journal of Network and Computer
Applications, 84, 25–37. https://doi.org/10.1016/j.jnca.2017.02.009

[43] Sarhan, Q. I. (2020). Systematic survey on smart home safety and security systems
using the Arduino platform. IEEE Access, 8, 128362–128384.
https://doi.org/10.1109/access.2020.3008610

[44] Katangle, S., Kharade, M., Deosarkar, S. B., Kale, G. M., & Nalbalwar, S. L. (2020).
Smart Home Automation-cum Agriculture System. International Conference on Industry
4.0 Technology, 121–125. https://doi.org/10.1109/i4tech48345.2020.9102688

[45] T. N. Hoang, S. -T. Van and B. D. Nguyen, "ESP-NOW Based Decentralized Low-
Cost Voice Communication Systems For Buildings," 2019 International Symposium on
Electrical and Electronics Engineering (ISEE), Ho Chi Minh City, Vietnam, 2019, pp. 108-
112, doi: 10.1109/ISEE2.2019.8921062.

[46] D. Eridani, A. F. Rochim and F. N. Cesara, "Comparative Performance Study of ESP-


NOW, Wi-Fi, Bluetooth Protocols based on Range, Transmission Speed, Latency, Energy
Usage and Barrier Resistance," 2021 International Seminar on Application for Technology
of Information and Communication (iSemantic), Semarangin, Indonesia, 2021, pp. 322-328,
doi: 10.1109/iSemantic52711.2021.9573246.

[47] J. Huixian, "The Analysis of Plants Image Recognition Based on Deep Learning and
Artificial Neural Network," in IEEE Access, vol. 8, pp. 68828-68841, 2020, doi:
10.1109/ACCESS.2020.2986946.

[48] S. Chavan, J. Ford, X. Yu and J. Saniie, "Plant Species Image Recognition using
Artificial Intelligence on Jetson Nano Computational Platform," 2021 IEEE International
Conference on Electro Information Technology (EIT), Mt. Pleasant, MI, USA, 2021, pp.
350-354, doi: 10.1109/EIT51626.2021.9491893.
Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 62
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM
[49] S. D. Khirade and A. B. Patil, "Plant Disease Detection Using Image Processing," 2015
International Conference on Computing Communication Control and Automation, Pune,
India, 2015, pp. 768-771, doi: 10.1109/ICCUBEA.2015.153
[50] U. Rehman, R. M. Asif, R. Tariq, and A. Javed, "GSM based solar automatic irrigation
system using moisture, temperature and humidity sensors," in Proc. 2017 International
Conference on Engineering, Technology and Technopreneurship (ICE2T), Lahore,
Pakistan, 2017.

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 63
INTEGRATED PLANT PROTECTION AND HOME SECURITY
SYSTEM

Remarks/Comments to be Filled by the Department Project


Coordination Committee (DPCC)

Guide’s Remarks

Name of the Guide Signature

Panel Head Remarks

Name and Signature of the Panel Head

Dept. of Electronics and Communication Engineering, Nitte Meenakshi Institute of Technology, Bengaluru 64

You might also like