Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use GY-85: Examples, Pinouts, and Specs

Image of GY-85Design with GY-85 in Cirkit Designer

Introduction

The GY-85 is a 9-axis motion sensor module that integrates an accelerometer, gyroscope, and magnetometer into a single compact board. This module is widely used for applications requiring precise orientation and motion tracking, such as robotics, drones, smartphones, and gaming devices. Its ability to measure acceleration, angular velocity, and magnetic field strength makes it a versatile choice for projects involving motion sensing and navigation.

Explore Projects Built with GY-85

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ADXL335 Accelerometer Data Visualization with Oscilloscope: A project utilizing GY-85 in a practical application
ADXL335 Accelerometer Data Visualization with Oscilloscope

This circuit connects an AITrip ADXL335 GY-61 accelerometer to an oscilloscope for signal visualization and a 3xAA battery pack for power. The accelerometer's Z-axis output is directly monitored on the oscilloscope, allowing for real-time observation of acceleration changes along that axis. The circuit is likely used for educational or testing purposes to demonstrate how the accelerometer responds to motion.

Open Project in Cirkit Designer
Image of Arduino UNO Based Air Quality Monitoring and GSM Notification System: A project utilizing GY-85 in a practical application
Arduino UNO Based Air Quality Monitoring and GSM Notification System

This circuit features an Arduino UNO microcontroller interfaced with an MQ135 air quality sensor, an MPU-6050 accelerometer/gyroscope, a SIM900A GSM communication module, and a buzzer. The Arduino reads analog data from the MQ135 sensor and communicates with the MPU-6050 via I2C, while also controlling the buzzer and handling serial communication with the SIM900A module. The purpose of this circuit is likely to monitor air quality and motion, provide alerts through the buzzer, and enable remote communication via GSM.

Open Project in Cirkit Designer

Technical Specifications

The GY-85 module is built around three key sensors:

  1. ADXL345: A 3-axis accelerometer for measuring acceleration.
  2. ITG-3200: A 3-axis gyroscope for angular velocity measurements.
  3. HMC5883L: A 3-axis magnetometer for detecting magnetic fields.

Key Technical Details

Pin Configuration and Descriptions

The GY-85 module has 6 pins for interfacing. The table below describes each pin:

Pin Name Description
VCC Power supply input (3.3V to 5V)
GND Ground connection
SDA I²C data line for communication
SCL I²C clock line for communication
XDA Auxiliary I²C data line (used for daisy-chaining multiple I²C devices)
XCL Auxiliary I²C clock line (used for daisy-chaining multiple I²C devices)

Usage Instructions

How to Use the GY-85 in a Circuit

  1. Power the Module: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to ground.
  2. I²C Communication: Connect the SDA and SCL pins to the corresponding I²C pins on your microcontroller (e.g., Arduino UNO).
  3. Pull-Up Resistors: Ensure that the I²C lines (SDA and SCL) have pull-up resistors (typically 4.7kΩ) if not already present on the module.
  4. Addressing the Sensors: Use the I²C addresses of the individual sensors (ADXL345, ITG-3200, HMC5883L) to communicate with them.

Important Considerations and Best Practices

Example Code for Arduino UNO

Below is an example Arduino sketch to read data from the GY-85 module:

#include <Wire.h>

// I²C addresses for the sensors
#define ADXL345_ADDR 0x53  // Accelerometer
#define ITG3200_ADDR 0x68  // Gyroscope
#define HMC5883L_ADDR 0x1E // Magnetometer

void setup() {
  Wire.begin(); // Initialize I²C communication
  Serial.begin(9600); // Start serial communication for debugging

  // Initialize ADXL345 (Accelerometer)
  Wire.beginTransmission(ADXL345_ADDR);
  Wire.write(0x2D); // Power control register
  Wire.write(0x08); // Set measurement mode
  Wire.endTransmission();

  // Initialize ITG-3200 (Gyroscope)
  Wire.beginTransmission(ITG3200_ADDR);
  Wire.write(0x3E); // Power management register
  Wire.write(0x00); // Set normal mode
  Wire.endTransmission();

  // Initialize HMC5883L (Magnetometer)
  Wire.beginTransmission(HMC5883L_ADDR);
  Wire.write(0x00); // Configuration register A
  Wire.write(0x70); // Set 8-average, 15 Hz default
  Wire.endTransmission();
}

void loop() {
  // Read data from ADXL345 (Accelerometer)
  Wire.beginTransmission(ADXL345_ADDR);
  Wire.write(0x32); // Start reading from data registers
  Wire.endTransmission(false);
  Wire.requestFrom(ADXL345_ADDR, 6); // Request 6 bytes (X, Y, Z)
  int16_t ax = Wire.read() | (Wire.read() << 8);
  int16_t ay = Wire.read() | (Wire.read() << 8);
  int16_t az = Wire.read() | (Wire.read() << 8);

  // Print accelerometer data
  Serial.print("Accel X: "); Serial.print(ax);
  Serial.print(" Y: "); Serial.print(ay);
  Serial.print(" Z: "); Serial.println(az);

  delay(500); // Delay for readability
}

Troubleshooting and FAQs

Common Issues

  1. No Data from Sensors:

    • Cause: Incorrect I²C wiring or missing pull-up resistors.
    • Solution: Verify the SDA and SCL connections and ensure pull-up resistors are in place.
  2. Inaccurate Readings:

    • Cause: Lack of calibration or external interference.
    • Solution: Calibrate the sensors and minimize magnetic or vibrational interference.
  3. Module Not Detected:

    • Cause: Incorrect I²C address or power supply issues.
    • Solution: Double-check the I²C addresses and ensure the module is powered correctly.

FAQs

  1. Can the GY-85 work with 5V microcontrollers?

    • Yes, the GY-85 is compatible with both 3.3V and 5V systems.
  2. How do I calibrate the magnetometer?

    • Use a calibration routine to account for hard-iron and soft-iron distortions. Libraries like Adafruit_Sensor can help.
  3. Can I use the GY-85 with other I²C devices?

    • Yes, the GY-85 supports daisy-chaining via its auxiliary I²C lines (XDA and XCL).

By following this documentation, you can effectively integrate the GY-85 module into your projects for accurate motion and orientation sensing.