cancel
Showing results for 
Search instead for 
Did you mean: 

i am using lis3dml sensor, i am not be able to get proper reading from the sensor does it require a calibration, if yes how to do the calibration?

Vkj.1
Associate II
 
9 REPLIES 9
Eleon BORLINI
ST Employee

Hi @Vkj.1​ ,

which values are you receiving?

I suggest you to perform periodically at least the hard iron calibration, as described in the datasheet of the LIS2MDL, p.20.

Hard-iron distortion occurs when a magnetic object is placed near the magnetometer and appears as a permanent bias in the sensor's outputs. The hard-iron correction consists of compensating magnetic data from hard-iron distortion. 

Since the LIS2MDL magnetometer has no offset register, you have to manage it via software (reading the initial offset in a steady and controlled condition.

At application level, you can also refer to the MotionMC library that provides real-time magnetometer calibration using hard iron (HI) and scale factor coefficients to correct magnetometer data. 

-Eleon

Vkj.1
Associate II

but i have not put any magnetic object near the sensor

Vkj.1
Associate II

how do i do the sensor calibration if i am not having the sensor eval board?

Vkj.1
Associate II

if i calculate the angle between the x and y components will it work as compass?

Eleon BORLINI
ST Employee

Hi @Vkj.1​ ,

>> but I have not put any magnetic object near the sensor

You could have a residual magnetization in case the sensor has been exposed to previously high magnetic fields, so in general an initial calibration is warmly suggested, at limit required.

>> how do i do the sensor calibration if i am not having the sensor eval board?

You can use the board on which you have mounted the magnetometer, you just have to measure the initial magnetic field and, if it is different from zero (and you have no magnetic sources in the neighborhood), you have to subtract this value to the measured field (via software)

>> if i calculate the angle between the x and y components will it work as compass?

The angle between the x and the y components will always be 90 deg. If you rotate the magnetometer and you keep on acquiring, you will get a maximum value -for example- along X axis: in this case the X axis of your device will be oriented towards Earth's magnetic pole. For more details about the "eCompass" application, please refer to, for example, the MotionEC real-time E-Compass library user manual.

-Eleon

Vkj.1
Associate II

where can i get the ecompass library files?

Vkj.1
Associate II

if i want to implemet the ecompass by using lis3dml sensor how do i do?

Vkj.1
Associate II

with unicleo gui and the API' s supports ony mentioned controllers with iks01a2 but if am using other STcontroller in my project and i want calibrate if i want to calibrate in mass production how do i do?

Eleon BORLINI
ST Employee

Hi @Vkj.1​ ,

>> where can i get the ecompass library files?

>> if i want to implemet the ecompass by using lis3dml sensor how do i do?

Usually an eCompass is composed by an accelerometer and a magnetometer, such as for example the LSM303AGR. So you need also the accelerometer part for implementing an eCompass. The MotionEC real-time library can be found in the X-CUBE-MEMS1 package.

>> with unicleo gui and the API' s supports ony mentioned controllers with iks01a2 but if am using other STcontroller in my project and i want calibrate if i want to calibrate in mass production how do i do?

The IKS01A2 is a reference design and Unicleo-GUI is a reference GUI for demo purposes. If you want to implement a mass production tester, you have to build your own tester with your own GUI (you might need 3 axial coils for a characterization at application level).

-Eleon