Air Hockey Robot

Inspired by the great Jose Julio with his amazing work Air Hockey Robot, I decided to make my own.

The build of the table was from scratch, by cutting the ply wood, drilling the holes, building the table, installing the fans, and the power supply.

Once the table is done, the next step is to install the Arduino Mega board + Ramps1.4, parts for the robot ( I used the parts Jose created ) and the motors. This step of installing the mechanical parts is crucial in that I had to make sure the path the robot goes through be smooth, straight, and square. There are a lot of factors that can limit the robot's final speed, ex: unevenness of the table surface, too wide of the table (causing the robot to stuck on the 2 rails when going fast), un-parallellness of the 2 rails ... etc. Unfortunately due to the design of my table and the imperfection of my building it, my robot's final speed is not as fast as the original one.

The next key step is the software. I wrote the software with C++ with OpenCV library and Arduino.

Compared to the original air hockey robot, I made quite some improvements, performance wise and logic wise, as well as some bug fixes.

You can find the source code here.

Below I list the improvements compared to the original air hockey robot:

  • the robot eye needs not specifically be a PS3 camera, but any web cam
  • the code is easier to read, with the new concepts of client-server, and improved performance and logic.
  • bug fixes
  • new and added logic for the robot strategy and missing step correction

[What can be done better?]

  • Due to the design and the imperfection of my DIY table, the mechanical of the robot limits its speed, so I was not able to get as fast speed as Jose's. If I can make it again, I'd just purchase a commercial table and go from there.
  • The current attack and defense algorithm has a lot of room for improvement