Close
0%
0%

puckman

An air hockey playing robot

Similar projects worth following
An autonomous air hockey bot that can defend against a human opponent.

In this project, we build a robot system to play air hockey. 

For the robot mechanics, we use an H-Bot gantry setup commonly used in DIY printers to move to robot pusher to any X-Y coordinate within the robot's play area. Two Nema 17 stepper motor control the XY motion of the gantry as follows:

 - both motors clockwise: pusher moves right

-  both motors counterclockwise: pusher moves left. 

- right motor clockwise, left motor counterclockwise: pusher moves upwards

- right motor counterclockwise, right motor clockwise: pusher moves downwards

The logic for motor control is implemented on the Raspberry Pi Pico. Each motor is connected to a microstep driver which is connected to the Pi Pico. 

For autonomous control, we use the iPhone camera to livestream the table to a python program running on PC. The program uses OpenCV with color thresholding to processes the frames from the camera. It determines the position of the yellow puck and the green pusher and calculates the appropriate move to vertically align the pusher with the puck. It sends the move to the Pi Pico motor control program through a USB connection, and the Pi Pico executes the motor control. 

The demo code files can be found at https://github.com/abdulkarim-mugisha/puckman

  • 1 × Air Hockey Table You will need a table to mount the gantry system on, preferably with square corners.
  • 2 × Nema 17
  • 1 × 3D printed parts motor pulleys, pulleys, motor supports, lateral supports, robot pusher, bushing
  • 1 × Raspberry Pi Pico
  • 1 × GT2 Open Timing Belt

View all 10 components

  • Gantry System Setup

    Abdulkarim Mugisha4 days ago 0 comments

    We are using an H-Bot gantry system. It should work better than the cartesian because the moving load is now lighter. 

    We 3d printed most of the parts to set the system on the air hockey table. The setup was relatively straightforward: we have 2 steel linear rods serving as the vertical rails. For the horizontal rails, we are using carbon fiber tubes which we deliberately chose because they are lighter than the steel linear rods.  The horizontal rail system and slides along the vertical rails with lienar bearings to reduce friction. The pusher is zip tied to bushings that slide along the horizontal rails. 

  • 3d printing and sourcing components

    Abdulkarim Mugisha02/08/2025 at 01:11 0 comments

    We attained a 40'' x 20'' air hockey table with airflow to attach the air hockey robot to.

    We're going to use the Hbot mechanism used on 3d printers for moving the robot's handle.

     We've acquired the following components so far:

    1. 2x NEMA 17 stepper motors 

    2. 2x 8mm x 450mm linear rods (track for the vertical axes)

    3. 2x 8mm x 500 mm carbon fiber tube (for a lightweight horizontal axis)

    4. GT2 6mm belt

    5. 2x linear bearings

    6. 12x 623 bearings (for setting up the pulleys)

    We've also 3d printed the majority of the support structures we'll need to set up the hbot mechanism

View all 2 project logs

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates