A build log for KURT (Killer.Ultimate.Robot.Teammate), an automated foosball goalie built onto a $50 secondhand foosball table. A Raspberry Pi and an overhead camera track the ball with an OpenCV color tracker and a Kalman filter predicts where it is heading, while a stepper motor and driver move the goalie back and forth. The page is a dated timeline of seven videos from hauling the table upstairs in October 2022 to a working goalie on December 25, 2022, followed by a click-to-fullscreen photo gallery of the same milestones.
Making an Automated Foosball Goalie!
Below are some videos and descriptions detailing the process of constructing my automated foosball goalie KURT (Killer.Ultimate.Robot.Teammate). I started the project after being inspired by a similar project that I saw on a college tour. It was a long journey from obtaining the foosball table in October to me creating a working version towards the end of December. So please feel free to jump around and check out the project below.
Bringing the Table Home (October 18, 2022)
So this was the day where we picked up the foosball table from Facebook Marketplace for $50. After that we had the fun time of hauling it all the way up the stairs so I could start putting it back together.
First Setup: Raspberry Pi and a Janky Camera Mount (December 3, 2022)
After setting up the foosball table, Raspberry Pi (the brains of this thing), and a very janky camera mount made out of dowels and a Chinese food container, I was able to focus on the software that would be used to track the ball across the foosball table. This was kind of a big deal because it would be the decider if this whole project was actually possible.
Ball Tracking with OpenCV and a Kalman Filter (December 9, 2022)
I did plenty of research on all sorts of object tracking software, even testing out some AI object recognition software. I ended up settling on a simple color tracker (OpenCV) mainly because it could quickly display the ball's coordinates (red circle, and red text), which were derived from the live camera feed. Finally, I used the Kalman Filter to predict the future estimated position of the ball (the white circle in the video that's leading the ball).
Stepper Motor, Motor Driver, and a Jingle Bells Melody (December 19, 2022)
Happy with the state of the object tracking software, I started to play around with the stepper motor and motor driver. It was a complex system, but utilizing resources found on the internet and with some guidance from my dad, an electrical engineer, I was able to construct the circuit that made the motor function. Having this isn't everything though, I need to write the software that would control the motor which includes direction, activation, and the speed. I would go on to make a few versions of the motor controller software, and finally got one to work well enough for testing.
Throughout this I was fascinated by the sound it made as I increased the speed. It sounded just like a musical scale, which makes sense because to change the speed you set it to a different frequency, or in musical terms a different note. Knowing this I was able to create the jingle bells melody. In the video you are able to hear the melody and also see the frequencies used, which are displayed on the monitor.
Designing and Building the Rig (December 22, 2022)
As a part of the planning process, I designed multiple prototypes of the contraption that would attach to the side of the table and move the goalie back and forth. Some were made out of Legos, and some cardboard. Once I was happy with the design, I added the parts to my Amazon cart and placed the order, praying that they would all work together. On receiving the parts I was thrilled to start putting the contraption (or KURT) together. After assembling and disassembling KURT many times, and a few runs to Home Depot, I was able to mount it and get almost everything setup and ready for the goalie to be moving!
First Movement (December 22, 2022)
Working motor controller connected to the table.
Final Setup: A Functional Foosball Goalie (December 25, 2022)
Finally, I was able to combine the ball tracking software with the motor controller to create a functional foosball goalie. A lot of tweaking and tinkering went into getting the optimal positioning strategy down, but in the end he makes more saves than I would.
Thanks for having a visit with KURT, my Automated Foosball Goalie!
There are still plenty of flaws, and many improvements to be made. But in the end, I'm happy that I took on this challenge, and even more so, I'm thrilled about all the knowledge that I gained.
Photo Gallery
Select any image to open the gallery, then use the arrow keys or on-screen controls to move through the build.














