Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use L3GD20H Triple-Axis Gyro Breakout Board: Examples, Pinouts, and Specs

Image of L3GD20H Triple-Axis Gyro Breakout Board
Cirkit Designer LogoDesign with L3GD20H Triple-Axis Gyro Breakout Board in Cirkit Designer

Introduction

The L3GD20H Triple-Axis Gyro Breakout Board (Manufacturer Part ID: 1032) by Adafruit is a compact and high-performance sensor module designed to measure angular velocity across three axes (X, Y, and Z). This breakout board is based on the L3GD20H gyroscope sensor, which provides precise motion tracking capabilities. It is ideal for applications such as robotics, drones, gaming controllers, and other motion-sensing projects.

This module is equipped with a user-friendly breakout board design, making it easy to integrate into various projects. It communicates via I2C or SPI, offering flexibility for different microcontroller platforms.

Explore Projects Built with L3GD20H Triple-Axis Gyro Breakout Board

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino Mega 2560-Based Bluetooth-Controlled Robotic Car with MPU6050 and L298N Motor Driver
Image of selfbalancing: A project utilizing L3GD20H Triple-Axis Gyro Breakout Board in a practical application
This circuit is a motor control system using an Arduino Mega 2560, an L298N motor driver, and an MPU6050 accelerometer and gyroscope. The Arduino controls two DC motors via the L298N driver and communicates with the MPU6050 for motion sensing and the HC-05 Bluetooth module for wireless communication. Power is supplied by a 3S LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Multi-Sensor Interface with GSM and Display
Image of NAAZ: A project utilizing L3GD20H Triple-Axis Gyro Breakout Board in a practical application
This circuit features an ESP32 Devkit V1 microcontroller as its central processing unit, interfacing with a variety of sensors and modules for monitoring and communication purposes. It includes an LCD I2C display for user interface, a SIM800L module for GSM communication, and sensors like the Adafruit L3GD20H gyro, Adafruit ADXL377 accelerometer, DS18B20 temperature sensor, and a pulse sensor for environmental and physiological data collection. The circuit also controls a red and a green LED, each with a current-limiting resistor, and a buzzer for audio feedback, all of which are likely used for status indication or alerts.
Cirkit Designer LogoOpen Project in Cirkit Designer
Teensy 4.1 Based Biometric Data Acquisition System with AD8232 Heart Rate Monitor and LIS3DH Accelerometer
Image of Teensy 4.1 accelerometer: A project utilizing L3GD20H Triple-Axis Gyro Breakout Board in a practical application
This circuit integrates a Teensy 4.1 microcontroller with an Adafruit LIS3DH Triple-Axis Accelerometer and an AD8232 Heart Rate Monitor. The accelerometer communicates with the Teensy via I2C (SCL and SDA lines), while the heart rate monitor's output and lead-off detection (LO+ and LO-) are connected to the Teensy's analog inputs. The circuit is designed to measure both acceleration and heart rate signals, likely for a wearable or health monitoring device.
Cirkit Designer LogoOpen Project in Cirkit Designer
Adafruit MPU6050 and VL6180X Sensor Interface with Servo Control
Image of wire: A project utilizing L3GD20H Triple-Axis Gyro Breakout Board in a practical application
This circuit features an Adafruit QT Py microcontroller interfaced with an Adafruit MPU6050 6-axis accelerometer/gyroscope and an Adafruit VL6180X Time of Flight (ToF) distance sensor, both connected via I2C communication. The QT Py also controls a Servomotor SG90, likely for physical actuation based on sensor inputs. The embedded code initializes the sensors, reads their data, and outputs the readings to a serial monitor, with the potential for motion control based on the sensor feedback.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with L3GD20H Triple-Axis Gyro Breakout Board

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 selfbalancing: A project utilizing L3GD20H Triple-Axis Gyro Breakout Board in a practical application
Arduino Mega 2560-Based Bluetooth-Controlled Robotic Car with MPU6050 and L298N Motor Driver
This circuit is a motor control system using an Arduino Mega 2560, an L298N motor driver, and an MPU6050 accelerometer and gyroscope. The Arduino controls two DC motors via the L298N driver and communicates with the MPU6050 for motion sensing and the HC-05 Bluetooth module for wireless communication. Power is supplied by a 3S LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of NAAZ: A project utilizing L3GD20H Triple-Axis Gyro Breakout Board in a practical application
ESP32-Based Multi-Sensor Interface with GSM and Display
This circuit features an ESP32 Devkit V1 microcontroller as its central processing unit, interfacing with a variety of sensors and modules for monitoring and communication purposes. It includes an LCD I2C display for user interface, a SIM800L module for GSM communication, and sensors like the Adafruit L3GD20H gyro, Adafruit ADXL377 accelerometer, DS18B20 temperature sensor, and a pulse sensor for environmental and physiological data collection. The circuit also controls a red and a green LED, each with a current-limiting resistor, and a buzzer for audio feedback, all of which are likely used for status indication or alerts.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Teensy 4.1 accelerometer: A project utilizing L3GD20H Triple-Axis Gyro Breakout Board in a practical application
Teensy 4.1 Based Biometric Data Acquisition System with AD8232 Heart Rate Monitor and LIS3DH Accelerometer
This circuit integrates a Teensy 4.1 microcontroller with an Adafruit LIS3DH Triple-Axis Accelerometer and an AD8232 Heart Rate Monitor. The accelerometer communicates with the Teensy via I2C (SCL and SDA lines), while the heart rate monitor's output and lead-off detection (LO+ and LO-) are connected to the Teensy's analog inputs. The circuit is designed to measure both acceleration and heart rate signals, likely for a wearable or health monitoring device.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of wire: A project utilizing L3GD20H Triple-Axis Gyro Breakout Board in a practical application
Adafruit MPU6050 and VL6180X Sensor Interface with Servo Control
This circuit features an Adafruit QT Py microcontroller interfaced with an Adafruit MPU6050 6-axis accelerometer/gyroscope and an Adafruit VL6180X Time of Flight (ToF) distance sensor, both connected via I2C communication. The QT Py also controls a Servomotor SG90, likely for physical actuation based on sensor inputs. The embedded code initializes the sensors, reads their data, and outputs the readings to a serial monitor, with the potential for motion control based on the sensor feedback.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Key Technical Details

  • Sensor: L3GD20H gyroscope
  • Measurement Range: ±245, ±500, ±2000 degrees per second (selectable)
  • Communication Interfaces: I2C (up to 400 kHz) and SPI (up to 10 MHz)
  • Supply Voltage: 3.3V (logic level) or 5V (via onboard regulator)
  • Current Consumption: 6.1 mA (typical)
  • Operating Temperature Range: -40°C to +85°C
  • Dimensions: 20mm x 20mm x 3mm
  • Weight: ~1g

