I've been playing with BMX160 shuttleboard and got a strage behaviour when testing magnetic distortion. My test consisted of positioning BMX160 shuttleboard in a relatively clean magnetic environment. After that, I acquired measurements from the magnetometer and printed it to the console. Then I used a permanent magnet to generate magnetic interference by putting said magnet really close to the shuttleboard. As expected, magnetometer output changed while the magnet was close to the PCB (that was actually great, since my goal was to detect change in magnetic field based on magnetometer magnitude). Later, I removed the magnet from magnetometer proximity and observed that the data remained distorted. I then unplugged and plugged back the power cable and uploaded my firmware again. There was no change. It looks as if the magnetic interference permanently changes magnetometer offsets. Also, the change in magnetometer output was dependent on the position of the permanent magnet.
Each time I did a figure-of-eight motion and plotted the results. It looks to me that hard-iron parameters are affected. I use BMM150 API to fetch magnetometer data. I also tried fetching the data without RHALL compensation, but the problem persisted.
Here are two images of the plot, each quazi-sphere represents one test.
My expectation was that the magnetometer data will remain severely distorted when in close proximity to the magnet (which was true), but I also expected that the readings will converge back to previous values when the source of magnetic distortion was removed.
Is this the expected behaviour or is there a problem somewhere?
Solved! Go to Solution.
BMM150 is one of the few magnetometers out there that cannot get magnetized, this is a key differentiator with other sensing technologies.
What you are seeing is most likely the effect of magnetization of OTHER components around the PCBs, such as mounting screws, standoffs, batteries, metal case, etc.