Rotary Inverted Pendulum
Rotary Inverted Pendulum is built with an encoder, a brush motor, a STM32F103 board, and has no rotation limit. It is capable of setting target angle, non-stop swinging and automatically swinging up. This project is a work of team of 3, which includes shicaiwei123 and yoyolalala. Code and documents are available here. Platform details Code and documents are available here.
An optical encoder is used to measure the angle of the pendulum. Thus calibration needs to be down by relaxing the pendulum to get the absolute angle every time after reset.
A slip ring (or collector ring) is used to prevent the winding of the wire.
The DC brush motor with reduction gearbox and magnetic encoder is driven by a TB6612FNG model controlled controled with PWM signal. A 3-ceils lithium battery is used as power.
The mechanical structure consists of three round plates which supports the slip ring, motor, and a quick-release plate. The round plates are connected with hexagonal copper pillars. The whole structure is mounted to a tripod through the quick-release plate.
Please refer to Study on PID Control of a Single Inverted Pendulum System for the PID control system.
Also we refer to Research and Implementation of the Swing - up and Stabilizing Operation for Rotational Inverted Pendulum for the swing-up and stabilizing operation.
The swing-up and stabilizing operation and the changes between different modes are modeled as a state machine.