Main Content

A Two-Degree-Of-Freedom Ball Balancing PID Controller

In this project, we implemented a two-degree-of-freedom ball balancing platform using a resistive touchscreen, two servo motors, and PID control.

We used a PIC32 microcontroller to read position data from the touchscreen and drive the servos, adjusting the platform’s angle. We tuned the system to balance a 1 inch diameter steel ball using a PID algorithm. The screen mount was made from acrylic with one 3D printed connection for quick and easy manufacturing. We bought the largest resistive touch screen available for our budget which was a 7x4 inch 4-pin resistive touchscreen from Adafruit to use as our control surface. Using position data from the touchscreen, the microcontroller was able to control the platform position to stabilize the ball through the servos. By isolating the x and y directions, we were able to successfully balance the steel ball on the surface.”

Link to article

Related Content