0% found this document useful (0 votes)
18 views56 pages

BE Project Report

The project report outlines an AI-driven system for crop health management and yield estimation using a solar-powered IoT sensor network. It includes modules for crop yield prediction, crop recommendation, and plant disease classification, leveraging machine learning to analyze environmental and soil data. The system aims to enhance precision agriculture and is designed for low-power operation, with future plans to support multiple crops and improve connectivity resilience.

Uploaded by

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

BE Project Report

The project report outlines an AI-driven system for crop health management and yield estimation using a solar-powered IoT sensor network. It includes modules for crop yield prediction, crop recommendation, and plant disease classification, leveraging machine learning to analyze environmental and soil data. The system aims to enhance precision agriculture and is designed for low-power operation, with future plans to support multiple crops and improve connectivity resilience.

Uploaded by

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

A PROJECT REPORT ON

AI-Driven System for Crop Health Management


and Yield Estimation Using a Solar-Powered IoT
Sensor Network

SUBMITTED TO THE SAVITRIBAI PHULE UNIVERSITY, PUNE


IN THE PARTIAL FULFILLMENT OF THE REQUIREMENTS
FOR THE AWARD OF THE DEGREE

OF

BACHELOR OF ENGINEERING (Computer Engineering)

SUBMITTED BY

Advait Naik Exam No: B400050515


Kaustubh Netke Exam No: B400050519
Rhea Shah Exam No: B400050567
Vineet Kothari Exam No: B400050457

DEPARTMENT OF COMPUTER ENGINEERING


Pune Institute of Computer Technology
Dhankawadi, Pune - 411043
SAVITRIBAI PHULE PUNE UNIVERSITY
2024-2025
CERTIFICATE

This is to certify that the project report entitled

AI-Driven System for Crop Health Management and Yield


Estimation Using a Solar-Powered IoT Sensor Network

Submitted by

Advait Naik Exam No: B400050515


Kaustubh Netke Exam No: B400050519
Rhea Shah Exam No: B400050567
Vineet Kothari Exam No: B400050457

is a bonafide student of this institute and the work has been carried out by
him/her under the supervision of Dr. S. S. Sonawane and it is approved
for the partial fulfillment of the requirement of Savitribai Phule Pune Uni-
versity, for the award of the degree of Bachelor of Engineering (Computer
Engineering).

Dr. S. S. Sonawane Dr. G. V. Kale


Internal Guide Head
Dept. of Computer Engg. Dept. of Computer Engg.

Dr. S. T. Gandhe
Principal
Pune Institute of Computer Technology
Place: Pune
Date:
ACKNOWLEDGEMENT

We take this opportunity to express our deepest gratitude to all those who
have contributed to the successful completion of our project titled ”Crop
Monitoring & Management using AI-Powered IoT in Precision
Agriculture.”
First and foremost, we are profoundly grateful to our project guide, Dr.
Sheetal Sonawane, for her invaluable guidance, constant support, and con-
structive feedback throughout the development of this project. Her expertise,
encouragement, and mentorship have been instrumental in shaping our work
and pushing us toward academic excellence.
We would also like to extend our heartfelt thanks to Dr. Geetanjali Kale,
Head of the Department, Computer Engineering, for providing us with the
opportunity, infrastructure, and academic environment to pursue this work.
Her leadership and commitment to fostering innovation have been a great
source of motivation.
Lastly, we sincerely thank all faculty members of the Computer Engineering
Department and our peers for their insightful suggestions and encouragement
during the various phases of the project.

Advait Naik
Kaustubh Netke
Rhea Shah
Vineet Kothari
(B.E. Computer Engg.)
ABSTRACT

This project presents a solar-powered precision agriculture system that inte-


grates Internet of Things (IoT) technology with machine learning to support
data-driven decision-making in farming. The system comprises three func-
tional modules: a crop yield prediction engine tailored for chilli cultivation, a
crop recommendation engine, and a plant disease classification system. Envi-
ronmental and soil parameters are collected through sensors and transmitted
to a cloud-based IoT platform for analysis. Machine learning models are
used to provide real-time predictions and recommendations based on cur-
rent field conditions. All modules are deployed on a low-power embedded
system powered by solar energy. The proposed system illustrates the poten-
tial for integrating AI-driven solutions with IoT infrastructure in real-world
agricultural applications. Future enhancements will aim to extend support
for multiple crops and improve system resilience in low-connectivity environ-
ments.
Contents

1 Introduction 1
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Problem Definition and Objectives . . . . . . . . . . . . . . . 2
1.4 Project Scope & Limitations . . . . . . . . . . . . . . . . . . 2
1.5 Methodologies of Problem solving . . . . . . . . . . . . . . . . 3

2 Literature Survey 4

3 Software Requirements Specification 7


