cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, I use LSM6DSO. I read raw data from sensor. How can I calculate meaningful data from raw data? I want to calculate gyroscope and acc values. I googleing it but I can't find anything. Am I read meaningful data from sensor?

MErkc.1
Associate II
 
5 REPLIES 5
KnarfB
Principal III

options:

  1. learn how to use Google
  2. read and understand the data sheet
  3. look for existing libraries like X-CUBE-MEMS1

hth

KnarfB

MErkc.1
Associate II

Hi, Thanks for your answer it is perfect answer. Do you tell me which part of data sheet? than I use zephyr os don't bare metal. I think you should learn how to communicate people in forum. @KnarfB​ 

MFran.4
Senior

@KnarfB​ answer may have been cold but the answer contains a lot of useful things. Did you read the datasheet? Did you understand everything you needed to understand?

Googling can be tricky sometimes. I found this application note, look at the point 4.5, maybe it could be useful!

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwjpmrX55Of0AhVUt6QKHdojAvcQFnoECA8QAQ&url=https%3A%2F%2Fwww.st.com%2Fresource%2Fen%2Fapplication_note%2Fdm00517282-lsm6dso-alwayson-3d-accelerometer-and-3d-gyroscope-stmicroelectronics.pdf&usg=AOvVaw2It03mShcwb7RvY2LLovew

For the record, my google search was "lsm6dso calculate acceleration" and the Application Note was the first result.

MErkc.1
Associate II

Thanks, I read datasheet and application note, I read stm32duino library I found some value on library but I think it is not real value because I read 1400 value on Z acc. I finally decided to consult the forum. Maybe work with these sensor who write these topic thanks again.

Eleon BORLINI
ST Employee

Hi @MErkc.1​ ,

you might also find useful to have a look to the LSM6DSO C drivers (lsm6dso_reg.c), where the conversion formulas from LSB to physical units are directly implemented. You have basically to multiply the LSB data for the sensitivity declared in the datasheet):

// Accelerometer FS 2g (1g = 9.81m/s^2)
 
float_t lsm6dso_from_fs2_to_mg(int16_t lsb)
{
  return ((float_t)lsb) * 0.061f;
}
 
 
// Gyroscope FS 125dps (1dps = 1 degree per second)
 
float_t lsm6dso_from_fs125_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