Application Note

BNO055
Quick start guide
Bosch Sensortec

Application note: BNO055 Quick start guide
Document revision

1.0

Document release dateMar.2015

Document number

BST-BNO055-AN007-00

Technical reference code

0 273 141 209

Notes

Data in this document are subject to change without notice.
Product photos and pictures are for illustration purposes only andmay differ from the real product’s appearance.

Application Note
BNO055 - Quick start guide

Page 2Contents
1. Introduction .......................................................................................................................... 3
2. Hardware design .................................................................................................................. 5
2.1 Schematics...................................................................................................................... 5
3. Calibration ............................................................................................................................ 6
4. Sample codes ...................................................................................................................... 75Legal disclaimer ................................................................................................................. 8
5.1 Engineering samples ....................................................................................................... 8
5.2 Product use ..................................................................................................................... 8
5.3 Application examples and hints ........................................................................................ 8BST-BNO055-AN 007-00| Versi on 1.0 | March 2015

Bosc h Sens ortec© Bosch Sensortec GmbH reserv es all ri ghts even in the event of i ndustrial property rights. We reserv e all ri ghts of di sposal such as copyi ng and passing on to thi rdparti es. BOSCH and the symbol are regi stered trademarks of Robert Bosch GmbH, Germany.
Note: Speci fi cati ons wi thin thi s document are subj ect to change without noti ce.

Application Note
BNO055 - Quick start guide

Page 3

1. Introduction
The BNO055 is a system in package (SiP) chip that includes a 3-axis 14-bit accelerometer,a 3-axis 16-bit gyroscope, a 3-axis magnetometer and a 32-bit Cortex M0+ microcontroller
running the company’s BSX3.0 FusionLib software.
Besides giving access to the individual sensor signals such as acceleration, rotation,and magnetic field strength, the sensor offers a total of five different sensor fusion modes. The
table below provides a quick overview of all the different fusion and non-fusion modes of thesensor:
Available sensor signals

Fusion modes

Non-fusionmodes

Operating ModeFusion DataAccel

Mag

Gyro

Relativeorientation

Absoluteorientation

CONFIGMODE-----

ACCONLYX----

MAGONLY-X---

GYROONLY

--X

-

-

ACCMAGX

X---

ACCGYRO

X

-X

-

-

MAGGYRO

-X

X

-

-

AMG

X

X

X

--

IMU

X

-X

X

-COMPASS

X

X

--X

*X

-

M4G

X

X

X

NDOF_FMC_OFFX

X

X-XNDOFX

XX-X* software simulated gyro signal
Fusion Modes:
IMU or Inertial Measurement Unit is a fusion of the accelerometer and the gyroscope
Compass is a fusion of the accelerometer and magnetometer, also commonly known as atilt-compensated compass
M4G (Magnet for gyroscope) is a fusion of the accelerometer and the magnetometer but theoutput data is similar to the IMU mode and hence the limitations of gyroscope is compensatedin this mode.
NDOF_FMC_OFF is a fusion of all three sensors – accelerometer, gyroscope and themagnetometer thereby providing Nine Degrees of Freedom (NDOF). In this mode the ‘FMC
(Fast Magnetic Calibration)’ feature is disabled and thereby the sensor needs a movement
similar to ‘figure 8 pattern’ to calibrate the magnetometer.
NDOF is also a fusion of all the three sensors, but with the feature ‘FMC’ enabled. By
enabling this feature, a quick movement (even an incomplete ‘figure 8 pattern’) will fully
calibrate the magnetometer.
BST-BNO055-AN 007-00| Versi on 1.0 | March 2015

Bosc h Sens ortec© Bosch Sensortec GmbH reserv es all ri ghts even in the event of i ndustrial property rights. We reserv e all ri ghts of di sposal such as copyi ng and passing on to thi rdparti es. BOSCH and the symbol are regi stered trademarks of Robert Bosch GmbH, Germany.
Note: Speci fi cati ons wi thin thi s document are subj ect to change without noti ce.

Application Note
BNO055 - Quick start guide

Page 4Once the sensor is powered, it executes a power on self-test (POST) and stays in theconfiguration (CONFIG) mode. After POR or soft reset, users need to wait at least 650ms
before talking to BNO055 through I2C interface. For the waiting time less than 650 ms, the I2C
communication does not respond. The hardware reset using hardware RESET pin or writing tothe RST_SYS bit in the SYS_TRIGGER register (0x3F) have the same effect as the po wer o nrest (POR). Users can then change to one of the sensor operation modes by writing to theOPR_MODE register (0x3D). Once the sensor is configured, it is ready to send the sensor
fusion results such as Quaternion, Euler angles, Linear acceleration and Gravity vector at
fixed output data rate. Users can then access the sensor fusion results from the BNO055
through I2C, UART or HID-over I2C interface.
The user can switch between Windows or the Android orientation format. By default however,the sensor axes orientation of the sensor is of Android format as shown in Figure 1. TheAndroidrotation
vectordefinition
canbefoundat
http://developer.android.com/guide/topics/sensors/sensors_motion.html

