Skip to main content
Visitor II
June 2, 2022
Solved

can't able to understand the raw_data ISM330DLC

  • June 2, 2022
  • 1 reply
  • 1261 views

Hi Everyone,

I am new to this field and working on ISM330DLC i am using the below program (link) to read the data and getting the raw_data of gyroscope values aways 0 when i kept on table it is getting values only if i made any movement. but i read that gyroscope will return some offset value when there is no movement in that case the program which i am using is it wrong?? but it is given the ST only in github what might be wrong can't ale to get.

STMems_Standard_C_drivers/ism330dlc_read_data_polling.c at master · STMicroelectronics/STMems_Standard_C_drivers (github.com)

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

    Hi @Akuma.6 Nallala​ ,

    I believe this is correct, you are reading almost 0 LSB (equals to 0 dps) on all the 3 axis when the device, and in particular the gyroscope, is in rest condition. It is different for the accelerometer, since typically the Z axis shows 1g offset when the device is pointing towards the ceiling. For the gyro, if you oscillate your hands, you should see something similar to a sine waveform plotting the dataout.

    The drivers you are linking are the correct one: in particular, here below I reported the formulas for LSB to physical unit conversions, for both axl and gyro.

    /*accelerometer LSB-to-physical units conversion*/
    float_t ism330dlc_from_fs2g_to_mg(int16_t lsb)
    {
     return ((float_t)lsb * 0.061f);
    }
     
    /*gyroscope LSB-to-physical units conversion*/
    float_t ism330dlc_from_fs125dps_to_mdps(int16_t lsb)
    {
     return ((float_t)lsb * 4.375f);
    }

    If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.

    -Eleon

    1 reply

    ST Employee
    June 3, 2022

    Hi @Akuma.6 Nallala​ ,

    I believe this is correct, you are reading almost 0 LSB (equals to 0 dps) on all the 3 axis when the device, and in particular the gyroscope, is in rest condition. It is different for the accelerometer, since typically the Z axis shows 1g offset when the device is pointing towards the ceiling. For the gyro, if you oscillate your hands, you should see something similar to a sine waveform plotting the dataout.

    The drivers you are linking are the correct one: in particular, here below I reported the formulas for LSB to physical unit conversions, for both axl and gyro.

    /*accelerometer LSB-to-physical units conversion*/
    float_t ism330dlc_from_fs2g_to_mg(int16_t lsb)
    {
     return ((float_t)lsb * 0.061f);
    }
     
    /*gyroscope LSB-to-physical units conversion*/
    float_t ism330dlc_from_fs125dps_to_mdps(int16_t lsb)
    {
     return ((float_t)lsb * 4.375f);
    }

    If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.

    -Eleon

    NaniAuthor
    Visitor II
    June 3, 2022

    Hi @Eleon BORLINI​ 

    Now i can able to get data from library motionGC_update function data.out is coming but the bias is not updating it is showing zero always even thought it is placed in steady position what might be the reason?