Skip to main content
Visitor II
June 17, 2020
Question

LSM9DS1 offset bias appears to be changing

  • June 17, 2020
  • 2 replies
  • 2060 views

We are using the LSM9DS1 to track orientation and measure the surrounding magnetic field. However, in our application the field being measured also includes the magnetic field from a permanent magnet. When briefly exposing the sensor to the magnet, the offset bias of the sensor is changing. This makes our previously calibrated parameters for the magnetometer unusable.

The screenshot below shows raw magnetometer output from our program. After we introduce a permanent magnet (within the full-scale range) and remove it from its vicinity, the magnetometer bias changes. For this screenshot, the change in magnetic field norm was approximately 1051 LSB, or 0.51 gauss at +/- 16 gauss. This gets much worse with stronger magnetic fields (>16 gauss) but nowhere near the 50 gauss indicated in the datasheet where a degrading offset would be noticeable. Is there any way to prevent this? I also found that this thread had a similar issue, but was never fully resolved. Any help would be greatly appreciated.

0693W000001qwf5QAA.jpg

    This topic has been closed for replies.

    2 replies

    Visitor II
    June 20, 2020

    Did you consider the possibility that some part(s) of your sensing unit might get magnetized?

    I know that such a magnetization is hard to show, even harder to measure in a repeatable way. But I would not exclude the possibility.

    ABhav.1Author
    Visitor II
    June 23, 2020

    Yes, we did. However, the setup was extremely minimal for this test. The sensor is from a SparkFun breakout board connected via jumpers on a mini breadboard to an Adafruit Feather Express. There was no magnetic material present near the setup as far as I know, such as iron screws or anything of the like.

    Visitor II
    June 23, 2020

    You don't need iron screws.

    Are you aware that the ubiquitous Nickel (mainly used for diffusion stop layers on capacitors, PCBs etc.) has ferromagnetic properties? Using a strong magnet might magnetize the Nickel layers. As these are not far from the magnetometer, even a bit of magnetization would create some offset.

    To evaluate this issue, you could use the magnetvfrom different directions, checking whether the change in offset correlatesvwith the direction and orientation of the magnet's approach.

    Or you could try to use a demagnetizing device: once these were easily available to remove residual magnetization from the heads of tape recorders. Not sure about their availability these days. But you might be able to dig up some schematics for a "demagnetizer".

    ABhav.1Author
    Visitor II
    June 23, 2020

    I actually did not know about this, that's a very good point. Though, I'm extremely surprised that the magnitude of the offset is as large as it was observed above if that's the case. I'm curious if it's possible that the sensor itself has nickel or another ferromagnetic material internally. For the PCB, are there design guidelines for making them insusceptible to magnetization? Or is nickel always part of the PCB fabrication process?

    I'll continue to test bringing in the magnet from different angles and observing the offset, along with looking into a demagnetizer.