Skip to the content
4 layers68 × 40 mmSnakeGame, the printed circuit board in 3D

A custom handheld Snake game based on STM32L0 MCU

Size
68 × 40 mm
Copper layers
4
Thickness
1.6 mm
Parts
186
Nets
106
Pads
492
Tracks, vias
941, 295
Pours
5
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
2 Aug 2026
Updated
2 Aug 2026

Overview

SnakeGame is an open-source printed circuit board by vinn-ie, from the vinn-ie/mini-snake repository on GitHub, published under the MIT licence. It is a 4-layer board of 68 × 40 mm with 186 parts on 106 nets, routed with 941 tracks and 295 vias.

It is built around the MAX7219M, KT-0603W and CL05B104KB54PNC, with the CL31A107MQHNNNE, TS-1187A-B-A-B and AO3401A among its other parts. Its parts include 98 diodes, 34 resistors, 22 capacitors, 7 transistors and 5 switches. It belongs with the lEDs and displays boards and the STM32 boards of this library.

Main components

6

README

README.md

Snake Game

Handheld STM32 Snake Game

A complete custom handheld Snake game, from schematic and four-layer PCB through embedded firmware and printable mechanical parts. The board uses an STM32L051 microcontroller to drive a 12 x 8 discrete LED matrix through two MAX7219 display drivers.

Twelve assembled Snake Game boards running the LED animation

Features

  • Classic Snake on a 96-pixel, 12 x 8 LED playfield
  • Four dedicated directional buttons
  • Adjustable speed and display brightness
  • High score and settings stored in the STM32 data EEPROM
  • ADC-derived random food placement
  • Battery-voltage monitoring with low-battery indication
  • Animated game-over screen and scrolling menu text
  • Custom PCB, component libraries, 3D assembly, and printable button/header parts

Hardware

BlockImplementation
MCUSTM32L051C8T6, Arm Cortex-M0+, LQFP-48
Display96 discrete 0603 LEDs arranged as 12 columns x 8 rows
Display drivers2 x MAX7219 over separate SPI peripherals
Controls4 x TS-1187A directional tactile switches
PowerTwo-cell AAA holder, boost conversion, power switch, and battery ADC sensing
Debug/programmingSWD plus UART signals exposed by the design
PCBFour copper layers, 1.6 mm FR-4 stackup

The primary design sources are SnakeGame.kicad_sch, SnakeGame.kicad_pcb, and SnakeGame.kicad_pro. Open the project in KiCad 7 or a newer compatible release. Project-specific switch symbols, footprints, and models are kept in project_lib.

Schematic

Complete Snake Game schematic

Click the schematic to open the full-resolution PDF.

The dated folders under production are historical exports, not an endorsed release package. Regenerate and inspect all Gerbers, drill files, placement files, and the BOM from the current KiCad source before manufacture.

Firmware

The firmware targets the STM32L051C8Tx and was generated with STM32CubeMX 6.10.0 using STM32Cube FW_L0 V1.12.2. Application code is in STM_Snake/Core/Src/main.c; the pin and peripheral configuration is preserved in STM_Snake/STM_Snake.ioc.

Build with GNU Arm Embedded Toolchain

Install GNU Arm Embedded Toolchain, then run:

sh
cd STM_Snake
make

Build products are written to STM_Snake/build/, including STM_Snake.elf, STM_Snake.hex, and STM_Snake.bin. Override the compiler prefix if required, for example make CROSS_COMPILE=/path/to/arm-none-eabi-.

The existing STM32CubeIDE project can also be imported from STM_Snake. Regenerate CubeMX code only with Keep User Code enabled. Flash the resulting image over SWD with an ST-LINK and STM32CubeProgrammer or directly from STM32CubeIDE.

Controls

  • Up/Down: move through menu items
  • Left/Right: change speed or brightness
  • Right on Play: start a game
  • Direction buttons in game: steer the snake; immediate reversal is blocked
  • Any direction after game over: restart the device
  • Right on Reset: erase saved settings and high score

Mechanical Files

3D contains the full PCB STEP assembly, printable STL/3MF parts, component models, and the OpenSCAD source for the pin-header cover. Slicer-generated G-code is intentionally excluded because it is specific to a printer, material, and profile.

Repository Layout

PathContents
SnakeGame.kicad_*KiCad schematic, PCB, and project settings
STM_Snake/STM32Cube firmware, linker script, HAL, and CMSIS
project_lib/Project-specific KiCad symbols, footprints, and models
3D/Mechanical source, printable parts, and assembly models
production/Historical BOM, placement, IPC, and fabrication archives
graphics/Project artwork and documentation media

Project Status

The design and firmware are presented as an archived working project rather than a supported consumer product. Before producing new hardware, regenerate manufacturing files from the current source, run KiCad electrical/design-rule checks, review the power circuitry, and validate battery thresholds on the assembled board.

Parts

