0% found this document useful (0 votes)
96 views

Smart Agri Report PDF

Uploaded by

Alok Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

Smart Agri Report PDF

Uploaded by

Alok Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

SILIGURI INSTITUTE OF TECHNOLOGY

PROJ- CSE781
IoT BASED SMART AGRICULTURE SYSTEM

BY
CSE_PROJ_2023_12

Name of Students Roll No.

1. SRISTI TALAPATRA 11900120095

2. ALOK KUMAR 11900119055

3. ADITYA SINGH 11900119075

4. DEEPSIKHA ROY 11900119067

Under the Guidance

of

Mr. Krittibas Parai & Mr. Prasanta Kumar Roy


Submitted to the Department of Computer Science & Engineering in partial fulfillment of the
requirements for the award of the degree Bachelor of Technology in Computer Science &
Engineering.

Year of Submission: 2023

Siliguri Institute of Technology


P.O. SUKNA, SILIGURI, DIST. DARJEELING, PIN: 734009
Tel: (0353)2778002/04, Fax: (0353) 2778003
DECLARATION

This is to certify that Report entitled “IoT BASED SMART AGRICULTURE SYSTEM “which
is submitted by me in partial fulfillment of the requirement for the award of degree B.Tech.
in Computer Science Engineering at Siliguri Institute of Technology under Maulana
Abul Kalam Azad University of Technology, West Bengal. We took the help of other
materials in our dissertation which have been properly acknowledged. This report has not
been submitted to any other Institute for the award of any other degree.

Date:

SL NAME ROLL NO SIGNATURE

1 SRISTI TALAPATRA 11900120095

2 ALOK KUMAR 11900119055

3 ADITYA SINGH 11900119075

4 DEEPSIKHA ROY 11900119067

Page | 1
CERTIFICATE

This is to certify that the project report entitled IoT BASED SMART
AGRICULTURE SYSTEM is submitted to Department of Computer Science &
Engineering of Siliguri Institute of Technology in partial fulfillment of the
requirement for the award of the degree of Bachelor of Technology in Computer
Science & Engineering during the academic year 2022-23, is a bona fide record of the
project work carried out by them under my guidance and supervision.

Project Group Number: 12

SN Name of the students Registration No Roll No


1. SRISTI TALAPATRA 201190100120010 11900120095
2. ALOK KUMAR 036014 11900119055
3. ADITYA SINGH 035901 11900119075
4. DEEPSIKHA ROY 036002 11900119067

--------------------------------------- ------------------------------------------

Signature of Project Guide Signature of the HOD

Name of the Guide: Mr. Krittibas Parai Department of Computer Science & Engineering
& Mr. Prasanta Kumar Roy

Page | 2
Acknowledgement

The acknowledgement page depicts the gratitude, respect and thankfulness of the
student towards the people who helped him in pursuing the project successfully and
ensured successful completion and implementation of the project. In this page, the
author expresses his gratitude and concern by using praising and thanksgiving words.

Signature of all the group members with date

1.

2.

3.

4.

Page | 3
TABLE OF CONTENTS

SL TOPIC PAGE NO
1 Introduction 7
2 System Analysis
2.1 Identification of need 8
2.2 Preliminary Investigation 9
2.3 Feasibility Study 10
2.4 Project Scheduling 11-13
2.5 Requirement Analysis. 14
2.6 Software requirement specifications 15-18
3 System Design
3.1 Modularization details 19-20
3.2 Data integrity and constraints 21-23
3.3 User Interface Design 24
4 Source Code
4.1 Project Code 25-26
5 Testing
5.1 Testing techniques and strategies 27-28
5.2 Debugging and Code improvement 29
6 Cost Estimation of the Project 30-32
7 Conclusion 33
8 Recommendation 34
9 Reference 35

Page | 4
LIST OF FIGURES

FIGURE DOMAIN PAGE NO


Challenges of future agriculture Preliminary Investigation 9

Soil Moisture Sensor Software requirement specifications 14

NodeMCU Software requirement specifications 14

Relay module Software requirement specifications 15

Mini Water Pump Software requirement specifications 15

Breadboard Software requirement specifications 15

9-volt battery and Clip Software requirement specifications 16

Jump wires, Water pipe Software requirement specifications 16

Circuit Diagram Software Engineering Paradigm 18

Flowchart Software Engineering Paradigm 19

User Interface User Interface Design 25

Real Time Working Software Engineering Paradigm 33

Page | 5
ABSTRACT

Internet of Things (IoT) technology has brought revolution to each and every field of
common man’s life by making everything smart and intelligent. IoT refers to a network
of things which make a self-configuring network. The development of Intelligent Smart
Farming IoT based devices is day by day turning the face of agriculture production by
not only enhancing it but also making it cost-effective and reducing wastage. Agriculture
industry has developed a lot with the help of technology, it has become data-centered and
smarter. The rapid growth of Internet of Things based technologies reshaped many
industries including agriculture. Such a radical change dismantles existing farming
practices and creates new opportunities along with some challenges. In this article the
possibility of wireless sensors and IoT in agriculture is highlighted, in addition some
challenges are expected to be tackled while integrating this technique with the traditional
methods of farming. The IoT devices and techniques used in agriculture applications are
explained in detail. Based on this article, we recognize recent trends of IoT in agriculture.
IoT technology gives a grasp to enhance the power of automation systems in agriculture.
Smart agriculture System that uses the advantages of cutting-edge technologies such as
Arduino and Wireless Sensor Network. This paper proposes the concept and features of
the sensor world in the internet of things for agriculture which is used to enhance the
production of crops. The agriculture stick being proposed through this paper is integrated
with Arduino Technology, Breadboard and mixed with different various sensors and live
data feed can be obtained online through mobile phone.

Page | 6
1. INTRODUCTION

