Best IMU Sensor for Arduino and ESP32 (Accelerometer + Gyroscope)

Picking the best IMU sensor for Arduino and ESP32 projects starts with a question a lot of beginners skip past: how many axes do you actually need, and do you want raw data or a sensor that does the math for you? Buy the wrong one and you’ll either pay for capability you never use, or spend a weekend writing sensor fusion code that a $15 chip would have handled internally.

This guide covers six modules spanning the full capability ladder, from a basic accelerometer-only board to a chip that outputs ready-to-use orientation data without you writing a line of fusion code. Along the way we’ll cover what accelerometers, gyroscopes, and magnetometers actually measure, and when raw sensor data is enough versus when you want onboard fusion doing the work.

Building a robot or drone that needs motion sensing? Check out our Best Arduino Robot Car Kits guide, and if you want a broader sensor collection to experiment with first, the Best Arduino Sensor Kit roundup is a good place to start.


Quick Comparison Table

ModuleAxesSensors IncludedInterfaceBest For
HiLetgo GY-521 MPU-60506-axisAccel + gyroI2CBudget/beginner motion sensing
HiLetgo GY-291 ADXL3453-axisAccel onlyI2C or SPITilt and vibration sensing
HiLetgo MPU9250 GY-92509-axisAccel + gyro + magI2C or SPIHeading/compass projects
Adafruit LSM6DSOX6-axisAccel + gyroI2C or SPILow-noise, ML-ready motion sensing
GY-BNO0559-axisAccel + gyro + mag + fusion CPUI2C or UARTReady-to-use orientation data
ICM-209489-axisAccel + gyro + magI2C or SPILow-power 9-axis tracking

1. Best Budget/Beginner 6-Axis IMU: HiLetgo GY-521 MPU-6050

HiLetgo GY-521 MPU-6050 6-Axis Accelerometer Gyroscope Module

Best for: Beginners who want the cheapest, most widely documented way to measure motion and tilt on Arduino.

Best IMU sensor for Arduino: HiLetgo GY-521 MPU-6050 module

The MPU-6050 is the IMU nearly every Arduino motion-sensing tutorial starts with, combining a 3-axis accelerometer and a 3-axis gyroscope on one chip. It talks over I2C, includes a built-in 16-bit analog-to-digital converter for clean data output, and has an onboard Digital Motion Processor that handles some of the sensor fusion math internally rather than leaving all of it to your Arduino.

For projects like tilt detection, step counting, or basic robot balancing, this is the chip that shows up in nearly every project writeup and forum thread, which makes troubleshooting far easier than with less common sensors. It won’t give you a compass heading since there’s no magnetometer onboard, but for pure motion and orientation sensing on a budget, it’s the default choice.

Specifications:

  • Axes: 6-axis (3-axis accelerometer + 3-axis gyroscope)
  • Accelerometer range: ±2g, ±4g, ±8g, ±16g (selectable)
  • Gyroscope range: ±250, ±500, ±1000, ±2000°/s (selectable)
  • Interface: I2C, default address 0x68
  • ADC resolution: 16-bit
  • Voltage: 3V to 5V (onboard regulator)

Why it stands out:

  • Cheapest reliable way to add motion and tilt sensing to an Arduino or ESP32 project
  • Massive tutorial and library base, including the dedicated ArduinoYard guide linked below
  • Built-in Digital Motion Processor offloads some fusion math from your microcontroller
  • Selectable accelerometer and gyroscope ranges suit everything from gentle tilt to fast rotation
  • Shares the same I2C bus as other sensors, so it drops easily into existing projects

Things to keep in mind:

  • No magnetometer, so it can’t provide a compass heading on its own
  • Raw gyroscope data drifts over time and needs filtering or fusion with accelerometer data for stable orientation
  • Owners occasionally report needing to average multiple readings at startup to calibrate out sensor offset

👉 Buy HiLetgo GY-521 MPU-6050 on Amazon

Verdict: The right starting point for almost anyone learning motion sensing on Arduino or ESP32. Cheap, well documented, and good enough for tilt detection, step counting, and basic stabilization projects.


2. Best Dedicated Accelerometer-Only Module: HiLetgo GY-291 ADXL345

