cancel
Showing results for 
Search instead for 
Did you mean: 

lis3mdl vs lsm9ds0

Artyum Arkaduis
Associate
Posted on June 12, 2017 at 20:42

Hi,

Some time ago I've succesfuly used lsm9ds0 (SparkFun) for 3D magnetic field readings. Today I'm trying to upgrade my device to use lis3mdl (MinIMU-9 v5 Gyro) but the magnetometer output is different than lsm and I don't know how to interpret it. It seems that X and Y axis woks simillar to lsm (positive and negative readings dependent on imu position) but the Z is always positive (eg 1500-4500 raw @ +/-4 gauss ) which I don't understand.

I've used config from AN4602:

M_CTRL_REG2,        0x40

M_CTRL_REG1,        0xfc

M_CTRL_REG4,        0x0c

M_CTRL_REG3,        0x00

I assumed that the magnetic field of measurement would be the same on lms9ds0 and lis3mdl but It seems that it's not or Am I doing something wrong?

Thank you

#magnetic-sensor #lsm9ds0 #lis3mdl
1 REPLY 1
Miroslav BATEK
ST Employee
Posted on June 13, 2017 at 09:58

Please check following topic 

https://community.st.com/0D50X00009XkYI6SAN

 regarding hard iron.

You should perform at least hard-iron calibration to get proper value of the magnetic field.