Time-of-flight 8x8 multizone ranging sensor with wide field of view expansion board based on vl53l5cx for stm32 nucleo (24 pages)
Summary of Contents for ST MotionTL
Page 1
UM2277 User manual Getting started with MotionTL tilt measurement library in X-CUBE-MEMS1 expansion for STM32Cube Introduction The MotionTL middleware library is part of the X-CUBE-MEMS1 software and runs on STM32. It provides real-time information about the tilt angles of the user device, i.e. cell phone. The library is also able to perform accelerometer 6-position calibration.
UM2277 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 UM2277 - Rev 8 page 2/20...
NUCLEO-L152RE NUCLEO-L073RZ development board. MotionTL library Technical information fully describing the functions and parameters of the MotionTL APIs can be found in the MotionTL_Package.chm compiled HTML file located in the Documentation folder. 2.2.1 MotionTL library description The MotionTL pedometer library manages the data acquired from the accelerometer; it features: •...
Page 4
UM2277 MotionTL library Note: This function must be called before using the tilt library. • void MotionTL_SetKnobs(MTL_knobs_t *knobs) – sets the knobs – the parameters for the structure type MTL_knobs_t are: ◦ fullscale is the full scale of accelerometer (in g). It is recommended to set full scale >1g for the sensor.
Page 5
UM2277 MotionTL library • uint8_t MotionTL_GetLibVersion(char *version) – retrieves the library version – *version is a pointer to an array of 35 characters – returns the number of characters in the version string • void MotionTL_CalibratePosition(float cal_data[][3], uint32_t num_records, MTL_cal_position_t cal_position) –...
2.2.3 Orientation The MotionTL library works with ENU orientation system, which means device X axis going to East, Y axis going to North, Z axis going Up. Any sensor orientation is internally transformed into device ENU orientation system. For this reason the sensor orientation must be defined using MotionTL_SetOrientation_Acc() function.
UM2277 MotionTL library Table 2. Pitch, Roll and Gravity Inclination output angles Value Pitch Roll Gravity Inclination Formula arctan2 (-Y/Z) arcsin (X) arccos (Z) Range -180°, +180° -90°, +90° 0, 180° Angle between Y axis and horizontal Angle between X axis and horizontal...
8.32.3 1719 1744 1727 2607 2619 Sample application The MotionTL 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-L476RG, NUCLEO-L152RE NUCLEO-L073RZ development board connected to an X-NUCLEO-IKS01A2,...
UM2277 Unicleo-GUI application Step 3. Start and stop data streaming by using the appropriate buttons on the vertical tool bar. The data coming from the connected sensor can be viewed in the User Messages tab. Figure 6. User Messages tab UM2277 - Rev 8 page 11/20...
Page 12
UM2277 Unicleo-GUI application Step 4. Click on the Motion Tilt icon in the vertical tool bar to open the dedicated application window. Figure 7. Motion Tilt Sensing window 1 You can switch between two angle modes. In the first mode the Pitch, Roll and Gravity Inclination angles are displayed, in the second mode the Theta, Psi and Phi angles are displayed.
UM2277 Unicleo-GUI application Step 5. Click on the Tilt Calibration icon in the vertical toolbar to open the dedicated application window Figure 9. Motion Tilt calibration window 1 This window first shows currently used calibration values calculated and stored during the previous calibration or default values if the calibration has never been performed.
UM2277 Unicleo-GUI application Figure 10. Motion Tilt calibration window 2 Step 6. Click on the Datalog icon in the vertical tool bar to open the datalog configuration window: you can select which sensor and activity data to save in files. You can start or stop saving by clicking on the corresponding button.
UM2277 References References All of the following resources are freely available on www.st.com. UM1859: Getting started with the X-CUBE-MEMS1 motion MEMS and environmental sensor software expansion for STM32Cube UM1724: STM32 Nucleo-64 boards (MB1136) UM2128: Getting started with Unicleo-GUI for motion MEMS and environmental sensor software expansion...
Page 18
UM2277 List of tables List of tables Table 1. List of acronyms ..............2 Table 2.
Page 19
MotionTL API logic sequence (main program)........
Page 20
ST’s terms and conditions of sale in place at the time of order acknowledgement. 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 MotionTL and is the answer not in the manual?
Questions and answers