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
Output Data Euler angles, quaternions, linear acceleration, gravity
Sensor Fusion Modes 9-axis fusion, accelerometer-only, gyroscope-only, etc.
Dimensions 3.8 mm x 5.2 mm x 1.1 mm

Pin Configuration and Descriptions

The BNO055 is typically available in a breakout board format. Below is the pinout for a common breakout board:

Pin Name Description
VIN Power supply input (3.3V or 5V, depending on the breakout board design)
GND Ground connection
SDA I²C data line
SCL I²C clock line
PS0 Protocol selection pin (connect to GND for I²C, or VCC for UART)
PS1 Protocol selection pin (used in combination with PS0 for protocol selection)
RST Reset pin (active low)
INT Interrupt pin (used for event notifications)

Usage Instructions

How to Use the BNO055 in a Circuit

  1. Power the Sensor: Connect the VIN pin to a 3.3V or 5V power source (depending on the breakout board) and GND to ground.
  2. Select Communication Protocol:
    • For I²C, connect PS0 to GND and PS1 to GND. Connect SDA and SCL to the corresponding I²C pins on your microcontroller.
    • For UART, connect PS0 to VCC and PS1 to GND. Connect the TX and RX pins to the UART pins on your microcontroller.
  3. Pull-Up Resistors: If using I²C, ensure that SDA and SCL lines have pull-up resistors (typically 4.7kΩ).
  4. Initialize the Sensor: Use the appropriate library or write custom code to initialize the BNO055 and configure its operating mode.

Important Considerations and Best Practices

Example Code for Arduino UNO

Below is an example of how to use the BNO055 with an Arduino UNO via 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 the BNO055 sensor
  if (!bno.begin()) {
    Serial.println("Error: BNO055 not detected. Check connections.");
    while (1);
  }
  Serial.println("BNO055 initialized successfully!");

  // Set the sensor to NDOF mode (9-axis sensor fusion)
  bno.setMode(Adafruit_BNO055::OPERATION_MODE_NDOF);
  delay(1000); // Allow time for initialization
}

void loop() {
  // Get Euler angles (heading, roll, pitch)
  sensors_event_t event;
  bno.getEvent(&event);

  Serial.print("Heading: ");
  Serial.print(event.orientation.x);
  Serial.print(" Roll: ");
  Serial.print(event.orientation.y);
  Serial.print(" Pitch: ");
  Serial.println(event.orientation.z);

  delay(500); // Delay for readability
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Sensor Not Detected:

    • Cause: Incorrect wiring or I²C address mismatch.
    • Solution: Double-check the connections and ensure the correct I²C address is used in the code.
  2. Inaccurate Readings:

    • Cause: Sensor not calibrated or mounted improperly.
    • Solution: Perform the calibration routine and ensure the sensor is securely mounted.
  3. No Output or Freezing:

    • Cause: Insufficient power supply or communication issues.
    • Solution: Verify the power supply voltage and check the SDA/SCL connections.
  4. Drifting Orientation:

    • Cause: Magnetometer interference or gyroscope drift.
    • Solution: Avoid placing the sensor near magnetic fields and recalibrate if necessary.

FAQs

By following this documentation, you can effectively integrate the BNO055 into your projects and achieve accurate orientation sensing.