I am using the BMM150 Magnetometer. The datasheet does not contain any information regarding the addresses of the calibration values that need to be read from the device to compensate the magnetometer output. These address reads can be deducted from the GitHub project, but it is still lacking a description of what each parameter is. Is there any application note or further documentation explaining this?
Also would like to know why the datasheet states that the max range in the z-axis is +-2500uT but it gets saturated to +-2048uT when using the int16_t format compensation? I assume this will be clearer once I have more information regarding the calibration/compensation parameters.
Solved! Go to Solution.
Thanks for the prompt response.
From what i understand, the output received from the bmm15_compensate functions can be converted to uT by usng the sensitivity of 16LSB/uT (it is done like that on the GitHub repo and suggested in datasheet).
In the attached pdf "temperature calibration" you mention that 32-bit resolution can be used. This would, however, result in potential outputs in uT much larger than the datasheet specifies for the BMM150 device.
For instance, for the Z-axis, the range is specified as +-2500uT. At +2500uT this result in a integeter output of 2500 * 16 (LSB/uT) = 40000. However, if 32-bit resolution is used, the integer output could be much higher than that. In the example code you give, you saturate in software to max of in32_t.
How is this possible? Because a value of much higher than the range specifice of +-2500uT will then be received as output?
Please help to clarify?
Sorry for the confusion.
BMM150 x/y/z raw data (signed integers) need to work with the trimmed values and the formula to derive meaningful values in the unit of uT. The API/driver does this job and outputs another set of signed integers while users can simply divide these signed integers after API by 16LSB/uT to get the final uT values. This means that the process from BMM150 x/y/z raw data to final meaningful uT values is not linear. Therefore, it is not possible to divide BMM150 raw data by 16LSB/uT to get uT values.
There will be no remnant magnetic field on the sensor if the device was exposed to a magnetic field higher than 2500uT (the field was still well below the maximum field specified as 7 T in the datasheet). This means that after the external strong magnet is removed, BMM150 will work back to normal as nothing has happened.