EastNorthFigure 1 BNO055 coordinate definition• Heading: rotation around the Z axis (0° <= heading < 360°). 0° = North, 90° = East,
180° = South, 270° = West. The heading value increases when you rotate around the Zaxis clockwise from top view of Figure 1.Pitch: rotation around the X axis (-180° <= pitch<= 180° ) with positive values increasing when the Z axis moves towards the Y axis.
• Roll: rotation around the Y axis (-90° <= roll <= 90° ) with positive values increasing whenthe X axis moves toward the Z axis.

BST-BNO055-AN 007-00| Versi on 1.0 | March 2015

Bosc h Sens ortec© Bosch Sensortec GmbH reserv es all ri ghts even in the event of i ndustrial property rights. We reserv e all ri ghts of di sposal such as copyi ng and passing on to thi rdparti es. BOSCH and the symbol are regi stered trademarks of Robert Bosch GmbH, Germany.
Note: Speci fi cati ons wi thin thi s document are subj ect to change without noti ce.

Application Note
BNO055 - Quick start guide

Page 5

2. Hardware design
2.1 Schematics
BNO055 schematic is as shown in figure 2 with I2C interface to an external microcontroller(MCU)1.

VDDSDASCL

GPIO1

GPIO2

MCU
Figure 2 BNO055 schematics with I2C interface
Notes:•••The external 32.768 kHz crystal is optional. Pin-26 (XOUT32) and Pin-27 (XIN32) can befloating when the external crystal is not used.
Pin-5 (PS1) and Pin-6 (PS0) should be tied to GND directly or through a zero Ohm resistor toGND to select I2C interface protocol. Don’t use a pull-down resistor for these two pins.
The MCU GPIO1 can be used to select the BNO055 7-bit I2C slave address, which will be0x29 when GPIO1 is high and 0x28 when low.

••

Pin-14 (INT) is push-pull and can be tied to MCU GPIO2 directly. This pin can be floating if
BNO055 interrupt is not used.
Pin-4 (nBOOT_LOAD_PIN) is pulled high through a 10K Ohms resistor. It is not necessary
to tie it to the other MCU GPIO pin.

1

Since majority of the application use I2C, the quick reference guide explains thi s communication protocol more indetail.
BST-BNO055-AN 007-00| Versi on 1.0 | March 2015

Bosc h Sens ortec© Bosch Sensortec GmbH reserv es all ri ghts even in the event of i ndustrial property rights. We reserv e all ri ghts of di sposal such as copyi ng and passing on to thi rdparti es. BOSCH and the symbol are regi stered trademarks of Robert Bosch GmbH, Germany.
Note: Speci fi cati ons wi thin thi s document are subj ect to change without noti ce.

Application Note
BNO055 - Quick start guide

Page 6

3. Calibration
Calibration of the sensor plays a major role in the sensor fusion software. In the BNO055, thecalibration of the accelerometer, gyroscope and the magnetometer runs in the background as
part of the sensor fusion software. The status of each sensor calibration is as shown in Figure 4.

Figure 4: BNO055 sensor calibration status register
The accelerometer and the gyroscope are relatively less susceptible to external disturbances,
as a result of which the offset is negligible. Moreover the accelerometer is factory
calibrated, and hence the calibration is not mandatory. For the gyroscope however leaving theBNO055 stationary for a few seconds at any time during the operation, will facilitate fullcalibration and thereby
remove the zero rate offsets. Unlike the accelerometer andgyroscope, the magnetometer calibration is mandatory immediately after every ‘power on reset’in order for sensor fusion to create accurate results.
Therefore, it is highly recommended to check the magnetometer calibration status periodically.
If the value of the two bits ‘MAG Calib Status’ is 3, then it means that the magnetometer is fully
calibrated and ready to go. If the value is 2, then the sensor fusion’s performance is still OK. Ifthe value is 1, then it is highly recommended to perform a Figure-8 motion to calibrate themagnetometer. And if the value is 0, this means that the magnetometer just got disturbed by
the magnetic interference fields nearby or the environment’s magnetic fields have justchanged. And therefore the magnetometer calibration must be performed. For further details
please refer section ‘3.10 Calibration’ in the datasheet.

BST-BNO055-AN 007-00| Versi on 1.0 | March 2015

Bosc h Sens ortec© Bosch Sensortec GmbH reserv es all ri ghts even in the event of i ndustrial property rights. We reserv e all ri ghts of di sposal such as copyi ng and passing on to thi rdparti es. BOSCH and the symbol are regi stered trademarks of Robert Bosch GmbH, Germany.
Note: Speci fi cati ons wi thin thi s document are subj ect to change without noti ce.

Application Note
BNO055 - Quick start guide

Page 7

4. Sample codes
It is highly recommended to use the BNO055 standard APIs to ease the integration. The APIs
can be downloaded from https://github.com/BoschSensortec/BNO055_driver.
Below mentioned steps demonstrate how to get BNO055 up and running with few API calls.
Step
1

Description
Power on the BNO055

2

struct bno055_t myBNO;
Create a structure to holddevice information
Link the I2C driver functions myBNO.bus_read = BNO055_I2C_bus_read;to the API communication
myBNO.bus_write = BNO055_I2C_bus_write;
function pointer3

