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.
Demo
Mechanical structure
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.
Optical encoder
A slip ring (or collector ring) is used to prevent the winding of the wire.
Slip ring
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.
Complete circuit board
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.