Skip to the content
4 layers95 × 150 mmEmbedded def, the printed circuit board in 3D

Embedded Connect Four system combining PIC assembly firmware, UART communication, a C++ solver, KiCad PCB design, electronics, and mechanical integration.

Size
95 × 150 mm
Copper layers
4
Thickness
1.6 mm
Parts
174
Nets
113
Pads
386
Tracks, vias
560, 37
Pours
4
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
5 Jul 2026
Updated
5 Jul 2026

Overview

Embedded def is an open-source printed circuit board by RomainMls, from the RomainMls/connect-four-embedded-system repository on GitHub. It is a 4-layer board of 95 × 150 mm with 174 parts on 113 nets, routed with 560 tracks and 37 vias.

It is built around the 2STR1160. Its parts include 42 resistors, 22 diodes, 12 capacitors, 11 connectors and 8 ICs.

Main components

1

README

README.md

Connect Four Embedded System

This repository contains our project for the INFO2055-1 - Embedded System Project course. The goal was to build a complete embedded system able to physically play Connect Four against a human player.

The project combines several parts: mechanical design, electronics, PCB design, PIC assembly firmware, UART communication, and a C++ program used to compute the bot move.

Repository Structure

  • firmware/main/: main PIC assembly firmware for the PIC16F1789 microcontroller.
  • firmware/tests/: small test programs used to validate hardware components separately.
  • software/connect4solver/: C++ Connect Four solver and serial communication with the embedded system.
  • hardware/kicad/: final KiCad PCB project and interactive BOM.
  • docs/: tutorial, test PCB image and useful datasheets.

General Behavior

The human player drops a token into a column. Sensors detect the played column, then the PIC sends this information to the C++ program through UART. The solver computes the bot response and sends the column back. The embedded system then moves the mechanism and drops the bot token into the selected column.

The firmware handles, among other things:

  • column detection through sensors;
  • UART communication;
  • stepper motor control;
  • limit switch handling;
  • mechanism movement logic;
  • LED debug signals.

PIC Firmware

The main firmware file is:

text
firmware/main/main.asm

It targets the following microcontroller:

text
PIC16F1789

The files in firmware/tests/ were used to test hardware parts separately: motor, pump, laser, servomotor, UART, sensors, etc.

Connect Four Solver

The solver is located in:

text
software/connect4solver/

Build it with:

bash
cd software/connect4solver
make

Run it with a serial device path:

bash
./c4solver <device_path>

Example:

bash
./c4solver /dev/ttyUSB0

The program listens for moves sent by the PIC, updates the game state, computes the best move and sends back a one-byte encoded response.

Hardware

The hardware/kicad/ folder contains the final KiCad PCB project: schematic, PCB and interactive BOM.

Useful documents are stored in docs/datasheets/, including the PIC16F1789 datasheet and PDF schematics of the PCBs.

Contributions

  • Joachim Amandine: tests
  • Malaise Romain: the base, state machine of the PIC assembly code and most of the work on the assembly firmware.
  • Renard Baptiste: UART communication, C++ program and most of the work on the assembly firmware.
  • Schins Martin: all the modeling, the mechanical design, and part of the electronics.

In addition to individual work, we regularly met in person at the lab. Several full days were spent working together on integration, testing and improving the complete system.

Note

This repository is a student project archive. It keeps the final code, intermediate hardware tests, hardware files and useful documentation needed to understand the complete system.

Parts

