Skip to main content
Graduate
January 8, 2025
Question

position detecting with mpu6050

  • January 8, 2025
  • 2 replies
  • 938 views

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.

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    January 8, 2025

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

    Good luck!

    Regards
    /Peter

    Super User
    January 8, 2025

    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.

     

    scotzapAuthor
    Graduate
    January 8, 2025

    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.

    Super User
    January 8, 2025

    That's telling you orientation - not position.

    But is that what you want?

    Your question is unclear.