Inspiration

You and your air hockey table friends are inseparable. That is, until you get covid. No need to fear, Air Hockey Table Friend is here! Of course no air hockey player beats your friend, but the robot arm strapped to Air Hockey Table Friend, powered by a stepper driver and taking inputs from OpenCV, will give you the support to power through those lonely days.

What it does

Portable Air Hockey Friend is first and foremost a fully functional air hockey table. Air Hockey Friend also includes a stepper motor driven arm to (theoretically) play air hockey against you and a Raspberry Pi camera system to track scoring.

How we built it

The Physical Table

We planed down 2"x4"s to make nice smooth faces and cut slots for a sheet of acrylic to fit into snuggly. An array of holes were cut into the acrylic using a lasercutter, allowing for airflow across the surface of the table, which decreases friction. We constructed a base and camera mount using 80-20s, with edges milled for a clean finish. Pucks (with April Tags extruded on them) and paddles were 3D printed.

Robot Arm

The robot arm is powered by the biggest motor that Winnie could find. Driving it is a TMC5160, one of the best stepper drivers in its class. It features up to 20A of phase current output! (although we only used 2.5A). The goal of this arm was to be fast and robust, and since the range of motion of small, we aimed for something with loads of torque.

Computer Vision

We used OpenCV with April Tag recognition to track the position of the puck. In order to keep score, our algorithm counts it as a goal if the puck goes out of the camera view and its previous trajectory was in the direction of the goal. While this isn't ideal, we had to make approximations due to the fact that the puck often traverses the table faster than the Raspberry Pi can process one frame. The Raspberry Pi communicates via serial port to an Arduino to display the score (but sadly that didn't end up working out).

Challenges we ran into

While we had hoped to use a feedback loop of some sorts to determine an optimal policy for the robot arm, that was not possible because of how much delay was in each frame. (Using a state space representation would've been really cool, but it performs poorly when the input/environment space is too discretized). Getting a nice surface finish for the wood & metal components making up the table was a labor of love. While it took a while, we feel like it was well worth the slick resulting look.

Accomplishments that we're proud of

The craftmanship.

What we learned

Tolerances are sadly important :(

What's next for Portable Air Hockey Table Friend

If we can take decrease processing time, possibly with a more efficient algorithm or a more powerful processer, we would like to make Air Hockey Table friend AI powered. This can be done by building a simulation space to determine the optimal motor input given puck location, velocity, and acceration. This is a variant of reinforcement learning called state space controls and value iteration.

Built With

Share this project:

Updates