Repository navigation
First stable release — the car balances on the ground, holds position, and can be driven over Bluetooth.
Features
- Cascaded control: motor PI → rate PI → angle P → velocity PI, plus turn P
- Inverse dynamics (feedback linearization) between the rate loop and the motor loop
- Fall guard: stops above 80°, resumes after being held within 10° for 0.5 s
- MPU6500 config self-repair (fixes the high-frequency buzz after power-on)
- Web Bluetooth remote: https://tthc8t6.github.io/blance_car_rc/
Firmware
blance_car.hex — built with Keil MDK / ARMCC v5.06 (-O3) from this tag, 0 errors, 0 warnings.
For STM32F103C8T6 with the wiring in the README's pin map. Flash with STM32CubeProgrammer, ST-Link Utility, or:
openocd -f interface/stlink.cfg -f target/stm32f1x.cfg -c "program blance_car.hex verify reset exit"Known issues
- Lifting the car winds up the velocity-loop integral; press the button to stop before lifting and again after setting it down
- No remote timeout: if Bluetooth disconnects, the last command keeps running