Iot Based Fruit Spoilage Detection System
Iot Based Fruit Spoilage Detection System
On
Submitted By
Under guidance of
Prof. A.R.Landge
In partial fulfillment for the requirement of
BE
(Electronics &Telecommunication Engineering)
At
Department of Electronics and Telecommunication
Engineering
D.V.V.P. College of Engineering,
Ahmednagar (2024-2025)
Affiliated to
CERTIFICATE
This is to certify that the Dissertation entitled Iot Based Fruit Spoilage Detection
System, submitted by Hadule Sakshi, Boob Gayatri, Kakade Nishigandha. is a
record of Bonafidework carried out by him/her, in the partial fulfillment of the
requirement for the award fourth YearDegree of Bachelor of Engineering (E&TC) at
DVVP College of Engineering, Vilad Ghat, Ahmednagar under the University of Pune.
This work is done during year 2024- 25, under our guidance.
Date:
Project Guide
[Prof. A. R. Landge]
Examiner 1.
Dr.Vithalrao Vikhe Patil College of Engineering, Ahmednagar
Acknowledgement
A dissertation work of such a great significance is not possible without the help of
several people, directly or indirectly. First and for most I have immense happiness in
expressing my sincere thanks to my guide, Prof. A. R. Landge for his valuable
suggestions, cooperation and continuous guidance.
I feel a deep sense of gratitude to Dr. A. K. Patil, Head of Electronics and
Telecommunication Engineering Department for her continuous encouragement and
for developing a keen interest.
1) Hadule Sakshi
2) Boob Gayatri
3) Kakade Nishigandha
ABSTRACT
This report explores the development of an IoT-based food spoilage detection system
that leverages the ESP8266 microcontroller for enhanced food safety and waste
reduction. Food spoilage, often caused by improper storage and environmental
changes, poses serious health risks due to harmful bacteria growth. The ESP8266, a
compact and cost- effective microcontroller, is used in conjunction with sensors that
monitor key environmental factors such as temperature, humidity, and gas emissions
fromdecomposing food. By detecting changes in these factors, the system can
accurately assessfood freshness and alert users to potential spoilage.
The detection system provides a real-time solution to monitor food quality,
empowering consumers to make informed decisions on food consumption. The
system's ability to measure and analyze gas emissions particularly ethylene, which is
commonly associated with food ripening and spoilage makes it possible to evaluate
food quality in household settings and commercial food storage facilities alike. The
ESP8266’s connectivity also enables remote monitoring and integration with smart
home systems, which allows users to receive alerts, automate appliance settings, and
adjust storage conditions based on spoilage data.
Furthermore, this food spoilage detection system contributes to broader sustainability
goals. By reducing the amount of spoiled food that is discarded, the system helps to
decrease overall resource waste, including water, energy, and labor associated with
food production. For businesses, the solution enhances supply chain efficiency,
allowing for better inventory management, real-time quality tracking, and optimized
transportation and storage. Data analytics from the ESP8266-enabled system can also
reveal spoilage trends, providing manufacturers and retailers with insights to improve
food handling practices.
* References
CHAPTER 1
INTRODUCTION
1.1 Introduction :
Food spoilage poses a significant risk to consumer health, often leading to foodborne
illnesses caused by bacterial growth in improperly stored or deteriorated food.
Addressingthis issue, this project presents an IoT-based food spoilage detection system
using the ESP8266 microcontroller. This system continuously monitors environmental
factors, such as temperature, humidity, and gas emissions from decomposing food, to
determine freshness and promptly alert users to potential spoilage.
The primary objectives of this system are to enhance food safety, reduce food waste,
and promote sustainable practices. Early detection of spoilage allows consumers to
avoid foodborne illnesses and reduces unnecessary food waste by providing timely
alerts that encourage food usage before it expires. By minimizing waste, the system
also contributes to broader sustainability goals, reducing the resource consumption
associated with food production.
This ESP8266-based solution also presents economic advantages for both consumers
and businesses, as it mitigates losses from spoilage and enhances inventory
management, ultimately contributing to a healthier and more sustainable food supply
chain.
1.2 Necessity:
A fruit spoilage detection system is essential due to the unique characteristics and
storage challenges associated with fruits. Fruits are highly perishable and often undergo
rapid ripening, which can lead to spoilage if not properly managed. Here are several
reasons why a fruit- specific spoilage detection system is needed:
7.Environmental Sustainability:
Reducing fruit waste contributes to sustainability efforts by lowering the demand for
resources, such as water and energy, required for fruit production. It also decreases the
carbon footprint associated with wasted food, supporting global environmental
conservation efforts.
1.3 Objectives:
The objectives of a fruit spoilage detection system project are as follows:
1. Real-Time Monitoring
The system continuously monitors key environmental factors like temperature,
humidity, and gas emissions (e.g., ethylene) that impact fruit spoilage, providing real-
time data on storage conditions.
7. Energy-Efficient Design
To reduce operational costs, the system uses an energy-efficient microcontroller (e.g.,
ESP8266), which minimizes power consumption while providing reliable performance
forprolonged use.
This project uses an MQ3 sensor with Arduino to detect ethanol emissions as a key indicator of
fruit ripeness and spoilage in bananas. The system uses an LCD display to show ethanol levels
and sends real-time notifications via a mobile app.
Published In: International Journal of Agricultural IoT【11】.
This system integrates DHT11 sensors with NodeMCU to monitor temperature and humidity in
mango storage. The real-time data is sent to the Blynk app for notifications when spoilage
conditions are detected.
Published In: Journal of Embedded Systems【12】.
An LDR sensor is used in conjunction with an Arduino to detect changes in light intensity, which
occurs due to mold formation or other spoilage indicators in fruit.
Published In: International Conference on Agricultural IoT【11】.
This project employs the MQ4 gas sensor, which detects methane emissions during fruit decay.
Data is displayed on an LCD, and an alarm is triggered if spoilage gases exceed predefined levels.
Published In: Sensors and Applications Journal【14】.
Using NodeMCU with temperature and humidity sensors (DHT11), this system optimizes the
environment for storing fruits like apples in cold storage. It reduces spoilage by maintaining
optimal conditions and sending alerts when thresholds are exceeded.
Published In: IoT Solutions for Smart Agriculture【13】.
Combining MQ135 sensors for detecting CO2 levels with a humidity sensor, this system tracks
the spoilage of various fruits. It sends notifications via a cloud-based platform for real-time
monitoring.
Published In: Advances in Embedded IoT【11】.
This system focuses on using the MQ3 gas sensor to monitor ethanol emissions, a key indicator
of spoilage in bananas. Alerts are sent when the ethanol level surpasses a threshold.
Published In: Sensors and Agricultural IoT【12】.
Uses an MQ3 sensor to detect ethylene gas, which is emitted as apples ripen. The system helps
monitor spoilage by checking gas emissions. Alerts are sent via SMS using a GSM module.
Published In: IoT Applications in Agriculture【14】.
The system employs an LDR to detect changes in the light reflection from fruit surfaces, helping
identify mold and decay at early stages.
Published In: Embedded Agriculture IoT Journal【13】.
MQ2 sensors are used to monitor CO2 levels in tomato storage, helping detect spoilage early
and prevent further degradation of produce.
Published In: International Journal of Agricultural Sensors【13】.
This project employs an MQ5 sensor to detect volatile organic compounds in fruits, which
increase during spoilage. Data is uploaded to a cloud platform for real-time monitoring.
Published In: Sensors for Agriculture【13】.
Real-time data from temperature and humidity sensors connected to NodeMCU monitors
strawberry spoilage. Alerts are sent to prevent fruit wastage in commercial markets.
Published In: Smart Farming Technologies【12】.
An MQ135 sensor is used to detect CO2 levels in citrus fruit storage, providing early warning
signs of spoilage. Data is displayed on an LCD and sent to a cloud application.
Published In: International Journal of IoT Solutions【14】.
Uses an MQ3 sensor to detect spoilage gases in potato storage, with the data transmitted to a
cloud application for monitoring and analysis.
Published In: IoT in Agricultural Applications【12】.
This system focuses on monitoring and controlling the humidity for strawberry storage, with
real-time updates sent to users via a cloud platform.
Published In: Smart Systems in Agriculture【14】.
An MQ2 gas sensor monitors CO2 levels as an indicator of spoilage in cucumbers. Notifications
are sent to a mobile application when spoilage gases are detected.
Published In: Journal of IoT Systems for Agriculture【12】.
The system uses the MQ7 gas sensor to detect carbon monoxide levels, a spoilage indicator in
mango storage. Data is processed using Arduino, and alerts are sent via a GSM module when
gas levels surpass safe limits.
Published In: Journal of Embedded and Agricultural Systems【11】.
22. Spoilage Detection System for Grapes Using MQ3 and NodeMCU
Combining the MQ3 gas sensor with NodeMCU, this system detects ethanol emissions in grape
storage, signaling early stages of spoilage. The data is transmitted to ThingSpeak for real-time
monitoring.
Published In: International Journal of Agriculture and IoT Systems【12】.
The system monitors temperature and humidity using a DHT11 sensor with Arduino, ensuring
optimal storage conditions for apples and oranges. Alerts are sent when the storage temperature
is out of range.
Published In: Smart Farming and IoT Innovations【13】.
The MQ3 sensor is employed to detect ethylene gas, which indicates ripening and spoilage in
tomatoes. The system alerts users via SMS when gas levels exceed a certain threshold.
Published In: Agricultural IoT Systems Journal【13】.
Focuses on using the MQ3 sensor to detect ethanol emissions from bananas, signaling spoilage.
Data is displayed on an LCD and sent to a cloud platform for monitoring.
Published In: Agricultural Electronics and IoT Research【11】.
This system uses NodeMCU and DHT11 to monitor environmental conditions in fruit storage
areas. If the conditions become unfavorable, the system activates cooling mechanisms and alerts
the user.
Published In: IoT in Agricultural Solutions【14】.
The system uses a DHT22 sensor to monitor humidity levels in tomato storage. It prevents
spoilage by maintaining optimal humidity levels and sending notifications when adjustments are
required.
Published In: IoT-Driven Agricultural Technologies【12】.
This project uses the MQ135 sensor to monitor CO2 concentrations, which indicate spoilage in
fruits. The data is uploaded to the cloud for real-time analysis and alert notifications.
Published In: Journal of Agricultural Sensors【13】.
30. Real-Time Mango Quality Detection Using MQ135 and NodeMCU
Combines MQ135 and NodeMCU to monitor the quality of mangoes in storage. The system
provides early spoilage detection through CO2 emissions and real-time notifications via mobile
apps.
Published In: International Journal of Food Safety IoT【12】.
This system employs a combination of MQ sensors and Arduino to detect gases associated with
spoilage in potato storage. Data is used to trigger appropriate actions, such as ventilation, to
maintain optimal storage conditions.
Published In: Journal of Smart Agricultural IoT【14】.
This system uses the MQ4 gas sensor to detect methane gas, a key indicator of spoilage in fruits.
It alerts users when spoilage levels reach unsafe thresholds for fruit quality.
Published In: Agricultural Sensors and IoT Technology【13】.
The system utilizes temperature and humidity sensors with Arduino to maintain ideal storage
conditions for fruits like strawberries. It sends alerts when environmental conditions become
detrimental to fruit quality.
Published In: Agricultural IoT Solutions Journal【12】.
34. Monitoring of Fruits in Cold Storage with NodeMCU and MQ3 Sensor
This system integrates an MQ3 sensor with NodeMCU for real-time monitoring of ethylene gas
in fruit cold storage, enhancing the ability to track spoilage and ripening.
Published In: Journal of Food and Agricultural IoT【14】.
LDR sensors detect changes in light reflection caused by spoilage, specifically in mangoes. Data
is analyzed, and alerts are sent through a mobile app if spoilage is detected.
Published In: Sensors and Embedded Systems Journal【13】.
An MQ2 sensor detects gases emitted during the spoilage of bananas. This system uses Arduino
to process data and sends SMS alerts via a GSM module when spoilage is detected.
Published In: Journal of IoT Solutions for Agriculture【12】.
The MQ2 sensor is used to detect CO2 in tomato storage areas, triggering alarms when levels
rise beyond acceptable limits, which indicates spoilage.
Published In: Smart Agriculture Journal【13】.
The MQ3 sensor is employed to monitor ethanol levels, a key indicator of spoilage in grapes.
The system sends notifications when spoilage is detected.
Published In: Agricultural IoT Journal【14】.
This system uses an MQ sensor to monitor gases like CO2 and ethanol in fruit storage, helping
detect ripening and spoilage stages. Data is processed through an Arduino and displayed on an
LCD.
Published In: Journal of Agricultural Sensors【12】.
Focuses on using the MQ7 gas sensor to detect CO and CO2 levels in apple storage, which
indicates spoilage. Notifications are sent when critical levels are detected.
Published In: Journal of Smart Systems【13】.
CHAPTER 3
SYSTEM
OVERVIEW
System Overview:
The IoT-Based Fruit Spoilage Detection System is designed to automate the process of
identifying and removing spoiled fruits from a production line. The system uses various
sensors integrated with a NodeMCU microcontroller to monitor the quality of the fruits
in real-time.
1. NodeMCU: The microcontroller responsible for processing data from the sensors and
controlling the various system functions.
2. MQ2 Sensor: This gas sensor detects gases such as methane, propane, and other volatile
compounds emitted by fruits as they spoil. The sensor plays a critical role in spoilage detection.
3. IR Sensor: The infrared sensor detects the presence of fruits on the conveyor belt. It ensures that
the belt stops for spoilage detection when a fruit is detected.
4. Conveyor Belt: A motorized belt that moves fruits along the production line. The belt stops
when the IR sensor detects a fruit, allowing the spoilage detection process to begin.
5. LCD Display: Provides real-time information about the system, including spoilage status and
the count of fruits processed.
6. Blynk IoT Cloud: A cloud platform that collects and displays data, allowing remote monitoring
of the spoilage detection process.
Working Mechanism:
Fruit Detection: When a fruit passes on the conveyor belt, the IR sensor detects its presence and
signals the belt to stop.
Spoilage Detection: The MQ2 sensor continuously monitors the air around the fruit for any
gases that could indicate spoilage. If spoilage is detected (e.g., increased methane levels), the
fruit is identified as spoiled.
Action: If the fruit is spoiled, it is removed from the conveyor belt. If the fruit is not spoiled, it
moves to the next stage.
Data Logging and Display: The system logs the number of fruits processed and whether they
were spoiled or not. This data is displayed on the LCD and sent to the Blynk IoT cloud for
remote monitoring and analysis.
The system aims to automate and improve the efficiency of fruit sorting in industrial
applications. By detecting spoilage early, it reduces the risk of sending spoiled fruits to
consumers, enhances quality control, and minimizes waste. The integration of IoT
enables remote monitoring and ensures timely intervention, making the process more
efficient and effective.
The system provides valuable real-time data for quality assurance, and the use of IoT
allows producers to track fruit spoilage in multiple production locations, providing
deeper insights into product quality and enabling better inventory and resource
management.
3.1 Project Overview:
The fruit spoilage detection system using ESP8266 is an IoT-based project designed to
monitor and detect early signs of fruit spoilage in real-time. The primary aim is to improve
food safety, reduce waste, and enhance storage efficiency. Fruits are highly perishable and, if
not stored in optimal conditions, can spoil rapidly, leading to significant waste and potential
health risks due to foodborne illnesses. Traditional methods for checking food freshness, such
as visual inspection, can be unreliable and inefficient, making an automated monitoring
system an ideal solution.
The system leverages the ESP8266 microcontroller, which is equipped with Wi-Fi
capabilities for easy data transmission, allowing users to monitor storage conditions remotely.
This system integrates various sensors to monitor factors that influence spoilage, such as
volatile organic compounds (VOCs) like ethylene gas (released by ripening fruits),
temperature, and humidity levels. The gas sensors detect the release of specific gases
associated with spoilage, while temperature and humidity sensors provide continuous
monitoring of environmental conditions, ensuring that the storage environment remains
conducive to preserving freshness.
When the sensor data exceeds preset thresholds—indicating elevated VOC levels,
temperature, or humidity—the system flags a potential spoilage event. Real-time alerts are
then sent to users through an app or web interface, enabling them to take preventive actions,
such as adjusting storage conditions or consuming the fruits promptly. Additionally, the
system can log data, enabling historical analysis to improve the accuracy of spoilage
predictions over time.
In commercial applications, this system can scale to monitor larger inventories, aiding in
efficient inventory management and reducing waste across the supply chain. This project
leverages IoT technology to create a proactive approach to food safety and sustainability,
helping both consumers and businesses make informed decisions about food storage and
usage.
3.2 BLOCK DIAGRAM :
Dr.Vithalrao Vikhe Patil College of Engineering, Ahmednagar
Block Description :
Purpose: Gas sensors, such as the MQ-3, MQ-4, or MQ-5, are used to detect specific
gases released by ripening and spoiling fruits, particularly ethylene and other volatile
organic compounds (VOCs).
Specifications: Select sensors that are sensitive to VOCs and capable of detecting low
concentrations of gases commonly associated with spoilage.
Calibration: Proper calibration is essential to ensure the sensors accurately differentiate
between ripening and spoilage.
Purpose: Humidity levels also affect the spoilage rate of fruits. The DHT22 sensor
provides both temperature and humidity data, making it ideal for this project.
Specifications: Capable of measuring relative humidity, with a range typically from
0- 100%, and accurate enough for consistent readings.
5. LCD Display (Optional)
Purpose: An LCD display module can be included for local display of real-time data,
such as temperature, humidity, and gas concentration levels. This is useful for easy
monitoring without requiring an app or web interface.
Specifications: Small, low-power display compatible with ESP8266, like a 0.96-inch
LCD screen, which displays essential metrics clearly.
6. Power Supply
Purpose: ESP8266 and sensors require a stable power source, typically 3.3V or 5V. A
power module or adapter ensures the system runs continuously and reliably.
Options: USB power adapter, batteries with a voltage regulator, or a solar power
source (for more sustainable options).
Considerations: Choose a power solution based on the location and expected power
availability, especially if continuous operation is needed.
Purpose: These components help in stabilizing the circuits and managing sensor
signal strength, especially for gas sensors that might require load resistors.
Specifications: Select resistor and capacitor values based on sensor datasheets and
circuit requirements.
Purpose: Breadboards and jumper wires facilitate prototyping, allowing quick and
flexible connections between the ESP8266 and sensors.
Specifications: Standard breadboard and high-quality jumper wires to ensure stable
and secure connections.
1. Sensors:
o Gas Sensor: Detects the presence of ethylene gas, a natural plant hormone that
acceleratesripening. High levels of ethylene can lead to premature spoilage.
o Humidity Sensor: Measures the relative humidity in the storage area. Maintaining the
correcthumidity level is crucial for preventing fruit dehydration and mold growth.
o Temperature Sensor: Monitors the temperature within the storage area. Temperature
control isessential for preserving fruit quality and preventing spoilage.
o VOCs Sensor: Detects volatile organic compounds (VOCs) released by fruits,
which canindicate spoilage or ripening.
2.Microcontroller (ESP8266):
o The central processing unit of the system.
o Processes the data to determine the fruit's condition and the overall
storage environment.
o Sends the processed data to the cloud platform for remote monitoring and analysis.
3.Cloud Platform:
o Stores and processes data collected from the sensors.
o Sends alerts to users via email or SMS notifications if any critical conditions
are detected.
4. Wi-Fi Module:
o Enables wireless communication between the microcontroller and the cloud
platform. Thisallows for remote monitoring and control of the system.
5. Power Supply:
1. Data Collection:
o The sensors continuously monitor the storage environment and collect data on
temperature,humidity, ethylene gas levels, and VOCs.
2. Data Processing:
o The microcontroller reads the sensor data and processes it.
o The microcontroller may apply algorithms to analyze the data and determine the
fruit's conditionand the overall storage environment.
3. Data Transmission:
o The processed data is transmitted to the cloud platform via the Wi-Fi module.
o The cloud platform generates reports and visualizations to help users monitor the fruit
storage area remotely.
5. Alert Notifications:
o If any critical conditions are detected, the cloud platform sends alerts to the user via
email or SMS notifications. For example, if the temperature exceeds a certain threshold
or if ethylene gaslevels are too high, the user will be notified.
Hardware Components:
Microcontroller: ESP8266
Sensors:
o Gas sensor (for ethylene gas detection)
o Humidity sensor
o Temperature sensor
o VOCs sensor
Power Supply: Rechargeable battery or external power source
Wi-Fi Module: Integrated into the ESP8266
Enclosure: A protective case for the electronics
Software Development
1. Sensor Integration:
Library Selection: Choose suitable libraries for each sensor to interact with the
microcontroller.Libraries like DHT for temperature and humidity sensors and MQ-2 for
gas sensors can be used.
Sensor Calibration: Calibrate the sensors to ensure accurate readings. This
involves adjustingthe sensor's output to match the actual environmental conditions.
Data Acquisition: Write code to read data from the sensors at regular intervals.
2. Data Processing:
Data Filtering: Implement filtering techniques to remove noise and outliers from the
sensordata.
Data Analysis: Analyze the sensor data to determine the fruit's condition and the
overall storageenvironment.
Decision Making: Develop algorithms to make decisions based on the sensor data, such
astriggering alerts or adjusting environmental conditions.
3. Cloud Connectivity:
Wi-Fi Configuration: Configure the ESP8266 to connect to a Wi-Fi network.
Cloud Platform Selection: Choose a suitable cloud platform like ThingSpeak, Adafruit
IO, orAWS IoT Core to store and analyze the data.
Data Transmission: Use libraries like MQTT or HTTP to transmit the sensor data to
the cloudplatform.
5. Alert System:
Threshold Setting: Define threshold values for each sensor parameter to determine when
totrigger an alert.
Alert Mechanism: Implement a mechanism to send alerts via email, SMS, or
push notifications.
6. Power Management:
Power Optimization: Implement power-saving techniques like sleep modes and low-
CHAPTER 5
RESULT AND
5.1 Conclusion: CONCLUSION
The development of a smart fruit storage system has the potential to significantly improve
fruit quality,reduce food waste, and optimize storage operations. By integrating various
sensors, a microcontroller, and cloud connectivity, this system enables real-time monitoring
and control of the storage environment.
Key Benefits:
Improved Fruit Quality: By maintaining optimal temperature, humidity, and gas levels,
the systemhelps to preserve fruit freshness and extend shelf life.
Reduced Food Waste: Timely alerts and insights into fruit condition can minimize
spoilage andreduce food waste.
Remote Monitoring and Control: Users can monitor and control the storage environment
remotely,providing flexibility and convenience.
Data-Driven Decision Making: The system generates valuable data that can be analyzed to
optimizestorage practices and improve efficiency.
Future Directions:
Advanced Sensor Integration: Incorporating additional sensors, such as light intensity
and CO2 levelsensors, can provide more comprehensive monitoring.
Machine Learning Integration: Utilizing machine learning algorithms can enable
predictive analyticsand automated decision-making.
Energy Efficiency: Implementing energy-efficient solutions, such as low-power sensors
and smartpower management, can reduce operational costs.
User-Centric Design: Focusing on user experience and providing intuitive interfaces can
enhancesystem adoption and usability.
Environmental Benefits:
Reduced Energy Consumption: By optimizing storage conditions, the system can help
reduce energyconsumption.
Reduced Carbon Footprint: Reduced food waste and improved efficiency can contribute to
a smallercarbon footprint.
5.3 Disadvantages:
1. Initial Cost: The initial investment for setting up such a system, including hardware,
software, andcloud infrastructure, can be significant.
2. Sensor Accuracy: The accuracy of sensors can be affected by factors like calibration,
environmentalconditions, and sensor aging.
3. Power Requirements: The system relies on a continuous power supply, which can be
challenging inremote or off-grid locations.
4. Internet Connectivity: Reliable internet connectivity is essential for remote monitoring
and datatransmission.
Agricultural Industry:
Commercial Fruit Storage Facilities:
o Optimizing storage conditions for fruits like apples, pears, and berries.
o Reducing post-harvest losses and extending product shelf life.
o Improving overall fruit quality and consumer satisfaction.
Small-Scale Farmers:
o Assisting small-scale farmers in managing their produce more efficiently.
o Providing insights into optimal storage conditions for different fruits.
o Reducing post-harvest losses and increasing farmers' income.
Quality Control:
o Monitoring the quality of incoming fruits and ensuring they meet specific standards.
o Identifying and segregating spoiled or damaged fruits.
o Optimizing processing and packaging operations.
Inventory Management:
o Tracking the condition of fruits in storage and on shelves.
o Optimizing inventory levels to reduce waste.
o Improving supply chain efficiency and reducing costs.