Final Paper PDF
Final Paper PDF
G. Sanajana B. Shirisha
Electronics and Communication Engineering Electronics and Communication Engineering
Institute of Aeronautical Engineering (JNTUH) Institute of Aeronautical Engineering (JNTUH)
Hyderabad, India Hyderabad, India
[email protected] [email protected]
Abstract —The agricultural sector is increasingly adopting conditions, the system enhances resilience in the agricultural
technology to enhance crop yields. This project proposes a crop sector.
recommendation system utilizing sensors for moisture, rainfall,
temperature, water levels, and humidity all integrated with an The adoption of IoT for real-time data acquisition and ML for
ESP8266 microcontroller. The gathered sensor data will train a predictive analytics marks a major advancement in the agricultural
logistic regression model to predict the ideal crop from options such sector. It provides farmers with an intelligent, scalable, and cost-
as cotton, strawberry, rice, sugarcane, tomato, and millets. This
effective solution to enhance crop productivity while minimizing
implementation aims to assist farmers in making informed
decisions, improving productivity while reducing resource waste.
environmental degradation. This project not only improves
By combining IoT and machine learning, the system provides a farming practices but also aligns with the larger global objective
modern solution for sustainable farming. Furthermore, it of achieving food security amidst population growth and climate
empowers small-scale farmers to make data-driven decisions, change. Furthermore, it has the potential to empower smallholder
ensuring more efficient use of their resources and boosting overall farmers, enabling them to compete in the market and secure better
agricultural output. livelihoods.
In developing countries, agricultural monitoring can prevent
famine and aid humanitarian efforts. A major challenge is yield Agriculture, the root of human civilization, remains the backbone
estimation, predicting crop yields before harvest. We propose a of India's economy. Crop selection is crucial in agricultural
scalable, accurate, and cost-effective method for crop yield planning and depends on factors such as market prices, production
prediction using publicly accessible remote sensing data. If
rates, and government policies. Significant changes in the
implemented at government soil health centers, this solution could
help farmers minimize fertilizer use, protect soil health, and agricultural sector are necessary to bolster India's economy. By
maximize revenue from their land. This approach not only applying machine learning techniques to farming, these challenges
contributes to environmental conservation but also promotes long- can be mitigated. In addition to technological advances, timely and
term agricultural sustainability by maintaining soil integrity for reliable information plays a crucial role in enhancing farming
future generations. outcomes. This project introduces a crop selection framework that
Keywords — Precision Agriculture, Machine learning, Crop addresses key issues faced by farmers, contributing to increased
prediction, Sensor Technology, Soil Monitoring, Real-Time Data yields and strengthening the agricultural economy.
I. INTRODUCTION The system employs predictive analytics to recommend the top
three crops based on soil nutrient composition, temperature, and
Agriculture, the cornerstone of many economies, is expected revenue. There are two methods for farmers to use this
increasingly challenged by erratic weather patterns, shrinking system. First, it can automatically suggest suitable crops based on
natural resources, and the escalating demand for food historical soil data from nearby locations. Alternatively, farmers
production driven by population growth. Traditional farming, can manually input soil parameters to receive customized
based on experience and historical trends, is often insufficient recommendations. While traditional crop selection methods rely
to tackle these issues, leading to suboptimal resource use, on experience and observation, they are increasingly inadequate
frequent crop failures, and lower productivity. To address these due to changing climatic conditions and resource limitations. This
challenges, technologies like the Internet of Things (IoT) and project leverages IoT and machine learning to modernize farming
Machine Learning (ML) are revolutionizing agriculture by practices.
incorporating data-driven, precision-based crop management
techniques. By monitoring real-time environmental factors through sensors
and analyzing this data using machine learning models, the system
This project introduces a Crop Recommendation System that predicts the best crop suited to the given conditions. The system
integrates IoT sensors and machine learning algorithms to offer utilizes logistic regression, a classification technique, to interpret
real-time, accurate crop suggestions. The system collects data sensor data and deliver precise crop recommendations. This
on critical environmental parameters such as soil moisture, approach enhances agricultural decision-making, leading to better
temperature, humidity, and rainfall, which is then analyzed by resource management, improved yields, and a more sustainable
ML models to predict the crops most likely to thrive. This farming future. Ultimately, the integration of technology in
allows farmers to make data-informed decisions, improving agriculture not only fosters economic growth but also promotes
yields and optimizing resources like water and fertilizers, environmental stewardship, ensuring that future generations
ultimately promoting sustainable and efficient farming inherit a viable and productive agricultural landscape.
practices. By enabling farmers to adapt quickly to changing
II. EXISTING APPROACH
of an event occurring versus not occurring. The coefficients in LR
Existing crop suggestion systems are often based on historical indicate how changes in the independent variables influence the log-
data and do not account for real-time environmental conditions. odds of the target outcome.
These systems can be inaccurate due to the dynamic nature of
weather and soil conditions. Performance metrics for LR include accuracy, precision, recall, F1-
Remote sensing data has been extensively utilized for crop yield score, ROC-AUC, and the confusion matrix, providing insight into
prediction within the remote sensing community (Bolton and true positives, false positives, true negatives, and false negatives.
Friedl 2013; Johnson 2014). However, most known approaches Though effective for simple classification problems, LR may not
depend on manually engineered features, based on the perform well with complex, non-linear relationships unless feature
assumption that these features can capture the majority of engineering or transformation is applied.
vegetation growth information present in high-dimensional
images. Some commonly employed features include the
Normalized Difference Vegetation Index (NDVI) (Quarmby et
al. 1993; Johnson 2014), two-band Enhanced Vegetation Index
(EVI2) (Bolton and Friedl 2013), and Normalized Difference
Water Index (NDWI) (Satir and Berberoglu 2016).
B. Pre-Processing:
B. Software implementation
Figure 3: Block Diagram ESP8266 collects data from sensors (e.g., DHT11, soil moisture, and
rainfall) and sends it to the computer via WiFi or through the serial
V. IMPLEMENTATION port.
Flask (hosted on the computer or server) receives the data, processes
A. Hardware implementation it, and updates a web dashboard. The user can access this dashboard
to view real-time environmental conditions and make decisions
ESP8266 WiFi Module (Mounted on a PCB): The central (e.g., activating irrigation).
component in this setup is the ESP8266, which is mounted on a
custom-made printed circuit board (PCB). The ESP8266 Anaconda is used in the background for:
connects to various sensors and acts as the communication Managing Python environments and dependencies.
module to send data wirelessly. The white USB cable connected Data analysis (e.g., using pandas to structure and clean the data).
to the board provides power and facilitates data transmission to a Data visualization (e.g., using matplotlib or Plotly to create real-time
computer or server. graphs).
Optional machine learning tasks (e.g., predicting future sensor
Rainfall Sensor: In the upper left of the image, there is a readings based on historical data).
rectangular sensor module with metal strips, which is a rainfall
sensor. This sensor detects rain based on the conductivity of Serial port communication serves as an alternative or debugging
water on its surface, sending signals to the ESP8266 to record tool, ensuring that data is still transmitted between the ESP8266 and
precipitation data. the computer even if WiFi is unavailable. It also allows for two-way
communication, enabling users to send commands
DHT11 Sensor: On the right side of the setup, a small sensor back to the ESP8266
module with a blue casing can be seen, which is likely the DHT11
sensor. This sensor measures temperature and humidity and is
connected to the ESP8266 via wires.
Soil Moisture Sensor: Located in the lower right section, the two-
pronged sensor, connected by wires, is the soil moisture sensor.
It measures the soil's moisture level by detecting the resistance
between the prongs and transmits this data to the ESP8266 for
further processing.
The IoT-based environmental monitoring system effectively Data Reliability: Sensor malfunctions and frequent calibration needs
collected real-time data using the ESP8266 WiFi module, which can affect data accuracy.
interfaced with sensors such as the DHT11 (for temperature and Connectivity: Poor internet access in rural areas and high initial
humidity), a rainfall sensor, and a soil moisture sensor. The costs pose challenges to system adoption.
system sent the data to a Flask-based web dashboard, enabling Data Overload: Managing and processing large data volumes in real-
live monitoring, where users could observe real-time sensor time requires significant resources.
readings, like soil moisture and temperature, or initiate actions Integration Issues: Ensuring compatibility with existing farming
such as controlling irrigation systems. systems and standardizing IoT protocols can be difficult.
Farmer Adoption: Lack of technical knowledge and resistance to
Sensor Performance: DHT11, soil moisture, and rainfall sensors new technologies could slow adoption.
effectively gathered environmental data, though minor
limitations in accuracy were observed. Advanced IoT Sensors: Future sensors with better sensitivity, multi-
Flask Web Dashboard: The dashboard displayed real-time data parameter functionalities, and solar-powered options can enhance
and provided user-friendly controls for irrigation and monitoring. data accuracy and sustainability.
Data visualization helped track environmental trends. Edge Computing: Real-time, local data processing will reduce
Serial Port Backup: In cases of WiFi failure, data was reliably latency and improve decision-making in areas with poor internet
transmitted via the serial port for logging and analysis. connectivity.
Anaconda and Data Analysis: Data was processed and visualized Advanced Machine Learning Models: Deep learning and transfer
using Python libraries in Anaconda, enabling real-time analysis learning can improve crop classification, pest detection, and
and future predictive insights. scalability for different regions.
Cloud Integration: Scalable cloud solutions will enable advanced
data analytics and AI-based insights, empowering farmers to make
more accurate and timely decisions.
Mobile and Web Platforms: Expanding to user-friendly mobile apps
with voice assistance can increase accessibility for farmers in remote
areas.
VIII. CONCLUSION
REFERENCES