Balancing Robot
As I'm interested in robotics and control systems, I am currenty working on a segway-style balancing robot. I've designed it to use an ESP32 microcontroller, which processes data from a gyroscope and accelerometer to maintain balance. The robot uses two brushless DC motors for movement, controlled via a motor driver that implements Field Oriented Control (FOC) and PID algorithms for smooth operation. The robot is powered using a battery that is built using 18650 lithium-ion cells with a BMS (battery management system) to ensure safe operation. The design uses two boards, a main board that does calculations for the control system and a motor driver board that monitors the motor position and drives them using the FOC algorithm implemented with a library salled SimpleFOC. The two boards communicate wirelessly using the ESP-NOW protocol, allowing for data exchange between the two without slowing the FOC control loop. The main board also has a Bluetooth module for remote control and monitoring. Currently I'm working to resolve issues with the magnetic motor position encoders. They communicate via I2C, but they are intended for 5V microcontrollers, so they will need replacing as the ESP32 operates at 3.3V.
Procedure Applied:
- Designed and built a self-balancing robot using an ESP32 microcontroller.
- Implemented a control system using gyroscope and accelerometer data to maintain balance.
- Used two brushless DC motors for movement, controlled via a motor driver that implements Field Oriented Control (FOC) and PID algorithms.
- Built the battery using 18650 lithium-ion cells with a BMS (battery management system)
Skills Applied:
- Microcontroller programming (ESP32)
- Control systems design (PID, FOC)
- Wireless communication (ESP-NOW, Bluetooth)
- Electronics design and prototyping
- 3D modeling and printing for custom parts
Key Outcomes:
- Outcomes are still pending as the project is in progress.
Gallery:

Photo of the current state of the robot, with the motor driver board, battery pack, and step-down voltage converters visible

3D CAD model of the robot frame in Solidworks