Wish List 0

Gyroscope Module With Angle Uart I2C Output Gy 25 Mpu6050

Rs. 434.00 Rs. 521.00

-The power supply: 3-5v (inner low dropout regulator).
-Communication: serial conversation (baud price 9600,115200), IIC the communique (read handiest the original records).

Features:
Chip: MCU + MPU6050
Model: GY-25
Power supply: 3-5v (internal low dropout regulator)
Communication: serial communication (baud 9600,115200), IIC communication
Module Dimensions: 15.5mm x 11.5mm 2.54mm pitch
Direct Data: YAW ROLL PITCH
Heading angle (YAW) ± 180°
Roll angle (ROLL) ± 180°
The pitch angle (PITCH) ± 180°
0.01° angular resolution


SPECIFICATIONS:
Power Supply                3.3V to 5V
Communication Protocol      UART/I2C
Measuring Range             -180 ° 1 ° 
ADC                         16 bit
Module size                 11.5 x 15.5 mm
Frequency response          100 HZ (115200bps)
Operating temperature       20 ° 8 °
Working Current             15mA
OVERVIEW:
Chip built-in 16bit AD converter  16-bit data output
Driver Chip                       MPU6050
Operating Voltage                 3-5V DC
Communication                     I2C/URAT Protocol
Gyro Range                        ± 250, 500, 1000, 2000 °/s

PACKAGE INCLUDES:

1 PCS x Gy25 Mpu6050 3 Axis Accelerometer And Gyroscope Sensor Ttl Output


//SORCE CODE TAKEN FROM BELOW LINK

//https://forum.arduino.cc/index.php?topic=588136.0


#include <SoftwareSerial.h>

static const int RXPin = 68, TXPin = 69; // announce your Rx and Tx pins

SoftwareSerial Portone(RXPin, TXPin);

float Roll,Pitch,Yaw;

unsigned char Re_buf[8],counter=0;

void setup()

{

Serial.begin(115200);

Portone.begin(9600); // SoftwareSerial can only support 9600 baud rate for GY 25 but Serial3 can support 115200 and 9600 both

delay(4000);      

Portone.write(0XA5);

Portone.write(0X54);//correction mode

delay(4000);

Portone.write(0XA5);

Portone.write(0X51);//0X51:query mode, return directly to the angle value, to be sent each read, 0X52:Automatic mode,send a direct return angle, only initialization

}


void loop() {

serialEvent();

Serial.print("roll= ");

Serial.print(Roll);

Serial.print(" pitch= ");                  

Serial.print(Pitch);

Serial.print(" yaw= ");                  

Serial.println(Yaw);

} // End of void loop


void serialEvent() {

Portone.write(0XA5);

Portone.write(0X51);//send it for each read

while (Portone.available()) {  

Re_buf[counter]=(unsigned char)Portone.read();

if(counter==0&&Re_buf[0]!=0xAA) return;        

counter++;      

if(counter==8)  // package is complete              

{    

  counter=0;                  

  if(Re_buf[0]==0xAA && Re_buf[7]==0x55)  // data package is correct      

    {          

     Yaw=(int16_t)(Re_buf[1]<<8|Re_buf[2])/100.00;  

     Pitch=(int16_t)(Re_buf[3]<<8|Re_buf[4])/100.00;

     Roll=(int16_t)(Re_buf[5]<<8|Re_buf[6])/100.00;

    }      

}  

}  // End of while

} // End of serialEvent

15 days

Write a review

Please login or register to review