cancel
Showing results for 
Search instead for 
Did you mean: 

position detecting with mpu6050

scotzap
Associate II

Hello, I want to control the position of my device with mpu6050. The logic is briefly as follows: I will mount my device somewhere, then with a command the device will save its current position. Afterwards, I want to know whether this device is in the initial position at certain intervals. How can I do this with mpu6050? Do I need to use both acceleration and gyro data? It seemed to me that just acceleration data would be sufficient, but I'm not sure.

4 REPLIES 4
Peter BENSCH
ST Employee

As the MPU-6050 is not a component from STMicroelectronics, you should contact the manufacturer TDK.

Good luck!

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.

Neither an accelerometer nor a gyroscope gives you position - they just give you movement.

Specifically, they give you acceleration:

  • linear acceleration from an accelerometer;
  • angular acceleration from a gyroscope.

 

That's why I thought I can use an accelerometer. When I hold the module parallel to the ground, I read one of the x y and z axes as 1 g and the others as 0 g. When I hold it perpendicular to the ground, this time I read one of the axes, which is 0, as 1 g. If I keep it fixed somewhere between perpendicular and parallel, the value of these two axes is around 0.7 g.

That's telling you orientation - not position.

But is that what you want?

Your question is unclear.