IMU Basics

Every REV Robotics Control Hub (REV-31-1595) and Expansion Hub (REV-31-1153) have a built in 9-axis IMU, or inertial measurement unit. The IMU incorporates three sensors: a 3-axis accelerometer, a 3-axis gyroscope, and a 3-axis geomagnetic sensor. The accelerometer measures the affect of forces on acceleration along the three axes. The gyroscope measures the rotational location of the the Hubs along the axes. The geomagnetic sensor (or magnetometer) uses the Earth's magnetic field to find orientation.
The accuracy of the magnetometer within the IMU is affected by proximity to surrounding magnetic fields.
The data considered and used by the IMU includes: rotation along each axis, forces of acceleration along each axis, and magnitude of acceleration. The rotational measurements for the gyroscope play an important part in the use of the gyroscope for positioning and location of the robot.
  • Heading is the measure of rotation along the z-axis. If the Hub is laying flat on a table, the z-axis points upwards through the front plate of the Hub.
  • Pitch is the measure of rotation along the x-axis. The x-axis is the axis that runs from the bottom of the hub, near the servo ports, to the top of the hub ,where the USB ports are.
  • Roll is the measure along the y-axis. The y-axis is the axis that runs from the sensor ports on the right to the motor ports on the left.
The orientation of the hub plays a large part into which measurement will be used to determine the orientation of the robot as it moves.

Product Specifications

  • I2C Address: 0x28
  • Port: 0

How to Use?


There are a multitude of applications for the IMU within autonomous op modes:
  • Use the Gyroscope to drive in the straight lines and turn during autonomous
  • Use the Accelrometer in conjunction with the gyroscope to avoid drift and give an approximation of position/travel
  • Use the IMU with motor encoders to track and determine robot placement on a field


Since the IMU is already installed with in the Control or Expansion Hub the main concerns are Hub position and configuration. The orientation of the Hub affects which axis is getting feedback.
The IMU always exists on I2C Bus 0.
To learn more on how to configure the IMU check out the I2C introduction page.
Last modified 3d ago