In this paper, we develop a smart agriculture system with the concept of the internet of
things[6]. Technology maintains the conceptual thinking of a farmer to smart agro-
business which performs the path to the next era of soft computing. One of the main
areas where IOT based research is going on and new products are launching on an
everyday basis to make the activities smarter and efficient towards better production is
in the field of Agriculture[1]. Automation must be implemented in agriculture to
overcome these problems. So, to provide a solution to all such problems, it is necessary
to develop an integrated system that will take care of all factors affecting productivity at
every stage. The product will assist farmers with live data (temperature, humidity, soil
moisture, UV index, IR) from the farm so that the necessary steps can be taken to enable
them to farm wisely by increasing their storage yields and saving resources (water,
fertilizer). This paper describes the concept of the internet of things which deals with the
automation of systems and further describes smart agriculture. Hence, automation must
be implemented in agriculture to overcome these problems. So, to provide a solution to
all such problems, it is necessary to develop an integrated system that will take care of
all factors affecting productivity at every stage. But complete automation in agriculture
is not achieved due to various issues. Though it is implemented at the research level, it
is not given to the farmers as a product to benefit from the resources. Hence this paper
deals with developing smart agriculture using IoT Devices that can be used by farmers.
Agriculture is considered the basis of the types of people as it is a basic source of food
grains and so on still utilize the customary techniques for cultivating which results in
low yielding of harvests and natural products. Be that as it may, wherever
computerization had been executed and individuals had been supplanted via
programmed hardware, the yield has been improved. Subsequently, there is a need to
execute present-day science and innovation in the farming area for expanding the yield.
The majority of the papers imply the utilization of remote sensor organization which
gathers the information from various sorts of sensors and afterward sends it to the
fundamental server utilizing remote convention.

Page | 7
2. SYSTEM ANALYSIS

2.1 Identification of Need:

With an increasing population across the world, food production and farming need to get
increasingly high-yielding and productive in limited time. The scope for manual
experimentation, viability assessment through trial-and-error etc are no longer feasible.
According to the UN Food and Agriculture Organization, the world will need to produce
70% more food in 2050 than it did in 2006. To meet this demand, farmers and
agricultural stakeholders will have to push the innovation limits of their current practices.
Just as the Industrial Revolution took farming to the next level in the 1800s, emerging
technologies, and more importantly, the Internet of Things is slated to have a similar
effect on the agricultural industry’s future. This transition from agriculture to Agri-tech
is now imperative, to ensure we put food on the tables of everyone around the world
while avoiding unrealistic time and labor requirements. Endorsement rates for IoT are
accelerating across the board – reaching nearly 43% of enterprises worldwide. However,
the IoT applications we presently employ in today’s agricultural landscape are only just
the beginning. We have come at this term from the many ways we refer to the
technology-oriented agriculture of now and the future. For example, Agri-tech refers to
the application of technology in agriculture in general. Whereas smart farming and smart
agriculture are mostly used to refer to the application of IoT solutions in agriculture.
Such applications include farm vehicle tracking, livestock monitoring, storage
monitoring and more. The coming years will witness an increasing use of these smart
farming and other technologies. In fact, IoT device installations in the agriculture are
projected to experience a compound annual growth rate of 20 percent, and according to
a January 2016 machina research report, the number of connected agricultural devices is
expected to grow from 13 million at the end of 2014 to 225 million by 2024.Once these
advancements are implemented in the agriculture sector, they are certain to scale up the
revenues and will also enable the farmers to manage more acreage. Smart Agricultural
Technology enables the farmers to have better control over the process of growing crops
and rearing livestock. This way it brings massive efficiencies of scale, cuts costs, and
helps in saving scarce resources, like water. Farmers and growers can reduce the waste
and increase the productivity that ranges from the quantity of fertilizer utilized to the
number of journeys made by farm vehicles

Page | 8
2.2 Preliminary Investigation

According to a plan announced in 2015 under "The 2030 Agenda for Sustainable
Development", the UN and international community set a target to end hunger by 2030.
However, recent figures released by WHO (World Health Organization) do not look
encouraging enough to support the agenda, as more than 800 million people worldwide
are facing the food shortage—one out of every nine people.

FIG : Challenges of future agriculture

Figure 13 presents a snapshot of major challenges that future agriculture expects to face
in 2050. This diagram basically presents three major issues: how to feed around 10
billion people; without using more land and; by reducing the emission of greenhouse
gasses by more than 60%. However, when we look closely then these three challenges
lead to many new problems, including smaller rural labour, continuously shrinking
arable land, water scarcity, harsh weather conditions, and many more. Focusing on the
above discussion, one can feel that the farms and relevant crop operations need to be run
differently than the past practices. One of the major reasons is the advancements in
technology, including sensors, communication methods, machines, and even robots. In
fact, technology has proved this already, as, in most developing countries; more than
50% of the population is somehow engaged in the agriculture industry yet are far behind
in providing both the quantity and quality when compared with the developed countries,
where less than 2% of the population is performing much better. Considering this
scenario, future agriculture is expected to evolve as a high-tech industry where
interconnected systems will enjoy the luxury of artificial intelligence and Big Data
facilities. The resultant systems will converge into a single unit where farm machinery
and management, starting from seeding to production forecasting, are combined. By
involving the advanced technologies like agricultural robots, Big Data, and cloud-
computing artificial intelligence, agriculture can create a new era of super fusion.

2.3 Feasibility Study

Page | 9
1. IoT enables easy collection and management of tons of data collected from sensors
and with integration of cloud computing services like Agriculture fields maps, cloud
storage etc., data can be accessed live from anywhere and everywhere enabling live
monitoring and end to end connectivity among all the parties concerned.
2. IoT is regarded as a key component for Smart Farming as with accurate sensors and
smart equipment, farmers can increase the food production by 70% till year 2050 as
depicted by experts.
3.With IoT production costs can be reduced to a remarkable level which will in turn
increase profitability and sustainability.
4. With IoT, efficiency level would be increased in terms of usage of Soil, Water,
Fertilizers, Pesticides etc.
5. With IoT, various factors would also lead to the protection of the environment.

