Overview

The L3GD20H is a 3-axis digital angular rate sensor (gyroscope) manufactured by STMicroelectronics. It measures rotational angular velocity around the X, Y, and Z axes with user-selectable full-scale ranges of ±245 dps\pm 245\text{ dps}, ±500 dps\pm 500\text{ dps}, and ±2000 dps\pm 2000\text{ dps} (degrees per second).

Housed in a compact 16-pin 3×3 mm3 \times 3\text{ mm} LGA package, the L3GD20H incorporates an internal 16-bit ADC, configurable low-pass and high-pass digital filters, a 32-level FIFO buffer, an embedded temperature sensor, and dual programmable interrupt generators. It is used in dead-reckoning navigation, optical image stabilization, RC quadcopter flight stabilization, and gaming motion controllers.

Quick reference

Operating voltage (VCC)3.3 V to 5.0 V DC (breakout with onboard regulator)
IC supply voltage (VDD)2.2 V to 3.6 V DC (3.0 V nominal)
InterfaceI2CI^2C (up to 400 kHz) & 3-Wire / 4-Wire SPI (up to 10 MHz)
Default I2CI^2C address0x6B (SDO/SA0 pin High to 3.3V)
Alternate I2CI^2C address0x6A (SDO/SA0 pin Low to GND)
Full-scale angular rate±245 dps,±500 dps,±2000 dps\pm 245\text{ dps}, \pm 500\text{ dps}, \pm 2000\text{ dps}
Output resolution16-bit 2's complement (I2CI^2C/SPI)
Active current draw6.0 mA active / 5.0 μA5.0\ \mu\text{A} power-down

Pinout

Breakout modules expose an 8-pin or 9-pin 0.1" (2.54 mm) header:

PinNameTypeDescription
1VCCPowerSupply input (+3.3 V to +5.0 V DC)
2GNDPowerGround (0 V)
3SCL / SPCDigital InputI2CI^2C Clock / SPI Clock
4SDA / SDIDigital Input / OutputI2CI^2C Data / SPI Serial Data Input
5SDO / SA0Digital OutputSPI Data Out / I2CI^2C Address Bit 0 (High = 0x6B, Low = 0x6A)
6CSDigital InputSPI Chip Select (High = I2CI^2C mode, Low = SPI mode)
7INT1Digital OutputProgrammable Interrupt Line 1 (data ready / threshold trigger)
8INT2 / DRDYDigital OutputInterrupt Line 2 / Data Ready signal

Specifications

ParameterSymbolMinTypMaxUnitConditions
Supply Voltage (Module)VCCV_{CC}3.33.3 / 5.05.5VPower rail with LDO
Active Supply CurrentICCI_{CC}6.08.0mANormal operating state
Power-Down CurrentIpdI_{pd}5.010.0µASoftware power-down
Sensitivity (±245 dps\pm 245\text{ dps})So245So_{245}7.68.759.8mdps/digit16-bit output
Sensitivity (±500 dps\pm 500\text{ dps})So500So_{500}15.317.5019.7mdps/digit16-bit output
Sensitivity (±2000 dps\pm 2000\text{ dps})So2000So_{2000}61.2570.0078.75mdps/digit16-bit output
Output Data RatefODRf_{ODR}12.5100800HzConfigurable via CTRL1

Register map

AddressRegisterAccessResetDescription
0x0FWHO_AM_IRead0xD7Device identification register (always returns 0xD7 for L3GD20H)
0x20CTRL1R/W0x07Data rate (ODRODR), bandwidth cutoff, power mode, X/Y/Z enable
0x23CTRL4R/W0x00Full-scale selection (±245/±500/±2000 dps\pm 245 / \pm 500 / \pm 2000\text{ dps}), SPI mode
0x26OUT_TEMPReadInternal temperature sensor output byte
0x280x29OUT_X_L / HReadX-axis angular rate output bytes
0x2A0x2BOUT_Y_L / HReadY-axis angular rate output bytes
0x2C0x2DOUT_Z_L / HReadZ-axis angular rate output bytes

Wiring

L3GD20H PinArduino / MCUESP32Notes
VCC5V / 3.3V3.3VModule includes 3.3V regulator
GNDGNDGNDSystem ground
SCLA5GPIO 22I2CI^2C Clock
SDAA4GPIO 21I2CI^2C Data
CS3.3V / 5V3.3VPull High for I2CI^2C mode
SDO3.3V / 5V3.3VConnect to VCC for 0x6B, GND for 0x6A

Example

cpp
#include <Wire.h>
#include <Adafruit_L3GD20_U.h>

Adafruit_L3GD20_Unified gyro = Adafruit_L3GD20_Unified(20);

void setup() {
  Serial.begin(115200);
  Serial.println("L3GD20H Gyroscope Test");

  /* Enable auto-ranging */
  gyro.enableAutoRange(true);

  /* Initialize the sensor */
  if (!gyro.begin()) {
    Serial.println("Could not find L3GD20H! Check wiring.");
    while (1);
  }
  Serial.println("L3GD20H initialized.");
}

void loop() {
  sensors_event_t event;
  gyro.getEvent(&event);

  Serial.print("X: "); Serial.print(event.gyro.x); Serial.print(" rad/s  ");
  Serial.print("Y: "); Serial.print(event.gyro.y); Serial.print(" rad/s  ");
  Serial.print("Z: "); Serial.print(event.gyro.z); Serial.println(" rad/s");

  delay(200);
}

Common mistakes

  • Leaving CS floating on I2CI^2C setups: As with ST accelerometers, leaving CS disconnected allows noise to switch the IC into SPI mode. Tie CS High to VCCV_{CC} for I2CI^2C mode.
  • Assuming zero-rate output is 0 dps: All mechanical MEMS gyroscopes exhibit static zero-rate offset drift. Application code must perform a 500-sample calibration at startup while stationary to subtract DC bias offsets from X, Y, and Z axes.
  • WHO_AM_I register mismatch: Older L3GD20 chips return 0xD4, whereas newer L3GD20H chips return 0xD7. Ensure your library supports 0xD7.

Notes

  • L3GD20 vs L3GD20H: The L3GD20H reduces power consumption, adds a 32-level FIFO buffer, improves zero-rate offset stability, and changes full-scale range from ±250 dps\pm 250\text{ dps} to ±245 dps\pm 245\text{ dps}.

Assets & downloads