Abstract: - Food waste from early or undetected spoiling is
still a major worldwide issue that has a big impact on environmental
sustainability, economic efficiency, and public health. Static expiry labels frequently result in the
needless disposal of food or the consumption of contaminated food because they
do not take dynamic storage conditions into account. We present an intelligent, real-time food
expiry monitoring system that combines edge-compatible machine learning with
inexpensive IoT sensing to overcome this constraint. The prototype captures spoilage indicators
from common perishables like dairy and poultry by integrating temperature,
relative humidity, and gas-sensitive modules that target ammonia and hydrogen sulphide. In
controlled trials, a lightweight supervised model that was trained on
time-series sensor data correlated with microbial growth benchmarks predicts
remaining shelf life with 93.8% accuracy. In controlled trials, a lightweight supervised model that was trained on
time-series sensor data correlated with microbial growth benchmarks predicts
remaining shelf life with 93.8% accuracy.
Our approach ensures user privacy, low latency, and offline
functionality by performing inference locally on an ESP32 microcontroller, in
contrast to cloud-dependent architectures.
The system allows for proactive household or small-scale commercial
management of food freshness by communicating alerts through a lightweight
mobile interface. This study shows that
condition-based expiry estimation, as opposed to calendar-based labelling, can
greatly reduce preventable waste while improving consumer safety—providing a
scalable, reasonably priced, and comprehensible substitute for current methods.
Key Word: IoT sensing,
machine learning, real-time monitoring, temperature-humidity tracking, volatile
gas analysis, edge intelligence, smart refrigeration, spoilage prediction, food
expiry detection, and improved food safety.
I. INTRODUCTION
An estimated 1.3 billion tons of food—nearly one-third of
all food produced for human consumption—are lost or thrown away annually
worldwide. Reliance on set expiration
dates that disregard current storage conditions accounts for a large amount of
this waste. These printed labels frequently misrepresent actual shelf life
under variable household or logistical settings because they are derived from idealized
laboratory environments. [1]
As a result,
consumers either throw away edible food too soon or, riskier, eat things that
have already deteriorated beyond acceptable bounds. Conventional techniques for
evaluating spoilage, like visual inspection, odour assessment, or pH testing,
are subjective, time-consuming, and inappropriate for ongoing observation. On the other hand, new digital methods have
the potential to replace calendar-based freshness estimation with
condition-based freshness estimation. [2] In order to monitor microbial
or chemical signs of deterioration, recent research has investigated sensor
networks, electronic noses, and machine learning models.
Nevertheless, many of these systems are still limited to
lab prototypes, need cloud connectivity, or are not specific enough for
everyday perishables like milk, poultry, or leafy greens in home settings. In
order to close these gaps, this paper presents a useful, edge-deployed food
expiry detection framework that uses ambient environmental data to dynamically
predict remaining shelf life. [3] Our
system prioritizes time-to-expiry regression—a more useful metric for end users
in contrast to earlier research that concentrated on spoilage
classification. The solution provides
real-time, comprehensible alerts without relying on the internet by combining
inexpensive gas, temperature, and humidity sensors with a lightweight
predictive model trained on microbial growth benchmarks. The architecture is feasible for both home
and small-retail adoption because it places a high priority on affordability,
privacy, and ease of integration into current refrigeration units.[5]
Over the past ten years, efforts to digitize food freshness
monitoring have changed dramatically,
moving from manual inspection to embedded sensing and data-driven analytics.
Early digital systems used alerts based on temperature changes. These were
helpful in cold-chain logistics but didn't work well for predicting biochemical
spoilage in everyday home settings. More recent works have integrated gas
sensing to capture metabolic byproducts of microbial decay.[1]
As such, Nastiti et al. (2022) monitored
ammonia and hydrogen sulfide emitted by chicken stored at ambient conditions,
demonstrating that these gases rise predictably as spoilage progresses. The
approach allowed the authors to classify freshness stages but did not translate
sensor trends into a time-to-expiry estimate; these limits practical utility
for consumers. In the same way, Damdam et al. (2023) used an IoT-linked
electronic nose to monitor volatile organic compounds from beef and attained
high accuracy in classifying spoilage. However, their system operated as a
binary detector, fresh/spoiled, and did not provide detail about when spoilage
would occur. [2]
Some parallel
efforts have targeted storage environment monitoring: Ck et al. (2020)
developed a refrigerator-integrated alert system on temperature and humidity
sensors, warning the user of deviations from safe ranges. While useful, this
approach assumes that the spoilage kinetics are dominated by ambient parameters
alone and ignores food-specific degradation kinetics altogether.
Gillespie et al.
(2023) further extended the concept to transport logistics by anomaly detection
in cold-chain IoT logs, flagging temperature excursions. Although valuable in
supply-chain compliance, such rule-based systems cannot adapt to individual
food types or usage patterns. To work around such limitations, the researchers
have turned to machine learning models trained on multi-modal sensor data.
Sahu et
al., 2020, exemplified a Raspberry Pi-based framework that combined features
from temperature, humidity, and images to estimate the quality of food items in
a non-invasive way. [4] While promising, their system relied on cloud
connectivity for model updates, which raises several concerns about reliability
in general and low-connectivity households. Singha et al. (2022) proposed
IntelliStore, using AI to predict storage-related spoilage in perishables.
However, their focus remains on commercial warehouses rather than retrofit
solutions for everyday kitchens.[5]
III. WORKING PRINCIPLE
The operating principle of the IoT-based food
spoilage detector relies on the detection of volatile gases, specifically
methane (CH₄), produced by the natural decomposition of perishable food
items, such as fruits and vegetables. [2] With increased microbial activity
during spoilage, the anaerobic metabolic processes produce measurable
concentrations of methane and other volatile organic compounds. A
methane-sensitive gas sensor, typically the MQ-4, is used to monitor the
surrounding atmosphere in enclosed storage spaces such as refrigerators. This
act based on the resistive change in its sensing layer from tin dioxide
(SnO₂) due to the exposure to methane, thus converting gas concentration
into a proportional analog voltage signal.[3]

Figure:
1. Circuit diagram of the food expiry detector using IOT
The resultant
signal is then fed into a microcontroller, which is often an Arduino Uno, for
preprocessing according to a pre-defined threshold-based algorithm previously
calibrated with known spoilage conditions. Upon exceeding the set threshold by
the sensor, the system triggers localized alerts through visual means (e.g., a
red LED), auditory means such as a buzzer, and textual means of an LCD display
showing "SPOILED" or real-time gas levels.[4]At this time, sensor
data may also be streamed to the Arduino Serial Monitor for the purpose of
real-time validation and logging.[4] The autonomous functionalities of this
setup preclude internet connectivity and advanced analytics and are
particularly suitable for low-cost household-level deployment to prevent the
accidental intake of spoiled food and reduce avoidable waste.[5]
IV.METHODOLOGY
AND RESULT
The IoT-based
food spoilage detection system is based on the biochemical principle that
organic matter in the process of decomposition, especially fruits and
vegetables, generates measurably detectable quantities of methane (CH₄)
gas as a by-product of microbial metabolism in low-oxygen conditions.[1] This
phenomenon is utilized through a methane-sensitive MQ-4 gas sensor, whose
internal layer of SnO₂ exhibits a measurable variation in electrical
resistance upon exposure to CH₄. The linear voltage signal resulting from
this, proportional to the concentration, is then routed into an Arduino microcontroller
where it is matched against a previously established threshold value determined
through empirical calibration with known fresh and spoiled samples.[2]If the
sensor reading surpasses this threshold, then the system triggers off a
multi-modal alert mechanism: a red LED turns on, an buzzer sounds off an
audible signal, and a 16×2 LCD shows a clear “SPOILED” status with the
real-time level of methane[3]

Figure: 2. Result of the Food Expiry Detector
In parallel, data
is streamed to the Arduino Serial Monitor for observation and validation in a
continuous manner. This setup functions autonomously in enclosed environments
like household refrigerators, independent of any internet operation or
computation, and hence offers a simple and fast, cost-effective early warning
against accidental consumption of deteriorated food.[4]
V.CONCLUSION
In summary, the
incorporation of inexpensive embedded sensors, in particular methane-detecting
gas sensors like MQ-4, with microcontroller-based systems presents an extremely
practical and feasible way to monitor food freshness in real time. These
systems, merely through some threshold-based logic, allow biochemical signals
of spoilage to be translated into actionable electronic alerts that will enable
users to make timely decisions about the safety of food and how or if it should
be disposed of. The prototype demonstrated here autonomously identifies the
early stages of spoilage effectively within household refrigeration units
through gas emissions that are well within the range of measurement, rather
than relying on subjective sensory evaluation. This method not only reduces health
risks from consuming spoiled food but also meaningfully contributes to reducing
food waste at the household level. Future improvements might include multiple
sensor fusion and enhanced selectivity in order to widen applicability to
various food types. Even in this form, however, the system represents a serious
advance toward smarter, safer, and more sustainable food management by
consumers.
REFERENCES
[1] B.Ravi Chander , P.A.Lovina ,G.Shiva Kumari Assistant Professors, Dept. of
ECE, St.Martin’s Engineering college, Dhulapally(v), kompally ,Secunderabad
500100 Telangana
[2] Prof. N.S. Ujgare
Student, Dept. Of Information Technology, KBT College of Engineering,
Maharashtra, India Assistant Professor Dept. of Information Technology, KBT
College of Engineering, Maharashtra, India. International Research Journal of
Engineering and Technology
[3] D. -E. Kim, N.
-D. Mai and W. -Y. Chung, "AIoT-Based Meat Quality Monitoring Using Camera
and Gas Sensor with Wireless Charging,"in IEEE
Sensors Journal, vol. 24, no. 6, pp. 7317-7324, 15 March15, 2024.
[4] C. Song, Z. Wu,
J. Gray and Z. Meng, "An RFID Powered Multisensing Fusion Industrial IoT
System
[5] Nguyen TB, Tran
VT, Chung WY. Pressure Measurement-Based Method for Battery-Free Food
Monitoring Powered by NFCEnergyHarvesting. Sci Rep.