2017-06-12 11:42 AM
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, 0xfcM_CTRL_REG4, 0x0cM_CTRL_REG3, 0x00I 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 #lis3mdl2017-06-13 12:58 AM
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.