Nothing Special   »   [go: up one dir, main page]

01 IoT Based Smart Agriculture

Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

JNANA SANGAMA, BELAGAVI – 590014

A Project Report on

“IoT Based Smart Agriculture Using Solar Energy”


Submitted in fulfillment of the requirements for the award of degree

BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE AND ENGINEERING

Submitted by:

Mohammad Kaif Devalapur 2AG19CS033


Mustakeen Nimbargi 2AG19CS034
Omkar S Patil 2AG19CS040
Ruchita Mudakavi 2AG19CS059

Under the Guidance of


Prof. Dhanashree K
Assistant Professor, Dept. of CSE,
AITM, Belagavi.

ANGADI INSTITUTE OF TECHNOLOGY & MANAGEMENT


BELAGAVI-590009
2022-2023
ANGADI INSTITUTE OF TECHNOLOGY & MANAGEMENT,
BELAGAVI -590009
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Certificate
This is to certify that Project entitled “IoT Based Smart Agriculture using Solar Energy ” is bonafide
work carried out by Mohammad Kaif Devalapur (2AG19CS033), Mustakeen Nimbargi
(2AG19CS034), Omkar S Patil (2AG19CS040), Ruchita Mudakavi (2AG19CS059) in partial
fulfillment of the requirements for the award of the degree of Bachelor of Computer Science &
Engineering under Visvesvaraya Technological University, Belagavi during the year 2022-2023. It is
certified that all the correction/suggestion indicatedfor internal assessment have been incorporated in the
report. The project report has been approved as it satisfies the academic requirements in respect of major
project work prescribed for the Bachelor of Engineering degree.

______________________________________ __________________________________________________ ___________________________________ ____________________________________________

Signature of Guide Signature of Co-Ordinator Signature of HOD Signature of Principal


Prof. Dhanashree Kulkarni Prof. Gautam Dematti Prof. DhanashreeKulkarni Dr. Anand Deshpande
Assistant Professor, Assistant Professor, Professor and Head, Principal and Director,
Dept. of CSE, AITM Dept. of CSE, AITM Dept. of CSE, AITM AITM, Belagavi

Name of the Examiner: Signature with date:

1. .…………………… ……………………..

2. …………………….. ......…………………
DECLARATION

We Mohammad Kaif Devalapur(2AG19CS033), Mustakeen Nimbargi


(2AG19CS034), Omkar Patil (2AG19CS040), Ruchita Mudakavi (2AG19CS059) studying
in the final year of Bachelor of Engineering in Computer Science and Engineering at Angadi
Institute of Technology and Management, Belagavi, hereby declare that this project work entitled
“IoT Based Smart Agriculture using Solar Energy” which is being submitted by us in the
partial fulfilment for the award of the degree of Bachelor of Engineering in Computer Science
and Engineering from Visvesvaraya Technological University, Belagavi is an authentic record
of us carried out during the academic year 2022-2023 under the guidance of Prof. Dhanashree
Kulkarni, Department of Computer Science and Engineering, Angadi Institute of Technology
and Management, Belagavi.
We further undertake that the matter embodied in the dissertation has not been submitted
previously for the award of any degree or diploma by us to any other university or institution.

Place: Belagavi Mohammad Kaif Devalapur


Date: Mustakeen Nimbargi
Omkar S Patil
Ruchita Mudakavi

i
ACKNOWLEDGEMENT

It is our proud privilege and duty to acknowledge the kind of help and guidance
received from several people in preparation of this report. It would not have been possible to
prepare this report in this form without their valuable help, cooperation and guidance.

First and foremost, we wish to record our sincere gratitude to Management of Angadi
Institute of Technology and Management and to our beloved Dr. Anand Deshpande,
Principal& Director, Angadi Institute of Technology & Management, Belagavi for his constant
support and encouragement in preparation of this report and for making available library and
laboratory facilities needed to prepare this report.

Our sincere thanks to Prof. Dhanashree Kulkarni, HOD, Department of Computer


Science andEngineering, AITM, for her valuable suggestions and guidance throughout the period
of this report.

We express our sincere gratitude to our guide, Prof. Dhanashree Kulkarni, Assistant
Professor,Department of Computer Science and Engineering, AITM, Belagavi for guiding us in
investigations for this project and in carrying out experimental work. Our numerous discussions
with her were extremely helpful. We hold her in esteem for guidance, encouragement and
inspiration received from her.

The project on "IoT Based Smart Agriculture using Solar Energy" was very helpful
to us in giving the necessary background information and inspiration in choosing this topic for the
project.Our sincere thanks to Prof. Gautam Dematti, Project Coordinator for having supported
the workrelated to this project. Their contributions and technical support in preparing this report are
greatlyacknowledged.

Last but not the least, we wish to thank our parents for financing our studies in this
college as well as for constantly encouraging us to learn engineering. Their personal sacrifice in
providing this opportunity to learn engineering is gratefully acknowledged.

ii
ABSTRACT
Temperature and humidity sensors can help you monitor the conditions in your growing
environment and make adjustments to maintain optimal growing conditions for your crops. Soil
moisture sensors can help you determine when to water your plants, while PIR motion sensors
can be used to detect movement of pests or other animals that may be damaging your crops.
Water level sensors can be used to monitor water levels in irrigation systems or other water
sources to ensure that you have adequate water for your crops. Finally, by using solar energy to
power your sensors, you can reduce your energy costs and minimize your carbon footprint.
Overall, integrating these technologies can help you optimize your agricultural processes,
reduce waste, and improve crop yields.

Keywords – Smart Agriculture (SA), Sensores, Internet of Things (IoT) , Pir Motion Sensor,
Humidity Sensor, Water Pump.

iii
TABLE OF CONTENTS
Declaration i
Acknowledgement ii
Abstract iii

Index vi

INDEX

CHAPTER 1 INTRODUCTION [1-2]

1.1 Introduction to IoT 1

1.2 Introduction to Topic 1

CHAPTER 2 LITERATURE SURVEY [3-4]

CHAPTER 3 SYSTEM ANALYSIS [5]

3.1 Existing System 5

3.2 Proposed System 5

CHAPTER 4 SYSTEM REQUIREMENTS [6]

