cancel
Showing results for 
Search instead for 
Did you mean: 

X-NUCLEO-IKS02A1 sensor orientation (axis) on PCB for use in MOTIONFX library

Pantera_MXJ
Associate

Hello fellow users!

 

I'm trying to implement the Fusion MOTIONFX library with the board X-NUCLEO-IKS02A1 and the nucleo board NUCLEO-U575ZI-Q so I can output via terminal all the values.

 

So far I can output the fusion values but they are wrong as I need to define the sensors orientation on the PCB board (real world) and there is no documentation that indicates this for the IKS02A1 (I also have the IKS4A1 and such info also is not avilable)

 

So will be nice of ST to have a:


1)definitive guide or schematic showing the physical orientation of the sensor axes (ISM330DHCX, IIS2MDC and IIS2DLPC) on the X-NUCLEO-IKS02A1.

2) The recommended orientation strings (acc_orientation, gyro_orientation, mag_orientation) for this specific board.

3) Clarification: Does the user need to remap the sensor axes manually in code to match the declared orientation strings? Or does MotionFX internally handle axis rotation based on the strings?

4) Ideally: an official reference example with working axis mapping + MotionFX configuration for terminal output

 

So here is the part of the code that I cant figure out what is the right one (Point 2 Above) if someone can point to the right declaration will be great.

 

strcpy((char *)MotionFX_knobs.acc_orientation, "swu");  //South/West/Up
strcpy((char *)MotionFX_knobs.gyro_orientation, "swu");
strcpy((char *)MotionFX_knobs.mag_orientation, "enu"); //East/North/Up

 

The information of sensor placement and axes orientation should be in all X-Nucleo with MEMs sensors boards, even the axes printed on the PCB

 

And if this is the correct way to map the sensor axes (Point 3)

 

data_in.acc[0] = (float)acc_axes.x / 1000.0f;
data_in.acc[1] = (float)acc_axes.y / 1000.0f;
data_in.acc[2] = (float)acc_axes.z / 1000.0f;

data_in.gyro[0] = (float)gyro_axes.x / 1000.0f;
data_in.gyro[1] = (float)gyro_axes.y / 1000.0f;
data_in.gyro[2] = (float)gyro_axes.z / 1000.0f;

data_in.mag[0] = (float)mag_axes.x / 500.0f;
data_in.mag[1] = (float)mag_axes.y / 500.0f;
data_in.mag[2] = (float)mag_axes.z / 500.0f;

 

Any help is appreciated, if the test is code is needed I can post it as is based on the Datalog terminal output for my boards combination.

 

Kind Regards

2 REPLIES 2
Pantera_MXJ
Associate

Pantera_MXJ_0-1752560916970.png

I just had to really zoom into the chips, impossible to see letter but  I can see the markings of pin one on the board and the chip, I thought that I had something else to share but my tests so far are not going well as I don't know how to set my reference. The letters NWU and SEU is how I think I need to set them in the MOTIONFX library, but the test are not going good, what I do is Test the Fusion Heading (ism330/iism2mdc) against the raw reading of the Magnetometer in degrees they should be close but so far North is good using NWU/Gyro-Acc and NSU -MAG- the rest is 90degrees off, but I can fix it because I'm guessing.

Pantera_MXJ
Associate

For example, the document Getting started with MotionFX sensor fusion library in X-CUBE-MEMS1
expansion for STM32Cube, gives the data for the IKS4 but where is for the rest of the boards? or in this case the IKS02A?

 

Pantera_MXJ_0-1752576413560.png

Pantera_MXJ_1-1752576439808.png