As seen in several short clips by Redditor “xmajor9x,” this ball-on-plate device can balance a ball on top of a flat surface using three servos, as well as make it roll around in a square or circular pattern. Actuation is handled by a three-servo setup, which uses a series of linkages to raise and lower the sides of this rectangular ball-rolling area.
An Arduino Due controls this machine using a PID loop, which factors in the ball’s position and speed for smooth ball movements. The device also implements a Python-based GUI written on top of the Kivy framework. This allows it to show interesting plots of servo responses, as well as adjust the P, I, and D values as needed.
All of this makes for an interesting setup mechanically and programming-wise. What really sticks out about the build, however, is that it employs a resistive touch panel to sense the ball’s movements, meaning a heavy ball must be used for the sensor to reliably determine position. Though its creator sees this interesting implementation as a disadvantage — and is considering using openCV computer vision control in a future iteration — perhaps this type of control scheme will inspire new hacks were computer vision isn’t quite the right solution.
For more info and code, be sure to check out the project’s GitHub page!
Balancing a Ball on Top of a Resistive Touch Surface was originally published in Hackster’s Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.