topic BMM150 range in MEMS sensors forum
https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BMM150-range/m-p/23010#M6672
<P>Hi everyone, </P><P>I am currently using the bmm150 (directly from the BMX160) to measure the magnetic field of a very small NdFeB magnet (250 micron size).</P><P>I use the Bosh API to set correctly every parameter (bmx160.c), and therefore use the compensated values for x, y and z, which are returned in int16.</P><P>While reading those values, I correctly find that when it overflows, the value is at 32768 for all three axis.</P><P>However, I don't understand the range of the magnetometer. Indeed, if I use the fact that LSB = 1/16 uT (as it is said <A href="https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BMM150-Z-axis-data/m-p/10528#M1873" target="_self">here</A>), and because the x and y axis are coded on 13 bits, then I should have a range of +/- 255.9375 uT (From -4905 to +4095, as -4096 is used to define a saturated state). When I measure the earth's magnetic field, convert binary into uT (by dividing by 16), calibrate the data against Soft Iron and Hard Iron effects, the value I obtain is 10 times lower than the actual earth's magnetic field. </P><P>Am I missing something obvious?</P><P>The other possible approach is the following: as the Datasheet gives +/-1300 uT range for x and y axis, and as the saturated value of x and y axis is -4096, does it mean that 4095 is associated to +1300uT, and -4095 to -1300 uT? That means that LSB = 0.32 uT, not 1/16 uT... <BR />Following the same thought, for the z axis, the binary value for +2500 uT is 16383 and -2500uT is -16383?</P><P>So basically, my question is: how to get from binary to uT value? </P><P>Thank you for your answer,</P><P>Corentin</P>Fri, 09 Apr 2021 07:33:49 GMTCPCamus2021-04-09T07:33:49ZBMM150 range
https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BMM150-range/m-p/23010#M6672
<P>Hi everyone, </P><P>I am currently using the bmm150 (directly from the BMX160) to measure the magnetic field of a very small NdFeB magnet (250 micron size).</P><P>I use the Bosh API to set correctly every parameter (bmx160.c), and therefore use the compensated values for x, y and z, which are returned in int16.</P><P>While reading those values, I correctly find that when it overflows, the value is at 32768 for all three axis.</P><P>However, I don't understand the range of the magnetometer. Indeed, if I use the fact that LSB = 1/16 uT (as it is said <A href="https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BMM150-Z-axis-data/m-p/10528#M1873" target="_self">here</A>), and because the x and y axis are coded on 13 bits, then I should have a range of +/- 255.9375 uT (From -4905 to +4095, as -4096 is used to define a saturated state). When I measure the earth's magnetic field, convert binary into uT (by dividing by 16), calibrate the data against Soft Iron and Hard Iron effects, the value I obtain is 10 times lower than the actual earth's magnetic field. </P><P>Am I missing something obvious?</P><P>The other possible approach is the following: as the Datasheet gives +/-1300 uT range for x and y axis, and as the saturated value of x and y axis is -4096, does it mean that 4095 is associated to +1300uT, and -4095 to -1300 uT? That means that LSB = 0.32 uT, not 1/16 uT... <BR />Following the same thought, for the z axis, the binary value for +2500 uT is 16383 and -2500uT is -16383?</P><P>So basically, my question is: how to get from binary to uT value? </P><P>Thank you for your answer,</P><P>Corentin</P>Fri, 09 Apr 2021 07:33:49 GMThttps://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BMM150-range/m-p/23010#M6672CPCamus2021-04-09T07:33:49ZRe: BMM150 range
https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BMM150-range/m-p/23035#M6681
<P>Hi,</P>
<P>Thanks for your inquiry.</P>
<P>In order to get BMM150 x/y/z values in the unit of uT, you need to use the formula and temperature compensation parameters in the NVM of each BMM150 chip to work together with the signed integers from BMM150 x/y/z/Hall resistance data registers. Please see the attached "bmm150-step-by-step-temperature-compensation-sample.pdf" for more information. This formula is also included in the BMM150 API source code on the Github at <A href="https://github.com/BoschSensortec/BMM150-Sensor-API" target="_blank">https://github.com/BoschSensortec/BMM150-Sensor-API</A>.</P>
<P>Thanks.</P>Fri, 09 Apr 2021 20:53:15 GMThttps://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BMM150-range/m-p/23035#M6681FAE_CA12021-04-09T20:53:15Z