3.1 Assumptions and Dependencies . . . . . . . . . . . . . . . . . 8
3.2 Functional Requirements . . . . . . . . . . . . . . . . . . . . . 8
3.2.1 System Feature 1: Crop Recommendation . . . . . . . 8
3.2.2 System Feature 2: Yield Prediction . . . . . . . . . . . 8
3.2.3 System Feature 3: Disease Detection . . . . . . . . . . 8
3.3 External Interface Requirements . . . . . . . . . . . . . . . . . 9
3.3.1 User Interfaces . . . . . . . . . . . . . . . . . . . . . . 9
3.3.2 Hardware Interfaces . . . . . . . . . . . . . . . . . . . . 9
3.3.3 Software Interfaces . . . . . . . . . . . . . . . . . . . . 9
3.3.4 Communication Interfaces . . . . . . . . . . . . . . . . 9
3.4 Nonfunctional Requirements . . . . . . . . . . . . . . . . . . . 10
3.4.1 Performance Requirements . . . . . . . . . . . . . . . . 10
3.4.2 Safety Requirements . . . . . . . . . . . . . . . . . . . 10
3.4.3 Security Requirements . . . . . . . . . . . . . . . . . . 10
3.4.4 Software Quality Attributes . . . . . . . . . . . . . . . 10
3.5 System Requirements . . . . . . . . . . . . . . . . . . . . . . . 10
3.5.1 Database Requirements . . . . . . . . . . . . . . . . . . 10
3.5.2 Software Requirements (Platform Choice) . . . . . . . 10
3.5.3 Hardware Requirements . . . . . . . . . . . . . . . . . 11
3.6 Analysis Models: SDLC Model to be applied . . . . . . . . . . 11
4 System Design 12
4.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . 13
4.2 Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . 13
4.3 Data Flow Diagrams . . . . . . . . . . . . . . . . . . . . . . . 15
4.4 Entity Relationship Diagram . . . . . . . . . . . . . . . . . . . 17
4.5 UML Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.6 Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . 19

5 Project Plan 20
5.1 Project Estimate . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.1.1 Reconciled Estimates . . . . . . . . . . . . . . . . . . . 21
5.1.2 Project Resources . . . . . . . . . . . . . . . . . . . . . 21
5.2 Risk Management . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2.1 Risk Identification . . . . . . . . . . . . . . . . . . . . 23
5.2.2 Risk Analysis . . . . . . . . . . . . . . . . . . . . . . . 23
5.2.3 Overview of Risk Mitigation, Monitoring, Management 23
5.3 Project Schedule . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.3.1 Project Task Set . . . . . . . . . . . . . . . . . . . . . 24
5.3.2 Task Network . . . . . . . . . . . . . . . . . . . . . . . 24
5.3.3 Timeline Chart . . . . . . . . . . . . . . . . . . . . . . 24
5.4 Team Organization . . . . . . . . . . . . . . . . . . . . . . . . 25
5.4.1 Team structure . . . . . . . . . . . . . . . . . . . . . . 25
5.4.2 Management reporting and communication . . . . . . . 25

6 Project Implementation 26
6.1 Overview of Project Modules . . . . . . . . . . . . . . . . . . . 27
6.2 Tools and Technologies Used . . . . . . . . . . . . . . . . . . . 27
6.3 Algorithm Details . . . . . . . . . . . . . . . . . . . . . . . . . 27
6.3.1 Algorithm 1: K-Nearest Neighbors (Yield Prediction
for Chilli) . . . . . . . . . . . . . . . . . . . . . . . . . 27
6.3.2 Algorithm 2: Random Forest (Crop Recommendation) 28
6.3.3 Algorithm 3: Vision Transformer (Disease Detection) . 28

7 Software Testing 29
7.1 Type of Testing . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.2 Test cases & Test Results . . . . . . . . . . . . . . . . . . . . 30

8 Results 31
8.1 Outcomes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
8.2 Screen Shots . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
9 Conclusions 37
9.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
9.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
9.3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

10 Appendix 39
10.1 Appendix A . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
10.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 40
10.1.2 Problem Class: P (Polynomial-Time Solvable) . . . . . 40
10.1.3 Satisfiability Check . . . . . . . . . . . . . . . . . . . . 41
10.1.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . 41
10.2 Appendix B . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
10.2.1 Survey Paper Details . . . . . . . . . . . . . . . . . . . 42
10.2.2 Implementation Paper Details . . . . . . . . . . . . . . 42
10.2.3 Event Participation Details . . . . . . . . . . . . . . . 43
10.3 Appendix C . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

11 References 45
List of Figures

4.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . 13


4.2 DFD Level 1 – Context Diagram . . . . . . . . . . . . . . . . 15
4.3 DFD Level 2 – Module Breakdown . . . . . . . . . . . . . . . 16
4.4 DFD Level 3 – Integrated Functional Workflow . . . . . . . . 16
4.5 Entity Relationship Diagram . . . . . . . . . . . . . . . . . . . 17
4.6 Activity Diagram . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.7 Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . 19

8.1 Yield Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . 34


