Skip to the content
2 layers43.8 × 58 mmPi hat, the printed circuit board in 3D

Program aiming to solve the one-way labyrinth generation riddle.

Size
43.8 × 58 mm
Copper layers
2
Thickness
1.6 mm
Parts
53
Nets
42
Pads
176
Tracks, vias
471, 27
Pours
5
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
27 Jul 2023
Updated
13 Sep 2026

Overview

Pi hat is an open-source printed circuit board by fodorbalint, from the fodorbalint/OneWayLabyrinth repository on GitHub. It is a 2-layer board of 43.8 × 58 mm with 53 parts on 42 nets, routed with 471 tracks and 27 vias.

It is built around the MCP6022-I/P, AQY211EH and PCF8563T/5, with the 1N4148W, NCE20P70G and Q13FC13500004 among its other parts. Its parts include 14 resistors, 9 connectors, 8 capacitors, 8 ICs and 3 diodes.

Main components

6

README

README.md

The one-way labyrinth algorithm

This research aims to solve the following problem:
"Draw a line that goes through an n x n grid (where n is an odd number), passing through each field once. The line has to start from the field at the upper left corner (1,1) and end at (n,n). At any time it is allowed to move left, right, up or down, and it has to randomly choose between the available fields."

At first sight it may look easy. But look at the following example:

Based on the black line's movement, blue fragments were drawn to indicate a path we have to go through in the future in order to fill the board.
Do you see why the situation is impossible from now on?

The question is, is there a single rule or a set of rules that will guarantee you can draw a labyrinth of any size? Or do the rules get infinitely complex?

To assist with the research, I have written a computer program. In the beginning, I let it run on a 21 x 21 field, and whenever I noticed a trouble, I coded the solution into it. While you can discover many patterns this way, they will be random and do not help in gaining a fundemental understanding. At one point you will find things get too complex, and you are still far from solving the 21 x 21 board.
That's where a gradual approach comes in.

Due to the length of the study, it cannot be displayed on this one page. To continue reading, download the PDF files for screen reading or to be printed out.)


The project contains the source code for use with Visual Studio. To start the program, run OneWayLabyrinth.exe in the folder "bin/Debug/net6.0-windows".

Screenshots:




Hotkeys:

Enter: Reload or Close error message
Ctrl + S: Save path
Right arrow: Step forward
Left arrow: Step back
Ctrl/Shift + arrows: step in direction if possible. If CapsLock is on, pressing the Ctrl or Shift keys is not necessary.
Space: Run automatically / Stop automatic running

Parts

53
QtyValueFootprintReferences
4MountingHoleCustom:MountingHole_3.2mm_M3H1, H2, H3, H4
31N4148WDiode_SMD:D_SOD-123FD1, D2, D3
31kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR8, R9, R13
3FiducialCustom:Fiducial_1mm_Mask3mmFID1, FID2, FID3
2100kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR2, R12
210kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR4, R14
22N7002Custom:SOT-23_Handsoldering_rightQ2, Q3
2AQY211EHCustom:SOP-4_6.4x4.78mm_P2.54mmU4, U5
2Conn_01x02_PinCustom:KF2510_1x02_P2.54mm_VerticalJ3, J9
2Conn_01x05_PinCustom:KF2510_1x05_P2.54mm_VerticalJ2, J8
10.02Custom:Constantan_R_1.2x10R1
110Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR7
1100Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR11
1100nFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC6
110uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC5
110µFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC3
1180Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR3
11pFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC8
120kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR10
1220µFCapacitor_THT:CP_Radial_D6.3mm_P2.50mmC1
125pFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC7
1300kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR6
133µFCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC2
147µFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC4
156kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR5
1Battery boostCustom:Battery_boostU2
1Battery buckCustom:Battery_buckU1
1Conn_01x03_PinCustom:KF2510_1x03_P2.54mm_VerticalJ7
1Conn_01x04_PinCustom:KF2510_1x04_P2.54mm_VerticalJ1
1Conn_02x04_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x04_P2.54mm_HorizontalJ5
1Conn_02x05_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x05_P2.54mm_VerticalJ6
1DIP-8 adapterPackage_DIP:DIP-8_W7.62mmU8
1MCP6022Custom:SOIC-8_3.9x4.9mm_P1.27mm_down_handsolderU3
1NCE20P70GCustom:Infineon_PG-TDSON-8_6.15x5.15mmQ1
1PCF8563TCustom:SOIC-8_3.9x4.9mm_P1.27mm_downU7
1Q13FC13500004Crystal:Crystal_SMD_3215-2Pin_3.2x1.5mmY1
1TPS7A0233DBVRCustom:SOT-23-5_HandSoldering_downU6
1USB_ACustom:USB_A_Receptacle_CustomJ4

