Sensor Fusion FXOS8700CQ and FXAS21002 IC axis mis-alignment.

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

Sensor Fusion FXOS8700CQ and FXAS21002 IC axis mis-alignment.

2,135 Views
ankit_chudasama
Contributor I

Hi,

We are using FXOS8700CQ(6-axis sensor with integrated linear accelerometer and magnetometer) and FXAS21002(3-Axis Digital Angular RateGyroscope) for getting the roll pitch and yaw.

Is it mandatory to align the x, y, and z axis of the both the ICs?
In our PCB we are not align the x, y, z axis of the both the ICs. Here I am attaching the image how we have connected the ICs on PCB. We are getting the data for the roll, pitch and yaw but values we are getting that is not valid. How we can get the right data by not making any changes to the hardware.

Please help to solve the problem.

3 Replies

1,927 Views
JackITB
NXP Employee
NXP Employee

Hi Ankit,

I'm assuming you are using our Sensor Fusion source code from ISSDK middleware library that can be added to NXP Kinetis SDK.

First of all, you need to define an XYZ reference frame (that follows the right-hand rule), and Coordinate System for your end product.

We usually take the Aerospace Coordinate System, also referred as “NED” (North, East, Down). The Coordinate system, associated with the XYZ reference frame chosen for the end product will govern the Pitch, Roll, Yaw angles computation. See AN5017 for more details. Please note that NED system is using a “gravity positive” convention whereas our accelerometer is “acceleration positive”.

Then, depending on exact sensor layout within the end product, you may have to apply a transformation Matrix (HAL Hardware Abstraction Layer) to align each sensor XYZ reference frame onto the end product reference frame. This consist usually in swapping and/or inverting axes.

Practical example can be found in the hal_frdm_fxs_mult2_b.c source file, contained in the issdk\algorithms\sensorfusion folder. It corresponds to the use of FIFO data reading but can be easily change for single data point reading (remove the loop counter). Also adjust the axis swap/inversion according to the layout of each sensors.

With the HAL correction, you can compensate any orientation of the different sensors and align their measurement onto the system reference frame.

 

Hope this helps,           Jacques.

1,927 Views
ankit_chudasama
Contributor I

Hi Jacques,

Jacques Trichet wrote:

Please note that NED system is using a “gravity positive” convention whereas our accelerometer is “acceleration positive”.

Can you give bit more brief explanation for above statement? I didn't understand.

Thanks,

Ankit

0 Kudos

1,927 Views
JackITB
NXP Employee
NXP Employee

Hello Ankit,

You can take a look at our Application Note AN5017 (more specifically paragraph 1.4 and 1.5) to have a better understanding.

To give a simple example, let's assume you are using the Aerospace / NED standard. If the accelerometer is mounted horizontally in your end product, it will measure +1g as stated in FXOS8700 datasheet (cf crop of fig.4 below), at least when the product will be layed down horizontally.

pastedImage_1.png

The earth gravity vector is oriented downward, hence aligned to Z-"Down" axis of the NED XYZ-reference frame. Consequently the Zout = +1g accelerometer reading will also apply directly to the NED frame.

If the sensor was mounted upside down in the end product (e.g. located on the bottom side of the PCB), you would need to negate the accelerometer data to match the NED frame convention: Zout = -1g for sensor but Z = +1g in the NED frame (unchanged for the end product).

Practically, when the sensor and NED axes are in opposite direction, you can use the sensor data as is, whereas when they are in the same direction, you shall negate the sensor data with the appropriate HAL matrix. This matrix will also handle axes permutation if any.

Best regards,   Jacques.

0 Kudos