Skip to the content
2 layers192 × 192 mmMaster Matrix 4x4, the printed circuit board in 3D

เอกสารนี้อธิบายรายละเอียดการออกแบบทางฮาร์ดแวร์ บล็อกการทำงาน หน้าที่ของแต่ละโมดูล และโครงสร้างทางวิศวกรรมของ Master Controller Board (ไฟล์ KiCad: MasterMatrix4x4.kicadsch, MasterMatrix4x4.kicadpcb) ภายใต้สถาปัตยกรรม…

Size
192 × 192 mm
Copper layers
2
Thickness
1.6 mm
Parts
79
Nets
60
Pads
250
Tracks, vias
223, 4
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
24 Aug 2026
Updated
6 Sep 2026

Overview

Master Matrix 4x4 is an open-source printed circuit board by Narawit-Intusub, from the Narawit-Intusub/Board-Game repository on GitHub. It is a 2-layer board of 192 × 192 mm with 79 parts on 60 nets, routed with 223 tracks and 4 vias.

It is built around the SN74AHCT1G125DBVR(UMW), SMAJ5.0A and OS102011MA1QN1. Its parts include 2 capacitors, 2 resistors, 2 ICs and 1 switch. It belongs with the lEDs and displays boards and the ESP32 boards of this library.

Main components

3

README

hardware/master/README.md

Master Controller Board (บอร์ดแม่) - Dual-MCU Smart Tile (ESP32 + ATtiny1604)

เอกสารนี้อธิบายรายละเอียดการออกแบบทางฮาร์ดแวร์ บล็อกการทำงาน หน้าที่ของแต่ละโมดูล และโครงสร้างทางวิศวกรรมของ Master Controller Board (ไฟล์ KiCad: Master_Matrix_4x4.kicad_sch, Master_Matrix_4x4.kicad_pcb) ภายใต้สถาปัตยกรรม Dual-MCU Smart Tile Grid


1. ภาพรวมบอร์ดแม่ (Master Board Overview)

Master Controller Board ขนาดแผ่น $192.0 \times 192.0\text{ mm}$ ($19.2 \times 19.2\text{ cm}$) แบ่งเป็น 16 ช่องตาราง ($4 \times 4$ Cells ช่องละ $48.0 \times 48.0\text{ mm}$) แต่ละช่องติดตั้งไฟ LED 4 ดวงแบบ $2 \times 2$ (รวม 64 หลอด) ทำหน้าที่เป็นทั้ง พื้นที่เล่นในตัว และ เกตเวย์เชื่อมต่อกับคอมพิวเตอร์/Unity

สถาปัตยกรรมชิปคู่บนบอร์ดแม่ (Dual-MCU Architecture):

บอร์ดแม่รวมไมโครคอนโทรลเลอร์ 2 ตัวไว้บนแผ่นเดียว เพื่อแยกบทบาทหน้าที่อย่างชัดเจน:

  1. ESP32 Gateway (U1):

    • เชื่อมต่อกับ Unity / PC ผ่านสาย USB ทางขอบด้านซ้าย (West)
    • รับข้อมูลเกม, สถานะ, ข้อมูลสี และค่าความสว่างจาก Unity
    • เก็บโครงสร้างแผนผังความสัมพันธ์ทั้งระบบ (System Topology Map)
    • คำนวณ Global Grid และแปลงพิกัดสากล
    • แยกข้อมูล Packet ตาม Tile ID
    • ตรวจสอบสถานะการทำงานของระบบ
    • ส่งทุก Packet ให้ ATtiny1604 ของบอร์ดแม่ผ่าน Internal UART
    • ESP32 ไม่ต่อเข้าหัวแม่เหล็กภายนอกโดยตรง และไม่ขับ LED โดยตรง
  2. ATtiny1604 Master Tile Controller (U_ATTINY):

    • ทำหน้าที่เป็น Smart Tile ประจำบอร์ดแม่ โดยใช้ Firmware สถาปัตยกรรมเดียวกับบอร์ดลูก
    • รับ Packet ข้อมูลจาก ESP32
    • จัดการเก็บสี 16 ช่องในหน่วยความจำ (Active Buffer และ Back Buffer)
    • ขับไฟ LED 64 ดวงในบอร์ดตัวเอง (1 สี ขยายออกเป็น 4 หลอดต่อช่อง)
    • ขับสัญญาณออกสู่โครงข่ายแม่เหล็ก 3 ทิศทาง (North, East, South) ผ่านสาย LINK_TX
    • กระจายสัญญาณและส่งต่อแพ็กเก็ตไปยังบอร์ดลูก
