MetaWearCPRO Magnetometer axis alignment

Hi,

I have purchased a MetaWearCPRO and I have a couple of questions regarding the magnetometer module. I have performed two periods of data collection, one where the module is rotated in all axis, and one where it is rotated around the z-axis (with the board placed flat and then turned up side down). I have uploaded images of the plots here:

http://www.biomechatronicslab.co.uk/images/YZaxisview.jpg

http://www.biomechatronicslab.co.uk/images/XZaxisview.jpg

http://www.biomechatronicslab.co.uk/images/XYaxisview.jpg

http://www.biomechatronicslab.co.uk/images/view6.jpg

http://www.biomechatronicslab.co.uk/images/view5.jpg

http://www.biomechatronicslab.co.uk/images/view4.jpg

My first question is why would the axis of the data not appear to align with the world axis? I have calibrated other magnetometers using the same method in this location and have not seen this before, the Z component of the data normally remains constant when revolving around the z-axis. There are no components that stand out as being misaligned to the board, and I don’t see any indication in the datasheet for the BMM150 (Section 8.2).

My second question is about the scaling, I was expecting the tests to produce a sphere, not an ellipsoid. I see the magnetic range of the module is different in the z-axis on the datasheet (±1300μT (x,y-axis) ±2500μT (z-axis)), but it appears that all three of the rotated axis are scaled differently (shown in view_5 and view_6). Are there any features that might be causing this?

Regards,

Sam

Comments

  • The distorted magnetic fields is most likely due to the coin cell battery.  See this post for demagnetizing the battery.

    Both iOS and Android APIs (v3) report magnetic fields in Tesla.
  • Hi Eric,

    Thank you for your reply.

    I have purchased the demagnetizer mentioned in the other post, the images below contain the results of the demagnetized IMU.


    The offset is now reduced, and I have no problem calibrating the IMUs to compensate for any residual magnetic forces from the board. My original concerns still remain, the scale and the axis misalignment are still present to the same degree.

    Do you have any other suggestions as to how I might progress towards getting more usable magnetometer data?

    Regards,

    Sam
  • edited July 2017
    I suppose the simple question is, are you sure the batteries are completely demagnetized?

    I've also let the hardware engineer know to look at this thread.
  • Hi Eric,

    Thank you for your reply.

    That is not the question. Demagnetizing the battery and the IMU will remove the effects of the hard-iron distortion. Since the magnetic field that is produced by the board/battery is at an orientation that is consistent to the orientation of the board, it will produce a consistent zero offset to the results from the magnetometer. My personal view is that demagnetizing the board is not a good recommendation to fix this for two reasons; firstly, the interference is constant it is quite easy to find, you just need to rotate the IMU randomly for a little while, and then find the mathematical center of the sphere/ellipsoid that is produced to find the offset; and secondly, because I am under the impression that coin cells will remagnetize anyway as current is drawn from them, meaning that demagnetizing is a temporary fix, not a permanent solution. I have also tested other calibrated IMUs by attaching a weak magnet to the outer casing, and while I am able to change the zero offset by doing this, the data still always forms a sphere, not an ellipsoid.

    I believe that the results that i am seeing are more consistent with soft-iron distortion, which is more likely to do with the way the materials of the board channel the earths magnetic field, which is dependant on the IMUs global orientation. This is more computationally expensive, do you have the calibration equations to fix this, including a protocol for correct axis scaling factors to ensure that the IMU returns the actually returns the magnetic field in Tesla?

    Regards,

    Sam
  • Hi @pv000980

    We agree that demagnetization only removes the static magnetic field and thus the effects of hard-iron distortion.  The stainless steel of the coin cell case still contributes to soft-iron distortion being an iron alloy.

    Do you have a reference for why you expect the coin cell to magnetize as current is drawn?  We do not expect this, as the chemical reaction is between Li and Mn which are not the ferrous parts.

    We agree that this is a soft iron distortion, and related primarily to materials in the coin cell casing.  We do not presently have any soft-iron calibration built into our firmware or APIs, but it is something we are working on.  Battery composition varies by manufacturer, so we cannot simply permanently calibrate sensors at manufacturing time.  In the future, there will be a compensation/calibration coefficient interface which can be loaded to correct the distortion.
This discussion has been closed.