8.2 Crop Recommendation . . . . . . . . . . . . . . . . . . . . . . 35
8.3 ThingSpeak Data Visualizations . . . . . . . . . . . . . . . . . 36

10.1 Survey Paper Details . . . . . . . . . . . . . . . . . . . . . . . 42


10.2 INC Certificates . . . . . . . . . . . . . . . . . . . . . . . . . . 43
10.3 Plagiarism Report . . . . . . . . . . . . . . . . . . . . . . . . . 44
List of Tables

5.1 Component-wise Timeline and Resource Requirements . . . . 21


5.2 Risk Assessment and Categorization . . . . . . . . . . . . . . . 23
5.3 Risks and Mitigation Strategies . . . . . . . . . . . . . . . . . 23

7.1 Testing Results . . . . . . . . . . . . . . . . . . . . . . . . . . 30

8.1 Model Accuracy Comparison for Crop Yield Prediction . . . . 32


8.2 Model Accuracy Comparison for Crop Recommendation . . . . 32
8.3 Model Accuracy Comparison for Disease Prediction . . . . . . 33
LIST OF ABBREVIATIONS

Abbreviation Illustration
AI Artificial Intelligence
IoT Internet of Things
ML Machine Learning
KNN K-Nearest Neighbors
RF Random Forest
ViT Vision Transformer
CNN Convolutional Neural Network
MQTT Message Queuing Telemetry Transport
API Application Programming Interface
DHT11 Digital Humidity and Temperature Sensor
ESP32 Espressif Systems 32-bit Microcontroller
LCD Liquid Crystal Display
CSV Comma Separated Values
SDLC Software Development Life Cycle
UAV Unmanned Aerial Vehicle
Wi-Fi Wireless Fidelity
CHAPTER 1
INTRODUCTION
AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

1.1 Overview
Precision agriculture is a modern farming practice leveraging technology to
make data-driven decisions. This project introduces an integrated, solar-
powered smart farming solution combining sensor-based data collection, IoT
platforms, and AI models to support Indian farmers in improving crop selec-
tion, yield estimation, and disease management.

1.2 Motivation
Traditional agriculture often relies on experience and assumptions, leading
to inefficiencies. Rising climate variability, soil degradation, and pest out-
breaks necessitate the use of smart technologies for sustainable farming. The
motivation behind this project is to bridge the gap between farmers and tech-
nology through an affordable and intelligent solution.

1.3 Problem Definition and Objectives


Farmers lack real-time insights into crop suitability, expected yield, and plant
health, resulting in losses and inefficient resource utilization.

Objectives:

• To develop a crop recommendation system based on soil and weather


parameters

• To predict crop yield in real-time using historical sensor data

• To detect diseases in chilli plants using image-based classification

• To enable all functionalities through a solar-powered, standalone em-


bedded system

1.4 Project Scope & Limitations


Scope:

• Chilli plant focus for disease detection

PICT, Department of Computer Engineering 2024-25 Page 2


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network
• Field-ready system with sensor input

• Integration with cloud (ThingSpeak IoT)

Limitations:

• Disease and Yield module limited to chilli leaf diseases

• Requires consistent internet for data sync

• Cannot yet handle multi-crop field segmentation

1.5 Methodologies of Problem solving


• Machine learning models: KNN, Random Forest, Vision Transformer

• Sensor-based data acquisition

• Image classification using transfer learning

• Cloud integration with ThingSpeak for IoT monitoring

• Solar-powered embedded deployment

PICT, Department of Computer Engineering 2024-25 Page 3


CHAPTER 2
LITERATURE SURVEY
AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network
Precision agriculture has become a vital field in modern farming, aiming to
optimize agricultural productivity through the application of machine learn-
ing, sensor networks, and real-time data analytics. Recent developments em-
phasize the integration of soil nutrient sensing, environmental monitoring,
and artificial intelligence to enhance decision-making for crop selection, yield
estimation, and plant health management. This literature review presents
an overview of existing approaches aligned with the three core modules of
the present system: crop yield prediction, crop recommendation, and disease
detection. Additionally, it examines trends in embedded system deployment
for real-time agricultural applications.
Crop yield prediction systems have been widely studied using data-
driven models trained on environmental and nutrient parameters. Cam-
marano [1] demonstrated the use of site-specific nitrogen application com-
bined with machine learning algorithms to improve yield forecasting, partic-
ularly when soil and weather data were integrated into the model. Similarly,
Harish and Devi [2] proposed a smart farming framework that utilized IoT-
enabled sensors to collect temperature, soil moisture, and nutrient values,
which were then processed through supervised learning models to predict
yield with considerable accuracy. Naik et al. [3] further highlighted the suit-
ability of lightweight models such as K-Nearest Neighbors (KNN) for crop
yield estimation, particularly in edge-deployed, resource-constrained agricul-
tural settings.
For crop recommendation, machine learning classifiers have proven
highly effective in analyzing soil and climatic conditions. Sethi and Lakhina
[4] implemented a Random Forest-based crop advisory system using NPK
values, temperature, and humidity as inputs. Their model significantly out-
performed heuristic systems by providing dynamic, data-driven recommen-
dations based on local conditions. Veerasamy et al. [5] also proposed an
IoT-integrated soil testing system employing ensemble models like Gradient
Boosting and Random Forest for recommending optimal crops. Their find-
ings confirmed the robustness of such models across varying agro-climatic
zones. Naik et al. [3] supported these observations by emphasizing that
ensemble algorithms are well-suited for crop selection tasks when integrated
with real-time sensor data.
In the domain of plant disease detection, deep learning and computer
vision have enabled early-stage classification of plant ailments with high re-
liability. Waheed et al. [6] applied DenseNet and CNN-GCN hybrids to
classify crop diseases with over 95% accuracy, showcasing the effectiveness of
convolutional neural networks (CNNs) for image-based plant health monitor-
ing. Kerkech et al. [7] developed a UAV-based solution for grapevine disease
detection, utilizing colorimetric features and CNNs to process aerial imagery