4.1 Hardware Requirements 6

4.2 Software Requirements 6

CHAPTER 5 SYSTEM DESIGN [7-15]

5.1 System Architecture 7

5.2 Data Flow Diagram 8

5.3 Use Case Diagram 12

5.4 Activity Diagram 13

5.5 Sequence Diagram 14

iv
CHAPTER 6 SYSTEM STUDY [16-18]

6.1 Feasibility Study 16

6.2 Types of Feasibility Study 16

CHAPTER 7 SOFTWARE ENVIRONMENT [19-20]

7.1 Hardware Backend 19

7.2 Application Backend 20

CHAPTER 8 IMPLEMENTATION [22-36]

8.1 System Modules 22

8.2 Sample Code 22

CHAPTER 9 TESTING AND RESULTS [35-41]

9.1 Testing 37

9.2 Results 38

9.2.1 Front Screen of Smart Agriculture App 38

9.2.2 Data Stream Screen 39

9.2.3 SignUp Screen 39

9.2.4 Login Screen 40

9.2.5 Dashboard Screen 40

9.2.6 41

41

CHAPTER 8 CONCLUSION 42
REFERENCES

v
LIST OF FIGURES

Sl.no Figure Name Pg.no

1. 5.1.1 Architecture of IoT Based Smart Agriculture 14


2. 5.2.1 Level 0 Data Flow of Application 16
3. 5.2.2 Data flow Level 1 diagram of NodeMCU 16
4. 5.2.3 Data flow Level 2 Diagram of NodeMCU and GSM Module 17
5. 5.3.1 Use Case Diagram of Application and User 18
6. 5.4.1 Sequence Diagram of Application and User 19
7. 5.51 Activity Diagram of IoT based Smart Agriculture 20
8. 9.2.1 NodeMCU ESP-32 34
9. 9.2.2 Soil Moisture Sensor 34
10. 9.2.3 Ultrasonic Sensor 35
11. 9.3.4 Temperature & Humidity Sensor 35
12. 9.2.5 Flame Sensor 36
13. 9.2.6 PIR Motion Sensor 36
14. 9.2.7 Relay Module 37
15. 9.2.8 GSM Module 38
16. 9.2.9 Water Pump Motor 38
17. 9.2.10 Dashboard 39
18. 9.2.11 Circuit 40
19. 9.2.12 App Interface 40
20. 9.2.13 Data Stream Screen 41
21. 9.2.14 Data 41

vi
IoT Based Smart Agriculture Using Solar Energy

CHAPTER 1:
INTRODUCTION

1.1 Introduction to IoT


In 1999- The term "Internet of Things" was used by Kevin Ashton during his work at P&G
which became widely accepted. 2004 - The term was mentioned in famous publications like the
Guardian, Boston Globe, and Scientific American. 2005-UN's International Telecommunications
Union (ITU) published its first report on this topic. 2008- The Internet of Things was born 2011-
Gartner, the market research company, include "The Internet of Things" technology in their research
“The Internet of Things (IoT) is a system of interrelated computing devices, mechanical and digital
machines, objects, animals or people that are provided with unique identifiers and the ability to
transfer data over a network without requiring human-to-human or human-to-computer interaction.”
How it Works?
1)Sensors:
▪ Sensors or devices are a key component that helps you to collect live data from the surrounding
environment.
▪ All this data may have various levels of complexities.
▪ It could be a simple temperature monitoring sensor, or it may be in the form of the video feed.
2)Connectivity:
▪ All the collected data is sent to a cloud infrastructure.
▪ The sensors should be connected to the cloud using various mediums of communications.
▪ These communication mediums include mobile or satellite networks, Bluetooth, WI-FI, WAN..
3)Data Processing:
▪ Once that data is collected, and it gets to the cloud, the software performs processing on the
gathered data.
▪ This process can be just checking the temperature, reading on devices like AC or heaters.
▪ However, it can sometimes also be very complex like identifying objects, using computer vision
on video.
4)User Interface:
▪ The information needs to be available to the end-user in some way which can be achieved by
triggering alarms on their phones or sending them notification through email or text message.
▪ The user sometimes might need an interface which actively checks their IoT system.
▪ For example, the user has a camera installed in his home. He wants to access video recording and
all the feeds with the help of a web server.

DEPT OF CSE, AITM BELAGAVI 1


IoT Based Smart Agriculture Using Solar Energy

Characteristics of IoT
1. Monitor their overall business processes.
2. Monitor their overall business processes.
3. save time and money.
4. Integrate and adapt business models.
5. Integrate and adapt business models

1.2 Introduction to Topic

Water is the basis and the main engine of life on earth. Humans use water for industrial purposes,
sanitation, and irrigation. In the last decades, the annual water withdrawal ranged between 11 billion and 15
billion cubic meters per year, out of which 69 % is used in agriculture . Unfortunately, most of this water is
wasted because of inadequate irrigation control systems. As in most arid and sub-Saharan countries,
agriculture in Morocco is the largest consumer of fresh water, especially after launching the Green Plan
program in April 2008 . This program aims to promote agriculture as an efficient sector capable of advancing
the economy, fighting poverty, and preserving many people in rural areas efficiently and sustainably. Within
the framework of this program, the government provided many facilities and assistance to farmers and
investors in irrigated agriculture to provide enough basic food for local consumption and export promotion
programs. However, the level of Smart Agriculture penetration in Morocco remains very low
Over the past few years, IoT has become one of the most important technologies of the 21st century.
Now that we can connect everyday objects—kitchen appliances, cars, thermostats, baby monitors to
the internet via embedded devices, seamless communication is possible between people, processes, and
things.

DEPT OF CSE, AITM BELAGAVI 2


IoT Based Smart Agriculture Using Solar Energy

CHAPTER 2:
LITERATURE SURVEY
1) Title IoT-solar energy powered smart farm irrigation system.
Author: A.R. Al-Ali, A. Al Nabulsi, S. Mukhopadhyay, M.S. Awal, S. Fernande, K. Ailabouni.
Journal: Journal of Electronic Science and Technology.
Year: 2019
• Journal of Electronic Science and Technology.

• Mobile monitoring and control mode.

• Fuzzy logic based control mode