HiLetgo GY-291 ADXL345 3-Axis Digital Accelerometer Module

Best for: Projects that only need acceleration and tilt data without the complexity or drift of a gyroscope.

HiLetgo GY-291 ADXL345 3-axis accelerometer module

Not every project needs a gyroscope, and the ADXL345 is built for the ones that don’t. It’s a dedicated 3-axis accelerometer with genuinely high resolution, capable of detecting tilt changes of less than one degree, and it includes onboard motion-detection features like tap, double-tap, and free-fall sensing that would otherwise need to be calculated in software from raw gyroscope-and-accelerometer data.

Because it skips the gyroscope entirely, there’s no drift to filter out and no fusion algorithm to write. For vibration monitoring, simple tilt switches, shock detection, or step counting, that simplicity is a real advantage over reaching for a full 6-axis IMU and only using half its data.

Specifications:

  • Axes: 3-axis accelerometer only
  • Range: ±2g, ±4g, ±8g, ±16g (selectable)
  • Resolution: 13-bit, 3.9mg/LSB
  • Interface: I2C or SPI
  • Built-in features: tap/double-tap detection, free-fall detection, activity/inactivity detection
  • Voltage: 3.3V to 5V (onboard regulator)

Why it stands out:

  • High resolution detects tilt changes under one degree without needing a gyroscope
  • Built-in tap, free-fall, and activity detection handled in hardware, not software
  • No gyroscope drift to filter, since there’s nothing to fuse or calibrate against
  • Dual I2C/SPI interface fits into more project architectures than I2C-only sensors
  • Genuinely simpler starting point than a full IMU for accelerometer-only use cases

Things to keep in mind:

  • No rotation data, so it can’t measure spin or angular velocity like the MPU-6050 can
  • Not a fit for projects needing stable orientation tracking over time, since accelerometer data alone drifts under motion
  • Reviewers note the interrupt pins need proper configuration in code to use the built-in tap and free-fall detection features

👉 Buy HiLetgo GY-291 ADXL345 on Amazon

Verdict: The simplest, most direct choice when a project only needs acceleration and tilt data. Skipping the gyroscope means skipping the drift problem entirely.


3. Best 9-Axis IMU with Magnetometer: HiLetgo MPU9250 GY-9250

HiLetgo MPU9250 GY-9250 9-Axis IMU Sensor Module

Best for: Projects that need a compass heading alongside motion and tilt data.

HiLetgo MPU9250 GY-9250 9-axis IMU sensor module

The MPU9250 takes the same accelerometer-and-gyroscope combination as the MPU-6050 and adds a third sensor: a 3-axis magnetometer that measures Earth’s magnetic field to provide compass heading. That makes it a genuine step up for navigation projects, drones, or anything that needs to know which direction it’s actually facing rather than just how it’s tilted or spinning.

It communicates over I2C or SPI and keeps the same selectable accelerometer and gyroscope ranges as the MPU-6050, so code written for one transfers over with minor changes. The magnetometer does add its own calibration requirements, since raw magnetic readings are easily thrown off by nearby metal or electrical noise from motors and wiring.

Specifications:

  • Axes: 9-axis (3-axis accelerometer + 3-axis gyroscope + 3-axis magnetometer)
  • Accelerometer range: ±2g, ±4g, ±8g, ±16g (selectable)
  • Gyroscope range: ±250, ±500, ±1000, ±2000°/s (selectable)
  • Magnetometer range: ±4800µT
  • Interface: I2C or SPI
  • Voltage: 3V to 5V (onboard regulator)

Why it stands out:

  • Adds compass heading to the same accelerometer and gyroscope combination as the MPU-6050
  • Dual I2C/SPI interface for flexible wiring
  • Selectable ranges across all three sensor types for different project needs
  • Well-documented successor to the MPU-6050 with a large existing code base
  • A common choice for drone flight controllers and navigation projects

Things to keep in mind:

  • Magnetometer readings need calibration, especially near motors, speakers, or other metal components
  • More complex to fuse three sensor types into stable orientation data than a 6-axis IMU
  • Placement matters: mounting it too close to high-current wiring can distort magnetometer readings

