Skip to main content
ABulu.2
Associate II
March 6, 2023
Solved

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?

  • March 6, 2023
  • 6 replies
  • 2508 views

..

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    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

    6 replies

    Peter BENSCH
    Technical Moderator
    March 6, 2023

    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

    ABulu.2
    ABulu.2Author
    Associate II
    July 26, 2023

    Thank you for your support @peter_3993 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?

    ABulu.2
    ABulu.2Author
    Associate II
    March 7, 2023

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

    Eleon BORLINI
    Eleon BORLINIBest answer
    ST Employee
    March 7, 2023

    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
    ABulu.2Author
    Associate II
    March 7, 2023

    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

    Eleon BORLINI
    ST Employee
    March 7, 2023

    Hi @ABulu.2​ ,

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

    -Eleon

    ABulu.2
    ABulu.2Author
    Associate II
    March 8, 2023

    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​ 

    Eleon BORLINI
    ST Employee
    March 10, 2023

    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
    ABulu.2Author
    Associate II
    July 26, 2023

    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?