Code snippet

myBNO.delay_msec = delay;
4

Set the correct I2C addressin the BNO055 API

myBNO.dev_addr = BNO055_I2C_ADDR1;

5

API initialization//myBNO.dev_addr = BNO055_I2C_ADDR2;
bno055_init(&myBNO);

6Change the operation
mode to NDOF

bno055_set_operation_mode(OPERATION_MODE_NDOF);

7

Read Euler angles

struct bno055_euler_float_t eulerData;
bno055_convert_float_euler_hpr_deg(&eulerData);

8

Read calibration status

unsigned char accel_calib_status = 0;
unsigned char gyro_calib_status = 0;
unsigned char mag_calib_status = 0;
unsigned char sys_calib_status = 0;
bno055_get_accel_calib_stat(&accel_calib_status);
bno055_get_mag_calib_stat(&mag_calib_status);
bno055_get_gyro_calib_stat(&gyro_calib_status);
bno055_get_sys_calib_stat(&sys_calib_status);

Note: It is advisable to check the calibration status periodically and provide accuracy status to the userfor re-calibration.
BST-BNO055-AN 007-00| Versi on 1.0 | March 2015

Bosc h Sens ortec© Bosch Sensortec GmbH reserv es all ri ghts even in the event of i ndustrial property rights. We reserv e all ri ghts of di sposal such as copyi ng and passing on to thi rdparti es. BOSCH and the symbol are regi stered trademarks of Robert Bosch GmbH, Germany.
Note: Speci fi cati ons wi thin thi s document are subj ect to change without noti ce.

Application Note
BNO055 - Quick start guide

Page 85 Legal disclaimer
5.1 Engineering samples
Engineering Samples are marked with an asterisk (*) or (e). Samples may vary from thevalid technical specifications of the product series contained in this data sheet. They are
therefore not intended or fit for resale to third parties or for use in end products. Their sole
purpose is internal client testing. The testing of an engineering sample may in no way
replace the testing of a product series. Bosch Sensortec assumes no liability for the use ofengineering samples. The Purchaser shall indemnify Bosch Sensortec from all claims arisingfrom the use of engineering samples.

5.2 Product use
Bosch Sensortec products are developed for the consumer goods industry. They may only be
used within the parameters of this product data sheet. They are not fit for use in life-sustaining or
security sensitive systems. Security sensitive systems are those for which a malfunction isexpected to lead to bodily harm or significant property damage. In addition, they are not fit for
use in products which interact with motor vehicle systems.
The resale and/or use of products are at the purchaser’s own risk and his own responsibility. The
examination of fitness for the intended use is the sole responsibility of the Purchaser.
The purchaser shall indemnify Bosch Sensortec from all third party claims arising from any
product use not covered by the parameters of this product data sheet or not approved by Bosch
Sensortec and reimburse Bosch Sensortec for all costs in connection with such claims.
The purchaser must monitor the market for the purchased products, particularly with regard toproduct safety, and inform Bosch Sensortec without delay of all security relevant incidents.

5.3 Application examples and hints
With respect to any examples or hints given herein, any typical values stated herein and/or any
information regarding the application of the device, Bosch Sensortec hereby disclaims any andall warranties and liabilities of any kind, including without limitation warranties of non-infringementof intellectual property rights or copyrights of any third party. The information given in thisdocument shall in no event be regarded as a guarantee of conditions or characteristics. They areprovided for illustrative purposes only and no evaluation regarding infringement of intellectual
property rights or copyrights or regarding functionality, performance or error has been made.

BST-BNO055-AN 007-00| Versi on 1.0 | March 2015

Bosc h Sens ortec© Bosch Sensortec GmbH reserv es all ri ghts even in the event of i ndustrial property rights. We reserv e all ri ghts of di sposal such as copyi ng and passing on to thi rdparti es. BOSCH and the symbol are regi stered trademarks of Robert Bosch GmbH, Germany.
Note: Speci fi cati ons wi thin thi s document are subj ect to change without noti ce.

Application Note
BNO055 - Quick start guide

Page 96 Document history and modificationRev. No
1.0

Chapter

Description of modification/changes

Date

Document creation

04 March 2015

Bosch Sensortec GmbHGerha rd- Kindler-Stra sse 872770 Reutlingen / Ge rm a n yconta ct@bosch- sensortec.com
www.bosch- sensortec.com
Modifications reserved | Printed in Germa ny
Specifications subject to cha nge without notice
Document number: BST- BNO05 5- AN007- 00
Ve rsi o n _ 1. 0 _ 05 0 3 15

BST-BNO055-AN 007-00| Versi on 1.0 | March 2015

Bosc h Sens ortec© Bosch Sensortec GmbH reserv es all ri ghts even in the event of i ndustrial property rights. We reserv e all ri ghts of di sposal such as copyi ng and passing on to thi rdparti es. BOSCH and the symbol are regi stered trademarks of Robert Bosch GmbH, Germany.
Note: Speci fi cati ons wi thin thi s document are subj ect to change without noti ce.