Main Content

Vibrational Anomaly Detector with SAMD21 ML Evaluation Kit

Build a vibrational anomaly detector using Cartesiam’s NanoEdge AI Studio and deploy it to the SAMD21 MCU.

Story
This tutorial will guide you through the process of building a vibrational anomaly detector using NanoEdge AI Studio and deploying it to the SAMD21 development board with MPLAB X.

We’ll be capturing accelerometer data using the Mikroe IMU2 Click board and use NanoEdge AI Studio to train a library that can model the nominal behavior of a USB case fan. Then we’ll deploy that library to the SAMD21 MCU to detect anomalous events (in this case, fan blockage) in real-time.

Once you’ve completed this project you should have the knowledge and starter code to build an anomaly detector that fits your own needs.

Before You Start
Before we get started you’ll need to install and set up the required software as detailed in the steps below

First, install the MPLAB X IDE and XC32 compiler. These are required to program the SAMD21. You can use the default free license for the XC32 compiler as we won’t need any of the pro functionality here.

Secondly, download NanoEdge AI Studio. We’ll use this to analyze our sensor data and generate the anomaly detection library. Head over to the NanoEdge AI Studio download page and fill out the form to get the free trial version. Once installed, I strongly recommend you peruse the NanoEdge AI Studio documentation to get familiarized with the development flow.

Finally, download the MPLAB X project which includes all the source code and configuration files required for this tutorial.

Connect the Mikroe IMU2 Click Board
While the SAMD21 board is powered off, simply plug the Mikroe IMU2 Click into the MikroBUS socket.”

Link to article