Inspiration

We play a lot of foosball in our dorm, so we came up with the idea of creating an autonomous foosball goalie, which sees a ball coming towards it and moves to block it before it enters the goal.

What it does

The foosball goalie is autonomous based on using webcam input. We get the position of the ball via the raspberry pi, send that info to the Arduino and use that to move gears, which control the goalie.

How I built it

We split our project into a couple different areas. One major side of our project was the hardware side, making the gears, the goal, and the bar. We designed the mechanical layout of our project on solidworks, which we then took to the invention studio to create realistically. We 3-D printed the gears needed for our motor, and used the laser cutter for the wooden base structures of our rig. We then took the bases to the woodshop, using wood glue and woodcutting tools to install everything together into one. The other major side was figuring out how to capture the position of the ball using a webcam. We used computer vision libraries and wrote a python script that used filters (HSV values) to capture the ball and implemented this on the raspberry pi. It essentially created a circle around an area that fit our criteria for what we believed the ball was. We then connected this to the Arduino and used serial communication to pass the position of the ball.

Challenges I ran into

The next component was figuring out how the Arduino would read in data from the encoder. Once we did this, we only had to figure out how to run the motor through the Arduino. We initially did all these components individually and then compiled the different functions into one script to run on the Arduino. However, we ran into a slight problem at the very end, and thus had to adjust the distance between the base platforms so that the gear inside could spin properly.

Accomplishments that I'm proud of

Having code that recognizes movement via the webcam. Getting the motors to spin.

What I learned

How to design objects on solid works, how to use the laser cutter, how to saw wood, how to use a raspberry pi and an Arduino.

What's next for Autonomous foosball goalie

Get a functioning, efficient, and aesthetic finished product.

Built With

Share this project:

Updates