cancel
Showing results for 
Search instead for 
Did you mean: 

LSM9DS1 Magnetometer readings make no sense?

RReic
Associate

Hello!

I am working with the LSM9DS1 and am having trouble with my magnetometer.

I tried following Application Notes in which pitch, yaw and roll are calculated but had no success. I tried tracking down the error and I found the following problem: My magnetometer reads strange values?

Currently I am calculating the norm of the measured magnetic field. I did this in two different towns, in my company and in a forrest, so there are no external magnetic fields disturbing my measurement and the error stays the same. The norm of the measured magnetic field changes significantly whenever I move or rotate the sensor. I expect the vector to have the same value, no mater to what degree my sensor is rotated, the same point in space should lead to the same vector norm.

As I said, the magnetometer is callibrated, there are no external magnetic fields, I followed the design rules for the layout in the datasheet and still I am picking up strange readings. Can someone please tell me what produces this error?

Kind regards,

Robert Reichel

1 REPLY 1
Miroslav BATEK
ST Employee

It is hard to judge with any data. Can you please collect data from X, Y, Z axis during multiple device rotation along, X, Y, Z axis? What you mean by "the magnetometer is calibrated"? Did you compensate at least the Hard-Iron?

You can check similar discussion:

https://community.st.com/s/question/0D50X00009XkfxlSAB/lis3mdl-calibration

https://community.st.com/s/question/0D50X00009XkYI6SAN/wrong-magnetic-values-with-lis3mdl