cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSL - which values should i get for position

ABran.4
Associate II

hello

we are using LSM6DSL with full-scale acceleration range of ±2g. each one of x/y/z axis has 2 bytes output value: OUTX_L_XL (28h) + OUTX_H_XL (29h). as far as i understand, we should get 2^16=65,536 value for -2...+2g. i.e. 65,536/4=16,384 for 1g.

Thus, if my device is in a steady state (does not move), i should be in -16,384 ...+16,384 range for any axis. BUT i have some devices that give out 16500 and even 17000 values.

how can it be possible?

thanks in advance

8 REPLIES 8

17000 would be 1.037 G

Does it present similarly in all orientations?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ABran.4
Associate II

thanks for your response.

X and Y axis are OK - with ~100...500 values. but Z is 17000. rest of devices are with Z=~16200. but some ones are 16500 and even 17000 values. The situation seems strange to me - i can understand 16200 value (the device can be not absolutely vertical). but i cannot understand 17000 value!

please help.

raptorhal2
Lead

The specification document says 40 mg offset possible. Additional stresses from PCB mounting can increase the offset.

For each axis, record the data facing up and facing down. Use the average for the for the correction offset to apply in use.

Cheers, Hal

ABran.4
Associate II

thank you for your response.

it is still not clear for me: i can calculate the 40 mg possible offset:

40 mg of 1g = 16384*40/1000= 655.36. thus, i got the max value 16384 + 656 = 17,040.

the max value that i had was 17438 (i wrote it above as 17000). again - the device is totally at rest (no movement).

please advice

raptorhal2
Lead

Perhaps it is a PCB mounting effect.

After calibrating it for 1 g offset and gain, the sensor should be usable. Or, do you have some production requirement where this performance is not usable?

Another option is to try another sensor copy if you can.

Cheers, Hal

1.04 G ->17049

What are the measurements right side up and upside down?

ie 17049 vs -15719 ??

>>the device is totally at rest (no movement).

Ok, but you're likely going to need to be able to re-orientate the board to calibrate/quantify the offsets.

Especially if the manufacture adds stresses/strains

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ABran.4
Associate II

i made now additional measurements on the "problematic" device:

upside down= -17530

upside up = 15150

So the center is -2380 (-0.1452 G) you'll need to subtract that out

Are there large copper planes under the device, within the structure of the PCB?

If you do a localized / careful reflow of the part, do the readings change/improve ?

Perhap consult with a local FAE supporting your account/project.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..