LIS2MDL appears to output inconsistent values
Hi all,
We have integrated an LIS2MDL magnetometer into our custom PCB. We have recently been running some tests on the boards, and are collection raw data from the sensor via the I2C line. In our testing, we have found that different boards appear to be outputting different raw values in what should be the same conditions. What we have done is taken the raw data from the devices, calculated the magnitude ( sqrt(mag_x^2 + mag_y^2 + mag_z^2) ) which provides the following pieces of information. All devices are placed in the exact same location in the exact same orientation when the data is recorded. Values are in LSBs, where 1LSB = 1.5 mG:
| Device | X Direction | Y Direction | Z Direction | Magnitude |
| # 1 | -3 | -153 | 58 | 163 |
| # 2 | 126 | -218 | 454 | 519 |
| # 3 | 132 | -315 | 211 | 404 |
| # 4 | 262 | -376 | 325 | 561 |
We have been testing the devices with various paramagnetic and ferromagnetic materials, so I'm wondering if there was some sort of bias introduced that I am unaware of. Regardless, I am looking for some explanation as to why the values recorded by four identical devices in identical conditions would be so different.
Thanks!
