Inertia Wheel Inverted Pendulum Project

Github

This project is suitable for anyone with extra free time and passion for interesing projects, but especially for electrical engineering studets (contorl theory students) to learn the control approach of an unstable process and test their algorithms, the primary contorller used in this project is LQR.

This project is also available on Thingiverse

This project is based on Nucleo STM32F411RE microcontroller. And the repo contains :

  • CubeMX project
  • Keil project
  • Solidworks files and STLs

Some photos of the project

The full gallery of the project can be found on Link:

Electronics hardware

  • Nuceleo STM32F411RE - Mouser
  • Monster motor shield - Ebay
  • Motor - Mabuchi RS-385PH with encoder (hall or optical)
    • With encoder or hall sensors Ebay
    • I used motor without sensor and retrofited it with Hall encoder 20cpr Ebay
  • Encoder Aliexpress
  • 1x 6mm steel or aluminum rod, 120mm long
  • 1x M10x1.5 screw
  • 2x M10x1.5 nuts
  • 10x M3 screw
  • 10x M3 Brass Knurl Nuts Aliexpress
  • 2x ball bearing, 10mm x 35mm x 11mm
  • steel/amulinum/wooden plate (cca 90mm x 2mm x300mm)

3D printed parts

PartLayer heightInfill
Inertia wheel*0.1mm>50%
Motor mount0.2mm30%
Pole shaft connector0.1mm30%
Shaft adapter0.1mm30%
Table mount + bearing holder0.2mm30%
Nucleo mount0.2mm30%
  • Inetria wheel
    • Motor shaft mount has to be adapted
    • The two provided wheel STLs are for 14tooth and 12tooth version of motors
    • Feel free to make your own version of the inertia wheel with the solidworks file

Control algorithm

  • PD (Simple)
  • LQR algorithm (Intermediate) - Included in the software + Synthesis using Matlab scirpt
  • MPC (Advanced) - Suggested use of muao MPC

Connecting the hardware

  • Monster motor shield is mounted on nucleo very simply, as on any Arduino
    • It provides the hardware connections needed and no need for additional jumpers
    • Inertia wheel motor should be connected to motor 2 terminal
    • 18V - 5A power supply should be used to power the shield
  • Encoder connection diagram is as follows: