Magnetometer on CPro

Hi all,

I'm trying to use the magnetometer on my CPro, but due to interference of the battery I get very unclear results. (see
Is there any update on using the magnetometer on a CPro?

Since I'm not looking for an absolute heading, but only for a relative change in degrees (or rad), is there a way I can calibrate the CPro with battery so that I at least can calculate the relative change when rotating the CPro?
Or is the magnetic field of a battery to strong to be able to detect enough change in the fields for this?


Ps: isn't this a serious design flaw of the CPro? And shouldn't this be mentioned somewhere? Assuming to have a board with a working magnetometer, and having to go through several demagnetizing steps with only some improvement is a big disappointment for me :(.


  • What do you mean by "unclear results"?  The magnetometer can still detect board movement even with the battery.  For example, spinning the board around the Z axis will produce a noticeable change in the B field readings.

    I apologize for any misinformation regarding the CPRO.  The only mention of this issue is in the FAQ however you are correct in that it should be placed in a more noticeable place e.g. store or description page.

    We are working on adding the magnetometer to the R form factor which uses a LiPo battery.  This is remove the interference from the magnetized coin cell casing.
  • @Alex

    What kind of demagnetizer are you using?  Fixed magnet demagnetizers do not sufficiently depolarize the ferromagnetic materials in the coin cell battery.

    An AC type demagnetizer can completely nullify the magnetic polarization.  Here is an example of one such:

    Once demagnetized in this way, the polarization of the battery will no longer directly interfere with the magnetometer.  The presence of ferromagnetic material in the battery still skews the field direction slightly, but we get usable readings in testing.
This discussion has been closed.