LIS331 DL Accelerometer

Have questions about a SparkFun product or board? This is the place to be.

Moderator: phalanx

Post Reply
Posts: 6
Joined: Wed Jan 16, 2019 6:02 pm

LIS331 DL Accelerometer

Post by RipVW » Wed Jan 16, 2019 11:08 pm

Greetings - I have this working and the x and y axes read as expected depending on the orientation. The z axis reads 2g when resting flat, 0g when upside down, and 1g when resting on any of the x or y sides. In other words, the z axis always read 1g too high. Is this a common problem? Do I not understand how this is supposed to work, or, have I damaged it, or, is the part defective? Thank you for your time.

Support Volunteer
Posts: 2341
Joined: Fri Jun 15, 2007 9:41 pm
Location: Eugene, Or

Re: LIS331 DL Accelerometer

Post by jremington » Sat Jan 19, 2019 10:45 pm

All magnetometers need to be calibrated to be useful. Yours has a rather severe Z offset, but that is not uncommon. At the minimum you need to estimate offsets and scale factors for each axis.

Simple procedure to calibrate a related magnetometer:

Much better, but more complicated procedure for another one: ... eter/14315

Post Reply