cancel
Showing results for 
Search instead for 
Did you mean: 

Weekend project: Real-time vibration anomaly detection on STM32L412RB using NanoEdge AI + Zephyr RTOS

AyushK
Associate II

Hi ST community,

Wanted to share a weekend project I built using STM32L412RB
and NanoEdge AI Studio.

Pulse is a real-time vibration anomaly detection device that
runs entirely on-device — no cloud, no internet.

What it does:
- Collects 3-axis accelerometer data at 500Hz via LIS2DH12 on I2C3
- Runs NanoEdge AI anomaly detection on Cortex-M4F with FPU
- Learns normal vibration on-device in ~30 seconds
- Persists training samples to internal flash via Zephyr NVS
with CRC32 header validation
- Detects anomalies in <600ms end-to-end
- Python GUI monitor over USB CDC

One thing worth sharing for anyone doing similar work — getting
the NanoEdge AI knowledge buffer placed correctly in flash required
a custom linker overlay (neai_overlay.ld). Took some debugging to
get right. Happy to share details if anyone is working on
something similar.

Currently tested on a Xiaomi air purifier fan. The post on
r/embedded got good engagement and raised an interesting question
about multi-mode devices which led to thinking about a future
static model variant with FFT-based mode detection.

GitHub: https://github.com/Ayushkothari96/pulse

Any feedback welcome — especially from anyone using NanoEdge AI
Studio on STM32L4 for similar applications.

Thanks,
Ayush

1 REPLY 1
Julian E.
ST Employee

Hi @AyushK,

 

It is very interesting, thank you for sharing!

 

Have a good day,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.