Table Shows the growth of IoT based adoption in the Agriculture sector from Year 2000-2016
and Forecasts of year 2035-2050.

• Efficiency: - IOT-enabled agriculture allows farmers to monitor their products and


conditions in real time. They get insights fast, can predict issues before they happen, and
make informed decisions on how to avoid them.
• Expansion: - By the time we have 9 billion people on the planet, 70% of them will live
in urban areas. IoT-based greenhouses and hydroponic systems enable short food supply
chains and should be able to feed the people. Smart closed-cycle agricultural systems
allow growing food everywhere—in supermarkets.
• Reduced resources: - Plenty of IoT solutions are focused on optimizing the use of
resources—water, energy, land. Precision farming using IoT relies on the data collected
from diverse sensors in the field which helps farmers accurately allocate just enough
resources within one plant.
• Improved product quality: - Data-driven agriculture helps both grow more and better
products. Using soil and crop sensors, aerial drone monitoring, and farm mapping,
farmers better understand detailed dependencies between the conditions and the quality
of the crops.
• Agility: - One of the benefits of using IoT in agriculture is the increased agility of the
processes. Thanks to real-time monitoring and prediction systems, farmers can quickly
respond to any significant change in weather, humidity.

Page | 10
2.4 Project Scheduling

A new project at work often signals the beginning of another adventure filled with
stakeholders, deadlines, deliverables, and tools. But whether your project is a new
product launch, a vendor event, the annual editorial calendar, or even employee
onboarding, you’ll need a project schedule to get you there.
Empowering yourself to create a project schedule with clear plans, processes, and
responsibilities is essential to keep your team on track, know who’s doing what by when,
and see how all the pieces connect. While it may take some time up front, a well-done
project schedule will increase efficiency, accountability, and clarity. And those three
words are music to everyone’s ears (especially your boss who entrusted this project to
you). You’ll also be able to cut back on the tools that are supposed to help you manage
a project but are actually making the process harder.
For project scheduling Gantt chart is used as a Gantt chart is a horizontal bar chart used
to illustrate the timeline of a project and its tasks. This gives your team a visual overview
of project information like your project schedule, upcoming milestones, and overall
project timeline.

Software development life cycle

The Software Development Lifecycle (SDLC) refers to a series of processes and


methodologies used in the development of software applications. It provides a structured
approach to software development, ensuring that the software is built efficiently, meets
the requirements, and is delivered on time and within budget. The typical stages in the
SDLC include planning, requirements gathering, design, coding, testing, deployment,
and maintenance. There are various models and methodologies used in SDLC, such as

Page | 11
the Waterfall model, Agile model, Spiral model, and more. In traditional software
development, security testing was a separate process from the software development
lifecycle (SDLC). The security team discovered security flaws only after they had built
the software. This led to a high number of bugs that remained hidden as well as increased
security risks. Today, most teams recognize that security is an integral part of the
software development lifecycle. You can address security in SDLC following
DevSecOps practices and conducting security assessments during the entire SDLC
process.

Prototype Model:

The Prototype Model is a software development model that involves the creation of an
initial, scaled-down version of the software to demonstrate its functionality and gather
feedback from users. In this model, a prototype or mock-up of the software is developed
quickly based on the initial requirements. The prototype is then reviewed and evaluated
by the stakeholders to gather feedback and make necessary changes or improvements.
This iterative process continues until a satisfactory prototype is achieved. Once the
prototype is approved, it serves as the basis for further development and refinement of
the final software product.

Software Development Lifecycle Diagram:

A typical Software Development Lifecycle diagram illustrates the various stages


involved in the development process. Here is a simplified representation of the SDLC
stages:

Plan: The planning phase typically includes tasks like cost-benefit analysis, scheduling,
resource estimation, and allocation. The development team collects requirements from
several stakeholders such as customers, internal and external experts, and managers to
create a software requirement specification document. The document sets expectations
and defines common goals that aid in project planning. The team estimates costs, creates
a schedule, and has a detailed plan to achieve their goals.

Design: Creating a high-level design and low-level design that outlines the system
architecture, data structures, and algorithms.

Implementation/Coding: Writing the code based on the design specifications.

Testing: The development team combines automation and manual testing to check the
software for bugs. Quality analysis includes testing the software for errors and checking
if it meets customer requirements. Because many teams immediately test the code they
write, the testing phase often runs parallel to the development phase.

Page | 12
Deployment: When teams develop software, they code and test on a different copy of
the software than the one that the users have access to. The software that customers use
is called production, while other copies are said to be in the build environment, or testing
environment.

Having separate build and production environments ensures that customers can continue
to use the software even while it is being changed or upgraded. The deployment phase
includes several tasks to move the latest build copy to the production environment, such
as packaging, environment configuration, and installation.

Maintenance: In the maintenance phase, among other tasks, the team fixes bugs, resolves
customer issues, and manages software changes. In addition, the team monitors overall
system performance, security, and user experience to identify new ways to improve the
existing software.

FIG: Software Development Lifecycle diagram

Page | 13
2.5 Requirement Analysis.

