Skip to content
If this is your first visit, please click here to learn about shipping and delivery.
If this is your first visit, please touch here to learn about shipping and delivery.
BNO055 nine-axis orientation sensor breakout board

From Gyroscope Readings to Reliable Orientation: A Practical BNO055 Project Guide

A gyroscope can tell you how quickly an object rotates. An orientation sensor aims to tell you how that object is facing. They are related measurements, but confusing them can turn a simple robot or interactive display into a frustrating exercise in drifting angles.

The BNO055 orientation breakout from PMD Way combines motion sensing with on-chip processing. This guide explains how to turn its readings into a trustworthy project interface, with particular attention to commissioning, calibration and the environment around the finished device.

Decide which measurement your project needs

For detecting a quick twist of a handheld controller, angular velocity may be enough. For displaying an object's attitude, you need an orientation estimate. For tracking an object through a room, neither measurement alone provides a complete position solution.

Integrating gyroscope rate produces a relative angle estimate, but bias and noise accumulate. Analog Devices explains the sources of gyroscope drift. As a simple illustration, an uncorrected constant bias of 0.1 degree per second would accumulate 6 degrees in a minute. That example describes integration error, not a BNO055 accuracy specification.

Write a requirement that can be tested: “recognise a deliberate quarter-turn gesture” is more useful than “measure movement accurately”. Specify the allowable delay, error, operating time and mounting conditions. A classroom visualisation and a closed-loop motion controller have very different demands.

Verify the breakout interface before loading a library

The Bosch BNO055 data sheet specifies chip supplies of 2.4–3.6 V for VDD and 1.7–3.6 V for VDDIO. Breakout input compatibility depends on its regulator and level-shifting circuitry. Confirm those features rather than applying 5 V directly to sensor pins.

For ordinary I2C, the chip address is 0x28 with COM3 low or 0x29 with COM3 high. It uses clock stretching. Check interface selection, pull-up voltage and controller support before diagnosing a missing response as a faulty sensor.

Make a small connection drawing for the exact board revision. Record the functions behind any combined UART/I2C labels and verify the selected interface against the manufacturer's documentation. Do not copy solder-bridge positions from a visually similar board.

Bring up one device on a short bus first. Confirm its identity, then report communication errors visibly. An application that quietly reuses an old orientation when a read fails can appear smooth while supplying stale information.

Choose a fusion mode deliberately

Bosch's IMU mode combines accelerometer and gyroscope data for relative orientation. NDOF also uses the magnetometer for absolute orientation. Magnetic disturbances and sustained acceleration can affect the result; the data sheet recommends testing the intended motion conditions.

For a tabletop model that needs a stable compass-like heading, start by assessing the magnetic environment. For a gesture interface that only needs changes relative to its starting position, evaluate whether relative orientation meets the requirement. Avoid choosing a mode solely because its name contains the largest number of axes.

Run the same movement sequence in each candidate configuration. Record drift at rest, response during motion and recovery after motion stops. Keep mode, units, software version and calibration information with the log so comparisons remain meaningful.

Establish the coordinate system physically

Draw three arrows on a sketch of the complete enclosure. State which direction is forward, which is right and which is up. Then identify the sensor's axes and determine how they relate to that drawing. Mounting a board sideways is acceptable if the transformation is intentional.

Turn the enclosure around one axis at a time and record the sign and dominant component of the response. Repeat in both directions. This simple exercise catches axis swaps before they become mysterious steering or animation errors.

Also record units. A number labelled merely “gyro” is ambiguous; use names such as “angular rate, degrees per second”. If a library returns radians while the display assumes degrees, calibration will not fix the resulting scale error.

Use Euler angles for display and quaternions for rotation processing

Euler angles are easy to read, but their interpretation depends on the rotation sequence and they have singular configurations. Quaternions avoid those Euler-angle singularities. MathWorks' quaternion introduction explains the representation and its conventions.

For a simple dashboard, labelled heading, pitch and roll may be convenient. For a 3D object that can turn freely, keep the quaternion through the orientation-processing path and convert only when needed for a display.

Check component order and whether the receiving software expects a frame or point rotation. Test known poses instead of assuming two libraries use the same conventions. A good first test is identity orientation, followed by separate quarter-turns and a return to the starting pose.

Calibrate in the assembled project

Calibration should be part of the user experience, not a hidden development ritual. Bosch's calibration guidance describes stationary gyroscope calibration, static accelerometer orientations and movement through different magnetic directions. Monitor the individual calibration states rather than relying on one timed delay.

Create a screen or serial output that explains what the operator should do next. “Place on a stable surface” and “move through different orientations” are more useful than an unexplained status number. Allow the process to be repeated after hardware changes.

Test with the final battery, fasteners, wiring and enclosure in place. Compare readings with nearby motors and other substantial loads both inactive and active. If heading changes when a motor starts while the enclosure remains still, investigate placement and magnetic interference before adding software smoothing.

Saved calibration data can shorten future setup, but keep it associated with the particular sensor and installation. Bosch discusses storing offsets in host memory in its calibration reuse guidance. Recheck the assembled system after restoring them; an old profile is not proof that today's conditions match yesterday's.

Use a repeatable acceptance test

  1. Start from power off and record the time until usable readings appear.
  2. Leave the device stationary and log variation over your intended operating interval.
  3. Move through marked poses and compare repeatability when approaching each from different directions.
  4. Exercise normal nearby loads and watch for changes unrelated to motion.
  5. Interrupt communication and confirm that stale data is identified.
  6. Restart and repeat without manually changing software settings.

Keep the raw log as well as the polished display. Smoothing can make a graph attractive while concealing lag or intermittent failures. Once the sensor meets the requirement, compare other options in the gyroscope breakout collection by their required measurements, interfaces and installation constraints.

Previous article Battery Power for Arduino Projects: Voltage Range, Runtime and Regulator Heat