• An IoT-based renewable energy system for smart farm irrigation was successfully
developed. The solar energy requirement has been calculated and the right size solar
energy cells were installed.

2) Title: Robust Wireless Sensor and Actuator Networks for Networked Control Systems.
Author: Bongsang Park, Junghyo Nah, Jang-Young Choi, Ick-Jae Yoon and
Pangun Park.

Journal: Department of Radio and Information Communications Engineering


and Electrical Engineering, Chungnam National University, Daejeon, Korea.
Year: 2019
• Clustering algorithm of GC and Scheduling algorithm of CH j was used in this system.
• In this paper, proposed the R-WSAN protocol to maintain the control stability against the
network faults such as node and link failures.
• In this paper, proposed the R-WSAN protocol to maintain the control stability against the
network faults such as node and link failures.

3) Title: Photovoltaic agriculture internet of things towards realizing the next generation of smart
farming.
Author: KAI HUANG LEI SHU (Senior Member, IEEE), KAILIANG LI ,FAN YANG,
GUANGJIE HAN (Senior Member, IEEE), XIAOCHAN WANG, AND SIMON PEARSON,
Nanjing Agriculture University, Nanjing, China and university of Lincoln, UK.

Journal: This work was supported in part by the Research Start-Up Fund for Talent Introduction.

DEPT OF CSE, AITM BELAGAVI 3


IoT Based Smart Agriculture Using Solar Energy

Year: 2020

• IoT can be easily combined with PA, in which we mainly focus on the wireless technology.
Then by deploying wireless sensor network nodes in PA, a completely new agricultural
internet of things.

• PA, as an effective production method to effectively alleviate the contradiction between


agriculture and energy, can give full play to the advantages of agricultural production and
energy production.

• The proposed scheme is very promising to enable PA by combining both PA and IoT.

4) Title: IOT in Agricultural Crop Protection and Power Generation.


Author: Mrs. Sowmya M S Asst.Prof, and Student - Anjana M, Charan Kumar A, Monisha R,
Sahana R H.

Journal: International Journal of Engineering Research & Technology (IJERT).


Year: 2020
• Objectives of the proposed work includes to protect the crops from heavy rain fall and
increase the yield.

• Generation of power using solar energy.

• Protect cops using Green house technique.

• To control operations regarding to closing and opening of Roof and other operations
manually through IOT technology.

• System used is moisture sensor, Humidity Sensor, temperature sensor, rain sensor, IR
sensor.

5) Title: Prospect of IoT Based Smart Agriculture in Bangladesh-A Review.


Author: Olly Roy Chowdhury Associate Professor Dept. of Physics and Mechanical Engineering
and Sarna Majumder Assistant Professor Dept. of Computer and Communication Engineering,
Patuakhali Science and Technology University, Patuakhali, Bangladesh.

Journal: International Journal of Engineering Research & Technology (IJERT) .


Year: 2021

DEPT OF CSE, AITM BELAGAVI 4


IoT Based Smart Agriculture Using Solar Energy

• This paper presents the current scenario of IoT based smart agriculture worldwide
especially in case of conducting the control actions and method of powering the entire
cultivation and irrigation process.

• Cropping reliability and crop yield are increased.

• Seed robots sows the seeds uniformly at proper distance and correct depths.

DEPT OF CSE, AITM BELAGAVI 5


IoT Based Smart Agriculture Using Solar Energy

CHAPTER 3:
SYSTEM ANALYSIS

3.1 Existing System:


Traditional Agriculture can be defined as a primitive style of farming that involves the intensive
use of indigenous knowledge, traditional tools, natural resources, organic fertilizer and cultural beliefs
of the farmers. It is noteworthy that it is still used by about 50% of the world population.

The primitive style of framing like slash and burn decreases the organic matter from the soil and
within the short period of time the nutrient content of the soil taken up by the crops. This makes the
farmers to move to another place for farming.

It is a process of the removal of topsoil by the natural physical forces of water and wind or through
forces associated with farming activities such as tillage. The roots of the plant and trees firmly hold the
soil, but the deforestation exposed the soil to get eroded by the weathering forces like rain, wind and
storms which causes the loss of top fertile soil.

Disadvantages of the existing system:


➢ It takes lot of time to get harvested.
➢ Pesticides will be used to prevent from attacking crops. Hence the crops are not so healthy.
➢ Decomposition takes lot of time in traditional agriculture.
➢ Farmers don’t make much money because of the profit on the crops grown or livestock raised.

3.2 Proposed System:


IoT smart agriculture products are designed to help monitor crop fields using sensors and by
automating irrigation systems. As a result, farmers and associated brands can easily monitor the field
conditions from anywhere without any hassle.

By making farming more connected and intelligent, precision agriculture helps reduce overall
costs and improve the quality and quantity of products, the sustainability of agriculture and the
experience for the consumer. Increasing control over production leads to better cost management
and waste reduction.

DEPT OF CSE, AITM BELAGAVI 6


IoT Based Smart Agriculture Using Solar Energy

Advantages of proposed system:


➢ Increased Crop Yield: The integration of renewable energy into cloud & IoT-based smart
agriculture will provide farmers with more efficient energy sources to power their operations,
which can lead to an increase in crop yields.
➢ Reduced Energy Costs: By utilizing renewable energy sources, farmers can reduce their energy
costs and operate more cost-effectively. The implementation of smart agriculture technologies such
as IoT and cloud computing can help farmers better manage their energy use and reduce their overall
energy costs.

➢ Improved Environmental Sustainability By utilizing renewable energy sources, farmers can


reduce their environmental impact and help reduce carbon emissions. This will also help support the
growth of green energy infrastructure, which is necessary for a sustainable future.

➢ Enhanced Efficiency: By utilizing cloud & IoT technologies, farmers can leverage data-driven
insights to optimize their operations, leading to improved efficiency and productivity.

DEPT OF CSE, AITM BELAGAVI 7


IoT Based Smart Agriculture Using Solar Energy

CHAPTER 4:
SYSTEM REQUIREMENTS

4.1 HARDWARE REQUIREMENTS

• Processor core : i3 core / Ryzen 3