PICT, Department of Computer Engineering 2024-25 Page 5


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network
under real-world conditions. Harish and Devi [2] contributed a CNN-powered
leaf disease detection module integrated into their IoT-smart agriculture sys-
tem, capable of classifying images in real time and recommending treatments.
Naik et al. [3] reviewed emerging architectures such as Vision Transformers
(ViTs) and noted their scalability and improved performance in plant disease
classification, particularly under limited training data scenarios.
While model design is central, the literature also emphasizes the im-
portance of robust hardware implementation for field usability. Harish and
Devi [2], and Veerasamy et al. [5] noted that real-time agricultural systems
often depend on microcontrollers like Raspberry Pi or ESP32 to process sen-
sor data. However, most solutions still rely on conventional power supplies.
To address this, the present system incorporates a solar-powered embedded
platform that collects sensor data via NPK and DHT11 modules and trans-
mits it to the ThingSpeak IoT cloud. This data is then processed by locally
deployed machine learning models, ensuring real-time prediction and decision
support even in off-grid or low-connectivity environments.
In summary, the reviewed literature confirms that integrating soil sens-
ing, environmental monitoring, and machine learning yields accurate and effi-
cient agricultural decision-support systems. Models like KNN, Random For-
est, CNN, and Vision Transformers are consistently effective across various
sub-domains. However, relatively few studies address full-system integration
with low-cost, solar-powered hardware capable of operating independently in
rural settings. The current project aims to fill this gap by offering a modu-
lar, energy-efficient, and field-ready precision agriculture platform combining
yield prediction, crop recommendation, and disease detection.

PICT, Department of Computer Engineering 2024-25 Page 6


CHAPTER 3
SOFTWARE REQUIREMENTS
SPECIFICATION
AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

3.1 Assumptions and Dependencies


• Continuous internet access for ThingSpeak updates

• Users can operate mobile or web-based interfaces

• The ViT model can classify chilli plant diseases accurately from clear
leaf images

3.2 Functional Requirements


3.2.1 System Feature 1: Crop Recommendation
• Input: N, P, K, air temperature, humidity

• Output: Top 3 crops with confidence scores

• Model: Random Forest

3.2.2 System Feature 2: Yield Prediction


• Input: N, P, K, soil temp, soil moisture, air temp, humidity

• Output: Estimated yield (kg/acre)

• Model: K-Nearest Neighbors

3.2.3 System Feature 3: Disease Detection


• Input: Image of a chilli plant leaf

• Output: Disease class + Treatment recommendation

• Model: Vision Transformer

PICT, Department of Computer Engineering 2024-25 Page 8


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

3.3 External Interface Requirements


3.3.1 User Interfaces
• Mobile/web interface (optional)

• LCD display (optional)

3.3.2 Hardware Interfaces


• Sensors: 7-in-1 NPK sensor, DHT11

• Camera module (for image input)

• Microcontroller: ESP32/Raspberry Pi

3.3.3 Software Interfaces


• ThingSpeak IoT platform

• Python, PyTorch, Sklearn

3.3.4 Communication Interfaces


• Wi-Fi module

• MQTT/HTTP for data push (ThingSpeak)

PICT, Department of Computer Engineering 2024-25 Page 9


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

3.4 Nonfunctional Requirements


3.4.1 Performance Requirements
• Yield model accuracy ≥ 97%
• Crop recommendation accuracy ≥ 96%
• Disease detection accuracy ≥ 94%

3.4.2 Safety Requirements


• Short-circuit protection for solar unit
• Fail-safe on device overheating

3.4.3 Security Requirements


• Limited local storage
• API authentication for ThingSpeak access

3.4.4 Software Quality Attributes


• Portability
• Scalability
• Maintainability

3.5 System Requirements


3.5.1 Database Requirements
• Sensor logs stored in ThingSpeak cloud
• Local CSV for offline logging

