Skip to content

STM32 Balance Car

A self-balancing robot using STM32F103C8T6 with Mahony algorithm for attitude estimation.

  • Wheeled
  • No license: all rights reserved by the creator
  • Work in progress
  • 3D printable

Suggested by Robotheca, created by @WxxGreat (opens in a new tab), from github.com/WxxGreat/STM32-Balance-Car (opens in a new tab). Pinned to commit 13592db (opens in a new tab).

Hardware license
No license
Software license
No license
Commercial use
Unknown

No license is stated for part of this robot.

The creator chose the hardware and software licenses on Robotheca; the repository has no license file for them yet.

This repository contains executable files that Robotheca doesn't check. Only run them if you trust the creator.

Which files (1 script)

Photo and 3D model

Its license doesn't let Robotheca show its photos.
See the photos on GitHub (opens in a new tab)

3D model loaded from the original files on GitHub at 13592db, under NONE. View the original files from GitHub (345 KB) (opens in a new tab)

What it can do

Written by Robotheca from the project's documents.

  • Balances upright on two wheels
  • Moves forward and backward by tilting
  • Stops when tilted beyond ±30°
  • Shows roll, pitch and yaw angles on a 240×240 LCD
  • Uses Mahony algorithm for sensor fusion

Bill of materials

This repository has no parts list Robotheca can read yet.

Build guide

The creator's steps, each with its instructions.

  1. 1Hardware Assembly
  2. 2PCB Assembly
  3. 33D Printed Parts Assembly
  4. 4Firmware Upload and Calibration

The creator's guide is written in Chinese. It has no license, so all rights stay with the creator: Robotheca doesn't show it here or translate it, and gives its own notes about the robot instead.

Read the creator's guideAsk the creator on GitHub (opens in a new tab)

Wiring and electronics

Notes written by Robotheca from the project's documents.

Main parts

  • STM32F103C8T6 microcontroller
  • MPU6050 or ICM20602 or ICM42605 IMU
  • Two MG513P20 12 V DC geared motors with quadrature encoders
  • ST7789 1.3 inch 240×240 LCD

Connections

  • IMU connected via I2C to the STM32
  • Motors driven by H-bridge drivers wired to GPIO and PWM timers
  • LCD wired to SPI pins for display updates
  • Encoders wired to external interrupt pins for speed measurement