The BNO055 is a highly integrated sensor module manufactured by Adafruit (Part ID: BNO055). It combines a 3-axis accelerometer, 3-axis gyroscope, and 3-axis magnetometer to provide absolute orientation in 3D space. Unlike traditional sensors, the BNO055 features an onboard microcontroller that runs advanced sensor fusion algorithms, delivering accurate and stable orientation data without requiring external processing.
The following table outlines the key technical details of the BNO055 sensor:
Parameter | Value |
---|---|
Operating Voltage | 3.3V to 5V |
Communication Interfaces | I²C, UART |
Power Consumption | ~12 mA (typical) |
Accelerometer Range | ±2g, ±4g, ±8g, ±16g |
Gyroscope Range | ±125°/s, ±250°/s, ±500°/s, ±2000°/s |
Magnetometer Range | ±1300 µT |
Operating Temperature | -40°C to +85°C |
Dimensions | 5.2mm x 3.8mm x 1.1mm |
The BNO055 sensor module has the following pinout:
Pin Name | Description |
---|---|
VIN | Power input (3.3V to 5V) |
GND | Ground connection |
SDA | I²C data line (connect to microcontroller's SDA pin) |
SCL | I²C clock line (connect to microcontroller's SCL pin) |
PS0 | Protocol selection pin (set to LOW for I²C, HIGH for UART) |
PS1 | Protocol selection pin (set to LOW for I²C, HIGH for UART) |
RST | Reset pin (active LOW, used to reset the sensor) |
INT | Interrupt pin (used for event notifications, optional) |
To use the BNO055 with an Arduino UNO, follow these steps:
Wiring:
Install Required 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 sensor's orientation data
sensors_event_t event;
bno.getEvent(&event);
// Print orientation data (roll, pitch, yaw)
Serial.print("Orientation: ");
Serial.print("X: "); Serial.print(event.orientation.x); Serial.print("° ");
Serial.print("Y: "); Serial.print(event.orientation.y); Serial.print("° ");
Serial.print("Z: "); Serial.print(event.orientation.z); Serial.println("°");
delay(500); // Wait 500ms before the next reading
}
Sensor Not Detected:
Inaccurate Orientation Data:
Random Resets or Instability:
Q: Can the BNO055 be used with a Raspberry Pi?
A: Yes, the BNO055 can be connected to a Raspberry Pi using the I²C or UART interface. Use the Adafruit CircuitPython library for easy integration.
Q: How do I calibrate the BNO055?
A: The sensor provides calibration status for the accelerometer, gyroscope, and magnetometer. Move the sensor in all directions to achieve full calibration. Save the calibration data to avoid recalibration on every startup.
Q: What is the maximum I²C clock speed supported?
A: The BNO055 supports I²C clock speeds up to 400kHz (Fast Mode).
Q: Can I disable specific sensors (e.g., magnetometer)?
A: Yes, the BNO055 allows you to configure its operation mode to use only specific sensors (e.g., accelerometer + gyroscope).
By following this documentation, you can effectively integrate the BNO055 sensor into your projects and achieve accurate 3D orientation tracking.