MPU6050 6 Axis Analog Gyro Sensor 6-axis Accelerometer with Serial Communication

Hi All -

Thanks in advance.

I, bought MPU6050 Gyro sensor but it is with Rx Tx (serial communication), many of the libraries available are with i2C, I,found one with serial communication but is in Chinese - not able to understand it.

Can you suggest a library for the above modules.

Best,

Ramesha

What is the problem with connecting the I2C device to the I2C pins, and using the I2C-based library?

This is what I could understand:

The data that is sent by the module to PC/ uC is divided into three data packets: the acceleration packet, the angular velocity packet and the angle packet, and three data packets are sequentially output.
When the baud rate is 115200, one frame of data is output every 10ms, and when the baud rate is 9600, one frame of data is output every 50ms.

Acceleration packet (Identifier: 0x51)

Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | Byte 8 | Byte 9 | Byte 10
0x55 0x51 AxL AxH AyL AyH AzL AzH TL TH Checksum
<---------------Acceleration Data-------------------->
Byte

AxL: X-axis acceleration low byte
AxH: X-axis acceleration high byte
AyL: y-axis acceleration low byte
AyH: y-axis acceleration high byte
AzL: z-axis acceleration low byte
AzH: z-axis acceleration high byte
TL: temperature low byte
TH: temperature high byte

Angular Velocity packet (Identifier: 0x52)

Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | Byte 8 | Byte 9 | Byte 10
0x55 0x51 wxL wxH wyL wyH wzL wzH TL TH Checksum
<---------------Angular Velocity Data-------------------->
Byte

wxL: X-axis angular velocity low byte
wxH: X-axis angular velocity high byte
wyL: y-axis angular velocity low byte
wyH: y-axis angular velocity high byte
wzL: z-axis angular velocity low byte
wzH: z-axis angular velocity high byte
TL: temperature low byte
TH: temperature high byte

Angle packet (Identifier: 0x53)

Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | Byte 8 | Byte 9 | Byte 10
0x55 0x51 RollL RollH PitchL PitchH YawL YawH TL TH Checksum
<---------------Angular Velocity Data--------------------->
Byte

RollL: Roll low byte
RollH: Roll high Byte
PitchL: Pitch low byte
PitchH: Pitch high byte
YawL: Yaw low byte
YawH: Yaw high byte
TL: temperature low byte
TH: temperature high byte

Hope that helps

MPU6050 w Serial_1-6.pdf (1.37 MB)

PaulS:
What is the problem with connecting the I2C device to the I2C pins, and using the I2C-based library?

Module doesn't have i2C pins

sherzaad:
This is what I could understand:

The data that is sent by the module to PC/ uC is divided into three data packets: the acceleration packet, the angular velocity packet and the angle packet, and three data packets are sequentially output.
When the baud rate is 115200, one frame of data is output every 10ms, and when the baud rate is 9600, one frame of data is output every 50ms.

Acceleration packet (Identifier: 0x51)

Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | Byte 8 | Byte 9 | Byte 10
0x55 0x51 AxL AxH AyL AyH AzL AzH TL TH Checksum
<---------------Acceleration Data-------------------->
Byte

AxL: X-axis acceleration low byte
AxH: X-axis acceleration high byte
AyL: y-axis acceleration low byte
AyH: y-axis acceleration high byte
AzL: z-axis acceleration low byte
AzH: z-axis acceleration high byte
TL: temperature low byte
TH: temperature high byte

Angular Velocity packet (Identifier: 0x52)

Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | Byte 8 | Byte 9 | Byte 10
0x55 0x51 wxL wxH wyL wyH wzL wzH TL TH Checksum
<---------------Angular Velocity Data-------------------->
Byte

wxL: X-axis angular velocity low byte
wxH: X-axis angular velocity high byte
wyL: y-axis angular velocity low byte
wyH: y-axis angular velocity high byte
wzL: z-axis angular velocity low byte
wzH: z-axis angular velocity high byte
TL: temperature low byte
TH: temperature high byte

Angle packet (Identifier: 0x53)

Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | Byte 8 | Byte 9 | Byte 10
0x55 0x51 RollL RollH PitchL PitchH YawL YawH TL TH Checksum
<---------------Angular Velocity Data--------------------->
Byte

RollL: Roll low byte
RollH: Roll high Byte
PitchL: Pitch low byte
PitchH: Pitch high byte
YawL: Yaw low byte
YawH: Yaw high byte
TL: temperature low byte
TH: temperature high byte

Hope that helps

Thanks a lot! will work with your inputs, shall let know if I, need further support