3.5.2 Software Requirements (Platform Choice)


• Python 3.8+
• PyTorch, Scikit-learn, OpenCV
• ThingSpeak API library

PICT, Department of Computer Engineering 2024-25 Page 10


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network
3.5.3 Hardware Requirements
• ESP32 or Raspberry Pi

• Solar panel + charge controller

• NPK + DHT11 sensors

• Camera (for image input)

3.6 Analysis Models: SDLC Model to be ap-


plied
The Iterative Model is applied to continuously test, improve, and deploy
model performance and integration in modular phases.

PICT, Department of Computer Engineering 2024-25 Page 11


CHAPTER 4
SYSTEM DESIGN
AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

4.1 System Architecture

Figure 4.1: System Architecture

4.2 Mathematical Model


Input:
Let X = {N, P, K, Ta , Ha , Ts , Ms } be the set of features, where:

• N, P, K: Nutrient values

• Ta : Air Temperature

• Ha : Humidity

• Ts : Soil Temperature

• Ms : Soil Moisture

Output:

• Yyield : Yield prediction (kg/acre)

• Ycrop : Recommended crop (Top 3 with probabilities)

PICT, Department of Computer Engineering 2024-25 Page 13


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network
• Ydisease : Disease class from 5 labels

Modeling:
Yield Prediction:

Yyield = KNN(Xyield ), where Xyield ⊂ X


Crop Recommendation:

Ycrop = RandomForest(Xcrop ), where Xcrop = {N, P, K, Ta , Ha }

Disease Prediction:

Ydisease = ViT(I), where I is the input image

PICT, Department of Computer Engineering 2024-25 Page 14


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

4.3 Data Flow Diagrams

Figure 4.2: DFD Level 1 – Context Diagram

PICT, Department of Computer Engineering 2024-25 Page 15


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

Figure 4.3: DFD Level 2 – Module Breakdown

Figure 4.4: DFD Level 3 – Integrated Functional Workflow

PICT, Department of Computer Engineering 2024-25 Page 16


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

4.4 Entity Relationship Diagram

Figure 4.5: Entity Relationship Diagram

PICT, Department of Computer Engineering 2024-25 Page 17


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

4.5 UML Diagrams

Figure 4.6: Activity Diagram

PICT, Department of Computer Engineering 2024-25 Page 18


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

4.6 Sequence Diagram

Figure 4.7: Sequence Diagram

PICT, Department of Computer Engineering 2024-25 Page 19


CHAPTER 5
PROJECT PLAN
AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

5.1 Project Estimate


5.1.1 Reconciled Estimates

Component Estimated Time Actual Time Resources Re-


quired
Sensor Setup & 2 weeks 4 weeks NPK Sensor,
Data Logging DHT11, ESP32
ThingSpeak IoT 2 days 2 days Wi-Fi Module,
Integration APIs
Crop Yield 3 days 1 week Scikit-learn
Model (KNN)
Crop Recom- 4 days 1 week Scikit-learn
mendation (RF)
ViT-based Dis- 3 weeks 3 weeks PyTorch, Image
ease Model Dataset
Embedded De- 1 week 2 week Raspberry
ployment Pi/ESP32
Testing & UI In- 2 week 2 week Display Module
tegration / App
Documentation 1 week Ongoing LaTeX, Word
& Reporting

Table 5.1: Component-wise Timeline and Resource Requirements

5.1.2 Project Resources


Human Resources:

• 1 ML/AI Developer

• 1 Embedded Developer

• 1 Data Collection & Tester

• 1 Technical Writer

PICT, Department of Computer Engineering 2024-25 Page 21


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network
Software Resources:

• Python, PyTorch, Scikit-learn, ThingSpeak API

• Operating System: Raspberry Pi OS / Linux

Hardware Resources:

• 7-in-1 NPK Sensor, DHT11 Sensor

• Solar Panel + Battery + Charge Controller

• ESP32 or Raspberry Pi

• Camera Module for Disease Detection

• Web App for Output

PICT, Department of Computer Engineering 2024-25 Page 22


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

5.2 Risk Management


5.2.1 Risk Identification

Risk Type
Sensor failure in field Hardware Risk
Internet outage for ThingSpeak Network Risk
Overfitting of ML models Model Risk
Insufficient image data Data Risk

Table 5.2: Risk Assessment and Categorization

5.2.2 Risk Analysis


• Sensor failure: Data unavailability → Use offline fallback values

• Overfitting risk: Use validation set & generalization metrics

• Image data shortage: Augment using image flips, rotations, and


public datasets

5.2.3 Overview of Risk Mitigation, Monitoring, Man-


agement

Risk Mitigation Strategy


Sensor failure Maintain spare sensor units
Internet connectivity Allow offline buffer; sync later
ML model overfitting Early stopping, k-fold cross-validation
Dataset imbalance Augmentation and synthetic sample gen-
eration

Table 5.3: Risks and Mitigation Strategies

