FXOS8700CQ - calibration in KW36 boards

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FXOS8700CQ - calibration in KW36 boards

758 Views
trialaccount12
Contributor V

Hi,

   I ran the ecompass demo present in KW36Z boards and I got different results in few scenarios. 

1. when I compared the magnetometer values with a compass application from my smart phone. As per datasheet, I found FXOS8700C location and aligned the board in same direction as smart phone but the resulting angle were totally different? Why is this behavior? 

2. I also need to obtain x,y,z values from accelerometer. When i calibrate the board and run the demo the accelerometer values are not following a pattern, it shoots negatives and positive in random manner irrespective of the direction i move the board. I checked both raw values from sensor data and averaged value as well. 

I have read the documentation and my goal is achieve the angle at which the board is moving and x,y axis precisely. I tried all possible ways but couldn't figure. 

Edit: Would be great if you could me what could go wrong in calibration? Cause one out of 10 calibration barely matches compass reading. I have calibration drone hardware but never faced any such issues.  And I needed value in range of 0 to 360 so I added this piece of code in ecompass.c file

if( g_Yaw_LP < 0 )
{
g_Yaw_LP += 360.0; // convert negative to positive angles
}

Thanks and Regadrs

Niranjan

0 Kudos
3 Replies

565 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

Among the modifications made to the SW, did you removed the Magnetometer_Calibrate function ?

Just to confirm, did you roll the board on all orientations to get max and min values as it asked in the demo code you are using ?

Could you please check this document as well ? You can try using those functions as a base and adapt those to your KW36 example

Hope it helps,

Regards,

Estephania

0 Kudos

565 Views
trialaccount12
Contributor V

Hi,

   No, i did not remove the calibration functions. Yes, I did roll the board in all orientations and got max and min values. Once the calibration is done, the output values greatly differ in values.  

Should I change any register values? [Default one in sdk code file is * XYZ_DATA_CFG Sensor Data Configuration Register */] And I am using the same.

I tested few times in lab environment and there was a community post which mentioned I should carry out the testing where no nearby ferromagnetic materials are present. I did try that as well. But still readings were wrong. It would be great if someone could from NXP could test the calibration condition and upload a video or something for us to understand better. 

I could not see any document in your attachment. Please check.

This query seems to be a common problem since many posts I could see related to this. 

Thanks and Regards

Niranjan

0 Kudos

565 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

Sorry , this it's the link

https://community.nxp.com/docs/DOC-101073 

Regards,

Estephania