/inverted_inertia_pendulum

This is an opensource project of Inverted pendulum based on inertial wheel. The repo contains all the software needed, stl and cad files and instructions.

Primary LanguageC

Inertia Wheel Inverted Pendulum Project

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

The video of it working can be seen 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

  • Inetria wheel - (0.1mm | 50+%)
    • 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
  • Motor mount - (0.2mm | 30%)
  • Pole shaft connector - (0.1mm | 30%)
  • Shaft adapter - (0.1mm | 30%)
  • Table mount + bearing holder - (0.2mm | 30%)
  • Nucleo mount - (0.2mm | 30%)

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:

Running the code

  • Build the Keil project and download it to your Nucleo