Page 1
Quick Start Guide STM32Cube function pack for STEVAL-PROTEUS1 evaluation kit for predictive maintenance application based on artificial intelligence (AI) (FP-AI-PDMWBSOC) Version 2.0 (15, Jan 2023)
Page 2
Agenda Hardware and Software overview Setup & Demo Examples Documents & Related Resources STM32 Open Development Environment: Overview...
Page 4
• HMI: 3 push-buttons (Reset, User, Power-on with battery), 4 LEDs (three user LEDs, one STBC02 LED status) • Flexible power supply options - LiPo battery, USB power, and primary battery • Connectors: SWD connector for debugging and programming capability, 34-pin expansion connector compliant with STMOD+ Contains: Latest info available at: FCC ID: YCP-STM32WB5M001 https://www.st.com/en/evaluation-tools/steval-proteus1.html IC: 8976A-STM32WB5M01...
Page 5
FP-AI-PDMWBSOC FW Architecture Key Features ❑ Complete firmware to acquire motion sensor data, process them for Anomaly Detection or N-Class classification, in order to send the results to the STBLESensor mobile app and/or a PC terminal console. ❑ Embedded software, middleware and drivers •...
Page 6
FP-AI-PDMWBSOC Ecosystem Complete turnkey solution from Datalog to Anomaly Detection and Classification status on Mobile App and up to Cloud STEVAL-PROTEUS1 supported NanoEdgeAIStudio [v3.2.1] Azure Central...
Page 8
• Copy the .zip file content into a folder on your PC. The package will contain source code example (Keil, IAR, STM32CubeIDE) based on STEVAL-PROTEUS • ST BLE Sensor Application for Android (from v4.17.4) / iOS (from v4.17.3) to download from Play Store / App Store...
Page 9
• 1 STEVAL-PROTEUS1 evaluation kit • 1 Laptop/PC with Windows 7, 8 or 10 • 1 USB micro-B cable to supply the sensor-board by PC • 1 smartphone with ST BLE Sensor App (Android or IOS) STEVAL-PROTEUS Optional (just for debugging and programming) •...
Page 11
STEVAL-PROTEUS1 Unboxing Lock the top case to the bottom one with the last four screws Power ON included in the kit. Push and hold S2 until the yellow LED turns on (HW Featrure) Plug the battery connector on J3 ut the cover on the battery and close it using two screws.
STEVAL-PROTEUS1 Power ON/OFF • Battery operated only (no USB cable): • Power ON: push and hold the power button until the yellow LED turns on (~3 sec). • Power OFF: push and hold the power button until the yellow LED LiPo Battery turns off (~3 sec).
Page 13
To update the firmware the user can choose one of the following procedure: • Save the same binary file (in *.bin format) in your mobile device and upgrade firmware by FUOTA using ST BLE Sensor Mobile App. • Connect the STEVAL-PROTEUS board to the STLINK-V3MINI (or V3MINIE)
Page 14
STEVAL-PROTEUS Setup Firmware update by FUOTA 1/2 How to re-program the STEVAL-PROTEUS by FUOTA: • Install and launch STBLE Sensor Mobile App, connect board and follow below steps Download in your smartphone the binary file from FP package...
Page 15
STEVAL-PROTEUS Setup Firmware update by FUOTA 2/2 • How to re-program the STEVAL-PROTEUS by FUOTA...
Page 16
STEVAL-PROTEUS Setup Firmware update by STLINK ❑ Power the board using Battery or USB plug ❑ Follow the connection by cables, as shown in the picture below STEVAL-PROTEUS USB Type-C USB micro-B Programming cable LiPo Battery STLINK-V3MINI STLINK-V3MINIE...
Page 17
2.2- PDMWBSOC Application: How to use the ST BLE Sensor App...
Page 18
Discovery View of ST BLE Sensor App After tapping on Connect one Device, you’ll see the list of available boards to which can connect. For each board are available: • FW running name (FP-AI-PDMWBSOC) • NEAI phase (idle, idle trained, learning, detecting, classifying) •...
Page 19
The proper workflow Open ST BLE This step is optional but Tap on the gear icon to remember that by default: Sensor App customize AD library parameters and sensor & ISM330DHCX is active with ODR = 3332 Hz and setup...
Page 20
Start learning phase Three simple steps Through this demo you can monitor NanoEdgeAI AD library status and also start/stop learning and detecting phases. To start your first learning follow the steps below: 1. Move the commands switch on the left to enable Learning 2.
Page 21
Start Detecting phase Three simple steps Through this demo you can monitor NanoEdgeAI AD library status and also start/stop learning and detecting phases. To start your first detection, follow the steps below: 1. Move the commands switch on the right to enable Detection 2.
Page 22
How to set Learning phase time 1/2 First of all tap on gear Tap on learning icon to open the setting parameter and select page Time [s] option...
Page 23
How to set learning phase time 2/2 Tap on Time/Signals Enter your desired parameter learning duration...
Page 24
How to set signals to learn 1/2 First of all tap on gear Tap on learning icon to open the setting parameter and select page Signals option...
Page 25
How to set signals to learn 2/2 Enter the desired Tap on Time/Signals number of signals parameter to learn...
Page 26
How to set AD library parameters First of all tap on gear Tap on Sensitivity or icon to open the setting Threshold parameter page to set its...
Page 27
How to use save/load NEAI AD model 1/2 External Memory if no model was if a model was When you turn-on your found, phase found, phase will PROTEUS, firmware will be IDLE be IDLE TRAINED automatically search for available NEAI AD before detect you are ready to model stored in the...
Page 28
How to use save/load NEAI AD model 2/2 External External Memory Memory If you are dissatisfied with results come from last learning, you can to avoid to lose your AD model after shutting down, you can open setting restore the model saved in the external flash memory by Load page and send Save Model command...
Page 29
Start Classifying phase Two simple steps Through this demo you can monitor NanoEdgeAI NCC library status and also start/stop classifying phase. To start your first classification, follow the steps below: 1. Push start button 2. Push stop button when you want Remember that classifying phase will end only when you push stop button...
Page 30
2.3- PDMWBSOC Application: How to use CLI Terminal Console...
Page 31
The proper workflow This step is optional but remember that by default: ISM330DHCX is active with ODR = 3332 Hz and FS = 2 G Plug USB Learning/Detecting Enter set_neai timer [t] or phases will end when connector set_neai signals [n] to customize you’ll push stop button and open (Time/Signals parameter...
Page 32
Anomaly Detection: Start learning phase The user has to enter the proper command to start the learning phase start neai_learn Learning phase started, green LED blinks...
Page 33
Anomaly Detection: Start detection phase The user has to enter the proper command to start detection phase start neai_detect Detection started Detection started Status Abnormal Status Normal red LED ON green LED ON Remember that detecting phase will end only when you push escape button...
Page 34
N-Class Classification: Start classification phase The user has to enter the proper command to start classification phase start neai_class Remember that classifying phase will end only when you push escape button...
Page 35
2.4- PDMWBSOC Application: Azure IoT Central Cloud Service...
Page 36
STBLESensor App Azure IoT Central Cloud connection 1/2 proteus-poc2 Add your device using Insert the QR-Code Select Azure Add the application Select the IoT Central Open Cloud Logging the template already retrieved during subscription IoT Central PnP Proteus-poc2 App proteus-poc2 published (See User Manual for more details)
Page 37
STBLESensor App Azure IoT Central Cloud connection 2/2 https://proteus-poc2.azureiotcentral.com/ Device inserted in Start the connectivity List of all the NEAI AD + NEAI Measurements provisioned in proteus-poc2 app with Azure IoT Central measurement to send Classification + Battery Azure IoT Central Dashboard...
Page 39
FP-AI-PDMWBSOC NEAI Machine Learning in STEVAL-PROTEUS1 Label Dataset Benchmark to ML Libs integration Run applications with Capture data and Classifying Build ML Libs in FW package NEAI AD or NEAI- NClass NEAI NEAI AD CLASSIFICATION HSDatalog NEAI Settings STEVAL-PROTEUS1 & FUOTA (By BLE) CLI - NEAI Commands...
Page 40
Capture data and create specific datasets Generating contextual data using HSDATALOG in Utilities folder ❑ The equipment behaviors can be analyzed, creating a lot of different dataset based on vibrometer or accelerometer data, focused on “Normal” & “Anomaly” working condition to monitor and detect. The same approach can be used to classify different “Working Generate data set Conditions”...
Page 41
Use NanoEdge AI Studio tool Label Dataset and Classifying to use with NanoEdgeAI Studio Convert each datasets in the right format (*.csv) accepted by NanoEdgeAI Studio tool (v3.2.1) ❑ The dataset previously generated using the datalogging firmware, classified as “Normal”, “Anomaly”, or as “Specific Cases to classify”, must be used as input dataset to create the new libraries for Anomaly Detection or N-Class Classification, to include inside the application FW.
Page 42
Use NanoEdge AI Studio tool Label Dataset and Classifying to use with NanoEdgeAI Studio Create a new project for Anomaly Detection library starting from the datasets and build the library Normal Anomaly...
Page 43
Use NanoEdge AI Studio tool Label Dataset and Classifying to use with NanoEdgeAI Studio Create a new project for N-Class Classification library starting from the datasets and build the library CLASS-1 CLASS-2...
Page 44
Use NanoEdge AI Studio tool Run the Benchmark to create the different ML Library Machine Library building running a benchmark to find the best library in terms of Accuracy, Performance (Score), RAM and FLASH Size Anomaly Detection N-CLASS Classification Normal Anomaly CLASS-1 CLASS-2...
Page 45
Use NanoEdge AI Studio tool Choose the best libraries and Deploy in binary format Press the “Compile Library” button to deploy a ZIP file including all the library files to include in your application Anomaly Detection N-CLASS Classification Set “Multi-library“ flag and insert “ncc”...
Page 46
NEAI Library Integration in the FP Embed the Machine Learning Library into FP-AI-PDMWBSOC Replace just the following NEAI files deployed into the project folder N-CLASS Classification Anomaly Detection 1.libneai.a 1.Libneai_ncc.a (for IAR&STM32CubeIDE projects) (for IAR&STM32CubeIDE projects) 2.Libneai_ncc.lib 2.libneai.lib (generated as explained before (generated as explained before and renamed from libneai.a to and renamed from libneai.a to...
Page 47
Run Learning and Detection by BLE or CLI Run applications with NEAI Anomaly Detection Run NEAI-AD Learning Run NEAI-AD Detection start neai_detect start neai_learn When the phase is IDLE, is mandatory to perform ❑ Learn the normal modes on the edge a new LEARNING phase before DETECTING, ❑...
Page 48
Run N-Class classification by BLE or CLI Run applications with NEAI- Nclass classification Run NanoEdgeAI N-Class classification start neai_learn...
Page 50
❑ FP-AI-PDMWBSOC ❖ DB4776: STM32Cube function pack for STEVAL-PROTEUS1 evaluation kit for anomaly detection based on artificial intelligence (AI) – SW Data brief ❖ UM3069: Getting started with the STM32Cube function pack for STEVAL-PROTEUS1 evaluation kit for predictive maintenance application based on artificial intelligence (AI) –...
Page 51
4- STM32 Open Development Environment: Overview...
Page 52
The STM32 Open Development Environment (STM32 ODE) is an open, flexible, easy, and affordable way to develop innovative devices and applications based on the STM32 32-bit microcontroller family combined with other state-of-the-art ST components connected via expansion boards. It enables fast prototyping with leading-edge components that can quickly be transformed into final designs...
Need help?
Do you have a question about the STM32Cube and is the answer not in the manual?
Questions and answers