PICT, Department of Computer Engineering 2024-25 Page 23


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

5.3 Project Schedule


5.3.1 Project Task Set
• Data collection and sensor interfacing

• Integration with IoT platform (ThingSpeak)

• Model training for crop yield and crop recommendation

• ViT model setup and training for disease classification

• Deployment on solar-powered embedded device

• UI and interface testing

• Final documentation and paper writing

5.3.2 Task Network

Sensor Setup ThingSpeak Integration Model Training

Disease Module
ViT Model Training Testing & Evaluation
Data Prep

5.3.3 Timeline Chart

Week Tasks
1-4 Sensor + IoT Integration
5-6 KNN & Random Forest Model Training
7-10 ViT Image Classification Setup + Data Augmentation
11-12 Embedded Deployment + Hardware Testing
13 Documentation + Result Evaluation

PICT, Department of Computer Engineering 2024-25 Page 24


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

5.4 Team Organization


5.4.1 Team structure

Role Member Responsibility


Project Lead Coordination, System Design
AI/ML Engineer Model development & evaluation
Embedded Developer Hardware interfacing, deployment
QA Tester Testing, dataset collection
Documentation Lead Report writing, diagrams, visuals

5.4.2 Management reporting and communication


• Weekly team sync-up meetings

• Task progress tracked on shared Trello board

• GitHub repo used for version control

• Project milestones communicated via shared Google Docs

PICT, Department of Computer Engineering 2024-25 Page 25


CHAPTER 6
PROJECT IMPLEMENTATION
AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

6.1 Overview of Project Modules


The system is divided into three major AI-driven modules integrated into a
solar-powered embedded architecture:

1. Crop Yield Prediction – Predicts expected chilli yield in kg/acre


based on live sensor inputs.

2. Crop Recommendation – Suggests top 3 crops based on soil nutrient


and weather conditions.

3. Disease Recommendation – Classifies leaf diseases in chilli crops


using image inputs.

6.2 Tools and Technologies Used


• Programming Languages: Python

• Libraries & Frameworks:

– Machine Learning: Scikit-learn, PyTorch


– Image Processing: PIL, torchvision, OpenCV
– Cloud: ThingSpeak IoT API

• Embedded Platform: ESP32 / Raspberry Pi

• Sensors: 7-in-1 NPK sensor, DHT11

• Power: 12V Solar Panel + Battery

• Deployment: Edge-based (local predictions)

6.3 Algorithm Details


6.3.1 Algorithm 1: K-Nearest Neighbors (Yield Pre-
diction for Chilli)
• Input: N, P, K, soil temperature, soil moisture, air temperature, hu-
midity

• Output: Estimated chilli yield in kg/acre

PICT, Department of Computer Engineering 2024-25 Page 27


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network
• Process: Distance calculation to k nearest historical samples (chilli-
specific)

• Accuracy Achieved: 97.53%

6.3.2 Algorithm 2: Random Forest (Crop Recommen-


dation)
• Input: N, P, K, air temperature, humidity

• Output: Top 3 crops with confidence percentages

• Process: Ensemble of decision trees for classification

• Accuracy Achieved: 96.42%

6.3.3 Algorithm 3: Vision Transformer (Disease De-


tection)
• Input: Leaf image (224x224)

• Output: Disease class + recommendation

• Process: Pretrained ViT fine-tuned on chilli disease images

• Accuracy Achieved: 94%

PICT, Department of Computer Engineering 2024-25 Page 28


CHAPTER 7
SOFTWARE TESTING
AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

7.1 Type of Testing


• Unit Testing: Tested model outputs with mock inputs

• Integration Testing: Verified ThingSpeak → ML → Output pipeline

• Validation Testing: Compared model predictions against actual field


values

• Usability Testing: Tested UI interface with farmers and mock users

7.2 Test cases & Test Results

Module Test Case Input Expected Output Result

Yield Prediction Known crop field data {N:40, P:20, K:50...} Yield 1200 kg/acre Passed

Crop Recommendation High K, Low N values {N:10, P:25, K:50, Temp:30, Hum:70} Top crops: Rice, Cotton, Maize Passed

Disease Detection Leaf image with whitefly damage Image of damaged chilli leaf ”Whitefly” + treatment tip Passed

Table 7.1: Testing Results

PICT, Department of Computer Engineering 2024-25 Page 30


CHAPTER 8
RESULTS
AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

8.1 Outcomes
1. Crop Yield Prediction

Model Accuracy (%)


Support Vector Regressor (SVR) 66.21
MLP Regressor 78.00
Linear Regression 92.50
Random Forest Regressor 97.26
Gradient Boost Regressor 97.48
K-Nearest Neighbors (KNN) 97.53

Table 8.1: Model Accuracy Comparison for Crop Yield Prediction

Multiple regression algorithms were evaluated to predict crop yield