The fundamental building blocks of an IoT System are Sensors, Processors, and
applications. The circuit diagram is a proposed model of our project which shows the
interconnection of these blocks. The sensors are interfaced, data from the sensor is
exhibited on the mobile app of the user. Continuous data from sensors accordingly helps
the farmer to take action to fulfill the requirements of the soil. Farming is a labor-
intensive task that requires lots of time, patience and effort. Moreover, these tasks are
repetitive and monotonous. Farmers can reduce these labor-intensive tasks to robotics
and automation-based solutions. Such solutions can perform tasks that range from
seeding and watering to harvesting and sorting. As a result, this technology integration
would result in higher productivity with slightest resource wastage. Here we have used
3 sensors i.e., DHT11, DS18B20 Waterproof Temperature Sensor and Soil Moisture
Sensor, one 12V LED Strip, 12V water pump, 7805 voltage regulator, and two TP122
transistors to control Led strip and water pump. 7805 is used to get the regulated 5V
from the 12V adapter, DHT11 sensor is used to get the temperature and humidity
readings. The DS18B20 sensor probe is used to get the soil temperature and a soil
moisture sensor is used to read the Soil humility that the water pump can be turned on/off
automatically.
System is implemented in three phases:
● Sensing
● Processing
● Information distribution.
In the sensing phase, various sensors like temperature, moisture, humidity are attached
to the Arduino Nano board to sense the soil, air and water characteristics of the field.
They sense the real time environmental values and transfer it to the gateway using the
NRF24L01 module. Sensors sense all the physical parameters and convert the analogue
value to digital value. Temperature and humidity sensors are used to measure the
temperature and humidity respectively on the field. Soil Moisture Sensors are of
capacitive type, and are used to measure the moisture of the soil. Wind speed is also
determined as it affects the amount of water required by crops NRF24L01 module is a
single chip 2.4 GHz transceiver which is suitable for low power wireless applications.
IoT gateway gathers the data from all the sensors and transfers it to the cloud for further
processing. Data received by the cloud can be visualized in many forms like different
graphs, histograms, etc.

Page | 14
2.6 Software requirement specifications

Farmers have started to realize that the IoT is a driving force for increasing agricultural
production in a cost-effective way. IoT solutions are focused on helping farmers close
the supply demand gap, by ensuring high yields, profitability, and protection of the
environment. The approach of using IoT technology to ensure optimum application of
resources to achieve high crop yields and reduce operational costs is called precision
agriculture.
To implement our project the software paradigm used is Arduino. Here is how it works:
The Arduino, an open-source platform, is connected to a computer via USB, where it
connects with the Arduino development environment (IDE). The user writes the Arduino
code in the IDE, then uploads it to the microcontroller which executes the code,
interacting with inputs and outputs such as sensors, motors, and lights. There are many
other microcontrollers and microcontroller platforms available for physical computing.
Arduino also simplifies the process of working with microcontrollers. Cross-platform -
The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux operating
systems. Most microcontroller systems are limited to Windows. The Arduino software
is published as open-source tools, available for extension by experienced programmers.

2.6.1 COMPONENTS AND MODULES

● SOIL MOISTURE SENSOR:


Soil Moisture Sensor is used for measuring the moisture in soil and similar materials.
The sensor has two large exposed pads which function as probes for the sensor, together
acting as a variable resistor. The moisture level of the soil is detected by this sensor.
When the water level is low in the soil, the analog voltage will be low and this analog
voltage keeps increasing as the conductivity between the electrodes in the soil changes.

FIG: SOIL MOISTURE SENSOR

● Nodemcu ESP8266:
NodeMCU is a low-cost open source IoT platform. It initially included firmware which
runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which was
based on the ESP-12 module. Later, support for the ESP32 32-bit MCU was added.

Page | 15
FIG: Nodemcu ESP8266
● RELAY MODULE:
Relay is one kind of electro-mechanical component that functions as a switch. The
relay coil is energized by DC so that contact switches can be opened or closed. A
single channel 5V relay module generally includes a coil, and two contacts like
normally open and normally closed .The relay module with a single channel board is
used to manage high voltage, current loads like solenoid valves, motor, AC load &
lamps.

FIG: RELAY MODULE

● MINI WATER PUMP:


Uses advanced electronic components and high-quality wear-resistant shafts. Long
working life, continuous power-on working time of more than 10,000 hours. It has
smooth operation, high efficiency, good performance. Small volume, low noise,
safety and environmental protection.

FIG: MINI WATER PUMP

● BREADBOARD:
A breadboard is a construction base used to build semi-
permanent prototypes of electronic circuits. Unlike a perf board or stripboard,

Page | 16
breadboards do not require soldering or destruction of tracks and are hence reusable.

FIG: BREADBOARD

● 9V BATTERY AND CLIP:


The nine-volt battery, or 9-volt battery, is an electric battery that supplies a nominal
voltage of 9 volts. Actual voltage measures 7.2 to 9.6 volts, depending on battery
chemistry. Batteries of various sizes and capacities are manufactured; a very
common size is known as PP3, introduced for early transistor radios. The PP3 has a
rectangular prism shape with rounded edges and two polarized snap connectors on
the top.

FIG: 9V BATTERY AND CLIP

● MINI WATER PIPE AND JUMPER WIRE:


Jumper wires are simply wires that have connector pins at each end, allowing them
to be used to connect two points to each other without soldering. Jumper wires are
typically used with breadboards and other prototyping tools in order to make it easy
to change a circuit as needed and a pipe for conveying water.

FIG: MINI WATER PIPE AND JUMPER WIRE

Page | 17
CIRCUIT DESCRIPTION & WORKING PRINCIPLE:

In this circuit there is a programmed ARDUINO. The working principle of the model
is based on storing data from the sensors with the help of ARDUINO and passing it
to the Wi-Fi module. There is a chargeable battery which is connected with the power
supply of ARDUINO so that the circuit starts working. There is also a charging
circuit with an AC/DC converter for charging battery.

FIG: CIRCUIT DIAGRAM

FIG: FLOWCHART OF OVERALL PROCESS

Page | 18
3. System Design
3.1 Modularization Details

After the Industrial Revolution, we have experience and expectations for highly
customized products or services and therefore the speed of innovation is increasing,
driven by digitalization and the fight for sustainability, while commoditization and
globalization are pushing down prices faster than ever before. So, how can
companies employ the features of agility and customization to gain a competitive
advantage? How can they influence economies of scale and reduce the cost of
complexity without impeding innovation? Further, how can they provide
customers with the seemingly opposing benefits of both customization and
industrialization?

Modularization is a implementation to divide the product or service in a logical way that


provides both economies of scale and the capability to make different arrangements for
increased value for customers. The Modularity of a product or a service is a scaling of
how configurable it is, meaning how many combinations you can build with a given
number of building blocks.

