BNO055 - Orientation Sensor

1) Overview

Sensor has 3 sensor functions, accelerometer, gyroscope and geomagnetic function.
One of the most valuable feature is that sensor includes ARM Cortex-M0+ and fusion software function.
This means you can just use it without deep knowledge for motion control algorithm.
Please refer following wed page.
https://www.bosch-sensortec.com/en/homepage/products_3/sensor_hubs/iot_solutions/bno055_1/bno055_4

Fortunately, I got chip sample and evaluated it.
It's very easy to use from software point of view but it's very difficult to build up the hardware from chip because size is very small (5.2mm x 3.8mm x 1.1mm) and you need to solder over 16 pins.

2) Picture

/media/uploads/kenjiArai/bno055_new.jpg /media/uploads/kenjiArai/bno055_10.jpg

3) Hardware Circuit

/media/uploads/kenjiArai/mbed_bno055_1.pdf
Above schematic has a mistake.
Please refer followings.
/media/uploads/kenjiArai/breakout.pdf (Added on March 20th, 2016)

4) Software

BNO055 Fusion control library

Import libraryBNO055_fusion

BNO055 Intelligent 9-axis absolute orientation sensor by Bosch Sensortec. It includes ACC, MAG and GYRO sensors and Cortex-M0+ processor.


Sample program

Import programBosch_BNO055_Fusion_example

Based on F401 example.Changed reset sequence and added RESET control and Power On/Off control. Check several mbed, LPC1768, LPC1114, NucleoF401RE, F411RE, L152RE and GR-PEACH

Another sample (old version)
/users/kenjiArai/code/Nucleo_F401_BNO055_example/

Known Bugs

As of April 8th, 2015
1) Power-on sequence and/or Reset sequence has a trouble. BNO055 nRESET control does NOT work well.
-> After reset, mbed cannot recognize BNO055 chip.
-> Added RESET pin control and Power ON/OFF control. (Done on April 7th, 2015)
2) For Nucle L152RE, I2C clock cannot set 400KHz due to reading data is not stable.

Tera Term output example (mbed board is at a standstill)
Euler Angles data
Heading:+227.0 [deg], Roll: +0.0 [deg], Pich: +0.0 [deg], #00
Heading:+227.0 [deg], Roll: +0.0 [deg], Pich: +0.0 [deg], #01
Quaternion data
W:6583, X:-48, Y:6, Z:15003, #00
W:6583, X:-48, Y:6, Z:15003, #01
Linear accel data
X: +0.0 [m/s*s], Y: +0.0 [m/s*s], Z: +0.0 [m/s*s], #00
X: +0.0 [m/s*s], Y: +0.0 [m/s*s], Z: +0.0 [m/s*s], #01
Gravity vector data
X: +0.0 [m/s*s], Y: +0.0 [m/s*s], Z: +9.0 [m/s*s], #00
X: +0.0 [m/s*s], Y: +0.0 [m/s*s], Z: +9.0 [m/s*s], #01
Chip temperature data
Acc chip:+28 [degC], Gyr chip:+28 [degC], #00
Acc chip:+28 [degC], Gyr chip:+28 [degC], #01

5) Calibration

This is only my Fusion setting condition, Fusion mode is NDOF.
I have NOT tried any other Fusion modes.
Data sheet said
Though the sensor fusion software runs the calibration algorithm of all the three sensors (accelerometer, gyroscope and magnetometer) in the background to remove the offsets, some preliminary steps had to be ensured for this automatic calibration to take place.
My understanding is that manual calibration is not mandatory but I implemented manual calibration method as an example in the above program.
Here is a result PDF file of the calibration execution.
/media/uploads/kenjiArai/bno055_calib_f401_20150410.pdf

Calibration Status Register
CALIB_STAT(0x35) is 4 calib. status. ->SYS Calib., GYR Calib., ACC Calib. and MAG Calib.
Gyro Calibration is very easy, just keep stable condition. It takes less than one second.
For Magnetometer Calibration, random moving (e.g. writing an 8 in the air) is required. It takes few seconds.
Accelerometer Calibration is difficult to done.If you rotate the BNO055 quickly, it's never done.

6) Stability

Data drift at stationary condition
/media/uploads/kenjiArai/bno055_logging_data_20150416.pdf
Data writing an 8 in the air
Logging data: page 1 & 2, Graph: page 3
/media/uploads/kenjiArai/bno055_logging_data_8inthe_air_20150411.pdf



