Long distance ranging tof sensor expansion board based on vl53l1x for stm32 nucleo (17 pages)
Summary of Contents for ST MotionAC2
Page 1
UM2774 User manual Getting started with MotionAC2 2-axis accelerometer calibration library in X- CUBE-MEMS1 expansion for STM32Cube Introduction The MotionAC2 is a middleware library part of X-CUBE-MEMS1 software and runs on STM32. It provides real-time 2-axis accelerometer calibration through offset and scale factor coefficients used to correct accelerometer data.
UM2774 Acronyms and abbreviations Acronyms and abbreviations Table 1. List of acronyms Acronym Description Application programming interface Board support package Graphical user interface Hardware abstraction layer Integrated development environment UM2774 - Rev 2 page 2/19...
NUCLEO-L152RE NUCLEO-U575ZI-Q development board. MotionAC2 library Technical information fully describing the functions and parameters of the MotionAC2 APIs can be found in the MotionAC2_Package.chm compiled HTML file located in the Documentation folder. 2.2.1 MotionAC2 library description The MotionAC2 2-axis accelerometer calibration library manages data acquired from the accelerometer; it features: •...
Figure 1. MotionAC2 accelerometer reading MotionAC2 library automatically extracts data and exploits ellipse fitting to estimate bias and scale factor to correct accelerometer readings. Due to bias and scale factor error, the relation between calibrated and raw accelerometer reading can be = a ⋅...
The MotionAC2 APIs are: • void MotionAC2_Init(MAC2_mcu_type_t mcu_type, float *freq) – performs MotionAC2 library initialization and setup of the internal mechanism – the CRC module in the STM32 microcontroller (in RCC peripheral clock enable register) has to be enabled before using the library –...
Page 6
UM2774 MotionAC2 middleware library in X-CUBE-MEMS1 software expansion • void MotionAC2_GetCalParams(MAC2_cal_params_t *cal_params) – retrieves the accelerometer calibration coefficients for offset and scale factor compensation and calibration quality factor – *cal_params parameter is a pointer to a structure with calibration parameters –...
UM2774 MotionAC2 middleware library in X-CUBE-MEMS1 software expansion 2.2.6 Calibration process The calibration process is based on the 4-point tumble calibration of the 2-axis accelerometer sensor when exposed to Earth gravitation field. The data is collected at the stationary condition.
UM2774 Sample application Sample application The MotionAC2 middleware can be easily manipulated to build user applications; a sample application is provided in the Application folder. It is designed to run on a NUCLEO-F401RE, NUCLEO-L073RZ, NUCLEO-L152RE NUCLEO-U575ZI-Q development board connected to the STEVAL-MKI209V1K.
UM2774 Sample application Step 3. When connected to STM32 Nucleo board with supported firmware [Library Evaluation] tab is opened. To start and stop data streaming toggle the appropriate start / stop button on the outer vertical tool bar. Figure 5. Start Figure 6.
UM2774 Sample application Step 4. Select the [Accelerometer Calibration] tab on the inner vertical tool bar to open the dedicated application status view. The window is split into one section with uncalibrated data, another with the calibrated data, another section with offset, scale factor and quality of calibration information and the last section with button [Calibration Procedure] to show instruction how to perform calibation and [Reset Calibration] to reset calibration values to default ones.
UM2774 Sample application Step 6. Select the [Data Injection] tab on the vertical tool bar to open the wiew dedicated to process the previously captured data. The data are processed by the MCU firmware. Figure 10. MEMS-Studio - Library Evaluation - Data Injection Step 7.
UM2774 References References All of the following resources are freely available on www.st.com. 1. UM1859: Getting started with the X-CUBE-MEMS1 motion MEMS and environmental sensor software expansion for STM32Cube 2. UM1724: STM32 Nucleo-64 boards (MB1136) 3. UM3233: Getting started with MEMS-Studio...
Page 19
ST’s terms and conditions of sale in place at the time of order acknowledgment. Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’...
Need help?
Do you have a question about the MotionAC2 and is the answer not in the manual?
Questions and answers