FXLS8471QR1-Self test

cancel
Showing results for 
Search instead for 
Did you mean: 

FXLS8471QR1-Self test

Jump to solution
908 Views
ziarehman
Contributor II

Hi,

I am looking some information on self test feature of fxls8471qr1.

What will be value of axis when fxls8471qr1 is engaged in self test?

Do we need to perform self test at any particular orientation?

Any help is appreciated.

Labels (1)
1 Solution
381 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Zia,

Is the full-scale range set to ±2g (fs[1:0] = 0b00)? I am asking this because the values specified in the datasheet are given for ±2g mode. I read the following values from the device at ±2g (and ODR = 1.56Hz) without offset calibration:

XST = XST_ON − XST_OFF = 506 – 186 = 320

YST = YST_ON − YST_OFF = 194 – (–277) = 471

ZST = ZST_ON − ZST_OFF = 7172 – 4273 = 2899

Could you please post here your values? How many accelerometers have you tested so far and how many of them failed the self test?


Regards,

Tomas

View solution in original post

0 Kudos
6 Replies
381 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Zia,

Simply compute the difference between the acceleration output of all axes with self-test enabled (st = 1) and disabled (st = 0) as follows:

XST = XST_ON − XST_OFF

YST = YST_ON − YST_OFF

ZST = ZST_ON − ZST_OFF

Note that it is recommended to take several samples (e.g. 10) for each axis and average them.


If these self test responses are higher than the minimum values specified for each axis in the datasheet (table 2), the FXLS8471Q passed the self test.


Let me know if you have any other questions.


Regards,

Tomas


PS: If my answer helps to solve your question, please mark it as "Correct" or “Helpful”. Thank you.

381 Views
ziarehman
Contributor II

Hi Tomas,

Just did a try as per your suggestion.
But it did not worked for me. The difference of all three axis is not always greater than the values given in the table.
What I have noticed is that at least difference of one axis out of three is greater that the tabled values.

Regards,

Zia

0 Kudos
382 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Zia,

Is the full-scale range set to ±2g (fs[1:0] = 0b00)? I am asking this because the values specified in the datasheet are given for ±2g mode. I read the following values from the device at ±2g (and ODR = 1.56Hz) without offset calibration:

XST = XST_ON − XST_OFF = 506 – 186 = 320

YST = YST_ON − YST_OFF = 194 – (–277) = 471

ZST = ZST_ON − ZST_OFF = 7172 – 4273 = 2899

Could you please post here your values? How many accelerometers have you tested so far and how many of them failed the self test?


Regards,

Tomas

View solution in original post

0 Kudos
381 Views
ziarehman
Contributor II

Hi Tomas,

Yes, the full scale range is set to 2g and ODR rate is set to 200Hz.

We are using accelerometer in a handheld device and I am calculating the difference by placing the device in different orientations.

At some orientations I am getting correct result and some results are not correct.

Does orientation has any effect of Self Test feature?

Do we need to add delay after putting accelerometer in self test mode?

Results of my accelerometer by placing in 6 different orientation are:

First Orientation: XST = 326; YST = (-15943) ;ZST = 3210

Second Orientation: XST = 331; YST = (-15932) ;ZST = 3084

Third Orientation: XST = (-3607); YST = 443 ;ZST = (-13262)

Fourth Orientation: XST = 328; YST = 449 ;ZST = 3154

Fifth Orientation: XST = 307; YST355) ;ZST = (-13256)

Sixth Orientation: XST = 327; YST = 460 ;ZST = (-13262)

So far I have tested this on two different instruments and results are more or less same.

Regards,

Atique

0 Kudos
381 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Zia,

It looks like you are not converting correctly the raw values from registers 0x01 – 0x06 to signed 14-bit values. As you can see in my example project, you should use something like this:

Xout_14_bit = ((short) (OUT_X_MSB<<8 | OUT_X_LSB)) >> 2;    // Compute 14-bit X-axis output value

Yout_14_bit = ((short) (OUT_Y_MSB<<8 | OUT_Y_LSB)) >> 2;    // Compute 14-bit Y-axis output value

Zout_14_bit = ((short) (OUT_Z_MSB<<8 | OUT_Z_LSB)) >> 2;    // Compute 14-bit Z-axis output value

If you place the accelerometer upside down so its z-axis points upward, the z-axis (Zout_14_bit) should be approximately -4096 which corresponds to -1g in ±2g range.

Now using correct signed 14-bit values, you should be able to get right numbers when performing self test, regardless of the sensor orientation.


Regards,

Tomas

381 Views
ziarehman
Contributor II

Hi Tomas,

I am converting these values before using them.

But there was a in my code mistake I was storing values in unsigned type, using the signed type resolve the problem.

Regards,

Atique