I. Intro
Date: August 2024.
A brushed DC motor with reduction gears has inevitable gaps between gears, and this can result in inaccurate actual speed readings from a low-resolution encoder, such as Hall effect sensor. BLDC motor, 12bit AS5600 encoder, and Field Oriented Control (FOC) can solve this problem. Still, I used cascade PID to to the control loop.
The code, CAD model (STL), and circuit schematic are on GitHub: Brushless-Self-Balance-Bot-FOC
II. Velocity Control and Position Control with FOC
Since the encoder AS5600 and the motor are separated, I need to build something to put them together, so I just started building the self-balance bot.