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

 

Link to comment
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... :-)

Link to comment
Share on other sites

  • 2 months later...
  • 3 years later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...