0

Bad results in magnetic measurements with LSM303
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Bad results in magnetic measurements with LSM303

by oriolboix on Mon Dec 18, 2017 3:17 pm

Three years ago I used an FLORA Accelerometer/Compass Sensor - LSM303 for compass measurements and I obtained good results.

Now my students are using another LSM303 and obtained incongruent results (the North direction are far different from the maximum field axis). I observed they are using a different library. In the product page the linked library is different from the one I used early.

I tested their circuit and my circuit, both with the example program of the old library and with the example program of the new library. In all the cases I obtain uncoherent results in magnetic values.

Someone has experienced similar problems? Do you know how to solve it?

oriolboix
 
Posts: 2
Joined: Thu Apr 20, 2017 2:59 am

Re: Bad results in magnetic measurements with LSM303

by adafruit_support_bill on Mon Dec 18, 2017 3:49 pm

Has anyone been testing it with a strong magnet? I've seen cases where parts of the magnetometer itself had become magnetized from the field of a rare-earth magnet in close proximity. This resulted in wildly distorted readings. They did have some success demagnetizing it with a common tool demagnetizer from the hardware store.

adafruit_support_bill
 
Posts: 70492
Joined: Sat Feb 07, 2009 10:11 am

Re: Bad results in magnetic measurements with LSM303

by oriolboix on Tue Dec 19, 2017 5:23 am

Thanks for the quick answer.

In the case of my students’ sensor I can’t say yes or not but in the case of my sensor I don’t used any permanent magnet near the sensor.

We try your suggestion in the next days.

Thanks

oriolboix
 
Posts: 2
Joined: Thu Apr 20, 2017 2:59 am

Please be positive and constructive with your questions and comments.