Skip to the content
2 layers160 × 70.3 mmGamegirl, the printed circuit board in 3D

Tetris implementation for the ESP32 microcontroller with integrated audio support, TFT display rendering, and SD card file access.

Size
160 × 70.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
60
Nets
65
Pads
249
Tracks, vias
567, 58
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
29 Apr 2026
Updated
16 Aug 2026

Overview

Gamegirl is an open-source printed circuit board by Samprab06, from the Samprab06/ESAP-Tetris repository on GitHub. It is a 2-layer board of 160 × 70.3 mm with 60 parts on 65 nets, routed with 567 tracks and 58 vias.

It is built around the CH340C, ESP32-WROOM-32 and AP2112K-3.3, with the MUN5211DW1 and TYPEC-304A-ACP16O among its other parts. Its parts include 18 resistors, 13 capacitors, 10 switches, 3 ICs and 3 connectors. It belongs with the audio and music and lEDs and displays boards and the ESP32 boards of this library.

Main components

5

README

README.md

ESAP Tetris

A complete, feature-packed Tetris game implementation for the ESP32 microcontroller featuring a custom PCB design, real-time graphics rendering on an ILI9341 SPI TFT display, I2S audio playback, SD card asset loading and a future multiplayer implementation


PCB Design

The project features a custom-designed PCB tailored for handheld gameplay with optimized power delivery, hardware debouncing, and an auto-programming USB-C interface.

Board Renders

Back View (Component Side)Front View (Controls)
PCB Front RenderPCB Back Render

Key Hardware & Schematic Highlights

  • Microcontroller: ESP32-WROOM-32 module (32-bit dual-core Xtensa @ 240 MHz, 520 KB SRAM, Wi-Fi/BT).
  • USB-C Interface & Auto-Flashing: Integrated CH340C USB-to-UART converter with dual NPN auto-reset circuitry (MUN5211DW1) for seamless hands-free code uploads via USB Type-C.
  • Power Management: AP2112K-3.3 LDO regulator supplying up to 600mA at 3.3V with dedicated ground plane thermal heat sinking. USB Type-C CC1/CC2 5.1kΩ pull-down resistors for 5V C-to-C charger support.
  • Display Connection: Dedicated 14-pin socket header for 2.8" ILI9341 SPI TFT Display (240×320 resolution) on the VSPI bus. Includes 10kΩ pull-up resistor on CS (GPIO5).
  • SD Card Storage: 4-pin SPI socket header for MicroSD card module on the HSPI bus. Includes 10kΩ pull-up resistor on CS (GPIO15).
  • Input Controllers: 8 tactile pushbuttons (UP, DOWN, LEFT, RIGHT, A, B, START, SELECT) with hardware RC debouncing filters (0.1µF capacitors) and 10kΩ pull-up resistors on input-only GPIOs (34, 35, 36, 39).
  • Audio & Volume Control: Audio output header with an integrated slide switch (SW12) for hardware gain/volume control.

🛠️ Hardware Specifications & Pinout

SPI Display Connection (VSPI)

ESP32 PinSignal NameDisplay Function
GPIO 23MOSISerial Data Input
GPIO 19MISOSerial Data Output
GPIO 18SCKSerial Clock
GPIO 5CSChip Select (10kΩ Pull-Up)
GPIO 2DCData / Command Select
GPIO 4RSTReset
3.3VLEDDisplay Backlight Power

MicroSD Card Connection (HSPI)

ESP32 PinSignal NameSD Card Function
GPIO 13MOSIData Input
GPIO 17MISOData Output
GPIO 14SCKClock
GPIO 15CSChip Select (10kΩ Pull-Up)

Game Control Buttons

GPIO PinFunctionHardware Circuit
GPIO 36 (VP)Left10kΩ Pull-Up + 0.1µF Debounce
GPIO 39 (VN)Right10kΩ Pull-Up + 0.1µF Debounce
GPIO 34Down10kΩ Pull-Up + 0.1µF Debounce
GPIO 35Up / Rotate10kΩ Pull-Up + 0.1µF Debounce
GPIO 32Button A10kΩ Pull-Up + 0.1µF Debounce
GPIO 33Button B10kΩ Pull-Up + 0.1µF Debounce
GPIO 27Start10kΩ Pull-Up + 0.1µF Debounce
GPIO 16Select10kΩ Pull-Up + 0.1µF Debounce

Software Architecture

The software is structured as a PlatformIO project

text
ESAP_Tetris/
├── PCB/                     # KiCad 10 PCB schematics, board layouts & gerbers
│   ├── pcb_front.png
│   └── pcb_back.png
├── include/                 # Header files
│   ├── main.hpp
│   ├── logic.h
│   ├── display.h
│   ├── audio.h
│   └── sdcard.h
├── src/                     # Source implementations
│   ├── main.cpp             # FreeRTOS task initialization & main loop
│   ├── logic.cpp            # Tetris game rules & state machine
│   ├── display.cpp          # TFT graphics rendering
│   ├── audio.cpp            # I2S audio decoding & streaming
│   └── sdcard.cpp           # SD card file system interface
├── platformio.ini           # PlatformIO configuration
└── README.md                # Project documentation

Building & Flashing

Prerequisites

  • VS Code with PlatformIO IDE extension installed.

