August 8, 2020

Ball Balancer

This is a project I started to learn about image processing and computer vision. I wanted to make a ball balancer that would keep a ball on a plate. However, this was before I had any understanding of control theory and so the project was not very successful. However I did learn a lot about image processing, computer vision and serial communcation between the computer and arduino.

The python code uses openCV to get the precise position of the ball and then sends it to the arduino via serial. I also believe that the plate does not move enough range of motion to prevent the ball from rolling off when it has a high velocity.

The main issue was with my arduino code. I was using only a position based control loop to keep the ball on the plate which was not fast enough to keep the ball on the plate. I also used a cartesian coordinate system instead of a polar coordinate system which would have been more appropriate for this application. I plan to revisit this project in the future and use a PID controller to keep the ball on the plate.