Major Project - Final 22
Major Project - Final 22
BACHELOR OF TECHNOLOGY
Mechanical Engineering
SUBMITTED BY
The students' project work titled "Development of the IoT-Based Monitoring and Control
System for Smart Fields" submitted in partial fulfilment of the requirements for the
Institute of Technology Allahabad is a genuine record of work carried out by the students
named below under my guidance during the period from August 2024 to December 2024
To the best of my knowledge, the content of this report has not been submitted to any other
We thank the Director of Motilal Nehru National Institute of Technology, Allahabad, for
giving us the chance to carry out this project work. We are highly grateful to our mentor,
Dr. Sunil Kumar Gupta, for his precious guidance, support, and keen attention throughout
the course of this work, which has been instrumental in its successful completion.
We extend our heartfelt gratitude to the esteemed members of our project evaluation panel, Dr.
Rajeev Shrivastav, Dr. Vandana Agarwal and Dr. Swastik Acharya, for their invaluable
feedback, encouragement, and diligent oversight, which have significantly contributed to shaping
this project. We are also deeply thankful to Prof. Mukul Shukla, Head of the Department of
Mechanical Engineering, for providing us with the necessary facilities and resources within the
department.
Lastly, we would like to take this opportunity to acknowledge the many people who provided
suggestions, advice, and much encouragement, without which completion of this project
The agricultural sector stands at the forefront of addressing critical global challenges, such as
food security, climate change, and the sustainable management of limited natural resources.
Despite its pivotal role, traditional farming practices often exhibit inefficiencies in resource
utilization, particularly concerning essential inputs like water, soil, and crops. These
these pressing issues, the "Development of the IoT-Based Monitoring and Control System
for Smart Fields" presents an innovative and intelligent solution tailored to modern agricultural
needs.
precise control over crucial agricultural factors. At its core, the system employs an array of
sensors to measure key parameters at farming sites, including soil moisture, temperature,
humidity, and light intensity. These sensors are integrated into a wireless network, functioning in
conjunction with an Arduino Uno microcontroller, which serves as the system's efficient and
powerful processing unit. The ESP32 executes a program designed to collect data from the
The design philosophy prioritizes modularity and scalability, ensuring the system’s adaptability
to diverse farm sizes and complexities. The automated irrigation design exemplifies this
approach, employing components such as electric water pumps and solenoid valves to regulate
water distribution based on real-time sensor data. Acting as the system’s "brain," the Arduino
Uno can mimic human decision-making by activating water pumps when soil moisture levels
drop below a critical threshold and halting irrigation once optimal moisture levels are restored.
This intelligent automation minimizes water wastage and ensures efficient resource use.
Seamlessly integrating with even the most basic remote monitoring systems, the IoT framework
enables farmers to access real-time data about their fields from any smartphone or computer. The
intelligence derived from the framework is categorized into three domains: farmland assessment,
environmental monitoring, and crop health analysis. Each domain provides actionable insights
Field tests of this system revealed several noteworthy benefits. Water consumption was reduced
environmental monitoring and timely interventions, while the reliance on manual labour and
The project also emphasizes the scalability and sustainability of IoT solutions in agriculture. The
system's design allows for the addition of advanced sensors to monitor nutrients, detect pests, or
forecast weather conditions, further expanding its functionality. The incorporation of solar-
impact, rendering the system suitable for deployment in remote and resource-constrained
regions. These features highlight the potential of IoT technologies to transform agriculture into
Candidate's Declaration i
Acknowledgement ii
Abstract iii
List of Figures iv
List of Tables v
Chapter 1 Introduction 1
2.3 Objective
4.1 Observations
Chapter 5 Conclusions 38
References 39
List of Figures
Figure Page No.
Introduction
The rapid advancements in technology have paved the way for innovative solutions in
various industries, including agriculture. Traditional farming methods often struggle to meet
the increasing demands for food production, sustainable practices, and resource
The development of an IoT-based monitoring and control system for smart fields aims to
These systems facilitate real-time data collection on environmental parameters such as soil
moisture, temperature, humidity, and light intensity. By leveraging this data, farmers can
make informed decisions to optimize irrigation, fertilization, pest control, and overall crop
health.
This project not only enhances productivity but also minimizes resource wastage, reduces
agriculture marks a significant step toward addressing global challenges, such as food
security, water scarcity, and climate change, making smart fields a cornerstone of modern
agriculture.
Water is a global resource that will be increasingly scarce in the future. Already, agriculture
takes up nearly 70% of the freshwater resources in the world. Of that, two-thirds or more is
essentially wasted. Much of that water that is wasted by inefficient systems could be three-
dimensional: it could be in the right place at the right time, it could have the right amount,
and it could be in the right form. We know how to make better systems; we know better ways
to irrigate. This project aims to make those changes happen, which is why we have set that
goal.
Soil fertility is deteriorating. This is the result of over-fertilization and poor farming. But we
need soil fertility to grow food. What we can do is watch the soil and use it as an early
warning system to avoid any further decline in fertility. We also must balance nutrient
applications. Then there is the problem of feeding 10 billion people by 2050. That is our due
Technical Viability:
The swift progress in the Internet of Things, sensor technologies, and wireless
communication has given agriculture a unique chance to implement systems that are not only
cost-effective but also sturdy and smart. These systems can address the many ongoing
operational costs, which in turn helps preserve some semblance of profit margins for the
Literature Review
IoT technology in agriculture has gained significant attention within the last decade. Through
research and practice, this technology has been applied into various ways to address a
sustainability. This chapter reviews prior work in the field, focusing on precision farming
through IoT-based solutions, and identifies the gap that this project aims to address.
II. Suma (2017): Developed an IoT-based irrigation system using soil moisture
sensors and weather information to determine the optimal time of water supply.
III. Meena (2018) : Incorporated IoT sensors for temperature, humidity, and light with
possibility of IoT integration with machine learning for accurate crop monitoring
and management.
IV. Pandian (2019) : Demonstrated the application of IoT-based drones for crop health
assessment and pest detection. Dedicated to aerial scanning of large farms, thus it
visualize data collected from IoT devices in agricultural fields. Offered farmers
VI. Sharma and Gupta (2021) : Solved issues of power availability in rural farms by
designs for energy-efficient systems that maintain operations in rural and off grid
Some of the gaps are not being filled by the studies mentioned above; they are:
I. Limited Scalability of Solutions : While many IoT systems are effective in small-scale or
challenge. Adapting IoT solutions for varying farm sizes, terrains, and crop types is an area
II. Energy Constraints in Remote Areas: Research often overlooks the energy demands of IoT
systems in rural or remote areas where access to reliable power sources is limited. While
solar-powered IoT devices have been proposed, their efficiency in different environmental
III. High Costs of Implementation : The high initial investment required for IoT devices,
infrastructure, and maintenance can be prohibitive for smallholder farmers. Studies often fail
to address cost-effective solutions or financing models that could make IoT adoption more
accessible.
IV. Data Integration and Interoperability Issues : Many IoT systems lack seamless integration
across devices and platforms. The absence of standardized protocols for data sharing and
V. Lack of Farmer Training and Awareness: IoT solutions are only as effective as the users
operating them. Research seldom addresses the training needs of farmers or develops user-
VI. Multiple Sensor Integration Challenges: The integration of multiple sensors, such as soil
moisture, temperature, humidity, and light intensity sensors, into a single system poses
data collection, and processing large volumes of data in real-time remain underexplored
areas.
2.3 Objective
The main goal of the project is to develop an IoT-based system that integrates the
following functions:
• Real-Time Monitoring
• Automated Control
• Sustainability
Continuous real-time observation of important aspects of farming, like the moisture in the
soil, the temperature, and the amount of light, as well as automated controls for many of the
systems the farmers use, could lead to a much more efficient use of resources—like water—
used by the farmers. Decisions about how to farm would be much more data-driven, and any
inefficiencies would quickly become apparent. Know where the inefficiencies are and you
can fix them. The system aims to help fix those inefficiencies and make farming a much
more sustainable task with the long-term health of the farmers and their fields much more
likely.
Chapter 3
The project "Development of the IoT-Based Monitoring and Control System for Smart Fields"
focuses on automating the regulation of soil moisture and air humidity to ensure optimal
environmental conditions for crops. By leveraging real-time sensor data and microcontroller
technology, this system provides an efficient and reliable solution for smart agriculture. The
system integrates sensors, microcontrollers, solenoid valves, and relay modules to control
high power devices such as water pumps and fans. Additionally, a MERN-based website,
"Smart Agro," was developed to display real-time graphs and provide farmers with manual
The system is designed to collect real-time data from sensors, process it using an Arduino
hardware and software ensures efficient monitoring and control of field conditions.
3.2.1 Sensor Modules : The system utilizes three key sensors to monitor environmental
parameters :
• DHT11 Sensor: Measures air humidity and temperature with high accuracy, providing
• ASAIR AM2315C Sensor: Collects soil moisture data, ensuring precise irrigation
3.2.2 Control Components : The sensors transmit data to the Arduino microcontroller via SCL
and SDA connections. The microcontroller processes the data and compares it with predefined
threshold ranges. When conditions deviate from the optimal range, the Arduino sends digital
signals to a relay module. The relay module activates high-power devices like fans, pumps, and
solenoid valves to restore favourable conditions. The solenoid valves are specifically used to
The processed sensor data is displayed locally in real-time, showing parameters such as soil
moisture, air humidity, temperature, and light intensity. Additionally, the data is transmitted using
bidirectional data exchange between the ESP32, server, and client. All devices are connected in
a common "room," facilitating seamless two-way communication. This setup ensures that real-
time data is consistently shared across all endpoints, allowing for effective monitoring and
control.
3.4 Software Integration and Website Development
The project includes the development of a MERN-based web application named "Smart Agro".
This platform provides farmers with remote access to real-time data through interactive graphs.
It also offers manual controls to override automated operations, giving farmers greater flexibility
3.5.1 Hardware Assembly : The sensors, microcontroller, solenoid valves, and relay module
were connected using SCL and SDA connections for data transfer and signal processing. High-
power devices like fans and pumps were integrated through the relay module for automated
control.
I. Project Setup
• Flutter Setup
o Install Flutter SDK and set up an editor like VS Code or Android Studio.
firebase_core: ^3.9.0
cloud_firestore: ^5.6.0
firebase_auth: ^5.3.4
• Firebase Setup
access.
• ESP32 Setup
o Add the ESP32 board to Arduino IDE via the board manager.
o Install the required libraries : Firebase ESP32 Client Library, WiFi.h for
internet connection.
• Components
o ESP32
the pinout:
o Connect the data pins to the appropriate GPIO pins on Arduino Uno.
Library Code:
#include<FirebaseESP32.h>
#include <WiFi.h>
Code:
WiFi.begin(ssid, password);
• Authenticate Firebase:
Code:
FirebaseData firebaseData;
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
Code:
int soilMoistureValue = analogRead(soilMoisturePin);
Code:
soilMoistureValue);
temperature);
humidity);
• Authentication Module
Code:
await FirebaseAuth.instance.signInWithEmailAndPassword(
• Firestore Integration
Code:
class FirestoreService {
FirebaseFirestore.instance.collection('sensorData');
Stream<DocumentSnapshot> getSensorData() {
return sensorData.doc('yourDocumentId').snapshots();
Code:
StreamBuilder<DocumentSnapshot>(
stream: FirestoreService().getSensorData(),
if (!snapshot.hasData) return
CircularProgressIndicator();
return Column(
children: [
Text("Temperature: ${data['temperature']}°C"),
Text("Humidity: ${data['humidity']}%"),
],
);
},
);
• UI Design
V. Testing
• Hardware Testing:
• Application Testing:
VI. Deployment
• Add push notifications for alerts (e.g., low soil moisture levels).
3.5.4 Website Development : The Arduino microcontroller was programmed to handle sensor
data and control logic. The ESP32 microcontroller was configured to facilitate WebSocket
communication. The MERN based website was developed to provide an intuitive user interface
for farmers.
Figure 3.8 Flowchart of Software Structure
3.5. Field Deployment : The framework was deployed in a test agricultural field to validate its
performance under real world conditions. The automated irrigation and humidity control system
The implemented framework successfully automated the regulation of soil moisture and air
humidity within the defined optimal ranges. The inclusion of solenoid valves ensured targeted
irrigation, reducing water wastage. The MERN-based website provided real-time insights and
remote control capabilities, significantly enhancing the usability and efficiency of the solution.
The integration of WebSocket communication ensured seamless data exchange between all
components.
Figure 3.11 Circuit Diagram of our proposed system
ARDINO CODE:
#include <dht11.h>
#include <Wire.h>
#include <BH1750.h>
#include <AHT20.h>
#include <LiquidCrystal_I2C.h>
#define DHT11PIN 4
BH1750 lightMeter;
AHT20 aht20;
dht11 DHT11;
LiquidCrystal_I2C lcd(0x27,20,4);
void setup()
Serial.begin(9600);
Wire.begin();
lcd.init();
lcd.backlight();
lightMeter.begin();
pinMode(5,OUTPUT);
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
void loop()
Serial.println();
// lcd.clear();
Serial.println((float)DHT11.humidity, 2);
lcd.setCursor(0,0);
lcd.print("Air Humidity:");
lcd.print((float)DHT11.humidity, 2);
lcd.print(" %");
Serial.println((float)DHT11.temperature, 2);
lcd.setCursor(0,1);
lcd.print("Air Temp:");
lcd.print((float)DHT11.temperature, 2);
lcd.write(byte(223));
lcd.print("C");
Serial.print(lux);
Serial.println("lux");
lcd.setCursor(0,2);
lcd.print("Light Int.:");
lcd.print(lux);
lcd.print("lux");
if (aht20.available() == true)
Serial.print(temperature, 2);
Serial.print(" C\t");
Serial.print(humidity, 2);
Serial.print("% RH");
lcd.setCursor(0,3);
lcd.print("Soil Humidity:");
lcd.print(humidity, 2);
lcd.print("%");
if(humidity>80)
digitalWrite(5,LOW);
digitalWrite(6,LOW);
else
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
if((float)DHT11.humidity>70)
digitalWrite(7,LOW);
else
digitalWrite(7,HIGH);
Serial.println();
// lcd.clear();
delay(2000);
4.1 Observations
Sensor Performance Analysis : The system was tested in a controlled environment to evaluate
the performance of the sensors used temperature and humidity sensor (DHT11), soil moisture
sensor (ASAIR AM2315C), and light intensity sensor (BH1750). The readings were taken
continuously over a period of 24 hours and the graphs are updated every 15 min of time stamp,
with data sent to Firebase and visualized in real-time using the dashboard.
4.2.1 Graph Description: This graph illustrates the variation in Temperature (°C) over Time
(time stamp) for a 24-hour period. The data was recorded at regular intervals using the DHT11
sensor.
• Consistent Cyclic Pattern: This cyclic pattern reflects the natural temperature
the effects of high ambient temperatures on crops. This mechanism ensures a stable
• Fan Activation: The fans are integrated into the IoT-based monitoring system,
35°C), the fans are automatically activated to circulate air and reduce heat.
and includes an option to integrate solar panels for sustainable energy usage.
within the affected zone, maintaining an optimal range of 25–30°C for most
crops.
• Energy Efficiency: The automated nature of the system ensures fans operate
systems.
increase the yield of heat-sensitive crops like leafy greens and tomatoes.
4.2.6 Discussion
has proven to be a reliable and scalable solution for managing high temperatures. By
leveraging IoT automation and efficient energy utilization, the system ensures a
This graph depicts the variation in Humidity (%RH) over Time (timestamp) for a
24-hour period. The data was recorded using the DHT11 sensor at 15-minute intervals.
• X-axis: Time Stamp (updated every 15 minutes)
• Daytime Drop: Humidity values drop steadily during the day, reaching a low of
sensor's reliability.
• Crop Water Retention: High humidity levels at night reduce plant water loss,
• Optimal Growth Conditions: The data ensures humidity stays within the ideal
4.3.6 Discussion
The integration of humidity monitoring into the smart agriculture system ensures the
health and productivity while minimizing resource wastage. The system’s ability to
agriculture.
4.3.7 Graph and Observation
• Nighttime Trend: Humidity starts at 70% RH, increases to 75% RH during the
night.
• Insights:
humidity.
This structured approach ensures both clarity and usability for analysing humidity
This graph illustrates the variation in Soil Moisture (%) over Time (timestamp) for
a 24-hour period. The data was recorded using the ASAIR AM2315C sensor at
intervals of 15 minutes.
45% to 65% when irrigation is active, ensuring the crops receive adequate
hydration.
decreases sharply, reaching as low as 30%, indicating the need for automated
interventions.
irrigation when soil moisture drops below the critical threshold of 30%,
• Efficient Water Usage: Automated irrigation ensures water is supplied only when
The IoT-based system ensures precise soil moisture monitoring and irrigation control.
• Automation Control: When soil moisture falls below the threshold (e.g., 30%),
the system automatically activates irrigation using water pumps. Once the desired
soil moisture level (e.g., 60%) is reached, the system stops irrigation to conserve
water.
underwatering, ensuring soil moisture levels are suitable for crop health.
4.4.6 Discussion
The integration of soil moisture monitoring and automated irrigation into the smart
agriculture system has significantly enhanced resource efficiency and crop health. The
system’s ability to maintain soil moisture within optimal levels reduces manual labour,
irrigation cycles.
irrigation system.
• Insights:
This graph depicts the variation in Light Intensity (lux) over Time (timestamp) for
a 24-hour period. The data was recorded using the GY-302 BH1750 sensor, which
• Initial Reading: The light intensity at the beginning of the observation period
• Peak Intensity: Light levels increased steadily, peaking at 570 lux during
were observed throughout the day due to intermittent cloud cover and shading,
• Identifying Pest Risks: Low-light conditions in the early morning or evening can
• Resource Allocation: Helps optimize the placement of crops in areas with the
light levels, with data processed in real time by the Arduino Uno microcontroller.
• Pest Control: Tracking low-light periods helps identify times and conditions
conditions.
4.5.5 Discussion
The integration of light intensity monitoring into the smart agriculture system provides
valuable insights for crop management and pest control. By ensuring optimal light
levels for photosynthesis, the system contributes to increased crop productivity and
• Initial Reading: Light intensity starts at 420 lux in the early morning.
• Peak Intensity: Peaks at 570 lux during midday, reflecting maximum sunlight
exposure.
• Insights:
This systematic analysis highlights the critical role of light intensity monitoring in
The data presented here has been obtained from a reliable government website and
The following data, sourced from a reliable government resource, outlines the types of soil and
the crops most suitable for cultivation in each type. This information is critical for determining
drought conditions.
• Crop Yield: Improved environmental monitoring resulted in a 15% increase in crop yield.
• Resource Optimization: Significant savings in labour and energy costs were observed
due to automation.
timely interventions.
Chapter 5
Conclusion
The IoT-Based Monitoring and Control System for Smart Fields exemplifies how IoT
IoT technologies, the system not only scales up to meet the demands of modern farming but
also scales down to enable real-time monitoring, automation, and smart decision-making at the
level of individual farms. This project highlights the potential of IoT as a virtual assistant for
precision agriculture and autonomous vehicles. Furthermore, the inclusion of Big Data aspects
enhances its capability to optimize resource usage and improve productivity. As technology
continues to evolve, the IoT-based approach serves as a robust foundation for future
[2] S. Pattnaik, S. Banerjee, S.R. Laha, B.K. Pattanayak & G.P. Sahu, “ A Novel
Intelligent Street Light Control System Using IoT. In Intelligent and Cloud
[3] S.R. Laha, M. Parhi, S. Pattnaik, B.K. Pattanayak, & S. Patnaik, “ Issues,
[4] A.K. Biswal, D. Singh, B.K. Pattanayak, D. Samanta, & M.H. Yang, “ IoT-based
smart alert system for drowsy driver detection”, Wireless communications and mobile
[5] A. Pati, M. Parhi, B.K. Pattanayak, D. Singh, D. Samanta, A. Banerjee, & G.K.
[6] M.R. Hosenkhan, & B.K. Pattanayak, “Security issues in internet of things (IoT):