2024-11-27 11:40 PM
Hi,
I am developing a product that can be installed in either a horizontal or vertical orientation and uses the LIS3MDL as the source for a compass..
The PCB is common so the LIS3MDL will be in one of 2 orientations.
In a horizontal position everything is fine and I get the readings expected.
In vertical orientation it is not working.
My assumption was that the axes X,Y,Z were just names and that the data from each axis was relevant to that axis and that the data obtained would relate to the plane that axis was on.
It seems this is incorrect. I have run a test and see that the range of values (max-min) on each axis is very different, particularly on the Z axis.
Moving the sensor through 360 degrees on each axis I am getting X -59 to 25, Y -36 to 46, Z -86 to 0
I assumed I would get the same min to max for each axis.
So can the sensor be used in a vertical orientation?
I need the Z axis facing forward (to replace X) and X axis facing left (to replace Y).
2024-12-05 08:02 AM
Hi @Acuario ,
Can you share the raw data? Just to understand the differences you saw.
2024-12-05 07:15 PM
The sensor can be used in a vertical orientation. You need to adjust the data in your software to correct the magnetic field so that the sensor output is consistent with the actual direction.