174
QtyValueFootprintReferences
1210KResistor_SMD:R_1206_3216MetricR20, R22, R24, R26, R28, R30, R32, R34, R40, R42, R44, R46
10WL-SMCW_1206Led SMD 1206:WL-SMCW_1206D1, D17, D18, D20, D21, D22, D23, D24, D25, D26
91 KResistor_SMD:R_1206_3216MetricR23, R27, R31, R35, R39, R43, R47, R48, R49
81 KPCM_4ms_Resistor:R_1206_3216MetricR50, R51, R52, R53, R54, R55, R58, R59
8WL-SWTPLed SMD 1206:WL-SMCW_1206D12, D13, D14, D15, D16, D19, D27, D28
7180 µFWCAP-ATG8 - 47 uF:WCAP-ATG8_6.3X11_DXL_C5, C7, C8, C9, C10, C11, C14
72STR11602STR1160:SOT105P242X150-3NIC1, IC2, IC3, IC4, IC5, IC6, IC7
7PNP_1WR-MPC4-4.2mm -4 pins:64900421122PNP_1, PNP_2, PNP_3, PNP_4, PNP_5, PNP_6, PNP_7
6100KResistor_SMD:R_1206_3216MetricR21, R25, R29, R33, R41, R45
41N4007W-T1N4007:SODFL3818X130ND2, D3, D4, D5
4691210910003WR-TBL 2.54:691210910003J9, J10, J13, J14
310KPCM_4ms_Resistor:R_1206_3216MetricR9, R36, R38
20402_885012105001Capacitor_SMD:C_1808_4520Metric_Pad1.72x2.30mm_HandSolderC3, C12
20402_885012105001Capacitor_SMD:C_1206_3216MetricC1, C2
21 KResistance SMD 1206:RESC3115X64NR56, R57
224.243.124.243.1:242431J3, J4
23557-2FUSE -35557-2:FUSE_3557-2_CHINA VERSIONF1, F2
2Conn_01x20Connector_PinHeader_2.54mm:PinHeader_1x20_P2.54mm_VerticalJ2, J6
2G***kibuzzard-69EC9204kibuzzard-69EC9204, kibuzzard-69EC9204
2G***kibuzzard-69EC925Ekibuzzard-69EC925E, kibuzzard-69EC925E
2G***kibuzzard-69EBE619kibuzzard-69EBE619, kibuzzard-69EBE619
10402_885012105001PCM_Capacitor_SMD_AKL:C_1206_3216MetricC13
1100KPCM_4ms_Resistor:R_1206_3216MetricR37
11KPCM_4ms_Resistor:R_1206_3216MetricR1
13.0 AChoke Filter 30uH:WE-CMB_NIZN_XSL1
1430783034816Tactile Switch SMD:430783034816S1
1472123010111Switch_THT:SW_Wurth_WS-TOTV_472123010111SW1
1649002127222Connector_THT_Wurth:J_Wurth_WR-MPC4_649002127222J7
1649003121732Connector_THT_Wurth:J_Wurth_WR-MPC4_64900311122J11
1649004121732Connector_THT_Wurth:J_Wurth_WR-MPC4_649004121732J12
1DRV8825_STEPPER_MOTOR_DRIVER_CARRIERDRV8825:IC_DRV8825_STEPPER_MOTOR_DRIVER_CARRIERU3
1G***kibuzzard-69EE3E94kibuzzard-69EE3E94
1G***kibuzzard-69ECAE7Bkibuzzard-69ECAE7B
1G***kibuzzard-69EBDF7Dkibuzzard-69EBDF7D
1G***kibuzzard-69EE007Fkibuzzard-69EE007F
1G***kibuzzard-69EE00FEkibuzzard-69EE00FE
1G***kibuzzard-69EC91E1kibuzzard-69EC91E1
1G***kibuzzard-69EE00A0kibuzzard-69EE00A0
1G***kibuzzard-69EC933Ckibuzzard-69EC933C
1G***kibuzzard-69EBE667kibuzzard-69EBE667
1G***kibuzzard-69ECC472kibuzzard-69ECC472
1G***kibuzzard-69EC92C1kibuzzard-69EC92C1
1G***kibuzzard-69EBDDA0kibuzzard-69EBDDA0
1G***kibuzzard-69EE1CC6kibuzzard-69EE1CC6
1G***kibuzzard-69EBE4F1kibuzzard-69EBE4F1
1G***kibuzzard-69EE0121kibuzzard-69EE0121
1G***kibuzzard-69EC935Fkibuzzard-69EC935F
1G***kibuzzard-69EBE63Bkibuzzard-69EBE63B
1G***kibuzzard-69EC92EAkibuzzard-69EC92EA
1G***kibuzzard-69EC9352kibuzzard-69EC9352
1G***kibuzzard-69EE0020kibuzzard-69EE0020
1G***kibuzzard-69ECAE6Ckibuzzard-69ECAE6C
1G***kibuzzard-69EC92D6kibuzzard-69EC92D6
1G***kibuzzard-69EE015Ekibuzzard-69EE015E
1G***kibuzzard-69EBE672kibuzzard-69EBE672
1G***kibuzzard-69EC92F0kibuzzard-69EC92F0
1G***kibuzzard-69EBE50Ckibuzzard-69EBE50C
1G***kibuzzard-69EE0113kibuzzard-69EE0113
1G***kibuzzard-69EC9B70kibuzzard-69EC9B70
1G***kibuzzard-69EE3EC3kibuzzard-69EE3EC3
1G***kibuzzard-69EE008Bkibuzzard-69EE008B
1G***kibuzzard-69ECAE3Ckibuzzard-69ECAE3C
1G***kibuzzard-69EE1C16kibuzzard-69EE1C16
1G***kibuzzard-69EC92E3kibuzzard-69EC92E3
1G***kibuzzard-69EE00DFkibuzzard-69EE00DF
1G***kibuzzard-69EDFFE9kibuzzard-69EDFFE9
1G***kibuzzard-69EE003Akibuzzard-69EE003A
1G***kibuzzard-69EC9347kibuzzard-69EC9347
1G***kibuzzard-69EE3EA6kibuzzard-69EE3EA6
1G***kibuzzard-69EE1C04kibuzzard-69EE1C04
1G***kibuzzard-69EE0031kibuzzard-69EE0031
1G***kibuzzard-69EBE658kibuzzard-69EBE658
1G***kibuzzard-69EC936Bkibuzzard-69EC936B
1G***kibuzzard-69EC92A9kibuzzard-69EC92A9
1G***kibuzzard-69EE00EFkibuzzard-69EE00EF
1G***kibuzzard-69EBDDE2kibuzzard-69EBDDE2
1G***kibuzzard-69ECAE84kibuzzard-69ECAE84
1G***kibuzzard-69EE0164kibuzzard-69EE0164
1G***kibuzzard-69EBDDD2kibuzzard-69EBDDD2
1G***kibuzzard-69EDFFD6kibuzzard-69EDFFD6

