Fresh Guard is a low-cost, IoT-based system designed for real-time prediction of fruit shelf life using continuous multi-sensor monitoring and machine learning analysis. The system integrates a DHT22 sensor to measure temperature and humidity, an MQ-135 gas sensor to monitor respiration-related gases such as carbon dioxide and volatile compounds, and a load cell with an HX711 amplifier to track weight loss over time. By combining these critical environmental and physiological parameters, FreshGuard enables early identification of spoilage trends and provides dynamic estimation of remaining shelf life before visible deterioration occurs. All sensors are interfaced with an ESP32 microcontroller, which performs real-time data acquisition and transmits the collected readings to a cloud platform for storage and analysis. A machine learning model, specifically Random Forest regression, continuously processes the time-series sensor data collected from temperature, humidity, gas concentration, and weight sensors to dynamically update the predicted remaining shelf life of the fruit. Unlike traditional static estimation methods, this approach analyzes multiple environmental and physiological parameters simultaneously, capturing complex nonlinear relationships between storage conditions and fruit degradation patterns. By continuously learning from sensor inputs, the model adapts to changing storage environments and provides real-time, data-driven freshness predictions. This integrated IoT–ML framework enables early detection of accelerated ripening or spoilage conditions, allowing timely corrective actions such as temperature adjustment, humidity control, or prioritized stock rotation.
Introduction
Fresh fruits are highly perishable, and traditional methods of assessing freshness (visual inspection, smell, touch) are unreliable and unsuitable for continuous monitoring. Post-harvest losses in developing regions can reach 20–30% due to lack of accurate and real-time monitoring systems.
The proposed Fresh Guard system addresses this issue by integrating IoT sensors with machine learning to monitor fruit freshness and predict shelf life in real time. It uses:
DHT22 sensor for temperature and humidity
MQ-135 gas sensor for detecting gases like CO? and VOCs
Load cell (HX711) for measuring weight loss
These sensors collect environmental, chemical, and physical data, which are processed by an ESP32 microcontroller. A machine learning model (e.g., Random Forest, Gradient Boosting) analyzes the data to estimate remaining shelf life and provide storage recommendations such as cooling or ventilation adjustments.
The system improves upon existing methods by:
Providing real-time, automated monitoring
Using multi-sensor data fusion for higher accuracy
Being low-cost and suitable for storage and transport environments
The methodology includes data collection, sensor integration, model training, and system validation using real fruit samples. The system also features an OLED display for user-friendly output, showing freshness levels and recommendations.
Overall, Fresh Guard enhances post-harvest management by reducing spoilage, improving storage efficiency, and supporting a more sustainable fruit supply chain.
Conclusion
The Fresh Guard Monitoring and Prediction System provides an effective solution for monitoring fruit freshness and estimating shelf life using a multi-sensor and machine learning approach. The system integrates sensors such as DHT22, MQ-135, and a load cell to continuously measure temperature, humidity, gas emissions, and weight loss, which are key indicators of fruit spoilage. By analysing these parameters in real time, the system can accurately predict the remaining shelf life of fruits and provide useful storage recommendations to users. The experimental results demonstrate that the system is capable of detecting early spoilage conditions before visible deterioration occurs. Its portable design, low-cost components, and real-time monitoring capability make it suitable for use in households, storage units, retail shops, and transportation environments. By providing timely information about fruit freshness, Fresh Guard helps users take preventive actions such as adjusting storage conditions or consuming fruits earlier.
Overall, the Fresh Guard system contributes to reducing post-harvest losses, improving storage management, and supporting sustainable food supply chains through intelligent monitoring and prediction technology.
References
[1] Younis, A., 2025, “Predicting Postharvest Tomato Quality Using Artificial Neural Networks”, Postharvest Biology and Technology, Vol. 198, Article 112345.
[2] Du, X., Wang, L., Chen, Y., and Zhao, H., 2025, “Smart Packaging Technologies for Fruit and Vegetable Preservation: A Comprehensive Review”, Trends in Food Science & Technology, Vol. 148, pp. 1–18.
[3] Rahman, M., and Li, X., 2024, “IoT Based Environmental Monitoring Along the Fruit and Vegetable Supply Chain”, Computers and Electronics in Agriculture, Vol. 214, Article 108212.
[4] Gallo, M., and Marinelli, S., 2024, “Integrating Edge AI in Domestic Refrigeration Systems for Spoilage Prevention”, IEEE Internet of Things Journal, Vol. 11, Issue 3, pp. 4562–4574.
[5] Mohammed, A., Srinivasagan, R., and Alqahtani, M., 2023, “A Non-Destructive Spectroscopic Technique for Shelf Life Estimation Using TinyML”, Sensors, 23(14), Article 6521.
[6] Patel, R., Verma, S., and Singh, P., 2023, “TinyML Based Shelf Life Estimation System for Fresh Date Fruits”, Journal of Food Engineering, Vol. 344, Article 111423.
[7] Ricci, F., and Colombo, L., 2023, “Real Time Ripeness Classification in Stored Produce Using Multi Sensor Fusion”, Biosystems Engineering, Vol. 226, pp. 45–58.
[8] Bernardi, A., and Arduini, F., 2023, “Low Power Gas and Humidity Sensing Platforms for Household Food Quality Monitoring”, IEEE Sensors Journal, Vol. 23, Issue 9, pp. 9874–9885.
[9] Jayasinghe, S., and Sammani, U., 2022, “Fruit Freshness Detection Using Physiological Gas Indicators and Machine Learning”, Measurement, Vol. 197, Article 111283.
[10] Sharma, V., Mehta, P., Kumar, R., and Bansal, A., 2022, “Machine Learning Based Shelf Life Prediction of Fruits Using Multi Sensor IoT Nodes”, Sustainable Computing: Informatics and Systems, Vol. 35, Article 100703.
[11] Vanderroost, M., Ragaert, P., Devlieghere, F., and De Meulenaer, B., 2014, “Intelligent Packaging for Food Products: A Review”, Trends in Food Science & Technology, Vol. 39, Issue 1, pp. 47–62.
[12] Nicolaï, B. M., Defraeye, T., De Ketelaere, B., Herremans, E., Hertog, M. L. A. T. M., Saeys, W., Torricelli, A., and Vandendriessche, T., 2014, “Non-Destructive Quality Evaluation of Fruits Using Sensor Technologies”, Postharvest Biology and Technology, Vol. 90, pp. 17–30.
[13] Yam, K. L., Takhistov, P. T., and Miltz, J., 2005, “Intelligent Packaging: Concepts and Applications”, Journal of Food Science, Vol. 70, Issue 1, pp. R1–R10.
[14] Gómez, A. H., He, Y., and Pereira, A. G., 2016, “Sensor-Based Monitoring of Postharvest Fruit Quality”, Journal of Food Engineering, Vol. 168, pp. 53–63.
[15] Ruiz-Garcia, L., Lunadei, L., Barreiro, P., and Robla, J. I., 2010, “Postharvest Monitoring of Fruit Quality Using Wireless Sensor Networks”, Journal of Food Engineering, Vol. 98, Issue 2, pp. 144–151.
[16] Kader, A. A., 2002, “Respiration Rate as an Indicator of Postharvest Fruit Quality”, Postharvest Biology and Technology, Vol. 26, Issue 2, pp. 127–139.
[17] Saltveit, M. E., 1999, “Respiration and Ethylene Production”, Postharvest Biology and Technology, Vol. 15, Issue 2, pp. 123–137.
[18] Abbott, J. A., 1999, “Quality Evaluation of Fresh Fruits Using Non-Destructive Techniques”, HortScience, Vol. 34, Issue 2, pp. 209–214.
[19] Kader, A. A., 1992, “Postharvest Technology of Horticultural Crops”, University of California Agriculture and Natural Resources, Publication 3311.
[20] Abeles, F. B., Morgan, P. W., and Saltveit, M. E., 1992, “Ethylene in Plant Biology”, Academic Press, San Diego.
[21] Kader, A. A., Zagory, D., and Kerbel, E. L., 1989, “Modified Atmosphere Storage of Fruits”, Critical Reviews in Food Science and Nutrition, Vol. 28, Issue 1, pp. 1–30.
[22] Ben-Yehoshua, S., 1987, “Water Loss and Its Relationship to Fruit Quality”, Acta Horticulturae, Vol. 201, pp. 123–144.