Overview

The LSM9DS1 is a 9-degrees-of-freedom (9-DoF) System-in-Package (SiP) motion sensor manufactured by STMicroelectronics. It combines a 3-axis digital accelerometer, a 3-axis digital gyroscope, and a 3-axis digital magnetometer into a single 3.5×3.0 mm3.5 \times 3.0\text{ mm} package.

Outputting 16-bit resolution data over I2CI^2C or SPI, the LSM9DS1 enables full 3D orientation tracking (heading, pitch, and roll) using sensor-fusion algorithms (like Madgwick or Mahony filters). It is standard equipment in robotics navigation, drone AHRS flight controllers, virtual reality controllers, and space/satellite payload tracking.

Quick reference

Operating voltage (VCC)3.3 V to 5.0 V DC (breakout module with LDO)
IC supply voltage (VDD)1.9 V to 3.6 V DC
InterfaceI2CI^2C (up to 400 kHz) & 3-Wire / 4-Wire SPI (up to 10 MHz)
I2CI^2C Address (Accel/Gyro)0x6B (Default; 0x6A alternate)
I2CI^2C Address (Magnetometer)0x1E (Default; 0x1C alternate)
Accel ranges±2g,±4g,±8g,±16g\pm 2g, \pm 4g, \pm 8g, \pm 16g
Gyro ranges±245 dps,±500 dps,±2000 dps\pm 245\text{ dps}, \pm 500\text{ dps}, \pm 2000\text{ dps}
Mag ranges±4 Gauss,±8 Gauss,±12 Gauss,±16 Gauss\pm 4\text{ Gauss}, \pm 8\text{ Gauss}, \pm 12\text{ Gauss}, \pm 16\text{ Gauss}
Current draw4.6 mA active (all 9 axes enabled) / 4 μA4\ \mu\text{A} power-down

Pinout

Breakout modules expose a 10-pin or 12-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
5CSAGDigital InputChip Select for Accel/Gyro (High = I2CI^2C mode)
6CSMDigital InputChip Select for Magnetometer (High = I2CI^2C mode)
7SDOAGDigital OutputI2CI^2C Address Bit for Accel/Gyro (Low = 0x6A, High = 0x6B)
8SDOMDigital OutputI2CI^2C Address Bit for Magnetometer (Low = 0x1C, High = 0x1E)
9INT1Digital OutputInterrupt 1 line (Accel/Gyro)
10INT_MDigital OutputInterrupt line (Magnetometer)

Specifications

ParameterSymbolMinTypMaxUnitConditions
Supply Voltage (Module)VCCV_{CC}3.33.3 / 5.05.5VPower rail with LDO
Active Supply CurrentICCI_{CC}4.66.0mAAccel + Gyro + Mag active
Accel Sensitivity (±2g\pm 2g)SaccS_{acc}0.061mg/LSB16-bit output
Gyro Sensitivity (±245 dps\pm 245\text{ dps})SgyroS_{gyro}8.75mdps/LSB16-bit output
Mag Sensitivity (±4 Gauss\pm 4\text{ Gauss})SmagS_{mag}0.14mGauss/LSB16-bit output
Max Accel ODRfODR_accf_{ODR\_acc}14.9952HzConfigurable
Max Gyro ODRfODR_gyrof_{ODR\_gyro}14.9952HzConfigurable
Max Mag ODRfODR_magf_{ODR\_mag}0.62580HzConfigurable

Dual I2CI^2C Devices in One Package

The LSM9DS1 contains two distinct I2CI^2C sub-devices inside the same silicon package:

  1. Accelerometer & Gyroscope engine: Default I2CI^2C address 0x6B (WHO_AM_I register 0x0F returns 0x68).
  2. Magnetometer engine: Default I2CI^2C address 0x1E (WHO_AM_I_M register 0x0F returns 0x3D).

Wiring

LSM9DS1 PinArduino / MCUESP32Notes
VCC5V / 3.3V3.3VModule includes 3.3V regulator
GNDGNDGNDSystem ground
SCLA5GPIO 22I2CI^2C Clock
SDAA4GPIO 21I2CI^2C Data
CSAG3.3V / 5V3.3VPull High for I2CI^2C mode
CSM3.3V / 5V3.3VPull High for I2CI^2C mode

Example

cpp
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_LSM9DS1.h>

Adafruit_LSM9DS1 lsm = Adafruit_LSM9DS1();

void setup() {
  Serial.begin(115200);
  Serial.println("LSM9DS1 9-DOF test");

  // Initialize I2C mode
  if (!lsm.begin()) {
    Serial.println("Could not find LSM9DS1! Check CSAG and CSM pins.");
    while (1);
  }
  Serial.println("LSM9DS1 initialized successfully.");
  
  lsm.setupAccel(lsm.LSM9DS1_ACCELRANGE_2G);
  lsm.setupMag(lsm.LSM9DS1_MAGGAIN_4GAUSS);
  lsm.setupGyro(lsm.LSM9DS1_GYROSCALE_245DPS);
}

void loop() {
  lsm.read();
  
  sensors_event_t a, m, g, temp;
  lsm.getEvent(&a, &m, &g, &temp);

  Serial.print("Accel X: "); Serial.print(a.acceleration.x); Serial.print(" m/s^2\t");
  Serial.print("Gyro X: "); Serial.print(g.gyro.x); Serial.print(" rad/s\t");
  Serial.print("Mag X: "); Serial.print(m.magnetic.x); Serial.println(" uT");

  delay(200);
}

Common mistakes

  • Leaving CSAG or CSM floating: Leaving either Chip Select pin unconnected drops the corresponding sub-device into SPI mode, making address 0x6B or 0x1E unresponsive over I2CI^2C.
  • Not performing magnetometer hard-iron calibration: Nearby metal, battery leads, or PCB ground planes induce static magnetic offsets. Software calibration must compute offset vectors (Vx,Vy,VzV_x, V_y, V_z) to center magnetometer readings.

Notes

  • LSM9DS1 vs MPU9250: The LSM9DS1 is STMicroelectronics' primary competitor to the InvenSense MPU9250 9-DoF IMU.

Assets & downloads