cancel
Showing results for 
Search instead for 
Did you mean: 

lsm6dsr sensor motion information

burak_Guzeller
Associate II

Hello everyone, I am working with the lsm6dsr sensor. How can I solve the position information or how much I move with this sensor? I am looking at projects with examples on github, but I could not find how to solve the directions, how much the sensor moves, etc. with this sensor. I would be glad if you can help.

1 ACCEPTED SOLUTION

Accepted Solutions
Federica Bossi
ST Employee

Hi @burak_Guzeller ,

A 9-axis IMU that I recommend you is LSM9DS1 that combines a 3D digital linear acceleration sensor, a 3D digital angular rate sensor, and a 3D digital magnetic sensor.

Otherwise, if you want to use the LSM6DSR you have two choises:

1) If you haven't done the board and the connections yet, you could connect both DSR and magnetometer to the microcontroller, take data from both, use MotionFX to calculate quaternions.

2) If you have already connected only the LSM6DSR to the micro, you can connect the magnetomer in sensorhub to the LSM6DSR, so that through the LSM6DSR you read both the IMU itself and the mag, at that point in the fw you have the data of both and you can manage them with the MotionFX.

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.

View solution in original post

11 REPLIES 11
Federica Bossi
ST Employee

Hi @burak_Guzeller ,

What do you mean by "how much I move with this sensor"?

What is your application?

Let me know so that I can help you in the most appropriate way. Thanks!

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.

My goal is to make position predictions using this sensor based on given latitude and longitude data. Can I observe the movement of an object using this sensor alone, or is a magnetometer necessary? I would appreciate it if you could provide information. I am using this GitHub link, but I am not sure about its accuracy: https://github.com/kriswiner/LSM9DS1/blob/master/quaternionFilters.ino. Thank you for providing information

In the datasheet of this sensor, it is stated that it is used in indoor navigation. My goal is to give the initial latitude and longitude data and I cannot find out how much the sensor has moved with the accelerometer and angular velocity. It shows different directions. Do I have to use a magnetometer to solve this problem? Do you have an alternative idea? I have not seen any examples about this regarding indoor location estimation.

Federica Bossi
ST Employee

Hi @burak_Guzeller ,

If you don't use a GPS, a magnetomer is needed to define the direction of the sensor at the starting point. Ideally, then you can proceed without the magnetometer.

You could have a look at our MotionFX Library, here you can find the user manual.

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.

A magnetometer is mandatory in the motionFx library, but how can I find the direction without a magnetometer? Is there any sample code etc.? Thank you.

Hi @burak_Guzeller ,

You always need a magnetomer or GPS at the beginning.

You could also look at the design tips for dead reckoning.

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.

Firstly, thank you . I want to use this sensor for indoor GPS control in this project. Naturally, when the GPS data is lost, I will get the initial latitude and longitude data. Finally, I searched for a similar project example etc. on github, but I couldn't find it. Is there a sample project that can guide me? Thank you for your interest. for

I decided to change the sensor, but do you have a different sensor that includes the lsm6dsr sensor and a pin to pin 9-axis, that is, a magnetometer, that you recommend?

Federica Bossi
ST Employee

Hi @burak_Guzeller ,

A 9-axis IMU that I recommend you is LSM9DS1 that combines a 3D digital linear acceleration sensor, a 3D digital angular rate sensor, and a 3D digital magnetic sensor.

Otherwise, if you want to use the LSM6DSR you have two choises:

1) If you haven't done the board and the connections yet, you could connect both DSR and magnetometer to the microcontroller, take data from both, use MotionFX to calculate quaternions.

2) If you have already connected only the LSM6DSR to the micro, you can connect the magnetomer in sensorhub to the LSM6DSR, so that through the LSM6DSR you read both the IMU itself and the mag, at that point in the fw you have the data of both and you can manage them with the MotionFX.

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.