7 comments on BNO055 - Orientation Sensor:

19 Jun 2015

Hi Kenji san,

I am also using the BNO055 but I am stuck already during chip id reading. It seems that I have same symptoms as you described "After reset, mbed cannot recognize BNO055 chip", did you solve this by adding a regulator and doing a power cycle?

Somehow the I2C interface of the BNO055 seems stuck, there is no ACK from the BNO during I2C communication. Unfortunately, I did not added the HW on the PCB to do a power cycle so i tried cutting the complete power of the board and sometimes I am able to read the correct chip-id but very unreliable.

Thanks, Bas

28 Jan 2016

This discussion is several months old, but here are my experiences with the BNO055.

"Stuck I2C" can be caused by your I2C controller not supporting I2C clock stretching. And be careful. Without clock stretching, the garbled communication may accidentally send nasty commands to the BNO055. Myself and another person have destroyed our devices that way. I'm guessing we triggered a flash erase or write to internal program memory.

By the way, if you see good quaternion data but distorted/jumping Euler data, I believe the BNO055 Euler outputs are mathematically wrong.

Magnetometer calibration. In NDOF mode, pick any two axes and rotate them back and forth over 90 degrees. For example, pitch back and forth over 90 degrees, then roll back and forth over 90 degrees. It now says calibrated.

03 Feb 2016

I have a question about the schematic you posted here : (https://developer.mbed.org/media/uploads/kenjiArai/mbed_bno055_1.pdf)

There you connect pin 7 and 8, but the datasheet states that they should not be connected, could you tell me why you decided to connect them to ground?

19 Mar 2016

I didn't come here long time.
Thanks your comment and sorry for not to replay until today.
I don't have any activity for BNO055 sensor and I cannot make a comment for those issues.
Only one point:
The schematic is wrong!!
Pin 7 & 8 have to set N.C. which Mart Moerdijk mentioned as above.

Thanks again and I'm sorry for no comment and wrong schematic.

21 May 2016

Hi, all.

I use STM32F405 gpio simulate I2C to read/write BNO055 registers.

The max work frequency is 5 KHz.

THE RESULT: SET AMG MODE :Raw accel X, Y and Z data:X= -144,Y= -1,Z= -1 Raw mag X, Y and Z data:X= 191,Y= -458,Z= 296 Raw gyro X, Y and Z data:X= -7,Y= -1,Z= -1 SET NDOF MODE :Raw Euler Heading, Roll and Pitch data:H= 5654,R= -129,P= -1 Raw Quaternion W, X, Y and Z data:W= 15694,X= -1,Y= -1,Z= -1 Raw Linear accel X, Y and Z data:X= 4,Y= -8,Z= -1 Raw Gravity sensor X, Y and Z data:X= -140,Y= -1,Z= -1 double accel data X, Y and Z data(m/s2):X= -1.380000,Y= -0.010000,Z= -0.010000 double accel data X, Y and Z data(mg):X= -140.000000,Y= -1.000000,Z= -1.000000 double mag data X, Y and Z data(uT):X= 6.750000,Y= -16.000000,Z= -0.062500 double gyro data X, Y and Z data(dps):X= -0.125000,Y= -0.125000,Z= -0.062500 double gyro data X, Y and Z data(rps):X= 0.004444,Y= 0.004444,Z= 0.000000 double Euler data H, R and P data(degree):H= 359.937500,R= -0.062500,P= -8.250000 double Euler data H, R and P data(radians):H= 6.282222,R= -0.001111,P= -0.143333 double Linear acceleration data X, Y and Z data(m/s2):X= 0.050000,Y= -0.080000,Z= -0.010000 double Gravity sensor data X, Y and Z data(m/s2):X= -1.400000,Y= -0.010000,Z= -0.010000

Maybe,I2C is not stable. The Euler data is not correct.

17 Jul 2017

The BNO055_Fusion library supports passing an I2C object by reference, but fails to wrap all of the I2C reads/writes in a lock() / unlock() sandwich causing contention with other threads that are using the I2C bus. Please update this. Also, the library uses wait_ms() and wait(), which are busy waits for most targets, Thread::wait() would be almost always a better choice.

22 Aug 2017

Hi Stephan,
I'm sorry late answer.
I followed your comment Thread::wait issue and I have updated the library.
For lock/unlock issue, I kept same as before because Mded OS5 already consider it ( at least Nucleo/STM32).

Please log in to post comments.