Summary of Capturing IMU Data with a BNO055 Absolute Orientation Sensor
The Bosch BNO055 is an advanced orientation sensor integrating tri-axis accelerometers, gyroscopes, and magnetometers. It features an internal M0+ microprocessor for data fusion or external processing options. The device supports various output formats including Euler angles and quaternions, with calibration capabilities stored in registers. It also includes motion interrupts and configurable unit selections for precise measurement of acceleration, magnetic fields, rotation, and temperature.
Parts used in the Bosch BNO055 Sensor Project:
- Bosch BNO055 sensor chip
- Tri-axis accelerometer
- Gyroscope
- Magnetometer
- M0+ microprocessor
- External host microcontroller
- Interrupt mechanism
- Read register for calibration status
- Unit_selection register
About the Sensor
The BNO055 uses three triple-axis sensors to simultaneously measure tangential acceleration (via an accelerometer), rotational acceleration (via a gyroscope), and the strength of the local magnetic field (via a magnetometer). Data can then be either sent to an external microprocessor or analyzed inside the sensor with an M0+ microprocessor running a proprietary fusion algorithm. Users then have the option of requesting data from the sensor in a variety of formats.
The chip also has an interrupt that can notify the host microcontroller when certain motion has occurred (change in orientation, sudden acceleration, etc.).
The sensor must be calibrated prior to use and a read register holds the current calibration status. Once calibrated, the calibration offsets can be written to the sensor and then the sensor is immediately ready to use the next time it is powered on.
A host microcontroller can request any or all of the data from the sensors (accelerometer, gyroscope, and/or magnetometer) in non-fusion mode and can request absolute and relative orientation (angles or quaternions) in fusion mode.
The sensor can return acceleration in m/s² or mg (
); magnetic field strength in mT; gyroscope data in degrees or radians per second (DPS and RPS, respectively), Euler angles in degrees or radians, or quaternions; and temperature in °C or °F. All options are set in the unit_selection register (table 3-11 in the datasheet, PDF page 30).
Euler Angles vs. Quaternions
If you are designing a sensor solution for a system that has a limited range of motion, you can use Euler angles. But if you are designing a sensor that can be oriented anywhere in space, you should use quaternions.
Euler Angles
Euler angles allow for simple visualization of objects rotated three times around perpendicular axes (x-y-x, x-z-x, y-x-y, y-z-y, z-x-z, z-y-z, x-y-z, x-z-y, y-x-z, y-z-x, z-x-y, z-y-x).
As long as the axes stay at least partially perpendicular, they are sufficient. However, as the axes rotate, an angle exists where two axes can describe the same rotation—creating a condition known as gimbal lock. When gimbal lock occurs, it is impossible to reorient without an external reference. See my article, Don’t Get Lost in Deep Space: Understanding Quaternions, to learn more about gimbal lock.
For more detail: Capturing IMU Data with a BNO055 Absolute Orientation Sensor
- What components does the BNO055 combine?
The BNO055 combines tri-axis accelerometers, gyroscopes, and magnetometers. - Can the BNO055 process data internally?
Yes, it uses an internal M0+ microprocessor running a proprietary fusion algorithm to analyze data. - How does the sensor notify the host about motion?
It uses an interrupt to notify the host microcontroller when specific motion occurs. - Is calibration required before using the sensor?
Yes, the sensor must be calibrated prior to use, and offsets can be written to the sensor. - What are the two modes for requesting data from the sensor?
Data can be requested in non-fusion mode for raw sensor data or fusion mode for absolute and relative orientation. - When should I use Euler angles versus quaternions?
Use Euler angles for systems with limited range of motion and quaternions for systems oriented anywhere in space. - What units can the sensor return for acceleration?
The sensor can return acceleration in m/s² or mg. - Where are the unit selection options configured?
All unit options are set in the unit_selection register.
