Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Notes: For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.
If you’ve spent time wrestling with sensor fusion algorithms trying to get decent orientation data from an IMU, the BNO055 will feel like a revelation. This Bosch sensor does all the heavy lifting internally, giving you clean quaternion or Euler angle outputs without writing a single line of fusion code. In this guide, I’ll walk you through everything you need to know about setting up the BNO055 Arduino interface and getting reliable absolute orientation data for your projects.
What is the BNO055 Absolute Orientation Sensor?
The BNO055 is a System-in-Package (SiP) that combines a triaxial accelerometer, triaxial gyroscope, and triaxial magnetometer with a 32-bit ARM Cortex-M0+ microcontroller. What sets it apart from sensors like the MPU9250 is that Bosch’s proprietary sensor fusion algorithms run directly on that internal processor, delivering ready-to-use orientation data.
Instead of raw sensor readings that require external processing, the BNO055 outputs calibrated data in multiple formats: Euler angles (heading, roll, pitch), quaternions, linear acceleration, and gravity vectors. For those of us who’ve spent weeks debugging Madgwick or Mahony filters, having this processed internally is genuinely liberating.
BNO055 Key Technical Specifications
Parameter
Specification
Accelerometer Range
±2g, ±4g, ±8g, ±16g (configurable)
Gyroscope Range
±125, ±250, ±500, ±1000, ±2000 °/s
Magnetometer Range
±1300µT (x,y), ±2500µT (z)
Orientation Output Rate
100 Hz (quaternion/Euler)
Linear Acceleration Rate
100 Hz
Communication
I2C (up to 400 kHz), UART, HID-I2C
Operating Voltage
2.4V to 3.6V
Current Consumption
12.3 mA typical (all sensors active)
Operating Temperature
-40°C to +85°C
BNO055 Data Output Types
The BNO055 provides multiple data formats through its fusion engine:
Output Type
Update Rate
Description
Quaternion
100 Hz
Four-point orientation for gimbal-lock-free calculations
Euler Angles
100 Hz
Heading, roll, and pitch in degrees
Linear Acceleration
100 Hz
Acceleration minus gravity (m/s²)
Gravity Vector
100 Hz
Gravitational acceleration only (m/s²)
Angular Velocity
100 Hz
Rotation rate in rad/s
Magnetic Field
20 Hz
Three-axis magnetic field strength (µT)
Temperature
1 Hz
Ambient temperature in °C
BNO055 Module Pinout Explained
Most BNO055 breakout boards from Adafruit or similar manufacturers include voltage regulation and level shifting. Here’s the standard pinout:
Pin
Function
Description
VIN
Power Input
3.3V to 5V (regulated onboard)
GND
Ground
Common ground connection
SDA
I2C Data
Serial data line
SCL
I2C Clock
Serial clock line
RST
Reset
Active low reset (optional)
INT
Interrupt
Configurable interrupt output
ADR
Address Select
LOW = 0x28, HIGH = 0x29
PS0/PS1
Protocol Select
Configure communication mode
The ADR pin deserves special attention. By default, the BNO055 uses I2C address 0x28. If you’re using an Arduino Zero or boards where 0x28 conflicts with onboard peripherals, pull ADR high to switch to 0x29.
Wiring BNO055 to Arduino
The BNO055 communicates via I2C, making wiring straightforward. Here’s the connection diagram for common Arduino boards:
BNO055 Arduino Wiring Table
BNO055 Pin
Arduino Uno/Nano
Arduino Mega
Arduino Leonardo
VIN
5V
5V
5V
GND
GND
GND
GND
SDA
A4
20
2
SCL
A5
21
3
Hardware notes from the bench: The BNO055 has notoriously tight I2C timing requirements. If you experience intermittent communication failures, try adding stronger pull-up resistors (2.2kΩ to 4.7kΩ) on SDA and SCL lines. Long wire runs are particularly problematic with this sensor.
Installing BNO055 Arduino Libraries
Adafruit provides excellent library support for the BNO055. You’ll need two libraries:
Installation via Arduino Library Manager:
Open Arduino IDE
Navigate to Sketch → Include Library → Manage Libraries
Search for “Adafruit BNO055” and install
Search for “Adafruit Unified Sensor” and install
The unified sensor library provides standardized data structures, making it easier to swap sensors in your projects without rewriting code.
Basic BNO055 Arduino Code Example
Here’s a straightforward sketch to read orientation data:
Upload this code and open the Serial Monitor at 115200 baud. As you rotate the sensor, you’ll see heading (yaw), roll, and pitch values update in real-time.
Understanding BNO055 Calibration
The BNO055 runs continuous auto-calibration algorithms internally. Each sensor subsystem has its own calibration status ranging from 0 (uncalibrated) to 3 (fully calibrated). Understanding this process is critical for reliable orientation data.
Calibration Status Monitoring
Add this function to monitor calibration:
void displayCalStatus() {
uint8_t sys, gyro, accel, mag;
bno.getCalibration(&sys, &gyro, &accel, &mag);
Serial.print(“Sys:”);
Serial.print(sys);
Serial.print(” Gyro:”);
Serial.print(gyro);
Serial.print(” Accel:”);
Serial.print(accel);
Serial.print(” Mag:”);
Serial.println(mag);
}
How to Calibrate Each Sensor
Gyroscope: Place the sensor stationary on a flat surface. Calibration completes quickly, usually within seconds.
Magnetometer: Move the sensor through figure-8 motions in the air. Recent firmware versions also accept general movement patterns. The magnetometer must find magnetic north before absolute heading becomes valid.
Accelerometer: The most demanding calibration requires placing the sensor in six orientations (+X, -X, +Y, -Y, +Z, -Z facing up). Using a wooden cube to hold the sensor helps maintain precise alignment.
System calibration: Reaches level 1 or higher once the magnetometer locates magnetic north. Until then, orientation values remain relative to power-on position.
Saving and Restoring Calibration Data
The BNO055 lacks internal EEPROM, so calibration data is lost on power cycle. For production applications, save calibration offsets to your Arduino’s EEPROM:
#include <EEPROM.h>
void saveCalibration() {
adafruit_bno055_offsets_t calibData;
bno.getSensorOffsets(calibData);
EEPROM.put(0, bno.getSensor().sensor_id);
EEPROM.put(sizeof(long), calibData);
}
void restoreCalibration() {
adafruit_bno055_offsets_t calibData;
EEPROM.get(sizeof(long), calibData);
bno.setSensorOffsets(calibData);
}
The Adafruit library includes a complete restore_offsets example that handles the full save/restore workflow.
Working with Quaternions
While Euler angles are intuitive, quaternions avoid gimbal lock and provide smoother interpolation. The BNO055 outputs quaternions natively:
imu::Quaternion quat = bno.getQuat();
Serial.print(“W: “);
Serial.print(quat.w(), 4);
Serial.print(” X: “);
Serial.print(quat.x(), 4);
Serial.print(” Y: “);
Serial.print(quat.y(), 4);
Serial.print(” Z: “);
Serial.println(quat.z(), 4);
For applications like camera stabilization or 3D visualization, quaternions eliminate the discontinuities that plague Euler angle systems near ±90° pitch.
BNO055 vs MPU9250 Comparison
Many engineers ask whether to choose the BNO055 or MPU9250. Here’s how they compare:
Feature
BNO055
MPU9250
Sensor Fusion
Onboard (9-axis)
External required
Output
Processed orientation
Raw sensor data
Calibration
Automatic
Manual required
Price
~$25-35
~$5-15
Setup Complexity
Simple
Moderate to complex
Customization
Limited
Full control
Power Consumption
12.3 mA
3.5 mA
Status
Active production
End of life
The BNO055 wins for rapid prototyping and applications where you need orientation data quickly. The MPU9250 (or its successor ICM-20948) offers more flexibility when you need custom fusion algorithms or lower power consumption.
BNO055 Arduino Project Applications
The BNO055’s plug-and-play orientation output makes it ideal for numerous applications:
Robotics and Self-Balancing Systems: The sensor excels in balance control applications. Self-balancing robots, inverted pendulums, and bipedal walkers benefit from the stable, pre-fused orientation output without tuning fusion parameters.
Drone Flight Controllers: Quadcopters and other UAVs use the BNO055 for attitude determination. The absolute heading from the magnetometer enables heading-hold flight modes and return-to-home features.
Virtual Reality and Motion Capture: Head tracking for VR headsets and motion capture gloves leverage the BNO055’s quaternion output. The 100 Hz update rate provides smooth tracking for immersive experiences.
Camera Stabilization: Gimbal systems use the sensor for camera orientation feedback. The linear acceleration output (gravity removed) helps distinguish intentional movements from vibration.
Navigation and Dead Reckoning: Combined with GPS, the BNO055 maintains orientation estimates during signal loss. The gravity-compensated linear acceleration enables pedestrian dead reckoning applications.
Troubleshooting Common BNO055 Issues
Sensor Not Detected
If you receive “No BNO055 detected” errors, verify wiring connections are secure, check that VIN receives proper voltage (3.3V or 5V depending on module), try the alternate I2C address (0x29) by pulling ADR high, and run an I2C scanner sketch to confirm the sensor appears on the bus.
Heading Drift or Inaccurate Readings
Magnetic interference causes most heading problems. Keep the sensor away from motors, speakers, and ferromagnetic materials. Ensure full magnetometer calibration (status = 3) before trusting heading values. Consider that indoor environments often have significant magnetic distortion.
I2C Communication Errors
The BNO055 has strict I2C timing requirements that violate the standard protocol in some edge cases. Solutions include using stronger pull-up resistors (2.2kΩ), reducing I2C clock speed, and avoiding ESP32 and certain NXP processors which have known compatibility issues.
Calibration Won’t Complete
For accelerometer calibration to reach level 3, the sensor must experience all six orientations. In applications where the sensor can’t be freely moved (like mounted in a vehicle), accept that accelerometer calibration may never fully complete, though data quality remains usable.
Does the BNO055 need external sensor fusion algorithms?
No. The BNO055’s primary advantage is its onboard ARM Cortex-M0+ processor running Bosch’s proprietary fusion algorithms. It outputs ready-to-use orientation data in quaternion or Euler angle format, eliminating the need for external Madgwick, Mahony, or Kalman filters that sensors like the MPU9250 require.
How do I prevent losing calibration when power cycles?
The BNO055 lacks internal EEPROM, so calibration data must be stored externally. Use the Arduino’s EEPROM library to save the calibration offsets after achieving full calibration (all values at 3). On subsequent power-ups, read these offsets back and write them to the sensor before entering fusion mode. The Adafruit library’s restore_offsets example demonstrates this complete workflow.
Why does my heading jump around even after calibration?
This typically indicates magnetic interference. The magnetometer is sensitive to nearby motors, speakers, metal structures, and even PCB traces carrying current. Move the sensor away from interference sources, ensure the magnetometer calibration status shows 3, and verify system calibration is above 0 (indicating magnetic north has been found). Indoor environments with steel structures often cause persistent heading errors.
Can I use multiple BNO055 sensors on one Arduino?
Yes. The ADR pin allows setting the I2C address to either 0x28 (ADR low) or 0x29 (ADR high), supporting two sensors on a single I2C bus. For more than two sensors, you’ll need an I2C multiplexer like the TCA9548A. Note that the BNO055 has known issues with some multiplexers due to its non-standard I2C timing.
What’s the difference between NDOF and IMU modes?
NDOF (Nine Degrees of Freedom) mode uses all sensors including the magnetometer to provide absolute orientation with a stable heading reference. IMU mode disables the magnetometer, providing relative orientation only. Use NDOF when you need compass heading; use IMU mode when magnetic interference makes the magnetometer unreliable or when only relative orientation matters.
Conclusion
The BNO055 Arduino combination delivers sophisticated orientation sensing without the usual algorithmic headaches. By handling sensor fusion internally, it lets you focus on your actual project rather than debugging filter parameters. While it costs more than raw sensors like the MPU9250, the development time savings often justify the expense.
For applications requiring reliable absolute orientation, whether that’s a self-balancing robot, a VR controller, or a camera stabilization system, the BNO055 remains one of the most accessible solutions available. Just remember to account for proper calibration procedures and watch out for magnetic interference, and you’ll have rock-solid orientation data for your projects.
Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Notes: For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.