based on sensor inputs (NPK, air temperature, humidity, soil tem-
perature, and soil moisture). Among all models tested, K-Nearest
Neighbors (KNN) produced the highest accuracy of 97.53%, making
it the final choice for deployment in the system. Ensemble models like
Gradient Boost Regressor (97.48%) and Random Forest (97.26%) also
performed competitively, while linear models and SVR yielded compar-
atively lower performance.

2. Crop Recommendation

Model Accuracy (%)


Logistic Regression 84.51
SVC 88.41
K-Nearest Neighbors (KNN) 94.20
Decision Tree 94.37
Gaussian Naive Bayes (NB) 96.02
Random Forest 96.42

Table 8.2: Model Accuracy Comparison for Crop Recommendation

Crop recommendation was formulated as a classification problem us-


ing soil nutrient (NPK) and environmental parameters (temperature,
humidity). The Random Forest classifier demonstrated the best perfor-
mance with 96.42% accuracy, closely followed by Gaussian Naive Bayes

PICT, Department of Computer Engineering 2024-25 Page 32


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network
(96.02%). Based on performance and robustness, Random Forest was
selected for integration in the deployed system to recommend the top
3 most suitable crops with associated confidence percentages.

3. Disease Prediction

Model Accuracy (%)


ResNet50 64.00
EfficientNet 68.00
MobileNetV2 78.00
Vision Transformer (Base Model) 94.00

Table 8.3: Model Accuracy Comparison for Disease Prediction

The disease detection module was developed as an image classification


task on chilli leaves. Various deep learning architectures were com-
pared, including CNN-based (ResNet50, EfficientNet, MobileNetV2)
and transformer-based (ViT). The Vision Transformer (ViT) outper-
formed all other models with a notable accuracy of 94%, demonstrating
superior learning of leaf disease patterns. Thus, ViT was selected for fi-
nal deployment, supporting detection of five classes: healthy, yellowish
leaves, whitefly, leaf curl, and leaf spot, along with remedy suggestions.

PICT, Department of Computer Engineering 2024-25 Page 33


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

8.2 Screen Shots

Figure 8.1: Yield Prediction

This screenshot displays the Crop Yield Prediction interface of the AgriTech
web application. The interface allows users to input various agricultural pa-
rameters including Soil Temperature (°C), Nitrogen (N), Phosphorus (P),
Potassium (K), Soil Moisture (%), Air Humidity (%), and Air Temperature
(°C). Based on these inputs, the backend model processes the data and pre-
dicts the expected crop yield. This functionality helps farmers make informed
decisions to maximize productivity by leveraging real-time environmental and
soil conditions.

PICT, Department of Computer Engineering 2024-25 Page 34


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

Figure 8.2: Crop Recommendation

This screenshot displays the Crop Recommendation interface of the


AgriTech platform. The user is prompted to enter key soil and environ-
mental parameters such as Nitrogen (N), Phosphorus (P), Potassium (K),
Temperature (°C), and Humidity (%). Based on these inputs, the system
uses a trained machine learning model to suggest the top 3 most suitable
crops that can be cultivated under the given conditions. This feature is
designed to assist farmers in making data-driven decisions that align with
their soil health and local climate, ultimately improving productivity and
sustainability.

PICT, Department of Computer Engineering 2024-25 Page 35


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

Figure 8.3: ThingSpeak Data Visualizations

This screenshot represents the ThingSpeak Data Visualization dash-


board, which provides real-time insights from sensors deployed in the field.
The data is collected using a solar-powered IoT sensor network, featuring
two sensors: a 7-in-1 NPK sensor (for soil nutrients and temperature) and
a DHT11 sensor (for air temperature and humidity). The visualizations in-
clude multiple line graphs displaying parameters like Crop Yield Estimation,
Soil Temperature, Humidity, and Nutrient Levels. This interface enables con-
tinuous monitoring of agricultural parameters to facilitate precision farming
and timely interventions.

PICT, Department of Computer Engineering 2024-25 Page 36


CHAPTER 9
CONCLUSIONS
AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

9.1 Conclusions
This project successfully integrates machine learning, computer vision, IoT,
and renewable energy to form a sustainable and intelligent precision agricul-
ture solution. By offering real-time insights on crop selection, yield expecta-
tions, and disease conditions, the system empowers farmers to make informed
decisions and reduce losses.

9.2 Future Work


• Extend chilli-specific yield prediction to other major crops such as
maize, rice, and wheat

• Include other crop diseases in the classification system

• Integrate automated irrigation control based on soil moisture

• Add voice-based support for regional languages

• Enhance edge deployment using model compression and pruning tech-


niques

9.3 Applications
• Small-scale farmers in remote areas

• Agricultural research and field extension agencies

• Government-led smart farming initiatives

• Educational projects in AI and IoT for agriculture

PICT, Department of Computer Engineering 2024-25 Page 38


CHAPTER 10
APPENDIX
AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