Steps

  1. Clone the repository:
    bash
    git clone https://github.com/Samprab06/ESAP-Tetris.git
    cd ESAP-Tetris
  2. Connect your ESP32 board via USB-C.
  3. Build & Upload firmware using PlatformIO:
    bash
    pio run -t upload
  4. Open the Serial Monitor:
    bash
    pio device monitor


License

This project is open-source and provided for educational and personal use.

Parts

60
QtyValueFootprintReferences
1210kResistor_SMD:R_0805_2012MetricR5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R18
100.1uCapacitor_SMD:C_0805_2012MetricC2, C3, C5, C6, C7, C8, C9, C10, C11, C12
4MountingHoleMountingHole:MountingHole_3.2mm_M3_DIN965_PadH5, H6, H7, H8
4MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
310uCapacitor_SMD:C_0805_2012MetricC1, C4, C13
21kResistor_SMD:R_0805_2012MetricR16, R17
227Resistor_SMD:R_0603_1608MetricR3, R4
25.1kResistor_SMD:R_0805_2012MetricR1, R2
1AButton_Switch_THT:SW_PUSH_6mmSW6
1AP2112K-3.3Package_TO_SOT_SMD:SOT-23-5U2
1BButton_Switch_THT:SW_PUSH_6mmSW7
1BOOTButton_Switch_THT:SW_PUSH_6mmSW8
1CH340CPackage_SO:SOIC-16_3.9x9.9mm_P1.27mmU4
1Conn_01x04_SocketConnector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ3
1Conn_01x07_SocketConnector_PinSocket_2.54mm:PinSocket_1x07_P2.54mm_VerticalJ1
1Conn_01x14_SocketConnector_PinSocket_2.54mm:PinSocket_1x14_P2.54mm_VerticalJ2
1ENButton_Switch_THT:SW_PUSH_6mmSW1
1ESP32-WROOM-32RF_Module:ESP32-WROOM-32U1
1MUN5211DW1Package_TO_SOT_SMD:SOT-363_SC-70-6Q1
1PWRLED_SMD:LED_0603_1608MetricD1
1SS12D07VG4 087easyeda2kicad:SW-TH_SS12D07VG4SW12
1STATUSLED_THT:LED_D3.0mmD2
1TYPEC-304A-ACP16Oeasyeda2kicad:USB-SMD_TYPEC-304A-ACP16OUSB1
1downButton_Switch_THT:SW_PUSH_6mmSW3
1leftButton_Switch_THT:SW_PUSH_6mmSW4
1rightButton_Switch_THT:SW_PUSH_6mmSW5
1selectButton_Switch_THT:SW_PUSH_6mmSW10
1startButton_Switch_THT:SW_PUSH_6mmSTART
1upButton_Switch_THT:SW_PUSH_6mmSW2

Similar boards

  • 2 layers54 × 12.5 mmBrodBoost C2, the printed circuit board in 3D

    BrodBoost C2

    axiometa/BrodBoost-C2

    USB - C Breadboard Powersupply: BrodBoost-C

    31 parts36CERN-OHL-S-2.0
  • 4 layers100 × 70.5 mmSmart Irrigation SystemV2, the printed circuit board in 3D

    Smart Irrigation SystemV2

    Benedikt3141/Smart-Irrigation-System

    A smart irrigation system for irrigation of up to 6 plants. It monitors the moisture, temperature, CO2 concentration, air quality ... and displays the data on a 2.4" TFT Display using an ESP32 DevKit C as processor.

    147 parts1MIT
  • 4 layers40 × 55 mmCopterCat cm4, the printed circuit board in 3D

    CopterCat cm4

    matveylapin/CopterCat_cm4

    Полётный контроллер для стандарта FMU-v6u. Обычно на дронах для программирования устанавливают полётный контроллер, одноплатный компьютер и иногда arduino.

    164 parts3Apache-2.0
  • 4 layers33.5 × 33.5 mmEsp32-led, the printed circuit board in 3D

    Esp32-led

    t3mschm2d/esp32-tiny-led-controller

    The main goal of this project is to develop an OpenHardware board for controlling digital LED strips. The control shall be done via Homeassistant and esphome.The PCB is based around an ESP32-U4WDH microcontroller and…

    29 parts2
  • 2 layers41.5 × 19 mmPwm fan control, the printed circuit board in 3D

    Pwm fan control

    Duckle29/PWM-to-fan

    A small board for controlling two DC fans from an open-drain inverted PWM output.

    28 parts1MIT
  • 2 layers26.5 × 55.5 mmCgf.CameraControl.Hardware, the printed circuit board in 3D

    Cgf.CameraControl.Hardware

    sensslen/Cfg.CameraControl.Hardware

    Hardware needed to control a lanc camera with a PTZ head

    30 partsMIT
  • 4 layers20.3 × 40 mmTemp sensor, the printed circuit board in 3D

    Temp sensor

    matthewlai/WiredHut

    Home automation

    21 parts20GPL-3.0
  • 2 layers112 × 79 mmMacropad, the printed circuit board in 3D

    Macropad

    dbozec/macropad

    Custom wireless macropad

    94 parts1

Questions

How big is the Gamegirl PCB?

It measures 160 × 70.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Gamegirl use?

60 parts, built around the CH340C, ESP32-WROOM-32, AP2112K-3.3 and MUN5211DW1. 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 Gamegirl KiCad files?

From the Samprab06/ESAP-Tetris repository on GitHub, at the commit this page was made from: the board is PCB/gamegirl.kicad_pcb and its schematic PCB/gamegirl.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Gamegirl design in my own project?

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