

The GY-61 is a digital accelerometer module designed to measure acceleration along three axes: X, Y, and Z. It is based on the ADXL345 sensor, which provides high-resolution (13-bit) data for motion detection, tilt sensing, and orientation measurement. The module is compact, lightweight, and easy to integrate into various projects, making it ideal for applications such as robotics, mobile devices, gaming controllers, and wearable technology.








The GY-61 module is built around the ADXL345 accelerometer sensor. Below are the key technical details:
| Parameter | Specification |
|---|---|
| Operating Voltage | 3.3V to 5V |
| Communication Interface | I2C / SPI |
| Measurement Range | ±2g, ±4g, ±8g, ±16g (configurable) |
| Resolution | 13-bit (4 mg/LSB at ±2g) |
| Operating Temperature | -40°C to +85°C |
| Power Consumption | 40 µA in measurement mode |
| Dimensions | 20mm x 15mm x 3mm |
The GY-61 module has a 6-pin interface. Below is the pinout description:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V to 5V) |
| 2 | GND | Ground connection |
| 3 | SCL | Serial Clock Line for I2C communication |
| 4 | SDA | Serial Data Line for I2C communication |
| 5 | CS | Chip Select (used for SPI communication; connect to GND for I2C mode) |
| 6 | INT | Interrupt pin (used for motion detection or data-ready signals) |
The GY-61 can be easily interfaced with an Arduino UNO using the I2C protocol. Below is the wiring guide:
| GY-61 Pin | Arduino UNO Pin |
|---|---|
| VCC | 5V |
| GND | GND |
| SCL | A5 (SCL) |
| SDA | A4 (SDA) |
| CS | GND |
| INT | Not connected (optional) |
The following code demonstrates how to read acceleration data from the GY-61 module using the I2C interface:
#include <Wire.h>
// ADXL345 I2C address
#define ADXL345_ADDRESS 0x53
// Register addresses
#define POWER_CTL 0x2D
#define DATA_FORMAT 0x31
#define DATAX0 0x32
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Initialize serial communication for debugging
// Initialize the ADXL345
Wire.beginTransmission(ADXL345_ADDRESS);
Wire.write(POWER_CTL); // Access POWER_CTL register
Wire.write(0x08); // Set measurement mode
Wire.endTransmission();
Wire.beginTransmission(ADXL345_ADDRESS);
Wire.write(DATA_FORMAT); // Access DATA_FORMAT register
Wire.write(0x08); // Set range to ±2g
Wire.endTransmission();
Serial.println("GY-61 initialized successfully!");
}
void loop() {
int16_t x, y, z;
// Request 6 bytes of data starting from DATAX0
Wire.beginTransmission(ADXL345_ADDRESS);
Wire.write(DATAX0);
Wire.endTransmission(false);
Wire.requestFrom(ADXL345_ADDRESS, 6);
// Read acceleration data
if (Wire.available() == 6) {
x = (Wire.read() | (Wire.read() << 8)); // Combine low and high bytes for X-axis
y = (Wire.read() | (Wire.read() << 8)); // Combine low and high bytes for Y-axis
z = (Wire.read() | (Wire.read() << 8)); // Combine low and high bytes for Z-axis
}
// Print acceleration values
Serial.print("X: ");
Serial.print(x);
Serial.print(" Y: ");
Serial.print(y);
Serial.print(" Z: ");
Serial.println(z);
delay(500); // Delay for readability
}
No Data Output
Incorrect or Unstable Readings
I2C Communication Failure
Can the GY-61 be used with 3.3V microcontrollers?
How do I change the measurement range?
DATA_FORMAT register in the code to set the desired range (±2g, ±4g, ±8g, or ±16g).What is the maximum sampling rate of the GY-61?
By following this documentation, you can effectively integrate the GY-61 accelerometer module into your projects for reliable motion and orientation sensing.