This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

magnetometer
#2
I don't have a good explanation for the oscillation, but the fact that you cannot get the axis down to zero looks like you are dealing with a bad calibration.

Absolute measurements with the phone's magnetometer can be tricky because you usually measure fields in the order of the earth's magnetic field, which is rather weak compared to unwanted influences. In fact, there are plenty magnetic fields from within the phone, which can also change from environmental influences (imagine when shopping for clothes you accidentally place your phone on one of those strong magnets that remove anti-theft devices). Therefore the phones try to remove the "permanent" field in the phone from the measurement and they use some kind of calibration algorithm to figure out what this "permanent" field is.

So, a typical behavior you can find on pretty much every device is that when using the magnetometer the first time after not using it for a while (or on some devices after a fresh boot), that there is an offset in one direction (which, if large enough, would prevent reaching zero). If you rotate the phone about all axes while running a measurement, there suddenly is a jump in the curve as the phone notices the incorrect calibration and corrects it.

But there are also some phone-specific behaviors. For example, some phones tend to recalibrate when the field becomes too strong (i.e. 100µT), which prevents measuring stronger fields while others only do not show this behavior.

In the end, the most robust method is to disable the calibration altogether and manually subtract the field measured before applying the field that you want to measure. You can do so in the menu in the top right corner. In any experiment that uses the magnetometer you will find an item "use calibrated magnetometer" or "switch to the raw magnetometer" (or maybe similar). With this setting the calibration from the phone should be disabled - you will quite likely not be able to rotate the field to zero, but also the phone should not mess up your measurement by recalibrating while measuring.

(This option is not present on some older Android phones which do not exhibit the raw magnetometer, but it should work on most phones.)
Reply


Messages In This Thread
magnetometer - by manuboltri - 12-14-2018, 06:04 PM
RE: magnetometer - by Sebastian Staacks - 12-14-2018, 10:22 PM
RE: magnetometer - by manuboltri - 12-15-2018, 12:03 AM
RE: magnetometer - by Roland Van Kerschaver - 12-16-2018, 02:32 PM

Forum Jump: