Pages: [1]   Go Down
Author Topic: self balancing robot and mpu6050  (Read 1765 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to calculate one angle about any of the three axis, I'm getting the angle stable using kalman filter and accelerometer reading only when the sensor is stationary (no linear movement), when the sensor start moving the accelerometer values changes make the angle be unstable also the body did not rotated, is there any way to get the stable angle without accelerometer values.
I'm using arduino UNO and "Jeff Rowberg" library for mpu6050.(https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050)
Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The accelerometer measures the g-force (acceleration combined with earth gravity). If the sensor starts moving, it measures that. That is what an accelerometer does.

You should combine it with the gyro values. The gyro is not influenced by the linear acceleration. However, the gyro drifts, so the gyro needs the accelerometer as much as the accelerometer needs the gyro.
 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks Erdin for your response, this is exactly what I'm doing (combining both to get stable angle), but the problem that I'm making a SegWay which has to be moving linearly so the angle will be unstable due to the accelerometer values and this is what I'm asking about? is there any way to get stable angle while moving linearly using this sensor?
Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I thinks you need the quaternion for orientation (which I still don't fully understand). You should be able to calculate the angle and speed and use that in software calculations to know the direction and orientation and tilt angle.
Logged

Pages: [1]   Go Up
Jump to: