Jump to content
I2Cdevlib Forums

Recommended Posts

Hello,

I am beginning with the MPU-6050.
To understand what are the data we get, I have read this topic : http://www.i2cdevlib.com/forums/topic/4-understanding-raw-values-of-accelerometer-and-gyrometer/.

 

What I would like to do is know how tilted is the sensor in relation to the three axes.
In french, we say that a "gyroscope" is used to get this, and a "gyromètre" do to get the angular velocity.
Here, this sensor enables the user to read the angular velocity.
Perhaps I should often read the angular velocity and try to determine the incline depending on the time... But it might be quite imprecise, mightn't it ?

 

May you explain me how could I solve this problem ?

 

Thank you in advance,
Soaocohoa

 

Share this post


Link to post
Share on other sites

Using an accelerometer by itself to determine incline works perfectly and is very accurate, but only as long as the sensor is not moving linearly. If it is only rotating, then the only acceleration will be due to gravity, and you can determine the orientation based on gravity. But if it starts moving, then there will be more than just gravity involved, and it is impossible to tell which acceleration is because of gravity and which is not. That's why you need another sensor; one of them estimates the orientation over time, and the other one is used to provide a gravity reference to compensate for gyro drift and errors in the rotational velocity estimations.

 

Of course, the math that actually does this is beyond my level of understanding... :-)

Share this post


Link to post
Share on other sites

fine .. I want to calculate the yawing from the MPU6050 ... but it is drifting as it is known... so is there any code with Kalman filter that fixes this drifting if not I thought about flipping the sensor and consider my pitch or roll angle as the yaw as I have a code that makes Kalman filter but with only Pitch and Roll angles  

You will find the mentioned code in the attachments and the .ino file at this directory 

\Example-Sketch-for-IMU-including-Kalman-filter-master\Example-Sketch-for-IMU-including-Kalman-filter-master\IMU\MPU6050

 

Example-Sketch-for-IMU-including-Kalman-filter-master.rar

Share this post


Link to post
Share on other sites

Hello, 

I am not sure that my data from the mpu6050 is correct. Could you please write what data you get if you do read the register 0x43 when the gyro is in rest. 

Thanks a lot

Eric

 

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×