Go Down

### Topic: MPU6050 Gyroscope calculation (Read 4408 times)previous topic - next topic

#### kazafwing

##### Feb 04, 2013, 04:51 am
Now, I can calculate the accelerometer. But I can only find a difficult equation to calculate the Gyroscope.
I want to know that is there any easy equation to calculate?

#### michinyon

#1
##### Feb 04, 2013, 04:58 am
what are you trying to calculate ?

The device will send you a number which is the degrees per second rotation of each axis,   or scaled
to represent that.    It is not a difficult calculation.

#### kazafwing

#2
##### Feb 04, 2013, 05:18 am
I just get the raw data from the device.
Is it hard to calculate?

#3

Mark

#### kazafwing

#4
##### Feb 04, 2013, 07:18 am
I have got some data from the device.
The data are as follow:

InvenSense MPU-6050
June 2012
WHO_AM_I : 68, error = 0
PWR_MGMT_2 : 0, error = 0

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: 1944, 368, 15608
temperature: 30.576 degrees Celsius
gyro x,y,z : -34, -204, -247,

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: 1952, 364, 15304
temperature: 30.435 degrees Celsius
gyro x,y,z : -38, -216, -274,

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: 1864, 388, 15356
temperature: 30.482 degrees Celsius
gyro x,y,z : -34, -233, -278,

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: 1888, 324, 15260
temperature: 30.576 degrees Celsius
gyro x,y,z : -14, -220, -261,

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: 1904, 392, 15316
temperature: 30.624 degrees Celsius
gyro x,y,z : -34, -241, -238,

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: 1856, 308, 15604
temperature: 30.435 degrees Celsius
gyro x,y,z : -33, -252, -235,

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: 1892, 444, 15528
temperature: 30.624 degrees Celsius
gyro x,y,z : 20, -236, -251,

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: 1924, 356, 15520
temperature: 30.576 degrees Celsius
gyro x,y,z : -19, -224, -251,

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: 1844, 280, 15732
temperature: 30.529 degrees Celsius
gyro x,y,z : -1, -240, -249,

MPU-6050
Read accel, temp and gyro, error = 0
accel x,y,z: 2004, 372, 15396
temperature: 30.671 degrees Celsius
gyro x,y,z : -20, -252, -255

#### michinyon

#5
##### Feb 04, 2013, 07:41 am
Well the gyro reading depends on the sensitivity you have set for the device.
At the most sensitive setting,  the gyro reading represents 131 LSB per degree of rotation, per second.

Where LSB refers to the least significant bits of the 12 or 16 bit binary number representing the
rotation.

So ( on that setting of the device ),  an increase of 1 in the binary number represents an increase
of  (1/131) of a degree per second in the measured rotation rate.

An increase of 131 in the binary number represents an increase of 1 degree per second in the measured
rotation rate.

Those readings you have there of about +250 in the z axis means there is a rotation of about 2 degrees per
second of rotation about the Z axis.   ( because 250 is roughtly twice 131 ).

If this was really happening,  the device would turn right around in about 3 minutes,  because it takes 180
seconds to turn full circle at 2 degrees per second.

You can set one of the other gyro sensitivity levels,   you get less sensistive readings that way but you get
to be able to read really large rotations.

#### kazafwing

#6
##### Feb 04, 2013, 08:18 am
Thanks for help.
Is those data is useful?
Should I do like this?

I want to convert the data to degree
GyroRate = (Measure value - Average Raw Data) / 1.0323
GyroAngle = GyroRate *

But I don't know is what and am I right??

#### dheerajp

#7
##### Feb 27, 2013, 03:44 pm
can you give me the connections and the code for this with arduino
thank you

Go Up