Trying to get FXOS8700CQ to work

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

Trying to get FXOS8700CQ to work

891 Views
tamirmichael
Contributor I

Hi all,

I have bought a breakout board for this NXP compass after having experimented with a Honeywell HMC5883, which was lacking because it cannot tilt-compensate the heading calculation.

I have i2c communication running correctly (I can read the product id and temperature as well as sensor data) but the issue I'm facing is that the fusion of the magnetometer and accelerometer using the adafruit libraries, as this source code demonstrates:

https://github.com/adafruit/Adafruit_AHRS/blob/master/Adafruit_Simple_AHRS.cpp

does not yield a 0-360 degrees smooth heading.

I am aware of Freescale libraries but the thing is that the adafruit software seems to be correct as well - hence me wondering whether I need to calibrate the device (I do not have an arduino board).

What are my options in doing so

Do you think the code I linked above is correct?

How do you suggest I proceed?

Thanks in advance

Tags (1)
0 Kudos
1 Reply

656 Views
anthonyduhamel
NXP Employee
NXP Employee

Hi Michael,

I suggest to play first on the magnetometer and accelerometer oversampling to make the heading calculation smoother.

The tables below have been extract from the datasheet:

pastedImage_1.pngpastedImage_2.png

pastedImage_3.png

For example, you can use the biggest OSR on the M-cell to have a low pass filtering effect on the data and make it smoother (example: ODR=12.5Hz/OSR=7). But it really depends on the responsiveness you need. 

What are your current settings for the FXOS8700CQ?

Have a nice day,

Anthony

0 Kudos