Skip to content
Conference Open access

A hybrid IoT-machine learning framework for real-time detection and classification of milk adulterants

2026 · BIO Web of Conferences · 0 citations · 33 references

Abstract

Milk adulteration is a growing public-health concern, as toxic substances such as urea, detergent, caustic soda, starch, formalin, and synthetic oils are commonly added to milk. Conventional laboratory testing is slow, costly, and poorly suited to decentralised use. This work proposes an IoT-based machine learning approach for real-time, multi-class detection of milk adulteration. A dataset of 1,557 verified samples spanning seven adulterant classes was collected using an ESP32 microcontroller interfaced with six physicochemical sensors (pH, total dissolved solids, electrical conductivity, turbidity, temperature and gas). Four physico-chemically motivated engineered features were derived, and five supervised classifiers were evaluated by ten-fold stratified cross-validation. The Random Forest classifier achieved 95.3 ± 1.2% accuracy (95% CI: 94.0–96.6%) and macro-averaged AUC of 0.989 ± 0.005. Model compression and fixed-point quantization enabled on-device inference on the ESP32 in 48 ± 6 ms, 96% faster than cloud inference, removing dependence on connectivity. Robustness assessment under Gaussian sensor noise and calibration drift confirmed that the system can be reliably deployed under field conditions.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.