186
QtyValueFootprintReferences
98KT-0603WLED_SMD:LED_0603_1608MetricD1, D2, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D20, D21, D22, D23 +82
13100nCapacitor_SMD:C_0402_1005MetricC3, C7, C8, C9, C10, C11, C14, C15, C16, C19, C20, C21, C22
1210kResistor_SMD:R_0603_1608MetricR3, R4, R5, R6, R7, R8, R10, R11, R12, R13, R14, R15
910kResistor_SMD:R_0402_1005MetricR19, R24, R25, R26, R27, R28, R29, R30, R31
62N7002Package_TO_SOT_SMD:SOT-23Q1, Q3, Q4, Q5, Q6, Q7
4100uCapacitor_SMD:C_1206_3216MetricC1, C4, C5, C6
41kResistor_SMD:R_0402_1005MetricR18, R32, R33, R34
456Resistor_SMD:R_0805_2012MetricR1, R9, R20, R21
4LSETJumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP2, JP3, JP4, JP5
4TS-1187A-B-A-BTS-1187A-B-A-B:SW_TS-1187A-B-A-BS1, S2, S3, S4
310uCapacitor_SMD:C_0603_1608MetricC2, C17, C18
31kResistor_SMD:R_0603_1608MetricR2, R16, R17
212pCapacitor_SMD:C_0603_1608MetricC12, C13
2DNPResistor_SMD:R_0805_2012MetricR22, R23
2MAX7219Package_SO:SOIC-24W_7.5x15.4mm_P1.27mmU2, U4
10.35 IH - 0.75 ITFuse:Fuse_0805_2012MetricF1
122uUser_Passives:LVF303015-220M-NL1
15VTestPoint:TestPoint_Pad_D2.0mmTP2
1AO3401APackage_TO_SOT_SMD:SOT-23Q2
1BOOTJumper:SolderJumper-3_P1.3mm_Bridged2Bar12_RoundedPad1.0x1.5mmJP9
1CELL1Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP8
1Conn_01x04Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical_SMD_Pin1RightJ1
1Conn_01x04Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ2
1Crystal_GND24User:OSC-SMD_4P-L3.2-W2.5-BLY1
1ResetJumper:SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mmJP1
1STM32L051C8TxPackage_QFP:LQFP-48_7x7mm_P0.5mmU1
1SW_SPDTUser:SW-SMD_MK-12C02-G025SW1
1VBATTestPoint:TestPoint_Pad_D2.0mmTP1
1VREFTestPoint:TestPoint_Pad_D2.0mmTP3
1~Battery_Holders:BH-AAA-B5AA001BH1
1~Package_TO_SOT_SMD:SOT-23U3

Similar boards

  • 4 layers408.7 × 50 mmPartial Drawer Controller v1, the printed circuit board in 3D

    Partial Drawer Controller v1

    Robast-GmbH/PCB_Designs

    This repository contains all the necessary files and instructions for the PCBs that are designed using KiCad. Here is an overview of the main components: - .github: Contains Github-specific configurations, including…

    619 parts1MIT
  • 4 layers100 × 90 mmOpentouch s3, the printed circuit board in 3D

    Opentouch s3

    JoeMighty/opentouch-s3

    A modern remake of the Bare Conductive Touch Board: 12 capacitive touch electrodes, MP3/WAV/MIDI audio, and now WiFi, Bluetooth LE, USB-C, a proper LiPo power path, a fuel gauge, line-in, MIDI out, Qwiic and an RGB LED.

    185 parts
  • 4 layers64 × 56 mmAlec sensor, the printed circuit board in 3D

    Alec sensor

    eshelton328/forge

    Hardware design monorepo with software-grade CI/CD. KiCad PCB projects with automated ERC/DRC, multi-fab rule validation, schematic & BOM checks, and auto-generated board documentation.

    100 parts
  • 2 layers110.1 × 110.4 mmMini, the printed circuit board in 3D

    Mini

    makerspet/oomwoo-esp32s3-cm

    Pi CM4/CM5-compatible Compute Module using ESP32-S3 instead of CPU

    116 parts1Apache-2.0
  • 4 layers70 × 70 mmAi camera, the printed circuit board in 3D

    Ai camera

    maxlab-io/tokay-lite-pcb

    Tokay AI Camera - ESP32 camera development board

    161 parts130CERN-OHL-P-2.0
  • 2 layers37.3 × 31.8 mmKeyChain, the printed circuit board in 3D

    KeyChain

    Brammert42/EPKeychain

    A keychain equipped with a RP2040 and a E-ink

    88 parts
  • 4 layers70 × 70 mmMaxlab io tokay lite pcb ai camera, the printed circuit board in 3D

    Maxlab io tokay lite pcb ai camera

    punkfab/pcb-corpus

    235 real KiCad boards from open-source hardware repositories, prepared as a placement and routing benchmark

    176 parts1
  • 4 layers32.8 × 36.3 mmEsp32, the printed circuit board in 3D

    Esp32

    gdoor-org/gdoor

    Wifi adapter and bus protocol documentation for the Gira TKS Door System

    68 parts57GPL-3.0

Questions

How big is the SnakeGame PCB?

It measures 68 × 40 mm and has 4 copper layers, 1.6 mm thick.

What parts does the SnakeGame use?

186 parts, built around the MAX7219M, KT-0603W, CL05B104KB54PNC and CL31A107MQHNNNE. 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 SnakeGame KiCad files?

From the vinn-ie/mini-snake repository on GitHub, at the commit this page was made from: the board is SnakeGame.kicad_pcb and its schematic SnakeGame.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the SnakeGame design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).