cancel
Showing results for 
Search instead for 
Did you mean: 

LSM303AH self-test fails

Eetu Nevalainen
Associate II

Hi,

We're not able pass LSM303AH accelerometer self-test on our products. Please see one of the results below. The datasheet doesn't describe what may be wrong if the self-test fails so could you guide us with this issue.

As far I understand the allowed difference on LSM30AH is: 70 <= |st avg - nost avg| <= 1500.

nost x: {56, 76, 68, 84, -40}, avg: 48.8

nost y: {-180, -172, -220, -148, -204}, avg: -184.8

nost z: {-8284, -8284, -8296, -8284, -8284}, avg: -8286.4

st x: {3116, 3128, 3240, 3228, 3164}, avg: 3175.2

st y: {2460, 2460, 2504, 2468, 2488}, avg: 2476

st z: {-5588, -5608, -5596, -5588, -5588}, avg: -5593.6

x diff: 3126.4

y diff: 2660.8

z diff: 2692.8

// Eetu

8 REPLIES 8
Eleon BORLINI
ST Employee

hi @Eetu Nevalainen​ , which FS did you set? Please note that these values are for 2g. And did you write 01h to ST [2:1] of CTRL3_A to enable positive self test? Regards

FS is set to 4g and positive self-test is enabled. Here's I2C traces from the self-test procedure. I didn't notice anything out of ordinary but maybe you can spot something.

​if FS is 4g you have to double the self test limits (the ds ones refers to FS 2g), changing from min 70mg, max 1.5g to min 140mg, max 3g. In this way, y and z values falls inside the limits, not the x value, which is too high... are you moving the LSM303AH during the self test? Regards

Thanks for the clarification. So are the limits triple if 8g is used and so on? The board is stationary on my table so the sensor should be not moving.

>> So are the limits triple if 8g is used and so on? Yes, you are right

But is the x value repeatable? Are you facing issue in reading DATAOU_X value? Eegards​

Nothing indicates that there's an issue in reading the values. I changed the board to another one and this one has a problem with y-axis even though the orientation is the same as before; x=2992, y=3748 and z=2974. I repeated the test over 10 times and the results are pretty much the same.

Okay so maybe the values themselves are incorrect. I'm using 14bit resolution so should I right-shift values by 2?

Eleon BORLINI
ST Employee

​Hi @Eetu Nevalainen, yes, consider that in normal mode case OUT_X/Y/Z_L/H_A data have to be computed on 16 bits and in two's complement (although the two lsb are 0). Regards