• Processor speed : 2.00 GHz
• Disk space : 256GB
• RAM : 4GB (8GB Recommended)
• Camera : Raspberry pi (5 MP)
• NodeMCU ESP- 32
• Soil Moisture sensor

4.2 SOFTWARE REQUIREMENTS

• Blynk App
• Smart Agriculture App

DEPT OF CSE, AITM BELAGAVI 8


IoT Based Smart Agriculture Using Solar Energy

CHAPTER 5:
SYSTEM DESIGN

5.1 System Architecture:

Monitoring System

Soil Moisture Sensor

Temperature Sensor
GSM
NodeMCU ESP-32
Module900
Humidity Sensor

Water Level Sensor

Solar Panel Controller

Battery

Fig 5.1.1. Architecture of IoT Based Smart Agriculture

Figure shows the structure of the proposed IoT based Smart Agriculture using Solar Energy:
NodeMCU to send data to all sensors. The communication server then delivers the data received from the
sensor's position which transmit this data to the monitoring center for analysis. The monitoring center, upon
analyzing the data, sends control commands to the sensors to adjust irrigation systems or activate actuators
such as valves or lights.

DEPT OF CSE, AITM BELAGAVI 9


IoT Based Smart Agriculture Using Solar Energy

The system includes various sensors, including the Moisture sensor for detecting moisture levels, the
temperature sensor for sensing temperature levels, and the humidity sensor for measuring humidity levels.
These sensors collect data and transmit it to the central system for analysis. If the specified conditions are
met, the system activates the irrigation system or adjusts the actuators.

5.2 Data Flow Diagram:


Level 0

Crops/
User Blynk
Fields

Fig 5.2.1. Level 0 Data Flow of Application

The above diagram represents the Level 0 of the Application. This diagram flow shows the user controls the
application system and the water into the field.

Level 1

Soil Moisture

Temperature
Data
Humidity

User Water level

GSM
GSM Module
Data

Fig 5.2.2. Data Flow Level 1 Diagram of NodeMCU and GSM Module

The above diagram represents the Level 1 state of the NodeMCU and GSM Module. In this it shows one step
detailed flow of the both modules, where, the NodeMCU module consists of the Soil moisture sensor
Temperature sensor Humidity sensor and Water Level sensor.

DEPT OF CSE, AITM BELAGAVI 10


IoT Based Smart Agriculture Using Solar Energy

Dry Pump
ON

Soil Moisture Data


Moisture
Moist Pump
OFF

Temperat Temperature
ure Data
User

Humidity Humidity Data

Water Water Level Data


Level

GSM Pump
Modul ON
e
Pump
OFF

Fig 5.2.3. Data Flow Level 2 Diagram of NodeMCU and GSM Module

The level 2 Data Flow Diagram briefs state of the NodeMCU and GSM Module. In this it shows one
step detailed flow of the both modules, where, the NodeMCU module consists of the Soil moisture sensor
Temperature sensor Humidity sensor and Water Level sensor.

DEPT OF CSE, AITM BELAGAVI 11


IoT Based Smart Agriculture Using Solar Energy

5.3 Use Case:

App
Control

Soil
Moisture

Temperatur
User
e

Humidit Blynk
y Interface

Water
Level

GSM Water
Module Pump

Fig 5.3.1. Use Case Diagram of Application and User

The Use Case diagram of Application and User is mainly containing the 2 modules, as the above
fig shows the interconnections of the user with Application.
1) User: The User controls the agriculture firm through a mobile application. The User connects the
NodeMCU through WiFi and controls the movement. The User can see the data in Mobile,
Computer like web browser or App.
2) Sensors: The Sensors are used for sensing and displaying the values for Farmers or Users in the
Computer.

DEPT OF CSE, AITM BELAGAVI 12


IoT Based Smart Agriculture Using Solar Energy

5.4 Sequence Diagram

Fig 5.4.1: Sequence Diagram of Application and User

An IoT-based smart agriculture system using solar energy can be depicted using a sequence
diagram, which shows the interactions between various components in the system. The sequence diagram would
depict the flow of information and actions between components such as solar panels, batteries, IoT devices,
cloud servers, irrigation systems, and smartphones. For example, the solar panels would detect sunlight and
convert it into electrical energy, which would be stored in a battery. The IoT device would measure
environmental factors and send data to the cloud server for analysis. The cloud server would then send
commands to the irrigation system to water the crops based on the analyzed data, while also sending alerts to
the farmer's smartphone app if any abnormal conditions are detected. The sequence diagram provides a visual
representation of how the system works and helps identify potential issues or inefficiencies.

DEPT OF CSE, AITM BELAGAVI 13


IoT Based Smart Agriculture Using Solar Energy

5.5 Activity Diagram

Start [Not Moist]


Soil Moisture, Water
The Humidity & Pump ON
Machin Temperature
e
[Moist]

Water Pump
GSM
OFF

Users

Fig 5.5.1: Activity Diagram of IoT based Smart Agriculture

An activity diagram is a type of UML diagram that shows the flow of activities or actions
in a system. The diagram is used to depict the various actions taken by components in the system to
achieve a specific goal. In the context of an IoT-based smart agriculture system using solar energy, the
activity diagram would illustrate the sequence of actions taken by the components involved in the
system. For instance, the solar panels detect sunlight and convert it into electrical energy, which is then
stored in a battery. The IoT device measures various environmental factors such as temperature,
humidity, and soil moisture levels, and then sends the data to the cloud server for analysis. The cloud
server processes the data and sends commands to the irrigation system based on the analyzed data. The
irrigation system then waters the crops based on the commands received from the cloud server. If any
abnormal conditions are detected, the IoT device sends alerts to the farmer's smartphone app, who then
receives the alerts on their smartphone and takes appropriate action based on the alerts. Overall, the
activity diagram helps to visualize and understand the steps involved in achieving the desired outcome
of the system.

DEPT OF CSE, AITM BELAGAVI 14


IoT Based Smart Agriculture Using Solar Energy

CHAPTER 6:
SYSTEM STUDY

6.1 Feasibility Study


