Catch Motor Wear Early with STM32 and ITTIA DB Lite
How local sensor history supports preventive maintenance and on-device AI
A pump can run within its alarm limits while vibration slowly rises over several weeks. A technician who sees that trend under comparable operating conditions has a reason to inspect the pump during a scheduled stop. An STM32 microcontroller and ITTIA DB Lite can collect and preserve that evidence on the equipment itself.
Compare runs under similar conditions
A healthy motor may vibrate more as it speeds up or takes on a heavier load. To distinguish an operating change from possible wear, record vibration alongside speed and load. Motor current and temperature can provide additional context. Compare each new reading with a healthy baseline built from the same operating range.
For example, a pump that repeatedly shows higher vibration at its normal speed and load may deserve a closer look. The same increase during startup may simply reflect a transient. Capturing when and how the motor was running helps the maintenance team tell those situations apart.
Keep the history on the device
ITTIA DB Lite stores timestamped measurements and derived values on the STM32. The application can keep a short rolling history of high-rate vibration samples, preserve selected windows around unusual events, and retain compact summaries for longer-term trends. This gives engineers evidence to investigate while keeping storage use within the device’s budget.
From Sensor History to On-Device AI
Physical AI starts with measurements from the machine. In a motor health application, the microcontroller can turn each sample window into a small set of features that describe how the motor is behaving. An on-device model can then evaluate those features together and produce a health score or anomaly classification.
Choose features that describe the motor
Vibration root mean square (RMS) summarizes the overall amplitude of a window. Frequency-band energy can show where vibration is changing, even when the overall RMS changes little. Current, speed, and temperature trends can help the application interpret those changes in context. ITTIA DB Lite AI supports local preparation of features for the inference workflow.
Capture the evidence behind an alert
Save the timestamp, operating conditions, feature values, and baseline used for the assessment. If the device runs an AI model, record its version and output with the event. When a technician reviews an alert, that record shows which measurements were available and what the device reported at the time.
In a pump installation, an alert might show that vibration rose across multiple runs at comparable speed and load while the temperature remained steady. The technician can use that evidence to prioritize an inspection and check possible mechanical causes such as mounting, alignment, or bearing wear.
Keep monitoring during network interruptions
The STM32 can continue collecting measurements and evaluating motor health when the network is unavailable. When connectivity returns, the application can send health summaries and selected event records to a gateway or fleet dashboard. Keeping high-rate data local helps limit network traffic while preserving the detail needed for investigation.
When integrating monitoring into an existing controller, measure its CPU, RAM, flash, and timing costs alongside the motor-control workload. Choose a sample rate, window size, and retention policy that fit the device and the signals you need to observe.
A C Example for Vibration Monitoring
This rule-based check calculates RMS for a window of calibrated, zero-centered accelerometer samples. The application retrieves a healthy RMS baseline from ITTIA DB Lite for the corresponding speed and load range. Use the same sample units and windowing method for both measurements.
#include <stdbool.h>
#include <stddef.h>
#include <math.h>
bool vibration_above_baseline(const float *samples, size_t count,
float healthy_rms, float alert_ratio)
{
if (samples == NULL || count == 0 ||
healthy_rms <= 0.0f || alert_ratio <= 1.0f) {
return false;
}
float sum_squares = 0.0f;
for (size_t i = 0; i < count; ++i) {
sum_squares += samples[i] * samples[i];
}
float current_rms = sqrtf(sum_squares / (float)count);
return current_rms > healthy_rms * alert_ratio;
}For example, a baseline of 0.20 g RMS and an alert ratio of 1.5 give a threshold of 0.30 g RMS. Treat that ratio as illustrative and tune it with measurements from the equipment. Evaluate repeated windows before raising an alert, then save the supporting measurements in ITTIA DB Lite. The function uses standard C and can run alongside an on-device AI model.
Try the ITTIA motor health demo
Explore the ITTIA Edge AI Motor Health Monitoring Demo and contact ITTIA to request the STM32 demo source code.