When reading the MPU 6050 has accelerometer and gyro, I assumed it was linear acceleration, but now I second guess that. From this video https://www.youtube.com/watch?v=qmd6CVrlHOM it seems like they are using acceleration and gyro to make one rotation direction. I need to know what direction the mpu is moving, not just a rotational value. Is there a way to extract this information?
-
Please tell us more. Do you want to measure the acceleration and deacceleration in a direction, or the motion with a constant speed in a direction ? – Jot Jun 22 '17 at 17:04
-
I am trying to find vertical velocity with mpu6050 but I failed. Did you find any benefical thing ? Thanks. – Faruk Z. Aug 27 '20 at 17:24
The MPU6050 has an accelerometer and a rate gyro (which tells you how fast it is rotating). The accelerometer will tell you which direction is down and in a motionless situation, that is all the information you have.
You'll probably want something like the MPU9150, it has a compass, which will give you the directional information you're asking for.
-
A compass will not tell you direction of movement, only direction of (apparent) orientation – Chris Stratton Nov 29 '15 at 8:41
-
When you're motionless you're ok, no movement information to report :-) The bigger problem, I think, is that at a steady speed you also have 0 acceleration, but you are moving. A compass will tell you your heading, but that may or may not be your direction of movement. I think you're talking about building an INS (inertial navigation system), you'll need to be able to determine a starting state and then track changes (accelerations) from there. You may want a GPS. – dlu Dec 29 '15 at 9:54
The MPU6050 has accelerometers in the x, y, and z axis. When placed on flat surface with no acceleration, you should get 0g (or whatever unit it uses, I cannot remember off the top of my head) in the x and Y directions, and 1g in the z axis. By continuously polling these values, you can find out the linear acceleration of each axis at a given moment in time.
What you saw is probably because the chip also has three Gyroscopes, for measuring rotational acceleration and speed. The chip can do both.