← All projects

PROJECT 01

BBOT

A self-balancing ESP32 robot with custom real-time motor control.

APR 2026 — PRESENTIn progressGitHubInteractive write-up
  • ESP32
  • C++
  • PlatformIO
  • FreeRTOS
  • PID Control
  • WebSockets

The idea

BBOT is a two-wheeled inverted-pendulum robot that stays upright on its own. The goal was to build a genuinely real-time control system on an ESP32 — from the sensor fusion that estimates its tilt to the motor timing that keeps it balanced — and to make every part of that loop observable and tunable while the robot runs.

How it works

Balance is handled by a cascaded PID controller fed by sensor fusion from an MPU6050 IMU, combined with a complementary filter to produce a stable tilt estimate. A custom 20 kHz hardware-timer ISR drives DRV8825 stepper motors with precise step timing, so the control effort translates directly into smooth, accurate wheel motion.

Engineering highlights

  • Live wireless PID tuning over WebSockets, so gains can be adjusted without reflashing.
  • OTA firmware updates for fast iteration.
  • A mobile control interface built in HTML, CSS, and JavaScript.
  • An onboard high-speed flight logger whose output is analysed in Python.
  • Unit-tested with PlatformIO native tests.

Status

In progress, April–August 2026.