The 162 most common of 174 parts.

Similar boards

  • 4 layers81.2 × 96.6 mmKv4p ht PANEL, the printed circuit board in 3D

    Kv4p ht PANEL

    VanceVagell/kv4p-ht

    Open source handheld ham radio project KV4P-HT

    174 parts828GPL-3.0
  • 4 layers120 × 70 mmMaster circuit, the printed circuit board in 3D

    Master circuit

    csiz/hex-single-motor-mini-drive

    FOC driver for a single BLDC motor.

    174 parts9MIT
  • 4 layers90 × 45 mmBMS LV 2022, the printed circuit board in 3D

    BMS LV 2022

    PUT-Motorsport/PUTM_EV_BMS_LV

    174 parts8Apache-2.0
  • 4 layers127.5 × 51.5 mmEMIsniffer, the printed circuit board in 3D

    EMIsniffer

    evabits/EMI_sniffer_beursgadget_WOTS_2026

    Schematics. Layout and Firmware of the WOTS2026 beursgadget.

    174 parts7MIT
  • 4 layers86.4 × 69.9 mmF28377S, the printed circuit board in 3D

    F28377S

    LE-TOM/TMS320F28377S-

    使用176管脚的TMS320F28377S为主控引出来12路PWM和所有的模拟输入端口

    174 parts6
  • 4 layers160 × 65 mmCapybara rocket, the printed circuit board in 3D

    Capybara rocket

    adam-kabbara/RSX-CANSAT-2026

    This is a repository design to manage the files made by the Aerial team under the Robotics for Space eXploration design team at the University of Toronto

    174 parts4
  • 4 layers70 × 116 mmPanel, the printed circuit board in 3D

    Panel

    Dennis960/Blumy

    A smart, WiFi-enabled ESP32 soil moisture and plant sensor

    174 parts3

Questions

How big is the Embedded def PCB?

It measures 95 × 150 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Embedded def use?

174 parts, built around the 2STR1160. 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 Embedded def KiCad files?

From the RomainMls/connect-four-embedded-system repository on GitHub, at the commit this page was made from: the board is hardware/kicad/Embedded_def.kicad_pcb and its schematic hardware/kicad/Embedded_def.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Embedded def design in my own project?

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