👉 Buy HiLetgo MPU9250 GY-9250 on Amazon

Verdict: The natural upgrade from the MPU-6050 when a project needs to know its heading, not just its tilt and spin. Budget extra time for magnetometer calibration.


4. Best Modern 6-Axis IMU: Adafruit LSM6DSOX

Adafruit LSM6DSOX 6-DoF Accelerometer and Gyroscope

Best for: Projects that want significantly better gyroscope stability than the MPU-6050 plus onboard motion-recognition features.

Adafruit LSM6DSOX 6-axis accelerometer gyroscope breakout board

The LSM6DSOX covers the same 6 degrees of freedom as the MPU-6050, accelerometer plus gyroscope, but it’s a newer chip with noticeably lower gyro noise and zero-rate drift. For projects doing orientation fusion, that translates directly into less drift and faster, more stable response without any extra filtering work on your end.

Beyond the raw sensor improvement, it packs in extras the MPU-6050 doesn’t have: built-in tap detection, activity detection, a pedometer/step counter, and a small programmable machine learning core capable of basic gesture recognition, all running on the chip itself. It connects over I2C or SPI and includes a STEMMA QT connector for solder-free wiring to compatible boards.

Specifications:

  • Axes: 6-axis (3-axis accelerometer + 3-axis gyroscope)
  • Accelerometer range: ±2g, ±4g, ±8g, ±16g, up to 6.7kHz update rate
  • Gyroscope range: ±125 to ±2000°/s, up to 6.7kHz update rate
  • Interface: I2C or SPI, STEMMA QT connector included
  • Built-in features: tap detection, activity detection, pedometer, programmable ML core
  • Voltage: 3V to 5V (onboard regulator, level-shifted)

Why it stands out:

  • Noticeably lower gyro noise and drift than the MPU-6050, meaning better fusion results
  • Onboard machine learning core handles basic gesture recognition without extra processing
  • Built-in tap, activity, and step-counting features reduce the code you need to write
  • STEMMA QT connector allows solder-free wiring to compatible development boards
  • High configurable data rates suit both low-power and fast-response applications

Things to keep in mind:

  • No magnetometer onboard, so it’s 6-axis only like the MPU-6050, not a full compass solution
  • Costs more than the MPU-6050 for the same basic accelerometer-and-gyroscope combination
  • The machine learning core requires additional configuration to use beyond basic sensor reading

👉 Buy Adafruit LSM6DSOX on Amazon

Verdict: The pick when MPU-6050-level capability isn’t precise enough. Better noise performance and useful onboard features justify the price jump for serious motion-sensing projects.


5. Best Sensor-Fusion IMU: GY-BNO055 Absolute Orientation Sensor

GY-BNO055 9-Axis Absolute Orientation Sensor Module

Best for: Projects that want ready-to-use orientation data without writing any sensor fusion code.

GY-BNO055 absolute orientation sensor module

Every other sensor in this guide hands you raw accelerometer, gyroscope, and magnetometer numbers and leaves the job of combining them into stable orientation data up to you. The BNO055 is different: it packs a 3-axis accelerometer, 3-axis gyroscope, and 3-axis magnetometer alongside its own onboard processor that runs Bosch’s sensor fusion algorithms internally, and hands your Arduino finished orientation data directly, as quaternions or Euler angles, instead of raw numbers you’d have to fuse yourself.

That onboard fusion is a genuine time-saver. Writing a stable complementary or Kalman filter from scratch to combine three raw sensor streams is one of the more frustrating parts of working with IMUs, and the BNO055 skips that step entirely. The tradeoff is calibration: getting clean absolute orientation requires walking the sensor through several positions so its internal algorithm can calibrate the accelerometer and magnetometer, and it doesn’t have internal memory to save that calibration through a power cycle.

Specifications:

  • Axes: 9-axis (3-axis accelerometer + 3-axis gyroscope + 3-axis magnetometer)
  • Onboard processor: 32-bit ARM Cortex-M0+ running sensor fusion
  • Output formats: quaternion, Euler angles, angular velocity, linear acceleration, gravity vector, magnetic field
  • Interface: I2C or UART
  • Voltage: 3V to 5V (onboard regulator)

