Component guide · Advanced · 3 min read
ICM-20948 9-Axis IMU

Pinout, Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The ICM-20948 from TDK InvenSense is a low-power 9-axis IMU: accelerometer, gyroscope and an AK09916 magnetometer, plus a Digital Motion Processor (DMP) for on-chip fusion. It connects over I2C (0x69 or 0x68) or SPI and runs from 1.8 to 3.6 V. It is the current replacement for the MPU9250 in robots, drones and wearables.
Key specs at a glance
- Sensors
- 3-axis accelerometer, 3-axis gyroscope, 3-axis AK09916 magnetometer
- Ranges
- Accel ±2 to ±16 g, gyro ±250 to ±2000 °/s, mag ±4900 µT
- Interface
- I2C up to 400 kHz (0x68 or 0x69), SPI up to 7 MHz
- Supply
- 1.71 to 3.6 V (3.3 V logic)
- Extras
- DMP for on-chip fusion, 512-byte FIFO, wake-on-motion
- WHO_AM_I
- 0xEA
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
What the ICM-20948 is
The ICM-20948 packs the same kind of sensors as the MPU9250 in a smaller, lower-power chip that is still in production. Its registers are split into four banks, so it is easiest to use with a library.
The DMP can run sensor fusion on the chip and output quaternions, which saves work on small boards. The SparkFun library supports both raw data and the DMP.
ICM-20948 pinout
The pins on the ICM-20948 and what each one does.
| Pin | Function |
|---|---|
| 3V3 / VIN | Supply (3.3 V; some breakouts include a regulator) |
| GND | Ground |
| SDA / SCL | I2C data and clock |
| AD0 | Address select: low 0x68, high 0x69 (SparkFun default 0x69) |
| INT | Interrupt output |
| CS | SPI chip select; high for I2C |
| FSYNC | Frame sync input (optional) |
- 3V3 / VIN
- Supply (3.3 V; some breakouts include a regulator)
- GND
- Ground
- SDA / SCL
- I2C data and clock
- AD0
- Address select: low 0x68, high 0x69 (SparkFun default 0x69)
- INT
- Interrupt output
- CS
- SPI chip select; high for I2C
- FSYNC
- Frame sync input (optional)
Wiring the ICM-20948
The ICM-20948 is a 3.3 V device. Use a level shifter on SDA and SCL with a 5 V Arduino, or the Qwiic connector with a 3.3 V board.
| ICM-20948 pin | Arduino Uno | ESP32 |
|---|---|---|
| VIN / 3V3 | 3.3V | 3V3 |
| GND | GND | GND |
| SDA | A4 via level shifter | GPIO 21 |
| SCL | A5 via level shifter | GPIO 22 |
| AD0 | Open (0x69 on SparkFun) | Open (0x69 on SparkFun) |
- VIN / 3V3
- Arduino Uno:
- 3.3V
- ESP32:
- 3V3
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- SDA
- Arduino Uno:
- A4 via level shifter
- ESP32:
- GPIO 21
- SCL
- Arduino Uno:
- A5 via level shifter
- ESP32:
- GPIO 22
- AD0
- Arduino Uno:
- Open (0x69 on SparkFun)
- ESP32:
- Open (0x69 on SparkFun)
Example code
Install "SparkFun 9DoF IMU Breakout - ICM 20948" from the Library Manager. Use begin(Wire, 0) if your board's AD0 is low (address 0x68).
#include "ICM_20948.h"
ICM_20948_I2C imu;
void setup() {
Serial.begin(115200);
Wire.begin();
Wire.setClock(400000);
while (imu.begin(Wire, 1) != ICM_20948_Stat_Ok) { // 1 = AD0 high (0x69)
Serial.println("ICM-20948 not found, retrying");
delay(500);
}
}
void loop() {
if (imu.dataReady()) {
imu.getAGMT();
Serial.print("acc mg "); Serial.print(imu.accX()); Serial.print(" "); Serial.print(imu.accY()); Serial.print(" "); Serial.print(imu.accZ());
Serial.print(" gyro dps "); Serial.print(imu.gyrX()); Serial.print(" "); Serial.print(imu.gyrY()); Serial.print(" "); Serial.print(imu.gyrZ());
Serial.print(" mag uT "); Serial.print(imu.magX()); Serial.print(" "); Serial.print(imu.magY()); Serial.print(" "); Serial.println(imu.magZ());
}
delay(50);
}Setup and tuning
SparkFun boards default to 0x69; other modules are often 0x68. Run an I2C scanner.
enable ICM_20948_USE_DMP in the library's config file to get quaternions from the chip.
remove gyro offset at rest and calibrate the magnetometer with a figure-of-eight motion.
set the low-pass filters to suit vibration on your robot or drone.
What you need
Shop this list7 of 7 found in our store · ₹4,823
SparkFun 9DoF IMU breakout ICM-20948 (Qwiic): the sensor this guide coversSparkFun 9DoF IMU Breakout – ICM-20948 (Qwiic & GPIO)₹2,659Closest match, check the specs
TDK InvenSense ICM-20948 Motion Tracking Sensor Module – 9-Axis IMU w/ DMP, I2C/SPI: another version this guide coversTDK InvenSense ICM-20948 Motion Tracking Sensor Module – 9-Axis IMU w/ DMP, I2C/SPI₹849
TDK InvenSense ICM-20948 Low Power 9-Axis MEMS Motion Tracking Device Sensor Module: another version this guide coversTDK InvenSense ICM-20948 Low Power 9-Axis MEMS Motion Tracking Device Sensor Module₹789
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
4-channel logic level converter (BSS138): to connect 5 V and 3.3 V signals safely4-Channel Logic Level Converter (BSS138)₹20
Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
Solderless breadboard: to build without solderingSolderless Breadboard₹68
Alternatives and when to choose them
Try it: I2c pullup calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Connecting it to 5 V logic without a level shifter.
- Using the wrong address flag (0 or 1) in begin() for the board's AD0 setting.
- Trying to read the magnetometer directly; it sits on the chip's internal auxiliary bus.
- Not calibrating the compass before using the heading.
Frequently asked questions
What is the ICM-20948's I2C address?
0x68 with AD0 low or 0x69 with AD0 high. SparkFun breakouts use 0x69.
Is it a replacement for the MPU9250?
Yes, it is TDK's current 9-axis part and is recommended for new designs.
Does it do sensor fusion?
Yes, its DMP can output quaternions; enable DMP support in the SparkFun library.
Can I use it with an Arduino Uno?
Yes with a level shifter, though a 3.3 V board is simpler.
What does WHO_AM_I return?
0xEA.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 1 step-by-step build in our project library uses parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.
