IMU and Digital Compass (H0BR4x)


SKU: H0BR40 Category:

3-axis Inertial Measurement Unit (IMU) + 3-axis Digital Compass

Stage: Production

In stock (can be backordered)


H0BR4x is a 3-axis initial measurement unit (IMU) combined with a 3-axis digital compass module based on STM32F0 MCU, LSM6DS3 IMU and LSM303AGR compass.

  • 2 x 3-axis accelerometers for inertial force and gravity vector measurements.
  • 3-axis gyroscope for angular rate measurements.
  • 3-axis magnetometer for measuring magnetic inclination and orientation.
  • Digital temperature sensor to provide temperature measurements and calibrate gyroscope temperature drift.
  • Use H04R40 as an integrated IMU for attitude estimation in drones and other robotic platforms.
  • Use as inertial-/gesture-based input device.
  • Supports sample readings of all sensors to an internal SRAM buffer, the CLI output or to a port in a remote module.
  • Supports streaming of any sensor data to an internal SRAM buffer, the CLI output or to a port in a remote module. Streaming duration and period (sampling frequency) can be adjusted.
  • Connect to external hardware or combine with other Hexabitz modules!

Using Hexabitz IMU and digital compass (H0BR40) module and Processing IDE I calculated pitch and roll angles and visualized them in 3D.
Caluclate Pitch and Roll Using Hexabitz Accelerometer



  • ST LSM6DS3 iNEMO inertial module (3D accelerometer and 3D gyroscope):
    • ±2/±4/±8/±16 g accelerometer full scale.
    • ±125/±250/±500/±1000/±2000 dps gyroscope full scale.
    • Up to 6 kHz ODR.
    • Embedded temperature sensor.
  • ST LSM303AGR eCompass module (3D accelerometer and 3D magnetometer):
    • ±50 gauss magnetic range.
    • ±2/±4/±8/±16 g accelerometer full scale.
    • Up to 150 Hz ODR.


  • STM32F091CBU6 32-bit ARM Cortex-M0 MCU.
  • 8MHz external oscillator.
  • Six array ports and six power ports (+3.3V and GND).
  • Access to 6xUART, 2xI2C, SWD, BOOT0, RESET.

Physical Properties

  • Shape: Hexagon
  • Size: 30 mm short diagonal, 17.32 mm side
  • Area: 7.8 cm^2
  • Weight: 3 g
  • Soldermask Color: Dark green
  • Surface Finish: ENIG (gold) or HASL-LF (tin)

Bill of Materials


Quickstart Guide


  1. Power your module from the 3V3 and GND pads. If you are using the FTDI 3.3V USB-UART cable, then the red wire should be connected to 3V3 (top) and the black one to GND (bottom).
  2. Connect the USB-UART cable to any of the module array ports (i.e., communication ports P1 to P6) using the wired Kelvin clamp or by soldering header connectors. The top pad is MCU TXD and the bottom one is MCU RXD. Thus, you should connect the top pad to the cable RXD (yellow in the FTDI cable) and the bottom pad to cable TXD (orange).
  3. If your module already has firmware on it (it showed one or multiple red indicator LED blinks when you powered it on), then you are ready to connect to the CLI in the next section. If your module doesn’t have a firmware yet, follow the firmware update guide here.

Try out some CLI commands

Follow the instructions to setup and connect to module CLI and try the following commands (Note all CLI commands are case-insensitive):
  • Type ping (and press enter), you will see a single indicator LED blink and a response message.
  • Type help to get a list of available module commands.
  • Type sample gyro To get filtered and calibrated Gyroscope values in the three axis in DPS (i.e Degrees per second).
  • Type sample acc To get filtered and calibrated acceleration values in the three axis in g.
  • Type sample mag To get filtered and calibrated magnetic inclination values in the three axis in mgauss.
  • Type stream gyro 10 1000 To get filtered and calibrated Gyroscope values in the three axis in DPS for 1000 ms (1 second) and with 10 ms stream sampling period (you can press enter to stop the stream).
  • Type stop To stop the current streaming of MEMS sensor values.


Frequently Asked Questions

Load More

Have more questions? Please check our main FAQ page and feel free to contact us for any unanswered questions.


  • Schematics (PDF)
  • Hardware Design Files (Circuit Maker)
  • Source Code (GitHub). Download a pre-compiled firmware HEX file here.
  • Documentation / Factsheet (PDF)
  • Projects & Examples: Please check our account on for demo projects and examples.