Accelorometer Gyroscope

GY-521

The board has a MEMS accelerometer and a MEMS gyroscope plus a magnetometer (compass) MPU9150 . The circuit provides 16-bits analog to digital conversion hardware for each channel (x, y, & z) on a i2c bus. The accelerometer on the board measures the acceleration along xyz directions, while the gyroscope measures the angular acceleration on one axis.

Connections:
VCC -> 3.3 V / 5 V (better)
GND -> GND
SCL -> A5
SDA -> A4
XDA ->
XCL ->
ADO ->
INT ->

The analog pins (set to INPUT) read the values from the sensor on pins A5 and A6 and data values will be sent to the serial port. To view the values open the Serial Monitor. Moving the sensor will display the values change.

  • the gyro module communicates with the Arduino through I2C serial communication via the serial clock (SCL) and data (SDA)
  • the MPU6050 chip needs 3.3V but a voltage regulator on the GY-521 board allows you to give it up to 5V

Schematic

Pic

Sample Code

GY-271

Schematic

Pic

Sample Code