on 2024-07-17 07:07 AM
This article presents a comprehensive guide on utilizing NanoEdge AI Studio to develop a data logger for embedded projects on Arm® Cortex® -M MCUs. It addresses the essential prerequisites, initiates a project with data logger generation, and offers clear, step-by-step instructions for project development within the NanoEdge AI Studio. The tutorial underscores the user-friendly nature of the process, making it accessible to individuals new to AI. It concludes with the deployment of the machine learning library to an STM32 device, specifically leveraging the ISM330DHCX accelerometer as the sensor for movement identification. The data logger implementation configures access to the sensor, manages its sampling process, and transmits this data over the serial bus using the USART peripheral.
NanoEdge AI Studio is a free AutoML software for adding edge AI to embedded projects offered by ST. It simplifies the integration of AI into any embedded project running on Arm® Cortex®-M MCUs. It enables embedded engineers, including those with limited AI experience, to identify the optimal AI model for their specific needs through intuitive processes.
NanoEdge AI Studio facilitates the generation of ML libraries for various project types, utilizing data from one or more sensors, potentially of diverse types. Presently, it supports the creation of four project types: Anomaly Detection (AD), 1-Class classification (1CC), n-Class classification (nCC), and Extrapolation (E).
This article provides a quick guide on creating a data logger using NanoEdge AI Studio, so you can start creating your own custom database. It includes detailed steps for configuring and deploying firmware on any STM32 device.
The NanoEdge AI Studio incorporates a feature that enables seamless collection and import of data from serial USB, facilitating the creation of datasets.
To access the data logging screen in NanoEdge AI Studio, navigate to the home page and click on the DL or data logger buttons.
Then, choose the board you want to use with for your project. In this case, we use the B-U585I-IOT02A board and its available accelerometer.
Once the board is selected, you need to configure the sensor and its parameters, including the number of axes, data rate, range, and samples per axis. In this demonstration project, the ISM330DHCX accelerometer is utilized. Choose the parameter values and proceed to click on [Generate Data Logger].
On this page, you can also view:
After generating the data logger, you have downloaded a “NanoEdgeAI_Datalogger” (*.zip) file with a binary (*.bin) file in it. Connect your board to your PC, then drag and drop this binary file to your connected board.
The onboard STLINK’s COM LED blinks while the binary is flashed onto the board. You can check the data logger in action by opening a VCOM Terminal and configuring it to your board’s serial communication settings.
For example, when using Tera Term, you can see the board’s sensor raw data being printed on the terminal:
The newly created binary for data logger and the overall process can be used for all cases addressed in the NanoEdge. This includes anomaly detection, 1-Class classification, n-Class classification and extrapolation if the developer does not have the dataset previously saved.
A more in-depth tutorial that covers all main settings (data rate, buffer size, sample time etc.) in consideration when creating and tuning your data logger is available in our wiki page.
Hope this article was helpful and for more information, visit our dedicated page: https://stm32ai.st.com/