A feasibility study is an assessment of the practicality of a proposed project or system. A
feasibility study aims to objectively and rationally uncover the strengths and weaknesses of an existing
business or proposed venture, opportunities and threats present in the natural environment, the resources
required to carry through and ultimately the prospects for success. In its simplest terms, the two criteria
to judge feasibility are cost required and value to beattained. Generally, feasibility studies precede
technical development and project implementation. The acronym TELOS refers to the five areas of
feasibility - Technical, Economic, Legal, Operational and Scheduling.

Why we need Feasibility Study?


• When we have new project with new concept
• When we are not confirming about the resources and time
• To suggest possible alternative solution
• To provide management with enough information to know
• Whether the project can be done
• Whether the final product will benefit its intended users

When we don’t need Feasibility Study?


• We know it’s feasible. An existing business is already doing it
• Why to do another feasibility study when there is an existing one which was done just a few
months ago

6.2. Types of Feasibility study:


6.2.1 Economic feasibility
Economic feasibility analysis is the most commonly used method for determining the
efficiency of a new project. It is also known as cost analysis. It helps in identifying profit against
investment expected from a project. Cost and time are the most essential factorsinvolved in this field
of study. Economic analysis could also be referred to as cost/benefit analysis. It is the most
frequently used method for evaluating the effectiveness of a newsystem. In economic analysis
the procedure is to determine the benefits and savings that are

DEPT OF CSE, AITM BELAGAVI 15


IoT Based Smart Agriculture Using Solar Energy

expected from a candidate system and compare them with costs. If benefits outweigh costs,
then the decision is made to design and implement the system.

6.2.2 Market feasibility


Market Feasibility Study determines the depth and condition of a particular market and its
ability to support a particular development. The main objective of a market feasibility study is to
understand the market to determine if enough demand exists to make the venture successful. It
provides a more in-depth and thorough analysis than any other type of market research.

6.2.3 Technical feasibility


The technical possibility of developing a product per client expectation is called technical
feasibility. It is a study carried out manually or using tools to understand the likelihood of completing
a work based on the availability of materials, people, infrastructure.

Whether the work is technically feasible? This means if it can be done from a technical point
of view. There may be financial feasibility that will relate to the cash flow or funding allocated to
complete the work. Likewise, operational feasibility deals with the larger picture including cost,
people, and facilities available to complete a project.

On the other hand, technical feasibility considers only the technical chances of completing a
given work. Say, for instance, there are enough funding, great technical equipment, sufficient time,
ample human resources available. But, if the resources are not technically proficient, then the whole
purpose gets defeated. Yes, people should know how to use technology in the development process
to greater levels to ship the product to the customer.

6.2.4 Legal feasibility


Legal feasibility study is to know if the proposed project confirms the legal andethical
requirement. It is important that the project or business is following the requirements needed to start
a business or a project including business licenses, certificates, copyrights, business insurance, tax
number, health and safety measures, and many more. It determines whether the proposed system
conflicts with legal requirements, e.g., a data processing system must comply with the local data
protection regulations and if the proposed venture is acceptable in accordance to the laws of the land.

6.2.5 Schedule Feasibility

It is defined as the probability of a project to be completed within its scheduled time

DEPT OF CSE, AITM BELAGAVI 16


IoT Based Smart Agriculture Using Solar Energy

limits, by a planned due date. If a project has a high probability to be completed on-time, then its
schedule feasibility is appraised as high. In many cases a project will be unsuccessful if it takes
longer than it was estimated: some external environmental conditions may change,hence a
project can lose its benefits, expediency and profitability.

6.2.6 Schedule Feasibility

Operational feasibility is the ability to utilize, support and perform the necessary tasks
of a system or program. It includes everyone who creates, operates, or uses the system. Tobe
operationally feasible, the system must fulfil a need required by the business. Operational
feasibility is the measure of how well a proposed system solves the problems, and takes
advantage of the opportunities identified during scope definition and how it satisfies the
requirements identified in the requirements analysis phase.

DEPT OF CSE, AITM BELAGAVI 17


IoT Based Smart Agriculture Using Solar Energy

CHAPTER 7
SOFTWARE ENVIRONMENT

7.1. Hardware Backend


7.1.1 Arduino
Arduino is an open-source electronics platform that is widely used by hobbyists, students, and
professionals for prototyping and developing interactive electronic projects. The platform consists of a
hardware board with a microcontroller and a programming language and development environment.
The hardware board is designed to be easy to use and flexible, and it includes a range of input and
output pins that can be used to connect sensors, actuators, and other electronic components. The board is
programmed using a simplified version of the C++ programming language, which can be learned quickly
even by beginners.
Arduino has become popular for its ease of use, low cost, and large community of users who share
ideas, code, and projects. It has been used to develop a wide range of projects, including robotics, home
automation, musical instruments, environmental monitoring, and many more.
Because it is open-source, users can modify and extend the Arduino platform to meet their specific
needs, and there are many third-party libraries and add-ons available that can be used to extend the
capabilities of the platform

7.2. Application Backend


7.2.1. Java
Android Java backend refers to the use of Java programming language to develop the backend
components of an Android application. The backend of an Android application typically refers to the server-
side components that support the app's functionality, such as the database, web services, and application logic.

Java is a popular choice for developing backend components because it is a powerful and flexible
programming language that can be used to build scalable and robust applications. In addition, Java has a large
and active community that has developed many libraries and frameworks that can be used to speed up
development and improve code quality.

DEPT OF CSE, AITM BELAGAVI 18


IoT Based Smart Agriculture Using Solar Energy

7.2.2 XML
The XML (Extensible Markup Language) is a markup language used extensively in Android Studio
for creating layouts, designing user interfaces, and storing data in a structured format. In Android
development, XML is used to define the visual structure of user interface components such as buttons, text
fields, and layouts.

Android Studio provides a powerful XML editor that makes it easy to create and modify XML files.
The XML editor provides features such as syntax highlighting, code completion, and automatic formatting
to make it easy for developers to write clean and maintainable XML code. One of the most common uses of
XML in Android development is for defining the layout of user interface components. Developers can create
an XML file that defines the structure and properties of a layout, and then use the Android Studio layout
editor to visualize and modify the layout.

XML is also used for storing data in Android applications. Developers can create XML files that
define the structure and contents of data, and then use the XML parsing libraries provided by Android to read
and manipulate the data.

