REPORT FOR MAJOR PROJECT
Development of Smart Agriculture System using
Machine Learning in IoT Network
Bachelor of Science in Information & Technology
Submitted By
DEEPAK SINGH
Enroll No. A50504920011
Under the guidance of
Dr. Anil Kumar Mishra
Assistant Professor
Co-Guide
Dr. Sarita
Assistant Professor
Department of Computer Science and Engineering
Amity Institute of Information Technology
Amity University Haryana
25 May 2023
I
Department of Computer Science and Engineering
Amity Institute of Information Technology
DECLARATION
I, Deepak Singh, Enrolment No. A50504920011, student of Bachelor of Science in
Information Technology, Department of Computer Science and Engineering, Amity
Institute of Information Technology, Amity University Haryana, (6th Sem) hereby declares
that the project entitled “Development of Smart Agriculture System using Machine
Learning in IoT Network” which is submitted by me to the department of Amity Institute
of Information Technology, Amity University, Haryana, in partial fulfilment of the
requirement for the award of the degree of Bachelor of Science in Information
Technology. I have taken care in all respects to honour the intellectual property rights and
have acknowledged the contributions of others for using them. I further declare that in case
of any violation of intellectual property rights or copyrights, I as a candidate will be fully
responsible for the same. My supervisor, Head of department and the Institute should not be
held for full or partial violation of copyrights if found at any stage of my degree.
Deepak Singh
A50504920011
II
Department of Computer Science and Engineering
Amity Institute of Information Technology
CERTIFICATE
This is to certify that the work in the project report entitled “Development of Smart
Agriculture System using Machine Learning in IoT Network” by Deepak Singh bearing
Enrolment No.: A50504920011 is a Bonafede record of project work carried out by her
under my supervision and guidance in partial fulfilment of the requirements for the award of
the degree of Bachelor of Science in Information Technology in the Department of
Computer Science and Engineering, Amity Institute of Information Technology, Amity
University Haryana, Gurgaon. Neither this project nor any part of it has been submitted for
any degree or academic award elsewhere.
Dr. Anil Kumar Mishra Dr. Sarita
Associate Professor Assistant Professor
ASET ASET
III
Department of Computer Science and Engineering
Amity Institute of Information Technology
ACKNOWLEDGEMENT
My journey towards achieving the destination for the design and development of this project
has finally come to an end, I would like to express my heartfelt gratitude to everyone who
contributed to its successful completion. I am deeply grateful to my project guide, Dr. Anil
Kumar Mishra and Dr. Sarita for their invaluable guidance, support, and expertise
throughout the development of the “Development of Smart Agriculture System using
Machine Learning in IoT Network” project. I am also thankful to my friends and family for
their endless support and motivation. Despite the challenges faced, I had a lot of learning
and fun throughout this journey. This project would not have been possible without the
relentless support and encouragement from everyone involved.
Date: 19th May 2023 Deepak Singh
A49505020011
BSc IT
IV
Department of Computer Science and Engineering
Amity Institute of Information Technology
V
ABSTRACT
The Smart Agriculture System is an innovative approach that leverages
technology to optimize and enhance agricultural practices. It integrates various
technologies such as Internet of Things (IoT), sensors, and data analytics to
monitor and manage agricultural processes effectively. This system aims to
address the challenges faced by traditional agriculture, such as water scarcity,
soil quality, pest control, and crop yield optimization.
The Smart Agriculture System consists of a network of sensors deployed in the
fields to collect real-time data on environmental conditions, including soil
moisture, temperature, humidity, and light intensity. These sensors
communicate with a central hub or cloud platform using wireless
communication protocols. The collected data is then analyzed to provide
valuable insights and actionable information to farmers.
Through the Smart Agriculture System, farmers can monitor and control
various parameters remotely, allowing for precise irrigation, fertilization, and
pest control. The system can send alerts to farmers in case of any deviations
from the optimal conditions, enabling them to take timely corrective actions.
Additionally, historical data analysis helps in predicting and preventing crop
diseases, optimizing resource usage, and improving overall crop yield.
Furthermore, the system can provide farmers with valuable decision support
tools, such as crop selection based on environmental conditions, weather
forecasting, and market trends. This empowers farmers to make informed
decisions, maximize productivity, reduce costs, and minimize environmental
impact.
The implementation of the Smart Agriculture System offers several benefits,
including improved resource efficiency, increased crop yield, reduced reliance
on chemical inputs, and enhanced sustainability. It has the potential to
revolutionize traditional farming methods, making agriculture more efficient,
productive, and environmentally friendly.
VI
LIST OF FIGURES
Name of the Figure Title Page No.
Figure 5.1 Block Diagram 16
Figure 5.2
Soil Moisture Sensor 16
Figure 5.3 Raindrop Sensor 17
Figure 5.4 Temperature & Humidity Sensor 17
Figure 5.5 Node MCU 19
Figure 5.6 Flow Chart 19
Figure 5.7 Arduino UNO R3 20
Figure 5.8 Temperature Data 22
Figure 5.9 Humidity Data 22
Figure 5.10 Rain Data 22
Figure 5.11 Soil Data 22
Figure 5.12 LCD Data 22
VII
Table of Contents
1. CHAPTER 8
1.1 INTRODUCTION 8
2. CHAPTER 9
2.1 LITERATURE REVIEW 9
2.2 RESEARCH GAP 11
3. CHAPTER 12
3.1 AIM AND OBJECTIVES 12
4. CHAPTER 13
4.1 METHODOLOGY 13
4.2 IoT 14
4.3 WIRELESS SENSOR NETWORKING SYSTEM 14
5. CHAPTER 16
5.1 TOOLS AND TECHNIQUES 16
5.2 OUTCOMES 22
6. CHAPTER 24
6.1 CONCLUSION 24
6.2 FUTURE SCOPE 24
REFERENCES 26
VIII
CHAPTER- 1
1.1 Introduction
Smart agriculture system using IoT (Internet of Things) is a modern approach to farming that
integrates technology into agriculture to improve crop yield and reduce waste. IoT-based
smart agriculture systems use sensors, data analytics, and other advanced technologies to
monitor and control various parameters of farming, such as temperature, humidity, soil
moisture, and light intensity.
The system works by installing sensors and actuators in different parts of the farm, which are
connected to a central control unit through the internet. The sensors collect data from the
environment, such as soil moisture, temperature, and humidity, and transmit it to the control
unit, where it is analysed and used to make decisions. The control unit can also send
commands to the actuators to adjust parameters such as water and fertilizer delivery.
Smart agriculture systems can help farmers optimize their crop production, reduce water
usage, and minimize the use of harmful chemicals. These systems can also help farmers to
better understand their crops and the environment in which they grow, enabling them to make
more informed decisions about crop management.
Here are some of the key points to understand about smart agriculture systems:
1. Precision Farming
2. Data Analytics
3. Drones and Robotics
4. Internet of Things (IoT)
5. Artificial Intelligence (AI)
6. Robotics
7. Crop monitoring
8. Big Data Analytics
Overall, smart agriculture systems using IoT have the potential to revolutionize farming
practices and increase the efficiency and sustainability of agriculture.
9
CHAPTER- 2
2.1 Literature Review
Smart agriculture systems using IoT have been a rapidly growing area of research in recent
years, with a growing number of studies exploring the potential of IoT technologies to
improve crop yields, reduce waste, and increase sustainability. In this literature review, we
will provide an overview of some of the key findings from recent studies on smart agriculture
systems using IoT.
One of the main areas of focus in this field has been the development of IoT sensors and
networks for monitoring and controlling various aspects of agricultural production. For
example, studies have explored the use of IoT sensors for monitoring soil moisture levels, air
temperature, and humidity, as well as the use of drones and other aerial vehicles for crop
monitoring and mapping (Gia et al., 2019; Hussain et al., 2021; Vlajic et al., 2021). These
studies have shown that IoT technologies can provide real-time data on crop growth and
environmental conditions, allowing farmers to make more informed decisions about
irrigation, fertilization, and pest control.
Another key area of research in this field has been the development of machine learning and
artificial intelligence algorithms for analysing the data generated by IoT sensors and
networks. Studies have shown that these algorithms can be used to predict crop yields,
identify pest infestations, and optimize resource allocation, among other applications
(Deshmukh et al., 2021; Hamid et al., 2020; Zhang et al., 2021). These studies have
demonstrated the potential of IoT technologies to improve agricultural productivity and
efficiency, as well as reduce waste and environmental impact.
However, there are also some challenges associated with the implementation of smart
agriculture systems using IoT. One of the main challenges is the cost of IoT sensors and
networks, which can be prohibitively expensive for small-scale farmers. Another challenge is
the need for reliable and secure data transmission, as well as data management and analysis
tools that are accessible and user-friendly for farmers who may not have extensive technical
expertise (Pauwels et al., 2021).
Overall, the literature suggests that smart agriculture systems using IoT have the potential to
revolutionize the way that crops are grown and managed, and to help farmers improve their
yields, reduce waste, and promote sustainable farming practices. However, further research is
10
needed to address the challenges associated with the implementation of these systems and to
ensure that they are accessible and affordable for all farmers.
11
2.2 Research Gap
The use of IoT in smart agriculture is a relatively new and emerging field. While there has
been some research done in this area, there are still several gaps that need to be addressed.
Some of the research gaps for smart agriculture systems using IoT are:
1. Integration of different sensors and devices: There are many different types of sensors
and devices that can be used in smart agriculture, such as soil moisture sensors,
weather stations, and drones. However, there is a lack of research on how to integrate
these different sensors and devices into a cohesive system.
2. Data management and analysis: The amount of data generated by IoT sensors and
devices in smart agriculture systems can be overwhelming. There is a need for
research on how to manage and analyse this data effectively to extract meaningful
insights and optimize agricultural processes.
3. Security and privacy: IoT devices are vulnerable to hacking and cyber attacks, which
can compromise the security and privacy of sensitive agricultural data. There is a need
for research on how to secure IoT devices and protect sensitive data in smart
agriculture systems.
4. Economic feasibility: While smart agriculture systems using IoT can improve crop
yields and reduce resource waste, they can also be expensive to implement. There is a
need for research on the economic feasibility of smart agriculture systems and how to
make them more affordable for farmers.
5. User adoption and acceptance: Smart agriculture systems using IoT require farmers to
adopt new technologies and change their traditional farming practices. There is a need
for research on how to encourage user adoption and acceptance of these systems, as
well as how to train farmers to use them effectively.
12
CHAPTER- 3
3.1 Aim and Objectives
The aim of smart agriculture systems using IoT is to improve the efficiency, sustainability,
and productivity of agriculture through the use of advanced technologies such as sensors, data
analytics, and actuators. The overall objective of these systems is to help farmers produce
more food with fewer resources and reduce the negative environmental impact of agriculture.
Specific objectives of smart agriculture systems using IoT may include:
1. Monitoring and controlling environmental factors such as temperature, humidity, and
soil moisture to optimize crop growth and reduce waste.
2. Reducing water usage and improving water-use efficiency through the use of sensors
to monitor soil moisture levels and adjust irrigation accordingly.
3. Improving the efficiency and accuracy of fertilizer and pesticide application through
the use of precision agriculture techniques.
4. Providing real-time monitoring and control of pests and diseases to minimize crop
damage and reduce the use of harmful chemicals.
5. Optimizing crop management decisions based on data analysis and machine learning
algorithms to improve yield and reduce costs.
6. Facilitating remote monitoring and control of farm operations, enabling farmers to
manage their crops more efficiently and effectively.
In summary, the objectives of smart agriculture systems using IoT are to optimize agricultural
production, increase efficiency, reduce waste, enhance sustainability, and mitigate
environmental impacts, all while improving profitability for farmers.
13
CHAPTER- 4
4.1 Methodology
The methodology of smart agriculture systems using IoT typically involves several steps,
including:
1. Identifying the problem: The first step in developing a smart agriculture system is to
identify the specific problem that needs to be addressed, such as reducing water usage
or optimizing fertilizer application.
2. Sensor deployment: Once the problem has been identified, sensors are deployed in the
field to monitor relevant parameters such as soil moisture, temperature, and humidity.
3. Data collection: The sensors collect data on the environment and crop conditions,
which is transmitted to a central data storage system.
4. Data analysis: The collected data is analyzed using data analytics techniques and
machine learning algorithms to identify patterns and trends.
5. Decision-making: Based on the data analysis, farmers can make more informed
decisions about crop management, such as adjusting irrigation or applying fertilizer.
6. Actuator deployment: Smart agriculture systems may also include the deployment of
actuators, such as irrigation valves or fertilizer sprayers, to automate the crop
management process.
7. Monitoring and control: Finally, smart agriculture systems provide real-time
monitoring and control of crop conditions, allowing farmers to adjust their
management strategies as needed.
The methodology of smart agriculture systems may also involve the development of software
applications and user interfaces to facilitate data visualization and decision-making.
Additionally, the implementation of smart agriculture systems may require collaboration
between farmers, technology providers, and other stakeholders to ensure successful adoption
and implementation.
14
4.2 IoT
IoT stands for the Internet of Things, which is a network of physical devices, vehicles, home
appliances, and other items that are embedded with sensors, software, and connectivity that
enable them to collect and exchange data.
The concept of IoT is based on the idea of connecting everyday objects to the internet,
allowing them to communicate with each other and with people, and making them more
intelligent and responsive to our needs.
IoT devices can range from small sensors that monitor temperature and humidity, to large
industrial machines that control manufacturing processes. They can also include wearable
devices that track our fitness and health, as well as smart home devices that allow us to
control our lights, thermostat, and security systems from our smartphones.
IoT technology has the potential to revolutionize many industries, from healthcare and
agriculture to transportation and manufacturing. It can enable businesses to gather real-time
data on their operations, improve efficiency, reduce costs, and enhance the customer
experience.
4.3 Wireless Sensor Networking System
Wireless Sensor network in the process of development in smart and precision agriculture can
be used to monitor regularly the changes in environmental conditions such as climate,
hydrology, plant physiology, humidity, temperature, rains dampness of soil and others. As a
process input, it can also demonstrate as a controller in the providing the inputs for seeds,
fertilizers, pesticides etc. The WSN application shall aid the data collection process to for
information needed by the farmers for cultivation and also as Input feeder control system on
agricultural machinery. The failures and breakdown issues such as malfunction of sensor and
power supply related issues and also the information security may be an area of concern in
the Wireless Sensor networking systems.
We maintain water level and flow it as required by relay switch on /off the Pump. Soil
moisture sensors are fixed under the ground in field. Initially the water level reading is taken
and decisions are made according to it. The temperature sensor (DTH11) is fixed at the center
of the field to get the overall reading of temperature of the soil. These sensors are connected
15
to Arduino where we will get the readings. All sensors will send data to Arduino and data
will be forwarded to WSN systems. The threshold value will be set according to the crop. The
threshold value will be marked based on the requirement of the crop specified and predefined
in the raspberry pi for every sensor. Whenever any sensor reaches a threshold value, message
alert is sent to the user and action is taken according to it.
16
CHAPTER- 5
5.1 Tools And Techniques
BLOCK DIAGRAM FOR IoT COMPONENTS
Figure-5.1
5.1.1 Soil Moisture Sensor
Soil sensor which stipulates the wetness of the soil measures the volumetric contents of water
inside the soil and gives us the moisture level as output. The sensor averages the water
content over the entire length of the soil environment wet or dry and the propelled yield. The
sensors can measure temperature from 0°C to 50°C and humidity from 20% to 90% with an
accuracy of ±1°C and ±1%.
Figure-5.2 Soil Moisture sensor
17
5.1.2 Raindrop Sensor
The rain sensors detect the rain, the basic principle of working is checking resistance of
sensor, and the sensor comprises two different conduction printed leads on whole surface.
When water droplets fall on surface of sensor it completes the circuit and thus creating a
resistance which is far less than open circuit resistance of sensor and the sensed data is sent to
controlling unit.
Figure – 5.3 Raindrop sensor
5.1.3 Temperature and Humidity Sensor
The humidity sensing device DHT11 is a moisture holding substrate with the electrodes
applied to the surface. The change in resistance between the two electrodes is proportional to
the relative humidity. Humidity sensors work by detecting changes that alter electrical
currents or temperature in the air.
Figure-5.4 Temperature & Humidity sensor
18
5.1.4 NodeMCU
NodeMCU is an open-source firmware and development board based on the ESP8266 Wi-Fi
module. It combines the functionality of a microcontroller with built-in Wi-Fi capabilities,
making it a popular choice for Internet of Things (IoT) projects.
Here are some key features of the NodeMCU:
Microcontroller: The NodeMCU is powered by the ESP8266 microcontroller, which is based
on the 32-bit RISC processor architecture and offers a clock speed of 80 MHz.
Wi-Fi Connectivity: The ESP8266 chip provides built-in Wi-Fi connectivity, allowing the
NodeMCU to connect to the internet and communicate with other devices or services.
Lua-based Firmware: NodeMCU uses a Lua-based firmware, which simplifies the
development process by providing an easy-to-use scripting language and a set of pre-built
functions for Wi-Fi connectivity, GPIO control, and other common tasks.
GPIO Pins: The NodeMCU board features multiple General Purpose Input/Output (GPIO)
pins, which can be used to interface with various electronic components such as sensors,
actuators, and displays.
Development Environment: NodeMCU can be programmed using the Arduino IDE or other
development environments that support the ESP8266 platform. This allows developers to
leverage the vast ecosystem of libraries and resources available for the Arduino platform.
USB-to-Serial Converter: The NodeMCU board includes a USB-to-Serial converter chip,
which simplifies the process of programming the board and allows for easy communication
between the board and a computer.
NodeMCU is widely used for prototyping IoT projects, home automation systems, sensor
networks, and other applications that require Wi-Fi connectivity and microcontroller
functionality. Its open-source nature and active community support make it a popular choice
among hobbyists, makers, and professional developers.
19
Figure -5.5 Node MCU
Figure -5.6 Flow Chart
It can be developed using a variety of software and programming languages depending on the
specific needs and requirements of the system. Here are some of the commonly used software
and languages:
20
1. Arduino
Arduino is an open-source electronics platform that is commonly used in IoT projects
due to its low cost and ease of use. Arduino supports C++ programming language and
has a large community of developers that create libraries and resources that make it
easy to interface with various sensors and actuators.
Figure -5.7 Arduino UNO R3
2. Raspberry Pi
Raspberry Pi is a popular single-board computer that is often used in IoT projects due
to its flexibility and ease of use. Raspberry Pi can run various programming languages
including Python, C++, and Java, and has a large community of developers that
provide libraries and resources for interfacing with different sensors and actuators.
3. Python
Python is a high-level programming language that is often used in IoT projects due to
its simplicity and ease of use. Python has a large number of libraries and frameworks
that make it easy to interface with different sensors and actuators, as well as
communicate with cloud platforms and databases.
4. Node-RED
Node-RED is a flow-based programming tool that is often used in IoT projects due to
its ease of use and visual programming interface. Node-RED provides a drag-and-
drop interface for connecting various sensors and actuators, and can interface with
cloud platforms and databases.
21
5. MQTT
MQTT is a messaging protocol that is often used in IoT projects for real-time
communication between devices and cloud platforms. MQTT is a lightweight
protocol that uses minimal bandwidth, making it ideal for low-power IoT devices.
6. Things Board
Things Board is an open-source IoT platform that allows users to connect devices,
collect and store data, and visualize and analyse data in real-time. It is commonly used
in smart agriculture systems to enable data processing, analysis, and visualization.
22
5.2 Outcomes
The system has checked for the performance with the help of thing speak.com
platform to check the Temperature, humidity rain and soil parameters. The figure
depicted enables the performance the smart irrigation project being operational.
Figure- 5.8 Temperature Data Figure- 5.9 Humidity Data
Figure- 5.10 Rain Data Figure- 5.11 Soil Data
Figure- 5.12 LCD data
23
Month Activity Status
February Selection of project area and Study of Completed
the related work.
Literature Survey and Study of Journals
related to the work.
March Study on the software implementation Completed
works C++ and data processing.
Study of packages/tools and installation of
packages.
April Study of hardware and selection of Completed
components.
Study of hardware implementation and
installation OS.
Study related to creating the environments
and working platform.
May Implementation of algorithm in Software. Completed
Implementation of code in hardware.
Table 5.1 Work Plan
24
CHAPTER- 6
6.1 Conclusion
The smart agriculture project demonstrated the significant potential of technology in
transforming the agricultural sector. By harnessing the power of data, connectivity, and
automation, farmers can make more informed decisions, optimize resource usage, and
increase productivity. Continued research, investment, and collaboration are crucial to further
refine and scale these smart agriculture solutions, ultimately contributing to a more
sustainable and resilient food production system
6.2 Future Scope
Enhanced Crop Monitoring and Management: The future of smart agriculture will focus on
developing advanced monitoring systems that provide real-time data on crop health, growth,
and nutrient requirements. This includes the integration of advanced sensors, drones, and
satellite imagery to gather precise information. By leveraging AI and machine learning
algorithms, farmers will be able to make data-driven decisions to optimize crop management,
reduce waste, and improve overall productivity.
Climate Resilience and Adaptation: With climate change posing significant challenges to
agriculture, the future scope of smart agriculture projects will involve developing
technologies and practices that enhance climate resilience and adaptation. This includes the
use of predictive models to assess climate risks, implement precision irrigation techniques,
and optimize crop varieties based on changing climatic conditions. Smart agriculture will
play a crucial role in ensuring food security and sustainability in the face of climate
uncertainty.
Data Integration and Interoperability: As smart agriculture technologies continue to evolve,
the future will emphasize the need for seamless data integration and interoperability across
different platforms and systems. Efforts will be made to standardize data formats, develop
open APIs, and establish data sharing protocols. This will enable farmers to access and
analyze data from various sources, facilitating better decision-making, and fostering
collaboration among stakeholders.
Adoption of Blockchain for Supply Chain Management: Blockchain technology holds great
potential for enhancing transparency, traceability, and trust in the agricultural supply chain.
25
In the future, there will be increased adoption of blockchain-based systems to track and verify
the origin, quality, and handling of agricultural products. This will benefit both farmers and
consumers by ensuring fair pricing, reducing fraud, and promoting sustainable and ethical
practices throughout the supply chain.
Integration of Smart Agriculture with Smart Cities: As urban populations continue to grow,
the integration of smart agriculture with smart city initiatives will become more prominent.
This involves establishing vertical farms, rooftop gardens, and urban agriculture projects that
leverage smart technologies to maximize food production within urban areas. The future will
see increased collaboration between urban planners, agricultural experts, and technology
providers to create sustainable and resilient food systems in urban environments.
26
REFERENCES:
1. Deshmukh, P. Mude, S. Thool, R. & Sayyad, S. (2021). IoT-Based Smart Agriculture
System: A Review. In Advances in Intelligent Systems and Computing (Vol. 1228, pp.
345-355). Springer.
2. Gia, T. N. Truong, Q. B., & Ho, T. D. (2019). A Smart Agriculture System Using IoT. In
2019 3rd International Conference on Green Technology and Sustainable Development
(GTSD) (pp. 47-51). IEEE.
3. Hamid, N. Akhter, & Ali, F. (2020). Smart Agriculture: A Review on IoT, AI, and
Machine Learning Applications. Journal of Sensors, 2020.
4. Hussain, M. Afzal, M. K., Anjum, M. A. Akram, & Saba, T. (2021). An IoT-Based Smart
Agriculture System for Monitoring and Control of Soil Moisture, Humidity, and
Temperature. IEEE Internet of Things Journal, 8(6), 4819-4827.
5. Pauwels, V. R. N. Mostert, M. P., & De Baets, B. (2021). Challenges and Opportunities
of IoT in Agriculture: A Systematic Literature Review. Computers and Electronics in
Agriculture, 181, 105975.
6. Vlajic, N. Mitic, D. Tomic, & Simic, M. (2021). Internet of Things for Agriculture: A
Comprehensive Review. Computers and Electronics in Agriculture, 180, 105924.
7. Zhang, W. Wang, Y. Ma, J. Ma, H. & Liu, X. (2021). Research on Smart Agriculture
Based on IoT and Machine Learning. In 2021 IEEE International Conference on Power,
Intelligent Computing and Systems Engineering (PICSE) (pp. 234-238). IEEE.
27