Why it stands out:

  • Onboard sensor fusion outputs ready-to-use orientation data, no fusion algorithm to write
  • Multiple output formats cover most orientation-tracking use cases directly
  • Separates gravity from linear acceleration automatically, useful for motion-only tracking
  • I2C or UART interface fits a wide range of microcontroller setups
  • Genuinely reduces development time compared to fusing three raw sensor streams by hand

Things to keep in mind:

  • Most expensive module in this guide, reflecting the onboard processor and fusion algorithms
  • Requires a multi-position calibration routine for the accelerometer and magnetometer to reach full accuracy
  • No internal EEPROM, so calibration data is lost on power cycle unless your code saves and restores it from the host microcontroller

👉 Buy GY-BNO055 Absolute Orientation Sensor on Amazon

Verdict: The pick when finished orientation data matters more than raw sensor access. It costs more, but it removes the hardest part of working with a 9-axis IMU.


6. Best Modern Low-Power 9-Axis IMU: ICM-20948

ICM-20948 9-Axis Motion Tracking Sensor Module

Best for: Battery-powered or wearable projects that need full 9-axis tracking without draining a battery.

ICM-20948 9-axis motion tracking sensor breakout module

The ICM-20948 is the direct successor to the MPU9250, built by the same underlying InvenSense technology but engineered specifically around power efficiency. It packs the same 9-axis combination, accelerometer, gyroscope, and magnetometer, into a design that TDK markets as one of the lowest-power full 9-axis motion sensors available, which matters directly for anything running off a battery for extended periods.

Like the MPU9250, it includes an onboard Digital Motion Processor that offloads some fusion computation from your microcontroller, and it supports both I2C and SPI. For wearables, long-running IoT sensors, or any battery-powered project doing full 9-axis tracking, the power savings over an MPU9250 add up meaningfully over a full day of runtime.

Specifications:

  • Axes: 9-axis (3-axis accelerometer + 3-axis gyroscope + 3-axis magnetometer)
  • Accelerometer range: ±2g, ±4g, ±8g, ±16g (selectable)
  • Gyroscope range: ±250, ±500, ±1000, ±2000°/s (selectable)
  • Magnetometer range: ±4900µT
  • Interface: I2C or SPI
  • Power consumption: as low as 2.5mW in full 9-axis mode

Why it stands out:

  • Significantly lower power draw than the MPU9250 for the same 9-axis capability
  • Onboard Digital Motion Processor offloads fusion computation from your microcontroller
  • Dual I2C/SPI interface supports flexible wiring options
  • Direct, well-documented successor to one of the most widely used 9-axis IMUs
  • Well suited to wearables and long-running battery-powered motion sensing

Things to keep in mind:

  • Not code-compatible with the MPU9250 despite being its successor, so libraries need to be swapped rather than reused
  • Counterfeit and mislabeled units circulate for this chip, so verifying the module against a known-good library is worth doing early
  • Like the MPU9250, magnetometer calibration is still needed for accurate heading data

👉 Buy ICM-20948 9-Axis IMU Module on Amazon

Verdict: The pick for battery-powered or wearable projects that need full 9-axis tracking without the MPU9250’s power draw. Budget time to switch libraries if migrating from an existing MPU9250 project.


Which IMU Sensor Should You Buy?

The right IMU sensor for Arduino or ESP32 comes down to three questions: how many axes does the project actually need, does it need a compass heading, and do you want raw data or finished orientation output.

For most beginner motion-sensing projects, tilt detection, and basic stabilization, the HiLetgo GY-521 MPU-6050 covers it at the lowest cost with the most tutorial support available anywhere. If a project only needs acceleration and tilt without rotation data, the HiLetgo GY-291 ADXL345 is simpler and skips gyroscope drift entirely. When a project needs precise, low-drift motion sensing and built-in gesture features, the Adafruit LSM6DSOX is worth the price jump over the MPU-6050.

If the project needs to know its heading, not just its tilt and spin, step up to a 9-axis module. The HiLetgo MPU9250 GY-9250 adds a magnetometer to MPU-6050-level capability at a reasonable price, while the ICM-20948 does the same job with dramatically better power efficiency for battery-powered builds. And if writing sensor fusion code isn’t something you want to deal with at all, the GY-BNO055 hands you finished orientation data directly, at a higher price but a real time savings.