Functioning with a Modular System is a mindset. It can be influenced across all


industries, pushing the boundaries of what can be achieved with product platforms and
shared components. Masters of the art of modularization acknowledge that it is much
more than just a modular product. Modularity encompasses the
whole business, Products, Operating Models, services and Infrastructure.

Modularization in IoT-based smart agriculture refers to the concept of breaking down


the system into smaller, self-contained modules that can be easily deployed, managed,
and upgraded independently. These modules can include various IoT devices, sensors,
actuators, communication protocols, and software components, all working together to
enhance agricultural processes and improve efficiency.

Here are some key aspects and benefits of modularization in IoT-based smart agriculture:

Scalability: Modularization permits for easy scalability by appending or removing


modules as per the requirements of the agricultural system. It enables farmers to start
small and gradually enlarge their IoT infrastructure as their needs grow.

Page | 19
Flexibility: Modular systems dispenses flexibility in terms of selecting and appending
particular modules based on the specific requirements of the farm. Different farms may
have different needs and challenges, and modularization allows customization.
Interoperability: Modularization advances interoperability, ensuring that modules from
different manufacturers can seamlessly communicate and work together. This sanctions
farmers to choose the best-in-class modules for different functionalities while avoiding
vendor lock-in.

Maintenance and Upgradability: With modularization, individual modules can be easily


maintained and enhanced without affecting the entire system. It simplifies
troubleshooting and reduces downtime by allowing faulty or outdated modules to be
replaced or updated independently.

Distributed Intelligence: Modular IoT systems in smart agriculture can distribute


intelligence across various modules. This permits for localized decision-making based
on sensor data, reducing the need for centralized control and enhancing real-time
responsiveness.

Rapid Prototyping: Modularization facilitates rapid prototyping and experimentation in


smart agriculture. Farmers or developers can quickly assemble and test different
modules, functionalities, or configurations to determine the most effective solution for
their specific needs.

Data Management: Modularization warrants efficient data management by allowing data


to be collected, processed, and analyzed at different stages of the agricultural process.
This therefore improves decision-making, resource allocation, and overall productivity.

Overall, modularization in IoT-based smart agriculture enhances the flexibility,


scalability, interoperability, and maintainability of the system. It empowers farmers to
adopt and integrate IoT technologies effectively, leading to optimized resource usage,
increased crop yields, and improved sustainability in agriculture and its various
practices.

Page | 20
3.2 Data Integrity and Constraints

Data integrity refers to the accuracy and validity of data over its lifecycle. Compromised
data is of little use to enterprises, not to mention the dangers presented by sensitive data
loss. For this reason, maintaining data integrity is a core focus of many enterprise
security solutions.
Data integrity can be compromised in several ways. Each time data is transferred, it
should remain intact and unaltered between updates. Error checking methods and
consistency procedures are typically relied on to ensure the integrity of data that is
transferred or replicated without the intention of alteration.
Security incidents may be accidental or intentional. Animals, farm working, and
machinery can have access to farming environments and cause incidents. Additionally,
smart systems comprise heterogeneous devices and software from distinct manufacturers
installed between growth areas and the cloud. These specific features might make several
security breaches and could result in incidents that compromise the smart system.

The system design should consider compatibility with distinct devices, protocols,
subsystems, and multi-access methods. Smart Agriculture uses machine-to-machine
(M2M) communication and devices manufactured by different vendors. However, most
security mechanisms were developed for the communication model used by TCP/IP
networks. These mechanisms usually ignore the existence of multiple heterogeneous
devices communicating simultaneously. Security features created for TCP/IP networks
can divide the relationship between smart farming devices, reducing their efficiency.
Multi-access methods and heterogeneity hinder security, interoperability, network
coordination and therefore increasing security vulnerabilities.
There are many kinds of sensors and technologies used by smart farming applications,
and this variety enables several security threats.

These are as follows:

RANDOM SENSOR INCIDENT:


It is the unintentional physical modification of a sensor device that diverts it from the
regular operation. Smart systems developed for small or large farms may have devices
installed outdoors. In many cases, these devices do not have tamper-resistant boxes, as
this would make it high-priced. The lack of tamper-resistant boxes exposes the device to
interactions with external agents such as people, animals, or agricultural equipment. A
farmworker or wild animal may accidently collide with a perception, removing the
device from its original location, violating system integrity. Farm equipment, such as a
tractor, may collide with the device causing temporary or permanent physical damage,
leading to data corruption, data unavailability, or damage to the device. This threat is not
exclusive to smart farming but may be present in other contexts, such as smart cities.

Page | 21
Therefore, it is a relevant issue because it can have a deep impact on the reliability of the
solution. In most cases, there is no way to avoid this threat, though it is necessary to
identify it to avoid its effects.

AUTONOMOUS SYSTEM DISRUPTION:


It is an intentional manipulation of autonomous system resources. Autonomous tractors,
robots, and UAV (Unmanned Aerial Vehicles) are technologies actively present in
precision agriculture, especially in large farms. This equipment have a series of features
that are essential to their operation, such as sensors, cameras, GPS, maps, and remote-
control systems. If an opponent modifies one or more components, the autonomous
system may work improperly or suffer/cause accidents. Malfunctions could result in
severe losses and therefore resulting in incorrect soil or crop management, damage to
crops, buildings, equipment and machinery, including the autonomous tractor itself.

IRREGULAR MEASUREMENT:
It consists of abnormal readings due to data corruption, energy depletion,
electromagnetic interference, severe weather, malfunctions, or false inputs. In some
regions, usually in large farms, high-voltage grids pass over agricultural areas and can
generate an electromagnetic field, causing distortions or data corruption. Power
depletion of battery-powered devices, variable connectivity, or malfunctioning of some
device components can cause irregular readings, compromising data availability or
integrity, which results in inaccurate data. Inaccurate data can be dangerous for decision
making, resulting in incorrect data analysis, and reducing system’s accuracy.

