

The BNO055 is a 9-axis absolute orientation sensor developed by Bosch and distributed by Adafruit. It integrates a 3-axis accelerometer, a 3-axis gyroscope, and a 3-axis magnetometer, along with an onboard microcontroller that fuses the sensor data to provide accurate orientation information. Unlike traditional sensors, the BNO055 eliminates the need for complex sensor fusion algorithms, making it an ideal choice for applications requiring precise motion tracking and orientation.








The BNO055 is a highly versatile sensor with the following key specifications:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 5V |
| Communication Interfaces | I²C, UART |
| Operating Current | ~12 mA |
| Measurement Range | Accelerometer: ±2g to ±16g |
| Gyroscope: ±125°/s to ±2000°/s | |
| Magnetometer: ±1300 µT | |
| Output Data Rate | Up to 100 Hz |
| Operating Temperature Range | -40°C to +85°C |
| Dimensions | 20.2mm x 18.2mm x 3.8mm |
The BNO055 breakout board from Adafruit has the following pin layout:
| Pin | Name | Description |
|---|---|---|
| 1 | VIN | Power input (3.3V to 5V) |
| 2 | GND | Ground connection |
| 3 | SDA | I²C data line (or UART TX in UART mode) |
| 4 | SCL | I²C clock line (or UART RX in UART mode) |
| 5 | PS0 | Protocol selection pin 0 (used to configure I²C or UART mode) |
| 6 | PS1 | Protocol selection pin 1 (used to configure I²C or UART mode) |
| 7 | RST | Reset pin (active low) |
| 8 | INT | Interrupt pin (optional, used for advanced configurations) |
The BNO055 can be easily interfaced with an Arduino UNO using the I²C protocol. Follow these steps to connect the sensor:
Wiring:
VIN pin of the BNO055 to the 5V pin on the Arduino.GND pin of the BNO055 to the GND pin on the Arduino.SDA pin of the BNO055 to the A4 pin on the Arduino.SCL pin of the BNO055 to the A5 pin on the Arduino.Install the Adafruit BNO055 Library:
Sketch > Include Library > Manage Libraries.Example Code: Use the following example code to read orientation data from the BNO055:
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BNO055.h>
// Create an instance of the BNO055 sensor
Adafruit_BNO055 bno = Adafruit_BNO055(55);
void setup() {
Serial.begin(9600);
// Initialize the BNO055 sensor
if (!bno.begin()) {
Serial.println("Error: BNO055 not detected. Check wiring or I2C address.");
while (1);
}
Serial.println("BNO055 initialized successfully!");
bno.setExtCrystalUse(true); // Use external crystal for better accuracy
}
void loop() {
// Get the Euler angles (heading, roll, pitch)
sensors_event_t event;
bno.getEvent(&event);
// Print orientation data to the Serial Monitor
Serial.print("Heading: ");
Serial.print(event.orientation.x);
Serial.print("°, Roll: ");
Serial.print(event.orientation.y);
Serial.print("°, Pitch: ");
Serial.print(event.orientation.z);
Serial.println("°");
delay(500); // Delay for readability
}
Sensor Not Detected:
0x28 (default).Inaccurate Readings:
No Output on Serial Monitor:
Serial.begin() in the code.Can the BNO055 be used with a 3.3V microcontroller?
How do I switch between I²C and UART modes?
PS0 and PS1 pins to configure the communication protocol:PS0 = 0, PS1 = 0 (default)PS0 = 1, PS1 = 0What is the maximum cable length for I²C communication?
By following this documentation, you can effectively integrate the BNO055 into your projects and leverage its powerful orientation sensing capabilities.