Magnetometer Not Working on MMR
Hello Laura and Eric,
I am getting invalid data from the Magnetometer and I need help with that. Here is the device info, and I am going to explain the issue in detail.
- Model: MetaMotion R
- Firmware: 1.4.4
- Hardware: 0.3
- I am using Python 2.7 API on Ubuntu 16.04
I edited the data_fuser.py (see the attached file) to include the magnetometer in the same pack with the acc and gyro. Both the acc and gyro displayed the data correctly, but the mag data were all zeros, or constant values. I tried to use MetaBase app from ios app store, and the mag data were not zeros, but still constant/almost constant as in the following screenshot.
I found another discussion in this form stating that the buzzer connected to the circuit was interfering with the Magnetometer. I opened the plastic case and moved the buzzer away from the circuit. Now, after I calibrate the device (based on https://mbientlab.com/tutorials/Calibration.html?highlight=sensors), the mag works once, but when I try to connect it back, it gives zeros again. I tried many times, and the mag only gives valid data once after the calibration.
Data after Calibration, but before moving the buzzer:
Data after calibration and after moving the buzzer:
Data at 2nd+ run after calibration (with or without the buzzer around) :
I assume that the device is not designed to require a new calibration each time I run the code since that makes it unusable. So, my questions are:
Q1: How can we get the Magnetometer to give the correct values without requiring calibration for every single run? Please provide us with a python sample code for that.
Q2: What can we do regarding the buzzer interfering with the mag? Should we just cut it from the circuit?
Q3: When I get the valid data from the calibration, I see that the mag is at 10HZ. How can we increase that? I checked the Magnetometer page on your website (https://mbientlab.com/cppdocs/0.7.0/magnetometer.html) but it did not give details on how to configure the sensor. A python sample code illustrating the Magnetometer configuration would be appreciated.
Thank you in advance and I look forward to hearing from you soon.