7.2.3 Blynk
Blynk is a platform for building Internet of Things (IoT) projects that allows developers to quickly
and easily create mobile applications to control and monitor connected devices. It provides a mobile app that
can be used to remotely control and monitor hardware devices connected to the Internet, such as Arduino or
Raspberry Pi.

Blynk provides a range of pre-built widgets, or components, that developers can use to create a
graphical user interface (GUI) for their IoT projects. These widgets include buttons, sliders, gauges, and
graphs, among others. Developers can then use these widgets to create a custom mobile app that
communicates with their IoT devices. Blynk is based on a client-server architecture. The Blynk app
communicates with a cloud-based server, which in turn communicates with the IoT device. The server acts
as a bridge between the mobile app and the IoT device, allowing developers to build applications that are
both interactive and secure.

Blynk is designed to be easy to use and requires minimal programming knowledge. It provides a
simple drag-and-drop interface for designing the GUI, and the Blynk library provides an easy-to-use API for
communicating with the server.

DEPT OF CSE, AITM BELAGAVI 19


IoT Based Smart Agriculture Using Solar Energy

CHAPTER 8
IMPLEMENTATION

8.1 System Modules


1. Sensing Module
2. Communication Module
3. Processing Module
4. Storage Module
5. User Interface Module

8.2 Sample Code


NodeMCU-32

#define BLYNK_TEMPLATE_ID "TMPL3obytayim"


#define BLYNK_TEMPLATE_NAME "IOT SMART SOLAR AGRICULTURE"
#define BLYNK_AUTH_TOKEN "Mhu-ICBZLspZaIrazyk45TrNFZ40rEbR"

#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#include <SoftwareSerial.h>

SoftwareSerial gsm(23,22);

int temp = 0, i = 0;
char str[15];

#define on
#define off
#define check

char ssid[] = "Iot Smart Solar Agriculture";


char pass[] = "smartagriculture";

#include "DHT.h"
#define DHTPIN 21
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);

const int trigpin= 17;


const int echopin= 16;

const int soil = 35;


int soilmoisture;
int soilvalue;
int soiltrigger = 50;

const int relay = 5;


int relaystate;

DEPT OF CSE, AITM BELAGAVI 20


IoT Based Smart Agriculture Using Solar Energy

int automatic=0;

long duration;
int distance;
int waterlevel;

float h, t;

const int flame = 19;


int flamestate;

int sendalert = 0;

const int pir = 18;


int pirstate;
/*--------------BATTERY------------------*/
int batteryper, solarper;

#define batsig 36

float batadc_voltage = 0.0;


float batin_voltage = 0.0;

float batR1 = 30020.0;


float batR2 = 7500.0;

float batref_voltage = 3.3;


int batadc_value = 0;

/*--------------SOLAR--------------------------------*/
#define solsig 34

float soladc_voltage = 0.0;


float solin_voltage = 0.0;

float solR1 = 30020.0;


float solR2 = 7500.0;

float solref_voltage = 3.3;


int soladc_value = 0;

BLYNK_WRITE(V20)
{
relaystate = !param.asInt();
}

BLYNK_WRITE(V21)
{
automatic = param.asInt();
}
void setup()
{
Serial.begin(115200);
gsm.begin(38400);
delay(500);

DEPT OF CSE, AITM BELAGAVI 21


IoT Based Smart Agriculture Using Solar Energy

gsm.println("AT+CNMI=2,2,0,0,0");
update();
delay(400);
gsm.println("AT+CMGF=1");
update();
delay(400);

Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);

pinMode(trigpin, OUTPUT);
pinMode(echopin, INPUT);

pinMode(flame, INPUT);
pinMode(relay, OUTPUT);

dht.begin();

void loop()
{
delay(100);
Blynk.run();

h = dht.readHumidity();
t = dht.readTemperature();

soilvalue = analogRead(soil);
soilmoisture = map(soilvalue, 0, 4096, 100, 0);

flamestate = !digitalRead(flame);

digitalWrite(trigpin,HIGH);
delayMicroseconds(10);
digitalWrite(trigpin,LOW);
duration=pulseIn(echopin,HIGH);
distance = duration*0.034/2;
waterlevel = map(distance, 2, 32, 100, 0);

if(soilmoisture < soiltrigger)


{
sendalert++;
}

if(sendalert == 2)
{
gsm.println("AT");
delay(100);
gsm.println("AT+CMGF=1");
delay(100);
gsm.println("AT+CMGS=\"+919845018457\"");
delay(100);
gsm.print("Temperature (°C): ");

DEPT OF CSE, AITM BELAGAVI 22


IoT Based Smart Agriculture Using Solar Energy

delay(100);
gsm.println(t);
delay(100);
gsm.print("Humidity (%): ");
delay(100);
gsm.println(h);
delay(100);
gsm.print("Soil Moisture(%): ");
delay(100);
gsm.println(soilmoisture);
delay(100);
gsm.print("Water Level(%): ");
delay(100);
gsm.println(waterlevel);
delay(100);
gsm.print("Battery (%): ");
delay(100);
gsm.println(batteryper);
delay(100);
gsm.print("Solar (%): ");
delay(100);
gsm.println(solarper);
delay(100);
gsm.println("");
delay(100);
gsm.println("Soil moisture below threshold. To turn on/off the pump reply on/off.");
delay(100);
gsm.write(26);
delay(1000);
gsm.println("AT+CMGD=1");
delay(1000);
gsm.println("AT+CNMI=2,2,0,0,0");
update();
delay(400);
gsm.println("AT+CMGF=1");
update();
delay(400);
}

if(automatic == 1)
{
pirstate = digitalRead(pir);

if(soilmoisture < soiltrigger)


{
digitalWrite(relay, LOW);
Blynk.virtualWrite(V20,1);
}
else
{
digitalWrite(relay, HIGH);
Blynk.virtualWrite(V20,0);
}
}
else
{

DEPT OF CSE, AITM BELAGAVI 23


IoT Based Smart Agriculture Using Solar Energy

//digitalWrite(relay, relaystate);
pirstate = 0;
}

/*--------------------------------------------------*/
batadc_value = analogRead(batsig);
batadc_voltage = batadc_value * 0.000861801242;
batin_voltage = batadc_voltage / (batR2 / (batR1 + batR2)) ;
batteryper = map(batin_voltage, 5.2 , 8.4, 0, 100);
/*-------------------------------------------------*/
soladc_value = analogRead(solsig);
soladc_voltage = soladc_value * 0.000861801242;
solin_voltage = (soladc_voltage / (solR2 / (solR1 + solR2)))+0.08 ;
solarper = map(solin_voltage, 0, 15, 0, 100);
/*-------------------------------------------------*/

Blynk.virtualWrite(V10,h);
Blynk.virtualWrite(V11,t);
Blynk.virtualWrite(V12,soilmoisture);
Blynk.virtualWrite(V13,waterlevel);
Blynk.virtualWrite(V14,flamestate);
Blynk.virtualWrite(V15,pirstate);
Blynk.virtualWrite(V16,batteryper);
Blynk.virtualWrite(V17,solarper);
if (gsm.available())
{
String message = gsm.readString();
Serial.println(message); // Print the received message to the Serial monitor

if (message.indexOf("on") != -1)
{
digitalWrite(relay, LOW);
Blynk.virtualWrite(V20,1);
relaystate = 1;
}
else if(message.indexOf("off") != -1)
{
digitalWrite(relay, HIGH);
Blynk.virtualWrite(V20,0);
relaystate = 0;
}
else if(message.indexOf("check") != -1)
{
checkstatus();
}
}
update();
}

void checkstatus()
{
gsm.println("AT");
update();
delay(100);
gsm.println("AT+CMGF=1");

DEPT OF CSE, AITM BELAGAVI 24


IoT Based Smart Agriculture Using Solar Energy

update();

delay(100);
gsm.println("AT+CMGS=\"+919845018457\"");
update();
delay(100);
gsm.print("Temperature (°C): ");
update();
delay(100);
gsm.println(t);
delay(100);
gsm.print("Humidity (%): ");
delay(100);
gsm.println(h);
delay(100);
gsm.print("Soil Moisture(%): ");
delay(100);
gsm.println(soilmoisture);
delay(100);
gsm.print("Water Level(%): ");
delay(100);
gsm.println(waterlevel);
delay(100);
gsm.print("Battery (%): ");
delay(100);
gsm.println(batteryper);
delay(100);
gsm.print("Solar (%): ");
delay(100);
gsm.println(solarper);
update();
delay(100);
gsm.write(26);
update();
delay(5000);
gsm.println("AT+CNMI=2,2,0,0,0");
update();
delay(400);
gsm.println("AT+CMGF=1");
update();
delay(400);
}

void update()
{
while (Serial.available())
{
gsm.write(Serial.read());//Forward what Serial received to Software Serial Port
}
while(gsm.available())
{
Serial.write(gsm.read());//Forward what Software Serial received to Serial Port
}

DEPT OF CSE, AITM BELAGAVI 25


IoT Based Smart Agriculture Using Solar Energy

CHAPTER 9
TESTING AND RESULTS

9.1 Testing

Testing is an important phase in the development life cycle of the product; this is phase where
theerror remaining from all the phases was detected. Hence testing performs a very critical role for quality
assurance and ensuring the reliability of the software. During the testing, the program the be tested was
executed with a set of test cases and the output of the program for the test cases was evaluated to determine
whether the program is performing as expected. Errors were found and corrected by using the following
testing steps and correction was recorded for future references. Thus, a series of testing was performed on
the system before it was ready for implementation.
Types of Testing
In these types of testing all major activities are described below.
1. Unit testing
2. Integration testing

9.1.1 Unit testing


Unit testing is a level of software testing where individual units/ components of a software
aretested. The purpose is to validate that each unit of the software performs as designed. A unit is the
smallest testable part of any software. It usually has one or a few inputs and usually a single output. In
procedural programming, a unit may be an individual program, function, procedure, etc. In object-oriented
programming, the smallest unit is a method, which may belong to a base/ super class, abstract class or
derived/ child class. (Some treat a module of an application as a unit. This is to be discouraged as there
willprobably be many individual units within that module.) Unit testing frameworks, drivers, stubs, and
mock/ fake objects are used to assist in unit testing.

9.1.2 Integration testing


Integration testing is a level of software testing where individual units are combined and tested as a group.
The purpose of this level of testing is to expose faults in the interaction between integrated units. Test drivers
and test stubs are used to assist in Integration Testing. Integration testing is the second level of the software
testing process comes after unit testing. In this testing, units or individual components of the software are
tested in a group. The focus of the integration testing level is to expose defects at the time of interaction

DEPT OF CSE, AITM BELAGAVI 26


IoT Based Smart Agriculture Using Solar Energy

between integrated components or units. Integration testing uses modules for testing purpose, and these
modules are combined and tested in integration testing. The Software is developed with a number of
software modules that are coded by different coders or programmers. The goal of integration testing is to
check the correctness of communication among all the modules.

DEPT OF CSE, AITM BELAGAVI 27


IoT Based Smart Agriculture Using Solar Energy

9.2 Results

Fig. 9.2.1 NodeMCU ESP-32

In this Figure NodeMCU is a popular development board that utilizes the ESP32 microcontroller. The
ESP32 is a powerful and versatile system-on-a-chip (SoC) designed for Internet of Things (IoT) applications. It
combines a dual-core processor, built-in Wi-Fi and Bluetooth connectivity, a rich set of peripherals, and low-
power capabilities, making it suitable for a wide range of IoT projects

Fig 9.2.2 Soil Moisture Sensor

In this Figure Soil moisture refers to the amount of water content present in the soil. It is a critical factor
in plant growth and agriculture, as it directly affects the availability of water for plant roots. Measuring soil
moisture helps determine irrigation needs and optimize water usage

DEPT OF CSE, AITM BELAGAVI 28


IoT Based Smart Agriculture Using Solar Energy

Fig 9.2.3 Ultrasonic Sensor

This is a sensor that can measure the distance of an object from the sensor position by ultrasonic sound
waves. It sends ultrasonic waves of 40 KHz in the medium. If the waves are reflected on the object and bounce
back to the sensor, it calculates the distance by calculating the travelling 111time and speed of sound.

Fig 9.3.4 Temperature and Humidity Sensor

A temperature and humidity sensor, also known as a hygrometer or thermohygrometer, is a device used
to measure both the temperature and relative humidity of the surrounding environment. It provides valuable
information for various applications, including weather monitoring, HVAC systems, indoor environmental
quality assessment, and industrial processes.

DEPT OF CSE, AITM BELAGAVI 29


IoT Based Smart Agriculture Using Solar Energy

Fig 9.2.5 Flame Sensor

A flame sensor is a device used to detect the presence of a flame or fire. It is commonly used in various
applications, such as gas appliances, industrial furnaces, and fire alarm systems, to ensure safetyby providing
early detection of fires.

Fig 9.2.6 PIR Motion Sensor

A PIR (Passive Infrared) motion sensor is an electronic device commonly used to detect the presence of
humans or animals in its vicinity. It works by detecting changes in infrared radiation emitted by objects within
its detection range.

DEPT OF CSE, AITM BELAGAVI 30


IoT Based Smart Agriculture Using Solar Energy

Fig 9.2.7 Relay Module

In This Figure power relay module is an electrical switch that is operated by an electromagnet . The
electromagnet is activated by a separate low-power signal from a micro controller. When activated, the
electromagnet pulls to either open or close an electrical circuit

Fig 9.2.8. GSM Module

A GSM module, also known as a Global System for Mobile Communications module, is a compact
electronic device that enables mobile communication using the GSM network. It serves as an interface between
electronic systems and the mobile network, allowing devices to send and receive information wirelessly.

DEPT OF CSE, AITM BELAGAVI 31


IoT Based Smart Agriculture Using Solar Energy

Fig 9.2.9 Water Pump Motor

Water pumps are mechanical or electromechanical devices that are designed to move water through pipes or
hoses by creating a pressure differential.

DEPT OF CSE, AITM BELAGAVI 32


IoT Based Smart Agriculture Using Solar Energy

Fig. 9.2.10. Dashboard


`

DEPT OF CSE, AITM BELAGAVI 33


IoT Based Smart Agriculture Using Solar Energy

Fig 9.2.11 Circuit

Fig 9.2.12 App interface

DEPT OF CSE, AITM BELAGAVI 34


IoT Based Smart Agriculture Using Solar Energy

Fig 9.2.13 Data Stream Screen

Fig 9.2.14 Data

DEPT OF CSE, AITM BELAGAVI 35


IoT Based Smart Agriculture Using Solar Energy

CHAPTER 10
CONCLUSION

In conclusion, the use of IoT in smart agriculture has revolutionized the traditional agricultural practices
by making them more efficient, productive, and sustainable. IoT-enabled sensors, communication systems,
and data analytics tools have enabled farmers to make data-driven decisions in real-time, resulting in
improved crop yields, reduced resource wastage, and increased profitability. With the ability to monitor soil
moisture, temperature, humidity, and other environmental factors, farmers can optimize crop growth by
providing the ideal conditions required for plant growth. IoT-based irrigation systems have made water
management more precise, reducing water usage and conserving valuable resources. The integration of IoT
with smart agriculture has also enabled farmers to implement precision agriculture practices. Precision
agriculture involves the use of sensors and data analytics to optimize farming practices such as fertilization,
pest control, and crop rotation. This has resulted in reduced costs, increased yields, and improved crop quality.
Furthermore, the use of IoT in agriculture has also brought about significant environmental benefits. By
reducing the amount of water and fertilizer used in farming, the environmental impact of agriculture has been
significantly reduced. This has resulted in a more sustainable and eco-friendly approach to farming. In
conclusion, the integration of IoT in agriculture has transformed traditional farming practices, making them
more efficient, productive, and sustainable. The use of IoT in agriculture has the potential to revolutionize
the way food is produced, consumed, and distributed, leading to a more sustainable

DEPT OF CSE, AITM BELAGAVI 36


IoT Based Smart Agriculture Using Solar Energy

REFERENCES
[1] Automatic face detection and recognition for attendance maintenance. Narayan Darapaneni, Aruna

Kumari Evoori, Vijaya Babu Vemuri, Thangaselvi. https://ieeexplore.ieee.org/document/9342670.

[2] Automatic Attendance System Using Deep Learning.Sunil Aryala, Rachhpal Singh , Arnav Sooda,
Gaurav Thapaa https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3352376.

[3] F. V. Massoli, G. Amato, F. Falchi, C. Gennaro and C. Vairo, “CNN-based System for Low Resolution

Face Recognition” Conference: 27th Italian Symposium on Advanced Database Sysms, AIMIR

Research Activities 2019. (2019).

[4] A Systematic Review on Monitoring and Advanced Control Strategies in Smart Agriculture. Syeda iqra

Ha ssan, Muhammad mansoor alam, Usman illahi, Mohammed a. al ghamdi, Sultan h.almotiri, and)

Mazliham mohd su’ud. (https://ieeexplore.ieee.org/abstract/document/9350242.

[5] IOT in Agricultural Crop Protection and Power Generation. Mrs. Sowmya M S, Anjana M, Charan

Kumar A, Monisha R, Sahana R H.(http://www.ijert.org/IJERTV9IS050208).

[6] Robust Wireless Sensor and Actuator Networks for Networked Control Systems. Bongsang Park,

Junghyo Nah, Jang-Young Choi, Ick-Jae Yoon and Pangun Park.(https://www.mdpi.com/1424-8220/

8220/19/7/1535).

[7] Prospect if IoT Based Smart Agriculture in Bangladesh- A Review. Olly Roy Chowdhury and Sarna

Majumder. (http://www.ijert.org/IJERTV10IS110813).

[8] Zigbee Wireless Mesh Networking. Accessed: Jul. 26, 2021. [Online]. Available:

https://www.digi.com/solutions/by-technology/zigbee wireless-standard.

[9] Internet of Things (IoT) Total Annual Revenue Worldwide From 2019 to 2030. Accessed: Jun. 29,

2021. [Online]. Available: https://www. statista.com/statistics/1194709/iot-revenue-worldwide/.

DEPT OF CSE, AITM BELAGAVI 37

You might also like