IMU-Controlled Gantry Motion Recorder

STM32 + BNO055 firmware streaming orientation data into a Python desktop stack for virtual gantry replay.

Project Overview

This project captures motion from an IMU and reproduces the motion on a 3-axis gantry system. An STM32F446RE reads orientation and motion data from a Bosch BNO055 over I2C, then streams measurements over UART/USB serial to desktop software. The desktop application records, visualizes, and converts that data into trajectories that can be replayed on a virtual gantry and eventually physical hardware.

System Architecture

The system was built as a hardware-software pipeline so each piece could be debugged independently: sensor acquisition on the microcontroller, frame parsing and control mapping on the desktop, then trajectory conversion and command execution on the gantry interface.

  • Embedded node: BNO055 sensor reads and serial telemetry on STM32 firmware.
  • Desktop pipeline: serial parsing, live visualization, and motion-control mapping in Python.
  • Gantry adapter: command interface for a Zaber virtual gantry during development.

Firmware and Embedded Work

I implemented the firmware flow for IMU acquisition and reliable serial streaming on STM32. That made orientation telemetry validation and downstream desktop integration significantly easier.

Desktop Tools and Motion Replay

I built a desktop toolkit in Python for live IMU monitoring, control, and trajectory replay. The stack includes scripts for real-time Euler visualization, live control mapping, a unified control/plotting app, and trajectory conversion utilities to drive the gantry system.

  • Live visualization: quick validation of orientation stream quality and calibration health.
  • Control mapping: convert IMU orientation into velocity-style gantry commands.
  • Trajectory replay: recorded motion converted to command sequences for repeatable playback.

Dead-Reckoning Improvements

To improve trajectory quality from integrated acceleration, I implemented and evaluated several drift-reduction techniques: high-pass filtering, ZUPT (zero velocity updates), and rest-bias correction. The plots below show before/after comparisons from the project writeup.

Before ZUPT

Before ZUPT

After ZUPT

After ZUPT

Before rest bias correction

Before Rest Bias Correction

After rest bias correction

After Rest Bias Correction

What I Learned

This project was a strong end-to-end embedded systems exercise across sensor interfaces, firmware telemetry, desktop tooling, and motion-control integration. It reinforced the importance of observability and staged integration when building cross-platform robotics systems.

Related Projects

Inverted pendulum

Inverted Pendulum

Real-time embedded control and firmware development on a physical control system.

Learn more
UBC AeroDesign

Software Co-Lead @ UBC AeroDesign

STM32 flight firmware, FreeRTOS architecture, and ground station software for autonomous aircraft.

Learn more