Skip to content
cd ../projects

Predictive-Edge — Predictive Maintenance on a Microcontroller

A TinyML system that detects bearing faults in industrial motors early and estimates remaining useful life (RUL): a 289-parameter (~1.1 KB) model that fits on an STM32H7. Capstone project.

Stack
Python · NumPy · scikit-learn · STM32H7 · Flask · Chart.js

Architecture

Predictive-Edge processing pipelineThe FFT of a 1 kHz vibration signal is computed; 8 features, including RMS and spectral entropy, are extracted around the bearing outer-race fault frequency (BPFO, 100 Hz) and its harmonics. The features feed a (16, 8) MLP with 289 parameters; the model is about 1.1 KB in float32 and 289 bytes with int8 quantization, targeting an STM32H7. A Flask and Chart.js dashboard shows the health and remaining useful life of a 200-motor fleet.Vibration1 kHz signalFFTBPFO = 100 Hz8 featuresRMS · entropy · …MLP (16, 8)289 parametersSTM32H7~1.1 KB · int8 289 BMonitoring: Flask REST + Chart.js — a 200-motor fleet, health and remaining useful life (RUL)

Approach

  • Physics-based features: An FFT is taken of the 1 kHz vibration signal. Eight features, including harmonic ratio, spectral entropy, RMS, and peak-to-peak value, are extracted around the bearing outer-race fault frequency (BPFO = 100 Hz) and its harmonics; temperature and current are fed into the model as well.
  • Model chosen by embedded constraints: Logistic Regression, Random Forest, SVM, Gradient Boosting, and MLP performed almost identically (F1 ≈ 0.99). Memory and inference cost decided the choice.
  • Methodology: GridSearchCV and 5-fold cross-validation. The scaler lives inside the Pipeline, so there is no data leakage. Since the difference between (32,16) and (16,8) was within one standard deviation, the 3× smaller (16,8) was chosen.
  • Embedded target: 289 parameters ≈ 1.1 KB (float32) — a tiny fraction of the STM32H7's 2 MB of Flash; int8 quantization brings it down to 289 B.
  • Monitoring dashboard: Health status and remaining useful life for a fleet of 200 motors, via a Flask REST API + Chart.js.

By the numbers

MetricValue
F1 (synthetic data)0.99
Parameters289
Model size~1.1 KB (float32) · 289 B (int8)

Limitations and next steps

The dataset is synthetic, generated from a physical fault model. Running the model on an actual STM32 board and validating it with real sensor data is in progress.