This Robot Predicts Your Next Move to Play Air Hockey

Published  December 12, 2024   0
DIY Air Hockey Robot

Remember the thrill of playing against a computer in classic games like chess or ping pong? Now imagine that experience brought to life, where a robot not only competes against you but predicts your every move. That’s exactly what the DIY Air Hockey Robot does. The DIY Air Hockey Robot was created by the YouTuber known as zeroshotrobotics, and it uses real-time computer vision and predictive algorithms to challenge players on an actual air hockey table. This isn’t just a simple mechanical arm swiping at the puck; it’s a carefully engineered machine capable of tracking the puck, calculating trajectories, and even anticipating rebound shots. The robot’s design relies on two fixed motors and a continuous H-shaped belt to move smoothly in two dimensions, which is obviously called an H-bot system. This setup avoids the weight-bearing issues common with traditional Cartesian systems, making it possible for the relatively heavy NEMA 17 stepper motors to achieve high-speed movement. Controlled by an Arduino Uno connected to TMC2208 drivers, the motors operate a 3D-printed puck hitter mounted on linear rods, ensuring precision in every motion.

DIY Air Hockey Robot

The vision system, powered by a Raspberry Pi 3B+ and a Pi Camera v2, detects the puck’s position and predicts its path using Python and OpenCV. Building the robot wasn’t without challenges. Early issues like belt slippage and detection errors required iterative problem-solving, from adding acceleration routines to fine-tuning the computer vision system. Mechanical alignment also proved tricky, with stiffness in the carriage’s motion resolved through some careful tweaking.

DIY Air Hockey Robot Movement Prediction

While the robot excels defensively, attempts to add offensive capabilities revealed structural instability, leading to temporary fixes and plans for future improvements. Combining accessible materials like 3D-printed parts, an air hockey table, and off-the-shelf electronics, it offers a unique blend of technical innovation and fun. While its creator plans a Version 2 with enhanced capabilities, this first iteration can be a fun build to play with. The DIY Air Hockey Robot is fully open-source and more details about the project including the link to the Instructables for the project can be gathered from the DIY Air Hockey Robot demo video.