HW Orientation Sensor - Weber-State-Submarine-Project/Submarine GitHub Wiki
Orientation Sensor Hardware Documentation
This section discusses the hardware implementation of the orientation sensor used for robot localization and boat turning.
Adafruit BNO085 Orientation Sensor
The BNO085 was selected for its versatility and features. It is used in this project for three primary functions:
- Robot localization utilizing the gyroscope.
- Performing precise turns.
- Readjusting to the wall based on orientation feedback.
The device supports multiple communication protocols; I2C was chosen for its simplicity and ease of implementation. The BNO085 provides the following capabilities:
- Acceleration Vector / Accelerometer: Measures three axes of acceleration (gravity + linear motion) in m/s².
- Angular Velocity Vector / Gyroscope: Measures three axes of rotation speed in rad/s.
- Magnetic Field Strength Vector / Magnetometer: Measures three axes of magnetic field sensing in microteslas (uT).
- Linear Acceleration Vector: Measures linear acceleration (acceleration minus gravity) in m/s².
- Gravity Vector: Measures gravitational acceleration (minus any movement) in m/s².
- Absolute Orientation / Rotation Vector: Outputs a four-point quaternion for accurate orientation data manipulation.
This project focuses primarily on the gyroscope for turning and stabilization. Attempts to utilize the accelerometer for robot localization were unsuccessful. For further details, refer to the Outdated/Failed Concepts section.
Specifications
Feature | Specification |
---|---|
Sensor Integration | Triaxial 12-bit accelerometer (±8g), Triaxial 16-bit gyroscope (±2000 dps), Triaxial geomagnetic sensor |
Microcontroller | 32-bit ARM® Cortex™-M0+ running CEVA's SH-2 firmware |
Package | 28-pin LGA, 5.2mm x 3.8mm x 1.1mm |
Interfaces | I2C, SPI, UART |
Operating Voltage | 1.7V to 3.6V |
Operating Temperature | -40°C to +85°C |
Features | - MotionEngine™ 9-Axis and 6-Axis Sensor Fusion |
- Dynamic calibration for temperature and aging effects | |
- "Always-on" features: step counter, stability detector, tap detector | |
- Activity classification: walking, running, standing, in-vehicle, on-bike | |
- Intelligent power management | |
- Support for external environmental sensors via secondary I2C interface |
Composite Sensor Maximum Data Rates
Sensor | Maximum Data Rate (Hz) |
---|---|
Gyro Rotation Vector | 1000 Hz |
Rotation Vector | 400 Hz |
Gaming Rotation Vector | 400 Hz |
Geomagnetic Rotation Vector | 90 Hz |
Gravity | 400 Hz |
Linear Acceleration | 400 Hz |
Accelerometer | 500 Hz |
Gyroscope | 400 Hz |
Magnetometer | 100 Hz |
Composite Sensor Calibration Measurement Performance
Sensor | Performance Metric | Value |
---|---|---|
Rotation Vector | Nominal Dynamic Rotation Error | 3.5° |
Static Rotation Error | 2.0° | |
Gaming Rotation Vector | Nominal | |
Dynamic Non-heading Error | 2.5° | |
Static Non-heading Error | 1.5° | |
Dynamic Heading Drift | 0.5°/min | |
Geomagnetic Rotation Vector | Nominal Dynamic Rotation Error | 4.5° |
Static Rotation Error | 3.0° | |
Gravity | Nominal Static Angle Error | 1.5° |
Linear Acceleration | Nominal Dynamic Accuracy | 0.35 m/s² |
Accelerometer | Nominal Dynamic Accuracy | 0.3 m/s² |
Gyroscope | Nominal Dynamic Accuracy | 3.1°/s |
Magnetometer | Either Dynamic Accuracy | 1.4 µT |
I2C Timing Characteristics
Parameter | Symbol | Conditions | Min | Max | Unit |
---|---|---|---|---|---|
SCL clock frequency | 400 | kHz | |||
SCL high period | t_high | 0.6 | μs | ||
SCL low period | t_low | 1.3 | μs | ||
Rise time for SCL and SDA | 10pF < Cb < 400pF | 20+0.1Cb | ns | ||
Fall time for SCL and SDA | 10pF < Cb < 400pF | 20+0.1Cb | ns | ||
SDA setup time | t_su | 0.1 | μs | ||
SDA hold time | t_h | 0 | μs | ||
Hold time for start condition | t_hst | 0.6 | μs | ||
Setup time for a stop condition | t_susp | 0.6 | μs | ||
Idle time between accesses | t_bf | 1.3 | μs |
PINOUT Diagram
Description: This pinout diagram details the connections for the BNO085 orientation sensor. It specifies the power, ground, and communication lines required for proper integration with the Raspberry Pi. Use this diagram to ensure the sensor is wired correctly for accurate orientation data during operation.