SENSOR WEAKENING:
This is the usual degeneration of sensors because of processes such as corrosion, dust
accumulation, and saturation. Some sensors used in smart farms can suffer slow
degradation for exposure to environmental conditions or climatic phenomena. For
example, wind speed sensors installed in dusty environments can suffer from dust
accumulation, which therefore prevents the rods from moving. Humidity sensors can
saturate when exposed to high humidity levels. Sensors built with copper may suffer
oxidation. This way, the sensors register incorrect or irregular measurements. The natural
degradation of the sensors requires their periodic replacement. However, some events
may expect device degradation, causing failures earlier than expected. It is still not
possible to avoid the natural degradation of the sensors. However, it is necessary to detect
sensor weakening, to prevent the use of inaccurate data by the system.

Page | 22
NODE CAPTURE:
It consists of the physical capture of a node or device. This operation could be carried
upon by entirely replacing the device or modifying components of hardware or software.
Node capture may not generate a major impact if done on a single node and might not
trigger other attacks. After capturing a device, the opponent can modify the hardware or
software, gain access to the system, or inject manipulated data. A node capture breaches
the integrity of the system and can potentially interfere with decision-making. It might
also damage the cultivation and cause major financial loss. For example, a hostile
actuator in an irrigation system could never start irrigation or flood the crop. A
dissatisfied employee or commercial competitor who has physical or logical access to
the system could perform this attack for several reasons.

FAKE NODE:
An adversary adds malicious nodes to the system to stop their operation. A node capture
could trigger this attack and therefore lead to node replication. This kind of attack usually
aims at both to manipulate data or to stop services and devices. In a system with
insufficient or fraudulent identity control, malicious sensors could send manipulated data
interfering with decision-making, or inject multiple packets into the network and
therefore causing a denial of service, or sleep deprivation. Likewise, actuators may act
maliciously, hostile gateways may send false commands to legitimate actuators, or act
as black holes to cause harm.

Page | 23
3.3 User Interface Design

The user interface of an IoT-based smart agriculture system generally consists of a


software application or a web-based platform that allows users to monitor and control
various aspects of their agricultural operations remotely. Here are some key modules and
features commonly found in such interfaces.
Dashboard: The dashboard supplies an overview of the system, exhibiting real-time data
and key metrics related to the agricultural environment. It may involve information such
as temperature, humidity, soil moisture levels, crop growth progress, and alerts for any
critical conditions.
Sensor Monitoring: The interface permits users to view data from various sensors
deployed in the field. Users can check the status and readings of sensors' scaling
parameters like temperature, humidity, soil moisture, light intensity, air quality, and
more.
Irrigation Control: Users can monitor and control the irrigation system anonymously
through the interface. They can set up schedules for watering, alter water flow rates, and
receive notifications if there are any problems or deviations from the desired conditions.
Mobile Access: Many smart agriculture interfaces provide mobile applications, enabling
users to monitor and control their farms from smartphones or tablets. This ensures
convenience and flexibility and thus allows farmers to stay connected while on the go.
Alerts and Notifications: The interface sends timely alerts and notifications to users
based on predefined thresholds or events.
It's important to note that the specific features and layout of the user interface can vary
depending on the manufacturer or provider of the IoT-based smart agriculture system.

FIG: USER INTERFACE

Page | 24
4. SOURCE CODE
4.1 Project coding

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>

#include <BlynkSimpleEsp8266.h>

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

char ssid[] = "Killer_fiber";//Enter your WIFI name

char pass[] = "sharda@123";//Enter your WIFI password

BlynkTimer timer;

bool Relay = 0;

//Define component pins

#define sensor A0

#define waterPump D3

int value =0;

