Skip to main content
Visitor II
September 26, 2016
Question

LSM9DS1 Magnetic Hard/Soft Iron Compensation & Factory Calibration

  • September 26, 2016
  • 1 reply
  • 747 views
Posted on September 26, 2016 at 12:14

Hello Forum and ST support,

I was wondering if the magnetic sensors of the LSM9DS1 are factory calibrated or not. At the moment, it looks to me as if they're not calibrated at all. My hard and soft iron calculation from measurement leads to extremely different results, despite all sensors are placed on the same PCB and in very similar environments.

Could you verify for me if they're calibrated or not? If not, is there a possibility to get factory calibrated sensors, so that I'd have to run my measurements and calibration factors only once per PCB design and not for every single unit?

Another question relates to that: Can you provide a tool that calculates the hard iron and soft iron compensation factors from measurements (CSV file)? As by now, I'm using a free tool I found somewhere in the internet, which works fine, but only calculates the hard iron offset. Another tool which is supposed to calculate factors for both (hard & soft iron effects) can't handle every set of data, sometime I get imaginary results (it's a MATLAB script).

Thanks in advance

#soft-iron #lsm9ds1 #hard-iron
    This topic has been closed for replies.

    1 reply

    ST Employee
    October 29, 2016
    Posted on October 29, 2016 at 20:20

    Hello,

    Yes, LSM9DS1 Magnetometers are factory calibrated. It is not possible to have ''extremely different results'' if ''all sensors are placed on the same PCB and in very similar environment'' especially concerning Soft Iron. There must be some different issue. Concerning Hard Iron you can find typical variation in the 'M_TyOff' parameter in ''Table 3. Sensor characteristics'' of the Datasheet. Please see also ''Note 3''.

    Even if LSM9DS1 SelfTest is STMicroelectronics confidential information, you can preform simple SelfTest using the following procedure:

    1.

    Read ACC XYZ outputs (ACC_NOST_DATA)

    Read GYR XYZ outputs (GYR_NOST_DATA)

    Read MAG XYZ outputs (MAG_NOST_DATA)

    2.

    Enable ACC ST (ST=SelfTest)

    Read ACC XYZ outputs (ACC_ST_DATA)

    Verify that: ACC_NOST_DATA - ACC_ST_DATA = POSITIVE value for each axis

    Disable ACC ST

    3.

    Enable GYR ST

    Read GYR XYZ outputs (GYR_ST_DATA)

    Verify that: GYR_NOST_DATA - GYR_ST_DATA = POSITIVE value for each axis

    Disable GYR ST

    4.

    Enable MAG ST

    Read MAG XYZ outputs (MAG_ST_DATA)

    Verify that: MAG_NOST_DATA - MAG_ST_DATA = NEGATIVE value for each axis

    The tool providing Hard/Soft Iron calculations will be available on www.st.com/mems in coming weeks, search for 'osxMotionMC' (Magneto-Calibration) package regularly. You'll also need the X-CUBE-MEMS1 package v3.0.0 (so far available version is v2.1.0) and Unicle-GUI application for this tool. They should all be released at the same time. Then follow the installation instructions in the documentation.

    Best regards,

    Petr