Accelerometer vs. Gyroscope vs. Magnetometer: What Each Axis Actually Measures

Every IMU in this guide is built from some combination of three fundamentally different sensor types, and understanding what each one actually measures explains why combining them is necessary for stable orientation tracking.

Accelerometers measure acceleration along each axis, including the constant pull of gravity. Sitting still on a table, an accelerometer reads roughly 1g straight down due to gravity alone, which is actually useful: that gravity vector tells you which way is down, giving a stable tilt reading. The catch is that any other acceleration, like the sensor being shaken or moved, adds to that gravity reading and makes it hard to separate “tilted” from “moving,” especially over short timescales.

Gyroscopes measure angular velocity, how fast the sensor is rotating around each axis, not the angle itself. Integrating that rotation rate over time gives you a change in angle, which works well for fast, short-term rotation tracking, but small measurement errors accumulate over time into what’s called drift: a stationary sensor will slowly report itself as rotating even when it isn’t.

Magnetometers measure the strength and direction of magnetic fields, primarily Earth’s magnetic field, which gives an absolute compass heading that doesn’t drift over time the way gyroscope data does. The tradeoff is that magnetometers are sensitive to any nearby magnetic interference, motors, speakers, and even some wiring can throw off readings, which is why magnetometer-equipped modules typically need a calibration routine away from interfering hardware.

Combining these three sensor types plays to each one’s strengths: the accelerometer’s stable-but-noisy tilt reading, the gyroscope’s fast-but-drifting rotation tracking, and the magnetometer’s drift-free-but-interference-prone heading, fused together, cancel out each other’s weaknesses far better than any single sensor could alone.


Raw Data vs. Sensor Fusion: Why the BNO055 Is Different

Most of the modules in this guide, the MPU-6050, ADXL345, MPU9250, LSM6DSOX, and ICM-20948, hand your microcontroller raw numbers: acceleration in g’s, rotation rate in degrees per second, magnetic field strength in microtesla. Turning those raw numbers into a single, stable orientation value is a separate job, typically handled with a complementary filter or a Kalman filter running on your Arduino or ESP32.

Writing that fusion code yourself is one of the more genuinely frustrating parts of working with IMUs. It involves tuning filter constants, handling sensor noise, and accounting for drift in ways that are easy to get wrong on a first attempt, which is exactly the gap the BNO055 fills. Its onboard 32-bit processor runs Bosch’s fusion algorithms directly on the chip, so instead of raw numbers, your microcontroller receives finished orientation data ready to use.

The practical tradeoff is cost and setup. The BNO055 costs more than a raw sensor of similar capability, and it still needs a calibration routine to reach full accuracy since sensor fusion can’t fully compensate for an uncalibrated magnetometer or accelerometer. But for projects where getting to working orientation data quickly matters more than saving a few dollars, that tradeoff is usually worth it.


Final Recommendation

For most Arduino and ESP32 projects, the HiLetgo GY-521 MPU-6050 remains the best all-around starting point for an IMU sensor for Arduino and ESP32 builds: cheap, simple, and backed by more tutorials than any other sensor in this guide. Projects needing a compass heading should look at the ICM-20948 for its power efficiency, and anyone who wants finished orientation data without writing fusion code should budget for the GY-BNO055.

ArduinoYard has a dedicated guide covering the MPU-6050 in depth, along with two guides on managing multiple I2C devices, useful if you’re pairing an IMU with other sensors on the same bus. The Accelerometer Module MPU6050 With Arduino: A Complete Guide covers wiring, calibration, and example code, while Understanding ESP32 I2C Pins and the ESP32 I2C Scanner guide help troubleshoot address conflicts when running an IMU alongside other I2C sensors.


Rounding out your motion-sensing or robotics parts list? Check out our guides on the Best Arduino Robot Car Kits, Best Arduino Sensor Kit, Best Relay Module for Arduino and ESP32, and Best Temperature and Humidity Sensor for Arduino and ESP32.

Leave a Comment