x-nucleo-iks01a2 with motionFX library
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-25 2:23 PM
Hello,
I'm using nucleoF446RE with X-NUCLEO-IKS01A2.
I read data from sensor (LSM6DSL and LSM303AGR) and with MotionFX library I get rotations, but there are some problems.
At beginning, if I don't rotate the board, the z-axis rotation is different from 0;
If I rotate the board along y-axis, I read correct value;
If I rotate along x-axis, I read correct rotation for x-axis, but there is also a rotation along y-axis and z-axis. (I use USART protocol to send and read data)
Also, I can't do the magnetometer calibration.
Can sameone help me?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-27 12:17 AM
I seems like wrong sensor orientation settings.
I propose to use STM32CubeMX and X-CUBE-MEMS1 package. You can generate example application for MotionFX for NUCLEO-F446RE and X-CUBE-NUCLEO-IKS01A2 in the STM32CubeMX. This application should work properly also with magnetometer calibration.
You can also directly check DatalogFusion application inside X-CUBE-MEMS1 package.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-01 1:58 PM
I tried to use DataLog application inside X-CUBE-MEMS1 and, using the gui, I see same thing: If I rotate the system along x axis I read rotation also on y axis (about -180), even after the magnetometer calibration.
Moreover, I don’t know why in MotionFX datasheet it is written that the rotation along y axis is between -90 and 90 degrees.
Can you help me?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-02 2:55 AM
I tried to replicate your issue on Nucleo-F401RE and IKS01A2 and don't see your issue. It always rotates in correct axis only. Please send me your project and datalog. You can store the datalog in Unicleo-GUI application for example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-04 5:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-04 5:27 AM
This is the datalog.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-04 7:48 AM
Hello,
I have analyzed your datalog and I see the magnetometer did not reach the calibrated state.
You can check the scatter plot. The points should draw circle with center in [0,0], after calibration you will jump to the calibrated values.
From your datalog I see you didn't cover second half of the sphere (circle) with the movement.
This is example of well calibrated magnetometer.
You can try the magnetometer calibration process using MagnetometerCalibration application in X-CUBE-MEMS1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-06 12:20 AM
I did it again and this is the data log. After calibration, when I rotate along x axis there is a rotation along y axis (about -180°) for some seconds and then it return to 0°.
Can I use MotionMC library with MotionFX library? How can I merge them?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-09 2:12 AM
I have a few comments:
The angle ranges are following:
- Yaw seems ... 0-360 degrees
- Pitch +/-180 degrees
- Roll +/-90 degrees
You can use MotionMC to calibrate magnetometer instead of functions MotionFX_MagCal... which are part of the MotionFX library. Basically you need to pass the data to MotionMC library and then use calibrated magnetometer data in sensor fusion (MotionFX).