Pin Configuration and Descriptions

The breakout board has 8 pins, as described in the table below:

Pin Name Description
VIN Power input (3.3V to 5V). Powers the onboard voltage regulator.
GND Ground connection.
SDA I2C data line. Connect to the microcontroller's SDA pin.
SCL I2C clock line. Connect to the microcontroller's SCL pin.
SDO SPI/I2C address selection or SPI MISO (Master In Slave Out).
CS SPI chip select. Pull low to enable SPI communication.
SCLK SPI clock line.
SDI SPI MOSI (Master Out Slave In).

Usage Instructions

How to Use the Component in a Circuit

  1. Powering the Board: Connect the VIN pin to a 3.3V or 5V power source and GND to ground.
  2. Choosing Communication Protocol:
    • For I2C: Connect the SDA and SCL pins to the corresponding pins on your microcontroller. Use the SDO pin to set the I2C address (low for 0x6A, high for 0x6B).
    • For SPI: Connect the CS, SCLK, SDI, and SDO pins to the respective SPI pins on your microcontroller.
  3. Pull-Up Resistors: If using I2C, ensure pull-up resistors (typically 4.7kΩ) are present on the SDA and SCL lines.
  4. Bypass Capacitor: Place a 0.1µF capacitor between VIN and GND for noise filtering.

