International Research Journal of Engineering and Technology (IRJET)
e-ISSN: 2395-0056
Volume: 13 Issue: 06 | Jun 2026
p-ISSN: 2395-0072
www.irjet.net
An Intelligent IoT and Machine Learning Framework for Real-Time Food Spoilage Detection and Quality Monitoring Anmol Keswani1, Roshni Khatri2, Sunny Nahar3 1Post Graduate Student, Dept of Masters of Computer Application, Vivekanand Education Society's Institute Of Technology Chembur, Mumbai 2Post Graduate Student, Dept of Masters of Computer Application, Vivekanand Education Society's Institute Of Technology Chembur, Mumbai 3Professor, Dept of Masters of Computer Application, Vivekanand Education Society's Institute Of Technology Chembur, Mumbai -------------------------------------------------------------------------***----------------------------------------------------------------------
Abstract-Food spoilage is a problem that causes a lot of
labour-intensive and prone to human error. While some sensor-based IoT systems have been developed (to automate environmental monitoring), most of these deployed systems apply static rules (threshold) to initiate alert events. As a result, binary (yes/no rule-based) methods fail to address the dynamic and nonlinear degradation processes of food and do not adapt to the inherent variability among food types.
financial losses and health risks all over the world. Most food monitoring systems that use the internet of things rely on rules that do not work well for different types of food and changing environments. This study suggests a way to monitor food quality that uses a device with many sensors and a machine learning system to predict when food will spoil in real time. The system uses a computer called an ESP32 that is connected to many sensors like MQ3, MQ4 and MQ135 gas sensors, a DHT22 temperature and humidity sensor, an LDR light sensor and a pH sensor. The sensor data is sent over Wi-Fi to a platform called AWS IoT Core, where a special machine learning model is used to classify how fresh the food is and predict how the quality will change over time.The system is very good at classifying food freshness with an accuracy of 94.3% for food like dairy, fruits and packaged goods. It can send alerts in under 2 seconds. This system is better, than systems that just use simple rules because it can adapt to different situations it has fewer false alerts and it can predict how long the food will last, which helps manage the supply chain and reduce food waste.
This paper presents an intelligent solution for monitoring food quality over time. Machine learning (ML) is an innovative way to significantly change food industry processes as we currently know them through the use of sensor devices and ML algorithms trained on historical datasets of sensor outputs labeled with spoilage factors. The ability to affordably develop predictive models using various types of data, such as historical data from different locations combined in one dataset, allows for much more accurate prediction of food quality deterioration than the previous method of using fixed thresholds alone. In particular, the use of recurrent neural networks (RNNs) or Long Short-Term Memory (LSTM) networks is beneficial for training models to predict food quality over time because of their inherent ability to model time-series data such as that from sensors. Additionally, these types of RNNs will enable predictive shelflife determination and allow the food industry to move from being reactive to proactive through real-time alerting capabilities that result from collected sensor and ML data.
Key Words: IoT, food quality monitoring, machine learning, Random Forest, LSTM, ESP32, food spoilage detection, smart supply chain, AWS IoT Core.
1.INTRODUCTION There are significant issues with the food safety and quality monitoring processes throughout the modern global food supply chain. The Food and Agriculture Organization of the United Nations reports that around one-third of food produced for human consumption is lost or wasted each year, much of it due to insufficient monitoring of the environmental conditions during storage and/or transportation [1]. Environmental variable fluctuations (e.g., temperature, humidity, ethanol concentration in the air, and exposure to light) can significantly increase the rate of spoilage due to microbial activity, oxidation, and enzymatic reactions; all of these are measured by physical parameters. Most warehouse and distribution facilities use manual inspections on a periodic basis to monitor food, which is
© 2026, IRJET
|
Impact Factor value: 8.315
This research presents an "end-to-end" intelligent framework that consists of: • A heterogeneous sensor device (ESP32) with multiple types of sensors collecting and transmitting data relating to gas composition, temperature, humidity, light intensity, and pH level in real-time to a cloudbased platform for building and maintaining ML predictive models. • A hybrid ML pipeline that uses both a Random Forest classifier to classify the current freshness and quality of food and an LSTM model that uses temporal information to predict
|
ISO 9001:2008 Certified Journal
|
Page 939