LogoLogo
  • Introduction
  • Getting Started with Control Hub
    • Connect to the Robot Controller Console
    • Updating Wi-Fi Settings
    • Connecting Driver Station to Control Hub
    • Wiring Diagram
    • Next Steps
  • Getting Started with Driver Hub
  • Adding More Motors
    • SPARKmini Motor Controller
    • Adding an Expansion Hub
  • Troubleshooting the Control System
    • General Troubleshooting
    • Control Hub Troubleshooting
    • Driver Hub Troubleshooting
      • Driver Hub Battery Troubleshooting
    • Expansion Hub Troubleshooting
    • Status LED Blink Codes
  • System Overview
    • Control Hub Specifications
    • Expansion Hub Specifications
    • Driver Hub Specifications
    • Port Pinouts
    • Protection Features
    • Cables and Connectors
      • XT-30 - Power Cable
      • JST VH - Motor Power
      • JST PH - Sensors and RS485
    • Integrated Sensors
    • Dimensions and Important Component Locations
  • Updating and Managing
    • Managing Wi-Fi on the Control Hub
    • REV Hardware Client
    • Updating Firmware
      • Firmware Changelog
    • Updating Operating System
      • Control Hub Operating System Changelog
    • Updating Robot Controller Application
      • Updating Robot Controller Application via Android Studio
    • Updating the Driver Hub
      • Driver Hub OS - Change Log
    • Accessing Log Files
    • Android Studio - Deploying Code Wirelessly
  • Hello Robot - Intro to Blocks Programming
    • Welcome to Hello Robot!
    • Where to Program - Client vs. Browser
      • What is an OpMode?
    • Setting up a Configuration
      • Common Errors in Configuration
    • Using a Gamepad
    • Part 1: Tackling the Basics
      • Tackling the Basics Directory - Blocks
      • Creating an OpMode - Blocks
      • Programming Essentials
      • Programming Servos
        • Programming Servo Basics
        • Using a Gamepad with a Servo
        • Programming Servo Telemetry
      • Programming Motors
        • Programming Motors Basics
        • Programming a Motor with a Gamepad
        • Programming Motor Telemetry
      • Programming Touch Sensors
      • Programming Color Sensors
        • Color Sensor Telemetry
        • Detecting Color
    • Part 2: Robot Control
      • Robot Control Blocks Directory
      • Programming Drivetrain Motors
      • Arcade Style TeleOp - Blocks
        • Establishing Variables in Blocks
        • Motor Power vs. Robot Movement
        • Programming Arcade Drive
      • Arm Control - Blocks
        • Adding a Limit Switch
      • Robot Control Full Program
    • Part 3: Autonomous and Encoders
      • ElapsedTime - Blocks
        • ElapsedTime Setup
        • ElapsedTime Logic
        • ElapsedTime - Multiple Movements
      • Encoder Basics
      • Drivetrain Encoders - Blocks
        • Converting Encoder Ticks to a Distance
        • Moving to a Target Distance
        • Setting Velocity
        • Turning the Drivetrain Using RUN_TO_POSITION
      • Arm Control with Encoders - Blocks
        • Estimating the Position of the Arm
        • Calculating Target Position
        • Using Limits to Control Range of Motion
    • Part 4: Going Beyond!
      • Exploring Functions
      • Programming Mecanum - Simplified
      • Programming Mecanum - Refined
  • Hello Robot - Intro to OnBot Java Programming
    • Welcome to Hello Robot!
    • Where to Program - Client vs. Browser
      • What is an OpMode?
    • Setting up a Configuration
      • Common Errors in Configuration
    • Using a Gamepad
    • Part 1: Tackling the Basics
      • Tackling the Basics Directory - OnBot
      • Creating an OpMode - OnBot
      • Programming Essentials
      • Programming Servos
        • Programming Servo Basics
        • Using a Gamepad with a Servo
        • Programming Servo Telemetry
      • Programming Motors
        • Programming Motor Basics
        • Programming a Motor with a Gamepad
        • Programming Motor Telemetry
      • Programming Touch Sensors
    • Part 2: Robot Control
      • Robot Control OnBot Java Directory
      • Programming Drivetrain Motors
      • Arcade Style TeleOp - OnBot Java
        • Establishing Variables in OnBot Java
        • Motor Power vs. Robot Movement
        • Programming Arcade Drive
      • Arm Control - OnBot Java
        • Adding a Limit Switch
      • Robot Control Full Program
    • Part 3: Autonomous and Encoders
      • ElapsedTime - OnBot Java
        • ElapsedTime Setup
        • ElapsedTime Logic
        • ElapsedTime - Multiple Movements
      • Encoder Basics
      • Drivetrain Encoders - OnBot Java
        • Converting Encoder Ticks to a Distance
        • Moving to a Target Distance
        • Setting Velocity
        • Turning the Drivetrain Using RUN_TO_POSITION
      • Arm Control with Encoders - OnBot Java
        • Estimating the Position of the Arm
        • Calculating Target Position
        • Using Limits to Control Range of Motion
  • Sensors
    • Introduction to Sensors
    • Digital
    • Analog
    • I2C
      • IMU
        • Orientating the IMU
      • Adding an External IMU to your Hub
    • Encoders
      • REV Motor Encoders
      • Through Bore Encoder
    • Using 3rd Party Sensors
      • Sensor Compatibility Chart
  • Useful Links
    • REV DUO Build System
  • Legacy Documentation
    • Configuring Your Android Devices
    • Expansion Hub with Android Device Robot Controller
      • Driver Station and Robot Controller Pairing
      • Wiring Diagram
      • Configuration
    • REV Hub Interface Software