text
Unity Game Engine
       │ USB DATA
       ▼
+-------------------------------------------------------------------------+
|                        Master Controller Board                          |
|                                                                         |
|                     [ J_NORTH (Female Mag-4P) ]                         |
|                     (VBUS, Link TX, Link RX, GND)                       |
|                                  ^                                      |
|                                  |                                      |
|  [ POWER INPUT ]            +----+----+                                 |
|  [ USB TO UNITY ]           | ATtiny  | <---> [ J_EAST (Female) ]       |
|         │                   |  1604   |       (VBUS, TX, RX, GND)       |
|         ▼                   | Master  |                                 |
|   +-----------+  Internal   +----+----+                                 |
|   |   ESP32   |  UART            | DIN_LOCAL (5V Logic)                 |
|   |  Gateway  | ---------->      v                                      |
|   +-----------+ (Level Shift)+---------------+                          |
|         │                    |  LED Matrix   | (MOD1 -> MOD2 -> .. MOD16|
|  (System Mgmt)               |  (64 LEDs)    | (Local Driving Only)     |
|   (West Edge)                +---------------+                          |
|                                  |                                      |
|                                  v                                      |
|                     [ J_SOUTH (Male Mag-4P) ]                           |
|                     (VBUS, Link TX, Link RX, GND)                       |
+-------------------------------------------------------------------------+

2. ขั้วต่อแม่เหล็ก 3 ทิศทาง (3-Edge Magnetic Link Bus)

บอร์ด Master ติดตั้งขั้วต่อแม่เหล็กที่ขอบบอร์ด 3 ด้านเท่านั้น ได้แก่ North, East, South (เว้นด้าน West ไว้สำหรับช่องรับไฟหลักและพอร์ต USB เชื่อมต่อคอมพิวเตอร์):

$$\text{Pin 1: [ VBUS ]} \quad \vert \quad \text{Pin 2: [ LINK_TX ]} \quad \vert \quad \text{Pin 3: [ LINK_RX ]} \quad \vert \quad \text{Pin 4: [ GND ]}$$

text
  Female Connector (North / East)       Male Connector (South)
      +---------------------+               +---------------------+
      | (1)  (2)  (3)  (4)  |               | (1)  (2)  (3)  (4)  |
      | VBUS LinkTX LinkRX GND|             | GND LinkTX LinkRX VBUS|
      +---------------------+               +---------------------+

การจับคู่สัญญาณเมื่อประกบกัน (Poka-Yoke 180° Inversion):

  • Pin 1 (VBUS) $\longleftrightarrow$ Pin 4 (VBUS): บัสจ่ายไฟเลี้ยงหลักของโครงข่าย
  • Pin 2 (LINK_TX) $\longleftrightarrow$ Pin 3 (LINK_RX): สายส่งข้อมูลชนสายรับข้อมูลของเพื่อนบ้าน
  • Pin 3 (LINK_RX) $\longleftrightarrow$ Pin 2 (LINK_TX): สายรับข้อมูลชนสายส่งข้อมูลของเพื่อนบ้าน
  • Pin 4 (GND) $\longleftrightarrow$ Pin 1 (GND): ระนาบกราวด์ร่วมของทั้งระบบ

3. เส้นทางข้อมูลและการกระจายสัญญาณ (Data Routing & Level Shifting)

  1. เส้นทางข้อมูล:
    • Unity $\rightarrow$ ESP32 (ถอดรหัสและแยก Packet)
    • ESP32 $\rightarrow$ ATtiny Master (ผ่าน Internal UART)
    • ATtiny Master $\rightarrow$ ขับไฟ LED 64 ดวงบนบอร์ด Master
    • ATtiny Master $\rightarrow$ กระจายข้อมูลออกสู่ LINK_TX ขั้วต่อแม่เหล็ก N/E/S ไปยังบอร์ดลูก
  2. การแปลงระดับแรงดัน (Level Shifting):
    • หาก ATtiny1604 ทำงานที่แรงดัน 5V เอาต์พุต GPIO ของ ATtiny จะเป็น 5V Logic อยู่แล้ว จึงขับขา DIN ของ WS2812B ได้โดยตรง
    • จุดที่ต้องแปลงระดับแรงดันคือระหว่าง ESP32 (3.3V Logic) กับ ATtiny1604 (5V Logic) บนสัญญาณ UART ภายใน เพื่อความเข้ากันได้ทางไฟฟ้าและความปลอดภัยของชิป
    • ทิศ ESP32 → ATtiny ใช้ 74AHCT1G125; ทิศ ATtiny → ESP32 ใช้ตัวแบ่งแรงดัน 10kΩ/20kΩ เพื่อจำกัดสัญญาณประมาณ 3.3V
  3. Current monitor: บัส I²C ของ INA219 มี pull-up 4.7kΩ ไปยัง +3V3 แยกทั้ง SDA และ SCL

4. สถาปัตยกรรมระบบไฟ (Power Architecture)

หลักการจ่ายไฟของระบบ:

text
Power Input
   └──► Master Protection
          └──► VBUS ผ่านขั้วต่อแม่เหล็ก
                 └──► Local Power Converter ในแต่ละ Tile
                        └──► 5V คงที่สำหรับขับ LED และเลี้ยง ATtiny1604

[!NOTE] การกำหนดสเปกภาคจ่ายไฟ:

  • บัสส่งไฟระหว่างบอร์ดใช้ชื่อกลางว่า VBUS เพื่อรองรับการทดสอบแรงดันที่เหมาะสม (เช่น 5V ตรง หรือ 9V–12V ร่วมกับ Local Step-Down Converter) เพื่อลดปัญหากระแสสูงและแรงดันตกคร่อมบนพินแม่เหล็ก
  • สเปกของ Power Input, พิกัดแรงดัน VBUS, วงจรตรวจวัดกระแส, และเบอร์ไดโอด TVS จะถูกกำหนดอย่างเป็นทางการหลังทราบพิกัดกระแสจริงของหัวแม่เหล็กและกำลังวัตต์สูงสุดของ LED ทั้งระบบ (ไม่ล็อกเบอร์ SMAJ5.0A หาก VBUS ถูกปรับขึ้นสูงกว่า 5V)
  • ตัวต้านทาน CC 5.1kΩ บนพอร์ต Type-C ทำหน้าที่ระบุสถานะ Sink พื้นฐาน ไม่ได้รับรองการจ่าย 5V/3A และไม่ใช่ระบบ USB-PD
  • R_BUS เป็น DNP โดยปริยาย ห้ามประกอบเป็น 0Ω จนกว่าจะยืนยันว่าใช้ VBUS 5V แบบจำกัดกระแส หากต้องการขยายหลาย Tile ให้แทนตำแหน่งนี้ด้วย Local Power Converter ที่เลือกตามพิกัดจริง
  • ขา VCC_(USB) ของโมดูล ESP32 ไม่ผูกเข้ากับราง +5V ภายนอก เพื่อป้องกันการป้อนไฟย้อนเข้าสาย USB Data ของคอมพิวเตอร์

5. การส่งแพ็กเก็ตและตรวจจับเพื่อนบ้าน

  • การส่งข้อมูล (LINK_TX): ATtiny Master ส่งออกทาง LINK_TX ซึ่งเชื่อมขนานไปยังขั้วต่อ N, E, S สัญญาณจะออกไปยังเพื่อนบ้านทุกด้านพร้อมกัน
  • การป้องกันข้อมูลวนซ้ำ (Deduplication): Packet จะระบุ Source ID, Destination ID, Sequence Number, Frame Number, TTL, และ CRC ทุกโหนดจะไม่ประมวลผล Packet เดิมซ้ำ
  • การค้นหาเพื่อนบ้าน (Neighbor Discovery): ขา LINK_RX แยกตามทิศทาง (LINK_RX_N, LINK_RX_E, LINK_RX_S) เมื่อได้รับข้อความ HELLO ทางขาใด จะทำให้ ATtiny ทราบทิศทางและบอร์ดที่เชื่อมต่ออยู่ทันที และส่งรายงานกลับไปยัง ESP32

Parts

79
QtyValueFootprintReferences
16100nCapacitor_SMD:C_0805_2012MetricC_MOD1, C_MOD2, C_MOD3, C_MOD4, C_MOD5, C_MOD6, C_MOD7, C_MOD8, C_MOD9, C_MOD10, C_MOD11, C_MOD12, C_MOD13, C_MOD14, C_MOD15, C_MOD16
16PTH_4P_INJ_IN1, J_IN2, J_IN3, J_IN4, J_IN5, J_IN6, J_IN7, J_IN8, J_IN9, J_IN10, J_IN11, J_IN12, J_IN13, J_IN14, J_IN15, J_IN16
16PTH_4P_OUTJ_OUT1, J_OUT2, J_OUT3, J_OUT4, J_OUT5, J_OUT6, J_OUT7, J_OUT8, J_OUT9, J_OUT10, J_OUT11, J_OUT12, J_OUT13, J_OUT14, J_OUT15, J_OUT16
16WS2812_Matrix_2x2ws2812-matrix-2x2:WS2812_Matrix_2x2_15x15mmMOD1, MOD2, MOD3, MOD4, MOD5, MOD6, MOD7, MOD8, MOD9, MOD10, MOD11, MOD12, MOD13, MOD14, MOD15, MOD16
2100nCapacitor_SMD:C_0603_1608MetricC1, C2
25.1kResistor_SMD:R_0603_1608MetricR_CC1, R_CC2
1100uFCapacitor_SMD:C_1206_3216MetricC_BULK1
110kResistor_SMD:R_0603_1608MetricR2
1330RResistor_SMD:R_0603_1608MetricR1
174AHCT1G125Package_TO_SOT_SMD:SOT-23-5U2
1Mag_East (Female)Library:fakemag4pin90degFemaleJ_EAST1
1Mag_North (Female)Library:fakemag4pin90degFemaleJ_NORTH1
1Mag_South (Male)Library:fakemag4pin90degMaleJ_SOUTH1
1SMAJ5.0ADiode_SMD:D_SMAD_TVS1
1SW_SPDTButton_Switch_THT:SW_Slide_SPDT_Angled_CK_OS102011MA1QSW1
1USB_C_6P_3A_5V_INConnector_USB:USB_C_Receptacle_6P_SMDJ_PWR1
1esp32-wemos-d1-miniesp32-wemos-d1-mini:esp32-wemos-d1-miniU1

Similar boards

  • 4 layers89.7 × 82.9 mmICE40UP5K logic analyzer rev2, the printed circuit board in 3D

    ICE40UP5K logic analyzer rev2

    hack-a-tack/FPGA_Logic_Analyzer

    (Info applies to rev. 1, update for later revisions (only final rev. matters in the README)) FPGA-based 8-channel logic analyzer implemented on iCE40UP5K.

    170 parts
  • 4 layers210.9 × 127 mmDual panel, the printed circuit board in 3D

    Dual panel

    fchorney/krakenpad-poc

    proof of concept and research into making kraken pad

    174 parts1
  • 4 layers140 × 104 mmRemram, the printed circuit board in 3D

    Remram

    hasenbanck/remram

    32bit STM32F7 based 3D printing controller using TMC2130 stepper driver

    264 parts40
  • 2 layers88.9 × 50.8 mmBLDC BIZ CARD, the printed circuit board in 3D

    BLDC BIZ CARD

    ageppert/Brushless-Motor-Biz-Card

    A brushless motor and driver built in to a business card form-factor for learning and experimenting!

    82 parts38MIT
  • 2 layers75.9 × 50.1 mmSuspension telemetry, the printed circuit board in 3D

    Suspension telemetry

    porast1/suspension-telemetry

    Suspension telemetry system for mountain bike or dirt bike

    77 parts14MIT
  • 4 layers165 × 50 mmHUB0402, the printed circuit board in 3D

    HUB0402

    jobitjoseph/All-in-one-USB-3.1-Hub-for-EE-Engineers

    311 parts8
  • 2 layers178.6 × 66 mmESP32S3comV3.2, the printed circuit board in 3D

    ESP32S3comV3.2

    leeyumsk/IRL-Subtitles

    Using techniques similar to human perception to localize sounds and speakers.

    69 parts2
  • 2 layers40 × 70 mmKinetiCoreDC, the printed circuit board in 3D

    KinetiCoreDC

    axpaul/KinetiCoreDC

    Compact STM32G0-based DC motor controller board featuring TI DRV8874 H-bridge drivers, RS485 communication, optoisolated I/O, and hardware power protection.

    183 parts1CERN-OHL-S-2.0

Questions

How big is the Master Matrix 4x4 PCB?

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

What parts does the Master Matrix 4x4 use?

79 parts, built around the SN74AHCT1G125DBVR(UMW), SMAJ5.0A and OS102011MA1QN1. 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 Master Matrix 4x4 KiCad files?

From the Narawit-Intusub/Board-Game repository on GitHub, at the commit this page was made from: the board is hardware/master/Master_Matrix_4x4.kicad_pcb and its schematic hardware/master/Master_Matrix_4x4.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Master Matrix 4x4 design in my own project?

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