+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Full Member level 2
    Points: 3,219, Level: 13

    Join Date
    Oct 2005
    Posts
    142
    Helped
    2 / 2
    Points
    3,219
    Level
    13

    How to measure orientation with IMU sensor on handheld product

    First I am not sure if this question is properly to be asked in this category, I am sorry if it is not.

    I am working on a project which use an IMU (accelerometer + gyroscope) sensor to detect the movement of a handheld product. I do not need an accurate measurement because I only need to detect whether a person is holding the product or place in rest position. I have created two prototypes for testing. One with the ADXL345 accelerometer, another one with the MPU6050 (accelerometer + gyroscope) sensor.

    I know that solely the accelerometer can be used to detect the orientation of the product by measuring the gravity direction when there is no other force applied to the product. This is probably when the product is placed at rest state when power on the product. However I encountered a problem that as my application is a handheld product, when it is switch on, the product can be not in a rest state. In another words, when I power on the product, there may be hand movement force with the gravity force. As such I can not measure the orientation.

    As I cannot measure the orientation, I also cannot reduce the gravity force from the accelerometer reading.

    Any idea how to solve the issue? Thank you very much.

    Another thing is when I test with the MPU6050 DMP, the "roll" and "pitch" in "yaw,pitch,roll" is correct immediate after I switch on it. However the DMP real(reduced gravity) accelerometer reading is not stable in this moment. How can the "roll and pitch" is correct if the accelerometer reading is not stable?

    Thank you very much.

    •   AltAdvertisement

        
       

  2. #2
    Advanced Member level 5
    Points: 24,248, Level: 37
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    4,651
    Helped
    1031 / 1031
    Points
    24,248
    Level
    37

    Re: How to measure orientation with IMU sensor on handheld product

    If the device is not in its rest postion when it is powered on, you should be able to detect that. You can have stored values of what the static measurements are, and then compare those values to the power-on values to determine what the device is doing. In other words, at rest the z-axis should measure 1g, and the x and y axes should measure 0 g. If you see something else, it's not at its rest position; it might be moving or it might just be tilted.



    •   AltAdvertisement

        
       

  3. #3
    Member level 3
    Points: 561, Level: 5

    Join Date
    Sep 2017
    Posts
    63
    Helped
    0 / 0
    Points
    561
    Level
    5

    Re: How to measure orientation with IMU sensor on handheld product

    you could read the current state and then read it again a short time later, both the gyro and the accelerometer will be changing as I don't think a persons stillness could match the sensitivity of the device. A good place to ask these questions is on the Arduino forum under the sensors section.

    "How can the "roll and pitch" is correct if the accelerometer reading is not stable?"
    I don't see how it can be. How do you determine that the DMP reading is not stable, and how do you determine that the pitch is correct. I mean how do you measure that?



--[[ ]]--