More from fodorbalint/OneWayLabyrinth

2
  • 2 layers38 × 44 mmCapacity tester, the printed circuit board in 3D

    Capacity tester

    fodorbalint/OneWayLabyrinth

    Program aiming to solve the one-way labyrinth generation riddle.

    27 parts1
  • 2 layers54 × 33 mmSpeed limiter, the printed circuit board in 3D

    Speed limiter

    fodorbalint/OneWayLabyrinth

    Program aiming to solve the one-way labyrinth generation riddle.

    26 parts1

Similar boards

  • 4 layers130 × 110 mmOpenBeacon2, the printed circuit board in 3D

    OpenBeacon2

    etherkit/OpenBeacon2

    Multimode MEPT based on OpenBeacon

    261 parts15
  • 2 layersEphemerkey, the printed circuit board in 3D

    Ephemerkey

    ephemerkey/ephemerkey

    The consumer half of the ephemerkey system, and the second PCB in this repo (alongside hardware/ephemerkey/, sharing the same scripts/kschgen.py engine, Makefile, and lib tables — the multi-project layout used by…

    70 parts
  • 4 layers92.5 × 70 mmClock, the printed circuit board in 3D

    Clock

    stevel1212-droid/stm32-rtc-climate-controller

    Kicad project of an STM32-based board climate controller utilizing an RTC module for time-scheduled environmental reading of temperature/humidity with SHT30 sensor and optional small relay for control.

    69 partsMIT
  • 6 layers90.1 × 135 mmHandheld, the printed circuit board in 3D

    Handheld

    gamebub/gamebub-pcb

    PCB design files for the Game Bub project

    386 parts31CERN-OHL-S-2.0
  • 2 layers100 × 100 mmZxuno1010, the printed circuit board in 3D

    Zxuno1010

    UzixLS/zxuno1010-board

    10x10cm PCB variant of ZX-UNO project for G738/G706 enclosure

    233 parts23MIT
  • 4 layers94 × 65 mmLink base brd, the printed circuit board in 3D

    Link base brd

    semtronik/link-hardware

    Open hardware for the Semtronik Link devices: ESP32-S3 base board, interface modules and enclosure. KiCad and Fusion sources, CERN-OHL-S v2.

    115 parts
  • 2 layers50.8 × 107.9 mmAnalog rev3, the printed circuit board in 3D

    Analog rev3

    PaulStoffregen/O_C_T41

    Ornament and Crime Optimized With Teensy 4.1

    202 parts164
  • 2 layers20.3 × 110 mm4HPico, the printed circuit board in 3D

    4HPico

    rheslip/2HPico-Eurorack-Module-Hardware

    2HP Eurorack module based on Raspberry Pi Pico 2

    73 parts84

Questions

How big is the Pi hat PCB?

It measures 43.8 × 58 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Pi hat use?

53 parts, built around the MCP6022-I/P, AQY211EH, PCF8563T/5 and 1N4148W. 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 Pi hat KiCad files?

From the fodorbalint/OneWayLabyrinth repository on GitHub, at the commit this page was made from: the board is Legacy/KiCad/pi hat/pi hat.kicad_pcb and its schematic Legacy/KiCad/capacity tester/capacity tester.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Pi hat design in my own project?

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