Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use BNO055: Examples, Pinouts, and Specs

Image of BNO055Design with BNO055 in Cirkit Designer

Introduction

The BNO055 is a 9-axis absolute orientation sensor that integrates a 3-axis accelerometer, a 3-axis gyroscope, and a 3-axis magnetometer into a single package. Unlike traditional sensors, the BNO055 features an onboard microcontroller that fuses raw sensor data to provide accurate orientation information in the form of Euler angles (pitch, roll, yaw) or quaternions. This eliminates the need for complex sensor fusion algorithms on the host microcontroller.

Explore Projects Built with BNO055

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Arduino Nano and BNO055 Sensor with Bluetooth Connectivity: A project utilizing BNO055 in a practical application
Arduino Nano and BNO055 Sensor with Bluetooth Connectivity

This circuit features an Arduino Nano interfaced with a BNO055 sensor and an HC-05 Bluetooth module. The Arduino communicates with the BNO055 via I2C (using A4 for SDA and A5 for SCL) and with the HC-05 via serial communication (using D0/RX and D1/TX for data transfer). The HC-05's Key and State pins are connected to D2 and D3 of the Arduino for module control, and all components share a common ground with the Arduino powered at 5V and the BNO055 at 3.3V from the Arduino's 3V3 output.

Open Project in Cirkit Designer
Image of ESP32-Based Orientation Sensor Interface: A project utilizing BNO055 in a practical application
ESP32-Based Orientation Sensor Interface

This circuit connects an ESP32 microcontroller to a BNO055 sensor. The ESP32's I2C pins (D21 for SDA and D22 for SCL) are interfaced with the BNO055's SDA and SCL pins, enabling communication between the microcontroller and the sensor. Power and ground connections are also established from the ESP32 to the BNO055, with the ESP32's 3V3 pin supplying power to the BNO055's Vin pin.

Open Project in Cirkit Designer
Image of Arduino UNO R4 WiFi Controlled Data Logger with BNO055 Sensor and Micro SD Storage: A project utilizing BNO055 in a practical application
Arduino UNO R4 WiFi Controlled Data Logger with BNO055 Sensor and Micro SD Storage

This circuit features an Arduino UNO R4 WiFi microcontroller connected to a Micro SD Card Module for data storage, a BNO055 sensor for orientation data, and three red LEDs for indication purposes. The LEDs are controlled by digital pins D2, D3, and D4, and can be turned on or off using a single-pole single-throw (SPST) toggle switch connected to their common cathodes and ground. The BNO055 sensor interfaces with the Arduino via I2C communication using the SDA and SCL pins, and the Micro SD Card Module is interfaced using SPI with chip select on pin D10 and data lines on pins D11 (MOSI), D12 (MISO), and D13 (SCK).

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

The BNO055 is a highly versatile sensor with the following key specifications:

Parameter Value
Operating Voltage 2.4V to 3.6V
Communication Interfaces I²C (default address: 0x28 or 0x29), UART
Power Consumption 12 mA (typical in normal mode)
Operating Temperature Range -40°C to +85°C
Accelerometer Range ±2g, ±4g, ±8g, ±16g
Gyroscope Range ±125°/s, ±250°/s, ±500°/s, ±1000°/s, ±2000°/s
Magnetometer Range ±1300 µT
Output Data Formats Euler angles, quaternions, linear acceleration, gravity vector
Dimensions 3.8 mm x 5.2 mm x 1.1 mm

Pin Configuration and Descriptions

The BNO055 is typically available in a 14-pin package. Below is the pinout description:

Pin Name Description
1 GND Ground connection
2 VDD Power supply (2.4V to 3.6V)
3 VDDIO I/O voltage level (typically connected to VDD)
4 PS0 Protocol selection pin 0 (used to select I²C or UART mode)
5 PS1 Protocol selection pin 1 (used to select I²C or UART mode)
6 COM3 Reserved for future use (leave unconnected)
7 RSTN Active-low reset pin
8 INT Interrupt output (can be configured for various events)
9 SCL I²C clock line
10 SDA I²C data line
11 BOOTN Active-low bootloader mode pin
12 TXD UART transmit data (used in UART mode)
13 RXD UART receive data (used in UART mode)
14 NC Not connected (leave unconnected)

Usage Instructions

How to Use the BNO055 in a Circuit

  1. Power Supply: Connect the VDD and VDDIO pins to a 3.3V power source. Ensure the GND pin is connected to the ground of your circuit.
  2. Communication Interface:
    • For I²C communication, connect the SDA and SCL pins to the corresponding pins on your microcontroller. Pull-up resistors (typically 4.7 kΩ) are required on both lines.
    • For UART communication, connect the TXD and RXD pins to the UART pins of your microcontroller.
  3. Protocol Selection: Use the PS0 and PS1 pins to select the communication protocol:
    • I²C mode: PS0 = 0, PS1 = 1
    • UART mode: PS0 = 1, PS1 = 0
  4. Interrupts: Optionally, connect the INT pin to your microcontroller to handle events like data ready or orientation changes.
  5. Reset: Connect the RSTN pin to a GPIO pin on your microcontroller for manual resets, or pull it high for normal operation.

Important Considerations and Best Practices

Example Code for Arduino UNO

Below is an example of how to interface the BNO055 with an Arduino UNO using I²C:

#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 serial communication
  while (!Serial);    // Wait for the serial monitor to open

  // Initialize the BNO055 sensor
  if (!bno.begin()) {
    Serial.println("Error: BNO055 not detected. Check connections.");
    while (1);
  }

  // Set the sensor to NDOF mode (fusion mode for orientation data)
  bno.setMode(Adafruit_BNO055::OPERATION_MODE_NDOF);

  Serial.println("BNO055 initialized successfully!");
}

void loop() {
  // Get orientation data (Euler angles)
  sensors_event_t event;
  bno.getEvent(&event);

  // Print pitch, roll, and yaw to the serial monitor
  Serial.print("Pitch: ");
  Serial.print(event.orientation.x);
  Serial.print(" Roll: ");
  Serial.print(event.orientation.y);
  Serial.print(" Yaw: ");
  Serial.println(event.orientation.z);

  delay(100); // Delay for readability
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Sensor Not Detected:

    • Ensure the I²C connections (SDA, SCL) are correct and have pull-up resistors.
    • Verify the I²C address (default is 0x28). If using 0x29, ensure COM3 is pulled high.
    • Check the power supply voltage (2.4V to 3.6V).
  2. Incorrect Orientation Data:

    • Perform a full calibration of the accelerometer, gyroscope, and magnetometer.
    • Ensure the sensor is mounted securely and aligned with the system's axes.
  3. No Data Output:

    • Verify that the sensor is in the correct operating mode (e.g., NDOF for orientation data).
    • Check the RSTN pin to ensure the sensor is not in reset mode.

FAQs

This concludes the documentation for the BNO055. For further details, refer to the official datasheet and application notes.