Skip to the content
2 layersAir Hockey, the printed circuit board in 3D

This repository contains all the code and hardware files for an autonomous air hockey table system. The system uses a 2-axis gantry controlled by an ESP32, with real-time vision and inference running on either a laptop…

Copper layers
2
Thickness
1.6 mm
Parts
3
Nets
62
Pads
80
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 8.0 (file 20240108)
Created
7 Oct 2024
Updated
9 Jun 2025

Overview

Air Hockey is an open-source printed circuit board by RaviPatel021, from the RaviPatel021/Air-Hockey-Bot repository on GitHub. It is a 2-layer board with 3 parts on 62 nets.

It is built around the ESP32-S2-DEVKITC-1. It belongs with the ESP32 boards of this library.

Main components

1

README

README.md

Autonomous Air Hockey Table

This repository contains all the code and hardware files for an autonomous air hockey table system. The system uses a 2-axis gantry controlled by an ESP32, with real-time vision and inference running on either a laptop or a Jetson Nano.

Folder Overview

  • embedded/
    Contains the embedded C++ code for the ESP32 that controls the 2-axis gantry using stepper motors and drivers.

  • laptop/
    Python code that runs on a laptop to handle camera input, detect the puck, run inference using a trained model, and send paddle commands to the ESP32 over serial.

  • Jetson_Nano/
    Similar to the laptop/ folder, but modified and optimized to run entirely on a Jetson Nano for a fully embedded setup.

  • KiCAD_Schematics/
    Electrical schematics and PCB layout files for the gantry control system, designed using KiCAD.


More detailed documentation and setup instructions will be added soon.

🚀 Getting Started

These instructions will help you get the system running on your machine.

1. Clone the Repository

bash
git clone https://github.com/RaviPatel021/Air-Hockey-Bot.git
cd Air-Hockey-Bot

2. Install Python Dependencies

Use Python 3.8–3.10. It's strongly recommended to use a virtual environment:

bash
python -m venv venv
venv\Scripts\activate  # Mac/Linux:: source venv/bin/activate
pip install -r laptop/requirements.txt

⚠️ On Jetson Nano, some packages (e.g., OpenCV, torch) may need to be installed with Jetson-specific wheels


🔧 Upload Firmware to ESP32

The ESP32 controls the stepper motors through UART and must be flashed with the code in embedded/.

You can upload the code using:

  • Arduino IDE (select ESP32 board, e.g. “ESP32 Dev Module”)

Make sure you have the required libraries installed:

  • TMCStepper
  • FastAccelStepper

⚙️ Connect the System

  1. Connect the camera and ESP32 to your computer or Jetson Nano.
  2. Verify the serial port device (e.g., /dev/ttyUSB0 on Linux or COM3 on Windows).
  3. Adjust serial port settings in the Python code if necessary.

▶️ Running the Control Script

From the laptop/ or Jetson_Nano/ directory, run:

bash
python main.py

This will start the vision processing pipeline, detect the puck position, run the PPO model inference, and send velocity commands to the gantry controller.


Parts

3
QtyValueFootprintReferences
2TMC2209_BigTreeTech_V1.3TMC2209_SILENTSTEPSTICK:MODULE_TMC2209_SILENTSTEPSTICKLeftMotor1, RightMotor1
1ESP32-S2-DevKitC-1PCM_Espressif:ESP32-S2-DevKitC-1U1

Similar boards

  • 2 layers107.8 × 91.5 mmWave reflector, the printed circuit board in 3D

    Wave reflector

    interspecifics/wave_reflector

    wave_reflector is a eeg instrument/interface for live performance and installation

    52 parts
  • 2 layersRobot PCB, the printed circuit board in 3D

    Robot PCB

    Mario-dango/Proyecto-RV

    Dispositivos de Entrada: Joystick analógico (2 GDL) para tracción, pulsadores de acción y MPU6050 (Acelerómetro/Giroscopio) para seguimiento de gestos de inclinación.

    38 parts
  • 2 layers156 × 89.4 mm4-DOF Robotic Arm, the printed circuit board in 3D

    4-DOF Robotic Arm

    Mkhalaf203/4-DOF-Robotic-Arm

    This repository contains the complete engineering files for a 4-Degree-of-Freedom (4-DOF) Robotic Arm System, featuring a gesture-controlled master-slave architecture.

    24 parts
  • 2 layers101.2 × 86.5 mmWindmeasureboard, the printed circuit board in 3D

    Windmeasureboard

    GGoodacre/WindChargeController-Capstone2024

    Solar Charge Controller for BEng Capstone 2024

    28 parts1
  • 2 layers40 × 30 mmBlinky, the printed circuit board in 3D

    Blinky

    earthtojake/text-to-cad

    Design physical products with AI

    3 parts26kMIT
  • 2 layers51.9 × 16 mmPassive2-rpi non standard adapter, the printed circuit board in 3D

    Passive2-rpi non standard adapter

    hzeller/rpi-rgb-led-matrix

    Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO

    3 parts4.4kGPL-2.0
  • 2 layers16.3 × 16.3 mmSensor, the printed circuit board in 3D

    Sensor

    scottbez1/splitflap

    DIY split-flap display

    3 parts4.2k
  • 2 layersSub, the printed circuit board in 3D

    Sub

    atopile/atopile

    Design circuit boards with code! ✨ Get software-like design reuse 🚀, validation, version control and collaboration in hardware; starting with electronics ⚡️

    3 parts4kMIT

Questions

What parts does the Air Hockey use?

3 parts, built around the ESP32-S2-DEVKITC-1. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Air Hockey KiCad files?

From the RaviPatel021/Air-Hockey-Bot repository on GitHub, at the commit this page was made from: the board is KiCAD Schematics/Air Hockey.kicad_pcb and its schematic KiCAD Schematics/Air Hockey.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Air Hockey design in my own project?

Its repository states no licence, so its author keeps all rights: ask RaviPatel021 before reusing the design.