Powered by GitBook
On this page
  • IMU Basics
  • Product Specifications
  • Identifying your Hub's internal IMU
  • IMU Interfaces
  • The universal IMU interface
  • The legacy BNO055IMU interface
  • Protecting the IMU from ESD

Was this helpful?

Export as PDF
  1. Sensors
  2. I2C

IMU

PreviousI2CNextOrientating the IMU

Last updated 10 months ago

Was this helpful?

IMU Basics

Each REV Robotics Control Hub (), and Expansion Hubs () purchased before December 2021, has a built in IMU, or inertial measurement unit. The IMU combines measurements from multiple internal sensors to compute its current orientation. It can also provide the angular velocity (how fast the IMU is rotating along each axis).

Expansion Hubs shipped AFTER December 1st, 2021 no longer include an internal IMU

The data used by the IMU to track the orientation includes the rotation along each axis, and the forces of acceleration along each axis. Using the acceleration forces allows the IMU to detect the direction of gravity, preventing drift in the pitch and roll readings. Only the heading will drift slowly, as small inaccuracies build up over time.

Product Specifications

  • I2C Address: 0x28

  • Port: 0

Identifying your Hub's internal IMU

Originally, Control Hubs and Expansion Hubs shipped with the Bosch BNO055 IMU. However, as of September 2022, the Control Hub's IMU was replaced with the Bosch BHI260AP IMU.

When you create a new configuration file, the correct IMU type should be automatically detected for I2C port 0, and added to the configuration.

IMU Interfaces

Version 8.1 of the FTC Robot Controller app adds a new universal IMU interface for Blocks and Java programming, which supports both the BNO055 IMU and the BHI260AP IMU. The BNO055 IMU can also be used from the legacy BNO055IMU interface.

The universal IMU interface

The universal IMU interface added in version 8.1 of the FTC Robot Controller app provides robot-centric orientation and angular velocity values. You can specify the exact orientation of the Control or Expansion Hub on your robot, and the interface will convert the raw values from the IMU into robot-centric values. This simplifies how you use the IMU's values, and prevents problems when the hub is not mounted with the REV Robotics logo facing upwards.

All values from the IMU interface are in the Robot Coordinate System, in which the origin is inside your robot, the Z axis points towards the ceiling, the Y axis points straight ahead through the front of your robot (whatever you define the front to be), and the X axis points out the right side of your robot. This coordinate system is right-handed, which means that if you point a typical right thumb in the same direction as the axis, rotation in the same direction that the fingers curl is considered positive.

The IMU.getRobotYawPitchRollAngles()method on the IMU interface provides the robot's orientation in a simplified format of yaw, pitch, and roll angles. Most teams should use this method to get the robot's orientation.

  • Yaw (also known as heading) is the measure of rotation along the robot's Z axis, or the side-to-side lateral rotation of the robot.

  • Pitch is the measure of rotation along the robot's X axis, or the front-to-back rotation of the robot.

  • Roll is the measure along the robot's Y axis, or the side-to-side tilt of the robot.

The legacy BNO055IMU interface

The BNO055IMU interface has several disadvantages compared to the universal IMU interface.

  • It can only be used with Control Hubs and Expansion Hubs that contain the original BNO055 IMU.

  • It only works reliably when the Hub is mounted flat, with the REV Robotics logo pointed upwards.

  • The values it provides are relative to the Hub, not the Robot.

  • You have to manually specify the axes order for the orientation angles (ZXY is recommended for typical use cases).

The coordinate system used for the BNO055IMU interface is defined like this:

  • The X axis runs from the bottom of the hub, near the servo ports, to the top of the hub, where the USB ports are.

  • The Y axis runs from the sensor ports on the right to the motor ports on the left.

  • The Z axis points upwards through the REV Robotics logo.

Protecting the IMU from ESD

During the 2023-24 FTC season, FIRST and REV Robotics received reports of teams experiencing an unexpected reset of their IMU after an electrostatic discharge (ESD) event. A new version of the Control Hub's Operating System (1.1.4) has been released, which introduces an update to reduce the frequency of these resets on Control Hubs with a BHI260AP IMU.

Below are additional tips for reducing the effects of ESD or conflicts with the internal IMU that may prevent similarly:

  1. Ensure all of your team’s code references the IMU correctly

  2. Check that your battery has a secure connection to your robot and is fully charged - We have found that Unexpected IMU Resets have also occurred due to poor battery connection or low voltage.

  3. Have a plan to reset your IMU – Teams who rely on the IMU can add human-triggered actions, like pressing a button to reinitialize the IMU, to their Driver-Controlled robot code. Teams may find it beneficial to align their robots with the playing field tile seams (to ensure alignment) prior to starting the reinitialization action.

To see which IMU your Control Hub has, navigate to the Manage page within the Program & Manage menu, either from the Driver Hub, REV Hardware Client, or .

To learn more on how to configure the IMU check out theintroduction page.

Prepare your robot with ESD Mitigation Techniques - with additional tips and tricks for you to try, including installing a on your robot.

Ask what measures your Event Hosts have taken to mitigate ESD at your event - Contact your event’s host in advance to see if they plan to

web interface
FIRST has a guide on Managing Electrostatic Discharge
Resistive Grounding Strap (REV-31-1269)
treat the playing fields with Staticide.
REV-31-1595
REV-31-1153
I2C