cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DS33 => problem with self test

Maciek Zawistowski
Associate II
Posted on November 13, 2017 at 11:16

Hello,

I recently bought two Pololu IMU03a systems, and both of them gives me negative self test (both accel and gyro). To communication I use I2c protocol.  During the test the device is stationary

Calibration:

Rej. 0x10h => Value: 0x30h;

Rej. 0x11h => Value: 0x5Ch;

Rej. 0x12h => Value: 0x44h;

Rej. 0x13h => Value: 0x00h;

Rej. 0x14h => Value: 0x00h;

Rej. 0x15h => Value: 0x00h;

Rej. 0x16h => Value: 0x00h;

Rej. 0x17h => Value: 0x00h;

Rej. 0x18h => Value: 0x38h;

Rej. 0x19h => Value: 0x38h;

After calibration i wait 200ms for stable output, then i erase first five values (by reading registers from 0x22h to 0x2Dh).

Then I read these five registers, I combine them (0x22h with 0x23h ...) and average them in each axis (OUT_NOST).

Then I write 0x01h into registry 0x14h to enable self-test, wait for about 200ms, and discarded next five values (from registers from 0x22h to 0x2Dh).

Then I read five times values for each axis (OUT_ST), calculate average those values, and find min and max value for each axis.

For each axis I make a compare as below:

abs(min_ST_x)<=abs(OUTX_ST - OUTX_NOSTD)<=abs(max_ST_x)

Values I recive:

XGyro without self test [8, 14, 6, 9, 7], with self test [ 2994, 4491, 4499, 4492, 4494]

YGyro without self test [-66, -74, -66, -62, -73], with self test [ 2649, 4020, 4020, 4014, 4

015

]

ZGyro without self test [-1, -1

-1

, -1

, -1

], with self test [ 3207, 4848, 4843, 4845, 4845]

XAkcel without self test [575, 505, 455, 502, 564], with self test [ 8114, 7962, 8036, 8056, 8098]

YAkcel without self test [434, 445, 529, 480, 449], with self test [ 9674, 9734, 9681, 9732, 9668]

ZAkcel without self test [

-16131

,

-16276

,

-16273

,

-16260

,

-16154

]

, with self test [

 -10374

,

-10543

,

-10510

,

-10446

,

-10412

]

Am I doing something wrong, or should I return those IMU's ??

Thanks for any answer or clue

7 REPLIES 7
Petr S
ST Employee
Posted on November 13, 2017 at 17:50

Hello Maciek,

I suggest trying to split the accelero and gyro self-tests instead of measuring them at the same time. Also I'd suggest to make the register settings exactly as defined in

http://www.st.com/content/ccc/resource/technical/document/application_note/9c/d9/07/d0/d4/a9/45/00/DM00175930.pdf/files/DM00175930.pdf/jcr:content/translations/en.DM00175930.pdf

, that's mandatory for correct self-test. See if it helps.

You can also download the 

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software-expansion/x-cube-mems-xt1.html#getsoftware-scroll

 SW package where you can find similar SelfTest example. This package supports a few Nucleo and MEMS Shield boards but if you don't have them you can still at least inspire yourself by the open source code.

Best regards,

Petr

Posted on November 14, 2017 at 07:39

Hi,

thank you for your response, I tried your approach as in

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fccc%2Fresource%2Ftechnical%2Fdocument%2Fapplication_note%2F9c%2Fd9%2F07%2Fd0%2Fd4%2Fa9%2F45%2F00%2FDM001759pdf%2Ffiles%2FDM001759pdf%2Fjcr%3Acontent%2Ftranslations%2Fen.DM001759pdf

p.77, Values I get are approximately the same, and both akcel and gyro self test fail. I think I need to send back those devices.

Why does this issue happened, the device is brand new (yesterday I've unpack it). Is there a possibility that device get broken during transport? Is those devices so fragile?

Petr S
ST Employee
Posted on November 14, 2017 at 10:33

Hi Maciek,

I've made a quick calculation for X axis of acc and gyro and the self-tests passed.

For linear acceleration (example of X axis):

Linear acceleration sensitivity for FS = ±2 is 0.061 mg/LSB

Average of 575, 505, 455, 502, 564 is approx. 520 LSB

Average of 8114, 7962, 8036, 8056, 8098 is approx. 8053 LSB

8053 - 520 = 7533 LSB * 0.061 mg/LSB = ~460 mg

Use these self-test limits:

90 <= 460 <= 1700 mg => passed

For angular rate (example of X axis):

Angular rate sensitivity for FS = ±2000 is 70 mdps/LSB

Average of 8, 14, 6, 9, 7 is approx. 9 LSB

Average of 2994, 4491, 4499, 4492, 4494 is approx. 4194 LSB

4194 - 9 = 4185 LSB * 70 mdps/LSB = ~293 dps

Use these

self-test limits

:

150 <= 293 <= 700 dps => passed

You can calculate remaining axes but I believe it will pass too so I wouldn't return the devices.

Best regards,

Petr
Posted on November 14, 2017 at 12:11

Hi,

thank you very much for your response. In AN4682 there is for XAxis:

| Min (ST_X) | <= | OUTX_ST-OUTX_NOST | <= | Max (ST_X) |.

Could you tell me how do you have calculate this line:

90 <= 460 <= 1700 mg => passed

I've trouble, I do not know how 90 value is calculated.

In my opinion it should be 7962 LSB * 0.061 mg / LSB ~ = 486mg (min value during test condition)

Posted on November 14, 2017 at 12:31

Now I finally understood what was the issue here. To explain it, the Min and Max values in

| Min (ST_X) | <= | OUTX_ST-OUTX_NOST | <= | Max (ST_X) | formula 

are actually the self-test limits given by ST. So you can rewrite your formulas as follows:

For linear acceleration:

90 mg <= | OUTX_ST [mg] - OUTX_NOST [mg] | <= 1700 mg

90 mg <= | OUTY_ST [mg] - OUTY_NOST [mg] | <= 1700 mg

90 mg <= | OUTZ_ST [mg] - OUTZ_NOST [mg] | <= 1700 mg

For angular rate:

150 dps 

<= | OUTX_ST [dps] - OUTX_NOST

[dps] | <=

 700 dps

150

dps 

<= | OUTY_ST [dps] - OUTY_NOST

[dps] | <=

 700 dps

150

dps 

<= | OUTZ_ST [dps] - OUTZ_NOST

[dps] | <=

 700 dps

If your calculated values fit into the interval, the device is ok.

Best regards,

Petr

Posted on November 14, 2017 at 12:53

And one last question where can I find those limits, are they depend for scale which I use, or are they constant??

Posted on November 14, 2017 at 14:18

At this moment you cannot find it anywhere, just use what I gave you, please. It's FS dependent so you have to strictly follow the procedure from application note.