cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, We use High-accuracy, ultra-low-power, 3-axis digital output magnetometer for a project and I wanted to detailed information about x,y,z values and how can we calculate the amplitude value?

ABulu.2
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @ABulu.2​ ,

you might check the iis2mdc_reg.c driver on github for the LSB to milliGauss conversion formula. I'm reporting them here for simplicity:

// Magnetometer raw data conversion
float_t iis2mdc_from_lsb_to_mgauss(int16_t lsb)
{
  return ((float_t)lsb) * 1.5f;
}
 
// Temperature sensor raw data conversion
float_t iis2mdc_from_lsb_to_celsius(int16_t lsb)
{
  return (((float_t)lsb / 8.0f) + 25.0f);
}

-Eleon

View solution in original post

9 REPLIES 9
Peter BENSCH
ST Employee

Welcome, @ABulu.2​, to the community!

You forgot to specify the partnumber of the sensor, but from the description I could see that you probably use the IIS2MDC?

Let's see if @Eleon BORLINI​ can help you.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
ABulu.2
Associate II

Thank you for your return @Peter BENSCH​ . Yes, we use IIS2MDC. @Eleon BORLINI​ 

Eleon BORLINI
ST Employee

Hi @ABulu.2​ ,

you might check the iis2mdc_reg.c driver on github for the LSB to milliGauss conversion formula. I'm reporting them here for simplicity:

// Magnetometer raw data conversion
float_t iis2mdc_from_lsb_to_mgauss(int16_t lsb)
{
  return ((float_t)lsb) * 1.5f;
}
 
// Temperature sensor raw data conversion
float_t iis2mdc_from_lsb_to_celsius(int16_t lsb)
{
  return (((float_t)lsb / 8.0f) + 25.0f);
}

-Eleon

ABulu.2
Associate II

Thank you, and can we use below formula for calculate the amplitude value? Because these values are vector and we want to focused amplitude value.

0693W00000aINW5QAO.png

Hi @ABulu.2​ ,

yes for sure, to have the spatial intensity you can use that formula.

-Eleon

ABulu.2
Associate II

Thank you �� Other questions are, how we can sure the sensor calibration? We have 4 sensor and when we were testing, we measured different x, y, z value. And I want to ask, we measure some values, and this values unit is milligauss, but what we measure using magnetometer? I think magnetic flux strength, but I am not sure. @Eleon BORLINI​ @Peter BENSCH​ 

Hi @ABulu.2​ ,

regarding the different measure issue, our suggestion is to always run the hard iron compensation, that calibrates the sensor residual offset at Time 0. You can refer to this example for LIS2MDL --> lis2mdl_hard_iron.c, which is very similar to IIS2MDC at programming level.

Regarding the physical quantity measured, you are right, it is the magnetic induction or magnetic flux density.

-Eleon

ABulu.2
Associate II

Thanks for your support @Eleon BORLINIMy thesis topic is to develop a dynamic preventive maintenance schedule for medical devices based on their usage. For this purpose, I have been collecting data using a magnetometer sensor 24/7 for the past 3 months. I need guidance on how to analyze the data from the three axes. Standard deviation seems to provide accurate results in determining the duration of device usage. However, I am concerned about the presence of noise in the real data and the potential reasons for fluctuations. Could you provide insights on how to interpret the data and what percentage of error can be considered normal?

Thank you for your support @peter BENS. My thesis topic is to develop a dynamic preventive maintenance schedule for medical devices based on their usage. For this purpose, I have been collecting data using a magnetometer sensor 24/7 for the past 3 months. I need guidance on how to analyze the data from the three axes. Standard deviation seems to provide accurate results in determining the duration of device usage. However, I am concerned about the presence of noise in the real data and the potential reasons for fluctuations. Could you provide insights on how to interpret the data and what percentage of error can be considered normal?