Important Considerations and Best Practices

  • Voltage Levels: Ensure your microcontroller's logic levels match the breakout board's requirements (3.3V or 5V).
  • Mounting: Secure the breakout board to minimize vibrations, which can affect readings.
  • Calibration: Perform sensor calibration to account for offsets and improve accuracy.
  • Data Filtering: Use software filtering (e.g., moving average) to smooth out noisy data.

Example Code for Arduino UNO (I2C)

Below is an example of how to interface the L3GD20H with an Arduino UNO using I2C:

#include <Wire.h>

// L3GD20H I2C address (default: 0x6B if SDO is high, 0x6A if SDO is low)
#define L3GD20H_ADDRESS 0x6B

// Register addresses
#define CTRL_REG1 0x20
#define OUT_X_L  0x28

void setup() {
  Wire.begin(); // Initialize I2C communication
  Serial.begin(9600); // Initialize serial communication for debugging

  // Configure the L3GD20H
  Wire.beginTransmission(L3GD20H_ADDRESS);
  Wire.write(CTRL_REG1); // Access CTRL_REG1
  Wire.write(0x0F); // Enable X, Y, Z axes and set power mode
  Wire.endTransmission();

  Serial.println("L3GD20H initialized!");
}

void loop() {
  int16_t gyroX, gyroY, gyroZ;

  // Read X-axis angular velocity
  gyroX = readGyro(OUT_X_L);
  // Read Y-axis angular velocity
  gyroY = readGyro(OUT_X_L + 2);
  // Read Z-axis angular velocity
  gyroZ = readGyro(OUT_X_L + 4);

  // Print the angular velocity values
  Serial.print("X: "); Serial.print(gyroX);
  Serial.print(" Y: "); Serial.print(gyroY);
  Serial.print(" Z: "); Serial.println(gyroZ);

  delay(100); // Delay for readability
}

// Function to read 16-bit gyro data from a register
int16_t readGyro(uint8_t reg) {
  Wire.beginTransmission(L3GD20H_ADDRESS);
  Wire.write(reg | 0x80); // Set MSB for auto-increment
  Wire.endTransmission();
  Wire.requestFrom(L3GD20H_ADDRESS, 2);

  if (Wire.available() == 2) {
    uint8_t lsb = Wire.read();
    uint8_t msb = Wire.read();
    return (int16_t)(msb << 8 | lsb);
  }
  return 0; // Return 0 if no data is available
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Output:

    • Ensure the breakout board is powered correctly (check VIN and GND connections).
    • Verify the I2C or SPI connections and ensure the correct protocol is selected.
    • Check the I2C address or SPI configuration in your code.
  2. Incorrect or Noisy Readings:

    • Ensure the breakout board is securely mounted to reduce vibrations.
    • Perform sensor calibration to eliminate offsets.
    • Use software filtering to smooth out noisy data.
  3. Communication Errors:

    • Double-check the pull-up resistors on the I2C lines.
    • Verify that the microcontroller's logic levels are compatible with the breakout board.

FAQs

Q: Can I use this breakout board with a 5V microcontroller?
A: Yes, the onboard voltage regulator allows the board to work with 5V systems. However, ensure the logic levels are compatible.

Q: How do I change the I2C address?
A: Use the SDO pin to set the I2C address. Connect it to GND for 0x6A or to VIN for 0x6B.

Q: What is the maximum sampling rate of the L3GD20H?
A: The L3GD20H supports a maximum output data rate of 800 Hz.

Q: Can I use this board for tilt sensing?
A: While the L3GD20H measures angular velocity, it does not directly measure tilt. For tilt sensing, consider combining it with an accelerometer.