10.1 Appendix A
10.1.1 Introduction
In computational theory, evaluating the feasibility of a problem involves un-
derstanding whether it can be solved efficiently within polynomial time. This
analysis is crucial in systems utilizing machine learning (ML), particularly
in real-time or embedded contexts such as the proposed precision agriculture
system. The goal of this section is to classify the computational complexity of
the supervised ML tasks used in this work—namely, crop recommendation,
crop yield prediction, and disease classification.

10.1.2 Problem Class: P (Polynomial-Time Solvable)


All three tasks tackled by the proposed system fall into the class of supervised
learning problems. These include:

• Classification (e.g., Random Forest, Vision Transformer): mapping


inputs to categorical outputs.

• Regression (e.g., K-Nearest Neighbors): mapping inputs to continu-


ous values.

In each case, the learning algorithms operate over a finite dataset and
perform optimization through deterministic steps such as tree construction,
distance computation, or gradient updates. These algorithms exhibit time
complexities bounded by polynomial functions of the input size (number of
samples and features). For example:

• K-Nearest Neighbors (KNN): O(n · d) per prediction, where n is


the number of training samples and d is the number of features.

• Random Forest: O(nt log n) for training t decision trees.

• Vision Transformers: Though computationally intensive, they re-


main deterministic and tractable on fixed-size inputs.

Hence, the underlying optimization and inference problems are solvable


in polynomial time and fall under the P-Class of computational problems.

PICT, Department of Computer Engineering 2024-25 Page 40


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network
10.1.3 Satisfiability Check
For a problem to be classified as decidable and polynomial-time solvable, the
system must be able to terminate for any finite input within a bounded time.
In this implementation:

• All models were trained and executed on bounded datasets collected


from sensors.

• Each algorithm completed its training and inference within predictable


time frames.

• No model required solving inherently combinatorial or undecidable


tasks (e.g., graph coloring, integer factorization).

Therefore, all algorithms pass the satisfiability check, meaning they


are decidable and non-intractable for the given input domains.

10.1.4 Conclusion
Based on the structural characteristics and empirical behavior of the machine
learning models used, it is concluded that the core tasks—crop recommen-
dation, yield prediction, and disease classification—are not NP-Hard. They
are tractable, deterministic, and solvable using standard optimization tech-
niques. This analysis confirms the computational feasibility and real-time
applicability of the proposed system in embedded, field-level deployment sce-
narios.

PICT, Department of Computer Engineering 2024-25 Page 41


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

10.2 Appendix B
10.2.1 Survey Paper Details
• Paper Status: Accepted

• Name of Conference: 1st GLOBAL CONFERENCE ON COG-


NITIVE COMPUTING AND COMMUNICATION TECHNOLOGY
- 2025 (GC4T - 2025)

• Paper Title: Precision Agriculture: A Survey of Techniques

Figure 10.1: Survey Paper Details

10.2.2 Implementation Paper Details


• Paper Status: Under Review

• Name of Conference: NA

• Paper Title: AI-Driven System for Crop Health Management and


Yield Estimation Using a Solar-Powered IoT Sensor Network

PICT, Department of Computer Engineering 2024-25 Page 42


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network
10.2.3 Event Participation Details

Kaustubh Netke
PICT, Pune
Concepts
Advait Naik
PICT
Concepts

(a) Advait INC Certificate (b) Kaustubh INC Certificate

Rhea Shah Vineet Kothari


PICT PICT
Concepts Concepts

(c) Rhea INC Certificate (d) Vineet INC Certificate

Figure 10.2: INC Certificates

PICT, Department of Computer Engineering 2024-25 Page 43


AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network

10.3 Appendix C

Figure 10.3: Plagiarism Report

PICT, Department of Computer Engineering 2024-25 Page 44


CHAPTER 11
REFERENCES
AI-Driven System for Crop Health Management and Yield Estimation
Using a Solar-Powered IoT Sensor Network
[1] Cammarano, A. (2024). Site-specific nitrogen application and machine
learning for crop yield forecasting. Agricultural Systems, 180, 105-118.

[2] Harish, S., & Devi, V. (2020). A smart farming framework using IoT-
enabled sensors and machine learning for yield prediction. Sensors and
Actuators: A. Physical, 313, 112-125.

[3] Naik, A., et al. (2025). Precision Agriculture: A Survey of Techniques

[4] Sethi, R., & Lakhina, R. (2020). Crop advisory system using Random
Forest and IoT-based soil and climate data. Agricultural Informatics
Journal, 45(2), 98-110.

[5] Veerasamy, R., et al. (2021). IoT-integrated soil testing for crop recom-
mendation using ensemble learning models. Precision Agriculture, 22(6),
870-885.

[6] Waheed, S., et al. (2020). Early-stage plant disease detection using
DenseNet and CNN-GCN hybrids. IEEE Access, 8, 11934-11942.

[7] Kerkech, M., et al. (2020). UAV-based grapevine disease detection using
CNNs and colorimetric features. Remote Sensing, 12(6), 960.

PICT, Department of Computer Engineering 2024-25 Page 46

You might also like