Overview

The LIS3DH is an ultra-low-power 3-axis high-performance linear accelerometer belonging to the "nano" family of STMicroelectronics MEMS sensors. Housed in a compact 3×3×1 mm3 \times 3 \times 1\text{ mm} 16-pin LGA package, it integrates a 3-axis capacitive sensing element along with an IC interface outputting 16-bit digital acceleration data over I2CI^2C or SPI.

Consuming as little as 2 μA2\ \mu\text{A} in low-power operating mode (and 11 μA11\ \mu\text{A} in normal mode), the LIS3DH features programmable full scales (±2g\pm 2g, ±4g\pm 4g, ±8g\pm 8g, ±16g\pm 16g), a 32-level FIFO buffer, two independent programmable interrupt pins, an integrated temperature sensor, and dedicated hardware logic for single/double-click (tap) detection and free-fall sensing. It is widely used in battery-powered wearables, asset trackers, tilt sensors, and tap-to-wake UI devices.

Quick reference

Operating voltage (VCC)3.3 V to 5.0 V DC (breakout with onboard LDO)
IC supply voltage (VDD)1.71 V to 3.6 V DC
InterfaceI2CI^2C (up to 400 kHz) & 3-Wire / 4-Wire SPI (up to 10 MHz)
Default I2CI^2C address0x18 (SDO/ALT pin Low / un-connected)
Alternate I2CI^2C address0x19 (SDO/ALT pin High to 3.3V)
Full-scale acceleration range±2g,±4g,±8g,±16g\pm 2g, \pm 4g, \pm 8g, \pm 16g
Output resolution10-bit (Normal), 12-bit (High Res), 8-bit (Low Power)
Active current draw11 μA11\ \mu\text{A} (Normal Mode at 50 Hz) / 0.5 μA0.5\ \mu\text{A} power-down

Pinout

Breakout modules feature an 8-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 / ALTDigital OutputSPI Serial Data Out / I2CI^2C Address Bit 0 (Low = 0x18, High = 0x19)
6CSDigital InputSPI Chip Select (High = I2CI^2C mode, Low = SPI mode)
7INT1Digital OutputProgrammable Interrupt Line 1 (free-fall / motion trigger)
8INT2Digital OutputProgrammable Interrupt Line 2 (click / double-click trigger)

Specifications

ParameterSymbolMinTypMaxUnitConditions
Supply Voltage (Module)VCCV_{CC}3.33.3 / 5.05.5VPower rail with LDO
Normal Mode CurrentInormI_{norm}1120µAfODR=50 Hzf_{ODR} = 50\text{ Hz}, VDD=2.5VV_{DD} = 2.5\text{V}
Low Power CurrentIlowI_{low}24µAfODR=1 Hzf_{ODR} = 1\text{ Hz}, low-power mode
Power-Down CurrentIpdI_{pd}0.51.0µAShut down state
Sensitivity (±2g\pm 2g)S2gS_{2g}1mg/digit16-bit left-justified
Sensitivity (±16g\pm 16g)S16gS_{16g}12mg/digit16-bit left-justified
Output Data RatefODRf_{ODR}11005376HzConfigurable via CTRL_REG1

Register map

AddressRegisterAccessResetDescription
0x0FWHO_AM_IRead0x33Device identification register (always returns 0x33)
0x20CTRL_REG1R/W0x07Data rate (ODRODR), Low-power mode enable, X/Y/Z enable
0x23CTRL_REG4R/W0x00Full-scale selection (±2g/±4g/±8g/±16g\pm 2g / \pm 4g / \pm 8g / \pm 16g), High resolution
0x280x29OUT_X_L / HReadX-axis acceleration output bytes
0x2A0x2BOUT_Y_L / HReadY-axis acceleration output bytes
0x2C0x2DOUT_Z_L / HReadZ-axis acceleration output bytes
0x38CLICK_CFGR/W0x00Single-tap / double-tap interrupt configuration

Wiring

LIS3DH PinArduino / MCUESP32Notes
VCC5V / 3.3V3.3VModule includes 3.3V LDO
GNDGNDGNDSystem ground
SCLA5GPIO 22I2CI^2C Clock
SDAA4GPIO 21I2CI^2C Data
CS3.3V / 5V3.3VPull High for I2CI^2C mode
SDOGNDGNDConnect to GND for 0x18, VCC for 0x19

Example

cpp
#include <Wire.h>
#include <Adafruit_LIS3DH.h>
#include <Adafruit_Sensor.h>

Adafruit_LIS3DH lis = Adafruit_LIS3DH();

void setup() {
  Serial.begin(115200);
  Serial.println("LIS3DH Test!");

  // Initialize I2C with default address 0x18
  if (!lis.begin(0x18)) {
    Serial.println("Could not find LIS3DH! Check CS and SDO pins.");
    while (1);
  }
  Serial.println("LIS3DH found!");

  lis.setRange(LIS3DH_RANGE_4_G);   // 2, 4, 8 or 16 G
  Serial.print("Range set to: 4G");
}

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

  Serial.print("X: "); Serial.print(event.acceleration.x); Serial.print(" m/s^2 ");
  Serial.print("Y: "); Serial.print(event.acceleration.y); Serial.print(" m/s^2 ");
  Serial.print("Z: "); Serial.print(event.acceleration.z); Serial.println(" m/s^2");

  delay(200);
}

Common mistakes

  • Leaving CS floating on I2CI^2C setups: If CS is left unconnected, the LIS3DH defaults to SPI mode or toggles protocol modes randomly. Always pull CS High to VCCV_{CC} for I2CI^2C mode.
  • Assuming 16-bit raw values are right-justified: Raw acceleration output registers (OUT_X_L / OUT_X_H) are left-justified. Shift raw 16-bit values right by 4 bits in Normal (12-bit) mode or 6 bits in Low-Power (10-bit) mode.
  • Wrong address jumper: Pulling SDO High changes the I2CI^2C address from 0x18 to 0x19.

Notes

  • LIS3DH vs ADXL345: The LIS3DH operates down to 1.71V supply and consumes significantly lower active current (11 μA11\ \mu\text{A} vs 145 μA145\ \mu\text{A}) than the ADXL345, making it ideal for coin-cell battery operation.

Assets & downloads