Rotary Inverted Pendulum is built with an encoder, a brush motor, a STM32F103 board. No rotation limit. Capable of setting target angle, non-stop swinging and automatically swinging up.
Rotary Inverted Pendulum project is a work of team. The other two teammates are shicaiwei123 and yoyolalala.
Primary demo with very limited precision and robustness is shown below.
I use an optical encoder to measure the angle of the pendulum. The absolute angle of the pendulum need calibrate every time after reset.
A slip ring is used to prevent the winding of the wire.
The DC brush motor with gearbox and magnetic encoder is driven by a TB6612FNG model controlled with PWM signal. A 3s lithium battery powers the system like the following projects.
The mechanical structure includes three round mounting plates to mount slip ring, motor, and quick-release plate. The plates are connected with hexagonal copper pillars. The whole structure is mounted to a tripod through the quick-release plate.
The round plates are rendered as acrylic plate below. But they are made of carbon fiber in the final work.
The PID control system refers to Study on PID Control of a Single Inverted Pendulum System.
The swing-up and stabilizing operation refers to Research and Implementation of the Swing - up and Stabilizing Operation for Rotational Inverted Pendulum
The swing-up and stabilizing operation and the changes between different modes are modeled as a state machine.