Lightweight edge AI approach for real-time audio-based machine health analytics on ARM cortex-M microcontroller
Abstract
Most audio-based machine-health studies on the MIMII benchmark stop at simulation, and existing edge-oriented anomaly detectors remain too large (8–64 MiB) for microcontroller deployment—leaving open the question of whether an accurate detector can actually run on a low-cost ARM Cortex-M device. This paper addresses that gap with a complete development-to-deployment pipeline for a lightweight YAMNet-based detector on the STM32 B-U585I-IOT02A (Cortex-M33). Its distinct contribution is the joint integration of moving-average denoising, random under-sampling, and an abnormality-thresholding decision rule, validated with the same YAMNet backbone, preprocessing chain and training protocol on both the MIMII fan sub-dataset and a self-collected dataset from 16- and 18-inch Khind fans (normal at three speeds, friction, block); for the three-class real-environment case the output layer is widened from two to three neurons and the decision rule extended to a priority-based scheme, so the architecture is common to both datasets rather than strictly identical. The deployed int8 model occupies only 0.18 MiB Flash with 0.30 s inference, reaching 0.87 ROC-AUC in MIMII simulation and 0.81–0.97 balanced accuracy across 30–70 cm in on-device tests. The MIMII partition is made at file level within pooled machine IDs rather than by recording session or by ID, so the simulation figures are within-session estimates and are reported as such; the on-device tests with live fans, whose audio is generated at test time and is disjoint from every training file, provide the partition-independent evidence. Because comparison protocols differ across studies (supervised vs. unsupervised, dataset subset, hardware), we report results with explicit metric definitions and treat literature comparisons as indicative. The work demonstrates that supervised lightweight transfer learning is deployable on resource-constrained hardware for practical fan monitoring, while noting limitations in data partitioning and validation scale that motivate the planned recording-level cross-validation and power-measurement studies.