void setup() {

Serial.begin(9600);

pinMode(waterPump, OUTPUT);

//digitalWrite(waterPump, HIGH);

pinMode(sensor, INPUT);

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

//Call the function

timer.setInterval(100L, soilMoistureSensor);

//Get the button value

Page | 25
BLYNK_WRITE(V1) {

Relay = param.asInt();

if (Relay == 1) {

digitalWrite(waterPump, LOW);

} else {

digitalWrite(waterPump, HIGH);

//Get the soil moisture values

void soilMoistureSensor() {

value = analogRead(sensor);

value = map(value, 0, 1024, 0, 100);

value = (value - 100) * -1;

Blynk.virtualWrite(V0, value);

void loop() {

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

soilMoistureSensor();

if(value < 30){

digitalWrite(waterPump, HIGH);

else{

digitalWrite(waterPump, LOW);

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

Page | 26
5. TESTING
5.1 Testing techniques and testing strategies

Overview:
The purpose of this test report is to summarize the testing activities conducted on the
Automatic Plant Watering System using Arduino. The system was tested to ensure
its functionality, accuracy, and reliability in watering plants automatically based on
soil moisture levels. The following sections outline the test results and provide an
overview of the system's performance.

Sensor Accuracy:

Test Result: Pass


Description: The soil moisture sensor accurately detected and reported moisture
levels in the soil.
Watering Mechanism Functionality:

Test Result: Pass


Description: The watering mechanism functioned properly, distributing water evenly
across the plants.
Timing and Scheduling:

Test Result: Pass


Description: The system successfully watered the plants at the specified intervals as
per the defined schedule.
Error Handling - Sensor Failure:

Test Result: Pass


Description: The system appropriately responded to a simulated sensor failure,
logging the failure, generating an alert, and ceasing watering until the issue was
resolved.
Alert System:

Test Result: Pass


Description: The alert system functioned correctly, sending timely notifications
when the soil moisture fell below the specified threshold.
Power Failure and Recovery:

Test Result: Pass

Page | 27
Description: The system resumed normal operation and continued watering based on
the scheduled settings after a simulated power outage and subsequent recovery.
Defects:

No critical defects were identified during the testing phase.


Recommendations:

The system performed well during testing, and no significant issues were found.
However, the following recommendations are provided to enhance the system's
overall performance and user experience:
Conduct additional testing under various environmental conditions to validate the
system's durability and performance in different scenarios.
Consider adding a backup power source or battery backup feature to ensure
uninterrupted operation during power outages.
Enhance the user interface by providing more intuitive controls and real-time
monitoring of sensor readings.
Conclusion:

The Automatic Plant Watering System using Adreno has successfully passed the
testing phase, demonstrating accurate sensor readings, reliable watering mechanism
functionality, and robust timing and scheduling capabilities.
The system effectively handled error conditions, such as sensor failures and power
outages, and generated appropriate alerts and notifications.
No critical defects were identified, and the system meets the specified requirements.
Please note that this test report provides a summary of the testing activities
conducted. For detailed information on individual test cases, their execution, and any
encountered issues, please refer to the corresponding test case documentation.

5.2 Debugging and Code improvement


When testing an automatic plant watering system using the Arduino project, you should
consider including the following aspects:
Watering Mechanism Testing: Test the watering mechanism, whether it's a pump or a
sprinkler system, to ensure it functions properly. Verify that the water is being distributed
evenly and in the desired quantity.

Timing and Scheduling Testing: Test the timing and scheduling functionality of the
system. Verify that it waters the plants at the appropriate intervals and according to the
predefined schedule.

Page | 28
Alert System Testing: If the system includes an alert system, such as email notifications
or mobile app alerts, test its functionality. Ensure that you receive timely and accurate
notifications regarding the watering status or any system errors.

Power and Battery Testing: Test the power source and battery life to ensure they are
sufficient to operate the system reliably. Verify that the system can handle power outages
and resume normal operation afterward.

User Interface Testing: If the system has a user interface, such as a control panel or a
mobile app, test its usability and functionality. Verify that users can easily configure the
watering settings, view sensor readings, and make any necessary adjustments.

Error Handling and Safety Testing: Test the system's response to various error
conditions, such as sensor malfunctions or water supply issues. Ensure that it can handle
unexpected situations gracefully and prioritize safety, such as shutting down in case of
emergencies.

Environmental Testing: Test the system's durability and performance under different
environmental conditions. Consider varying temperatures, humidity levels, and exposure
to sunlight to ensure the system operates reliably in different scenarios.

Long-Term Testing: Conduct extended testing to evaluate the system's performance over
an extended period. Assess its ability to consistently water the plants and adapt to
changing soil moisture levels.

Overall System Integration Testing: Finally, test the overall integration of different
components in the system. Verify that they work seamlessly together and communicate
effectively to achieve the intended functionality.

Page | 29
6. COST ESTIMATION OF PROJECT
Cocomo (Constructive Cost Model) is a regression model based on LOC, i.e. number of
Lines of Code. It is a procedural cost estimate model for software projects and is often
used as a process of reliably predicting the various parameters associated with making a
project such as size, effort, cost, time, and quality.
Features of COCOMO Model
● It is a software cost estimation model.
● It estimates the cost of the software in a rough and quick manner.
● It is mostly used for small-medium sized software.
● Basic Cocomo model consists of three modes of development-
● Organic mode
● Semi-Detached mode
● Embedded mode

Organic Mode:

The Organic mode applies to software projects that are relatively small in size, with a
small development team and well-understood requirements. In this mode, the
development team is experienced and has a good understanding of the software domain.
The software development process is flexible and informal. The Organic mode assumes
a low level of complexity, minimal team coordination overhead, and a low risk of
schedule delays. Effort estimation in this mode is typically optimistic.

Effort = 2.4(KLOC) 1.05 PM


Tdev = 2.5(Effort) 0.38 Months

Semi-Detached Mode:
The Semi-Detached mode applies to software projects that fall between the Organic and
Embedded modes in terms of size and complexity. It represents a moderate level of
complexity and team coordination. The development team may have a mix of
experienced and less-experienced members. The software requirements may be partially
understood, and there may be some level of risk involved. Effort estimation in this mode
is more realistic compared to the Organic mode.

Effort = 3(KLOC) 1.12 PM


Tdev = 2.5(Effort) 0.35 Months

Embedded Mode:
The Embedded mode applies to large-scale software projects that involve complex and
critical systems, such as embedded software in aerospace, defines, or automotive
industries. These projects typically have stringent requirements, high levels of
complexity, and significant risks. The development team size is usually large, involving

Page | 30
multiple disciplines and departments. Effort estimation in the Embedded mode is often
conservative due to the challenges and uncertainties associated with such projects.

Effort = 3.6(KLOC) 1.20 PM


Tdev = 2.5(Effort) 0.32 Months.

Hardware cost

Calculation

The effort and the time taken to complete both are calculated through predefined
equations.
The formula used is-
Effort(E)= a*(KLOC)^b PM(Person month)
Time = c(E)d
Person Required = effort/time

Page | 31
Where, KLOC = size of the product i.e. no. of lines of code.a, b, c, d are constants and
have different values for different models.Time is the time required to develop the
product and the unit is months.And the effort is the total effort calculated that will be
required to complete the work calculated in PM (Person Months).

Embedded-

Effort = 3.6(KLOC) 1.20 PM

=3.6*(0.062)*1.20 PM

=0.15 PM

Time = 2.5(E) 0.32 Months

= 2.5(658.31) 0.32 Months

= 0.73 Months.

Total Cost = Months * No. of team member * salary of each person.


= 0.73 * 4 * 50,000
= ₹1,46000/-

REAL TIME WORKING MODULE

Page | 32
7. CONCLUSION
Smart Farming IOT Based Agriculture System for Live Monitoring of Temperature and
Soil Moisture has been proposed using Node MCU Chip, and various other Hardware
Devices. The system has high efficiency and accuracy in fetching the live data of
temperature, humidity, and soil moisture. The IoT based Agriculture system being
developed through this paper will help farmers in increasing the agriculture yield and
take efficient care of food production as it will always provide a helping hand to farmers
for getting accurate live feed of environmental temperature and soil moisture with
accurate results. With the help of these systems, various problems faced by farmers in
daily life are being solved to a greater extent. Therefore, this system avoids excessive
irrigation, under irrigation, soil erosion, and reduces water wastage. The main advantage
is that the action of the system can be changed depending on the situation (plants,
climate, soil, etc.). Through this program, agriculture, agricultural fields, parks, gardens,
golf courses can be measured. Therefore, this program is cheaper and more efficient
compared to other types of automation systems. For larger applications, higher
sensitivity can be performed in large areas of agricultural land. A soil moisture level
monitoring system was developed and the project provided an opportunity to study
existing systems, as well as their features and constraints. The proposed system can be
used to turn off / off the water spray according to soil moisture levels thus making the
irrigation process one of the most time-consuming agricultural activities. Agriculture is
one of the biggest uses of water. These days’ food demand is increasing due to the
population, so the way of farming is very important to reach the demand of the public.
Focusing on smarter and efficient ways of cultivation is crucial. The improvement of
new practices of increasing crop yield and handling, recently youth are inclining towards
agriculture and choosing it as a profession. Technology like IoT helps them to simplify
the way of cultivation and monitoring crops by accessing the information using mobiles
and the internet. Taking these factors into consideration, this paper highlights the major
role of technologies, mainly IoT, which makes farming smarter to meet the expectations
in future. We use wireless sensors, cloud, Bluetooth and other devices as discussed
earlier. Various farming methods and how effective they work to save the resources are
explained. In conclusion, monitoring the farmland is very important, for better
cultivation and less wastage of resources IoT technology is necessary.

Page | 33
8. RECOMMENDATION
The Recommendations are interlinked with conclusion. The conclusion drawn from
the project report can be further implemented in the recommendation section to
overcome the constraints of the project. Farmers have started to realize that the IoT
is a driving force for increasing agricultural production in a cost-effective way. IoT
solutions are focused on helping farmers close the supply demand gap, by ensuring
high yields, profitability, and protection of the environment. The approach of using
IoT technology to ensure optimum application of resources to achieve high crop
yields and reduce operational costs is called precision agriculture. IoT in agriculture
technologies comprise specialized equipment, wireless connectivity, software and IT
services, Smart farming based on IoT technologies enables growers and farmers to
reduce waste and enhance productivity ranging from the quantity of fertilizer utilized
to the number of journeys the farm vehicles have made, and enabling efficient
utilization of resources such as water, electricity, etc. IoT smart farming solutions is
a system that is built for monitoring the crop field with the help of sensors (light,
humidity, temperature, soil moisture, crop health, etc.) With the use of IoT creations,
the costs can be reduced to a dramatic level that will increase productivity and
survival. With the use of Io efficiency, it will be greatly increased until water, soil,
fertilizer, pesticides, etc. are used. The presence of advance technologies, especially
the involvement of the IoT, matters a great deal in regard to reaching this goal.
Environmental issues continue to cage the planet, which increases the need for safe
and clean agriculture. This is the reason humanity is witnessing a second green
revolution, largely based on the IoT. The use of these technologies makes the farming
industry highly productive with reduced labor and other resource consumption; same
time, minimizing the impact on the environment. Our planet has the resources, but
we have to learn how to utilize them wisely and precisely. Sensible use of technology
can lead us where we can utilize these resources efficiently in order to ensure the
food security of the current and coming generations. For this purpose, we need
collective efforts to build such institutions that can shape long-term decisions and
polices to eliminate hunger effectively. On this route, the experience, tools, and
support from those nations that have succeeded in overcoming hunger should provide
to those regions that are fighting to feed its local mouths. Although growth in every
industry matter, growth in agriculture, particularly among small growers, can be
highly effective to control the undernourishment issues, as more than 70% of the
population of developing countries belongs to rural areas and somehow depends on
agriculture sector.

Page | 34
9. REFERENCE
● [1] Pratibha, S. R., Hongal, A., & Jyothi, M. P. (2017, March). IoT based
monitoring system in smart agriculture. In 2017 international conference on
recent advances in electronics and communication technology.
● [2] Sushanth, G., & Sujatha, S. (2018, March). IOT based smart agriculture
system. In 2018 International Conference on Wireless Communications, Signal
Processing and Networking.
● [3] Singh, V. P., Jain, S. K., & Tyagi, A. (2007, October). Risk and reliability
analysis: a handbook for civil and environmental engineers. 4. Rao, R. N., &
Sridhar, B. (2018, January). IoT based smart crop-field monitoring and
automation irrigation system. In 2018 2nd International Conference on Inventive
Systems and Control.
● [4] Abhishek D. et al., "Estimates for World Population and Global Food
Availability for Global Health", Book chapter, The Role of Functional Food
Security in Global Health, 2019,
● [5] Elder M., Hayashi S., "A Regional Perspective on Biofuels in Asia", in
Biofuels and Sustainability, Science for Sustainable Societies, Springer, 2018
Accessed: Apr. 15, 2019
● [6] Zhang, L., Dabipi, I. K. and Brown, W. L, "Internet of Things Applications
for Agriculture". In, Internet of Things A to Z: Technologies and Applications,
Q. Hassan (Ed.), 2018
● [7] S. Navulur, A.S.C.S. Sastry, M. N. Giri Prasad, "Agricultural Management
through Wireless Sensors and Internet of Things" International Journal of
Electrical and Computer Engineering (IJECE), 2017; 7(6) :3492-3499.
● [8] E. Sisinni, A. Saifullah, S. Han, U. Jennehag and M. Gidlund, "Industrial
Internet of Things: Challenges, Opportunities, and Directions," in IEEE
Transactions on Industrial Informatics, vol. 14, no. 11, pp. 4724-4734, Nov.
2018.
● [9] Fundamentals of Software Engineering, RAJIB MALL, PhD, is Professor,
Department of Computer Science and Engineering, IIT Kharagpur.

Page | 35

You might also like