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.
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 |
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) |
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
}
Sensor Not Detected:
Inaccurate Readings:
No Output or Freezing:
Drifting Orientation:
Q: Can the BNO055 be used with 5V logic microcontrollers?
A: Yes, most breakout boards include level shifters to support 5V logic. Check your specific board's documentation.
Q: How do I know if the sensor is calibrated?
A: The BNO055 provides calibration status for each sensor. Use the getCalibration()
function in the Adafruit library to check the status.
Q: Can I use the BNO055 with SPI?
A: No, the BNO055 supports only I²C and UART communication protocols.
Q: What is the maximum update rate of the BNO055?
A: The BNO055 can output data at up to 100 Hz in fusion mode.
By following this documentation, you can effectively integrate the BNO055 into your projects and achieve accurate orientation sensing.