- What it is
- KURT (Killer.Ultimate.Robot.Teammate), a robot goalie for a real foosball table. A camera watches the ball and a stepper motor slides the goalie over to block it.
- Why I made it
- I saw a similar project on a college tour and wanted to build my own, so in October 2022 we picked up a foosball table from Facebook Marketplace for $50.
- What I did
- I tracked the ball with OpenCV on a Raspberry Pi, using a camera on a mount made of dowels and a Chinese food container, plus a Kalman filter to guess where it was headed. Then I built the motor circuit and controller with some guidance from my dad, and the side mount after Lego and cardboard prototypes.
- How it turned out
- By Christmas 2022 KURT was blocking shots on his own. He still has flaws, but he makes more saves than I would, and I learned a ton building him.
My original write-up
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.
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.
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.
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).
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.
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 set up and ready for the goalie to be moving!
December 22, 2022
Working motor controller connected to the table.
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.
Click on the Image to View Them Fullscreen!














