Skip to the content
2 layers97.2 × 112.7 mmComplexCalc, the printed circuit board in 3D

Standalone embedded complex n×n linear system solver (Gauss-Jordan, 2x2-4x4) on a custom STM32F411 PCB with a 4x4 keypad and ILI9341 TFT — no PC required

Size
97.2 × 112.7 mm
Copper layers
2
Thickness
1.6 mm
Parts
50
Nets
56
Pads
269
Tracks, vias
736, 33
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
29 Aug 2026
Updated
5 Nov 2026

Overview

ComplexCalc is an open-source printed circuit board by UAA-F14, from the UAA-F14/ComplexCalc-HW repository on GitHub. It is a 2-layer board of 97.2 × 112.7 mm with 50 parts on 56 nets, routed with 736 tracks and 33 vias.

It is built around the AMS1117-3.3. Its parts include 25 switches, 10 capacitors, 6 resistors, 5 connectors and 2 ICs. It belongs with the STM32 boards of this library.

Main components

1

README

README.md

ComplexCalc — Hardware Version 🔌⚡

A standalone embedded calculator for complex n×n linear systems (Ax=b) — no PC required at runtime. Custom STM32F411 PCB with a 16-button keypad and an ILI9341 TFT display, built for electronics students and AC circuit analysis.

[!NOTE] Work in progress. Firmware is functional (keypad input, TFT UI, Gauss-Jordan solver); the PCB is still being routed (some ADC connections are pending — see Design).


📁 Repository Structure

text
├── code/
│   └── 06ComplexCalcDasProject/   # STM32CubeIDE / CMake firmware project
│       ├── Core/
│       │   ├── Inc/               # ComplexGJ.h (solver), TFT_Screen.h, display_ui.h, ...
│       │   └── Src/                # SWComplexGJ.c (solver), TFT_Screen.c, display_ui.c, main.c, ...
│       └── Drivers/                # Vendored STM32 HAL + CMSIS (ST-generated, not project code)
├── design/
│   └── ComplexCalc/                # KiCad schematic + PCB (in progress)
└── README.md

The actual project logic lives in Core/Inc / Core/Src; everything under Drivers/ is STM32CubeMX-generated boilerplate.


🎯 Overview

  • MCU: STM32F411C(C/E)U (Cortex-M4, UFQFPN48) — the same chip used on "BlackPill" dev boards, but here on a custom PCB, you can use the minimum sistem or insert a blackpill in the socket, it works either way.
  • Display: ILI9341 TFT over SPI.
  • Input: 16-button matrix keypad (4×4), wired directly on the PCB.
  • Power: coin-cell battery holder + AMS1117-3.3 LDO regulator.
  • Solver: Gauss-Jordan elimination, single-precision (float) complex arithmetic, systems from 2×2 up to 4×4.

No serial terminal, USB host, or PC connection is needed to use the calculator — power it on, and the keypad + screen are the whole interface. (USB/SWD is only used to flash firmware.)


🚀 Build & Flash

Using STM32CubeIDE (recommended):

  1. Open STM32CubeIDE.
  2. File → Open Projects from File System.
  3. Select code/06ComplexCalcDasProject/.
  4. Build (Ctrl+B), then flash over USB/SWD (Ctrl+Alt+X).

Using CMake + the ARM GCC toolchain (also supported by this project):

bash
cd code/06ComplexCalcDasProject
cmake --preset Debug      # or: Release
cmake --build --build-preset Debug

This uses the project's own cmake/gcc-arm-none-eabi.cmake toolchain file — you'll need arm-none-eabi-gcc and ninja installed.


🎮 Usage

On power-up, the screen prompts for the system size (2–4). From there:

InputAction
0–9Enter digits (toggles between real/imaginary part)
=Confirm entry / advance
S + P (combo)Cycle display theme

Once the full A matrix and b vector are entered, the solver runs on-device and the result is shown on screen — no PC needed.


🧮 Solver Details

  • Algorithm: Gauss-Jordan elimination (solve_complex_system in ComplexGJ.h/SWComplexGJ.c).
  • Precision: single-precision float, EPSILON = 1e-7 for singularity checks.
  • Maximum size: 4×4 (N_MAX), matching the keypad-driven size range (2–4).
  • Error handling: returns SOLVER_ERR_INVALID_SIZE / SOLVER_ERR_SINGULAR for out-of-range sizes or singular matrices.

🖥️ Design (PCB)

KiCad project at design/ComplexCalc/ — schematic + PCB for the keypad, MCU, TFT header, and power circuitry.

PCB routing in progress

Routing in progress — some ADC-related connections are still pending. A rendered board image will replace this screenshot once the layout is finished.

A datasheet-vs-schematic power supply review (VCAP sizing, VBAT, NRST, HSE crystal value) is available at docs/ComplexCalc-HW_power_supply_review_en.pdf (Spanish version).


🤝 Contributing

  1. Firmware changes go in code/06ComplexCalcDasProject/Core/.
  2. PCB changes go in design/ComplexCalc/ (KiCad 8+).
  3. Open a PR against this repo.

📞 Issues

Report bugs or hardware questions via this repo's Issues.

Parts

50
QtyValueFootprintReferences
510kResistor_SMD:R_0805_2012MetricR4, R5, R6, R7, R8
4100nFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC9, C10, C11, C12
4MODButton_Switch_THT:SW_PUSH-12mmSW18, SW20, SW26, SW28
222pFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC5, C6
2Conn_01x20_SocketConnector_PinHeader_2.54mm:PinHeader_1x20_P2.54mm_VerticalJ4, J5
1-Button_Switch_THT:SW_PUSH-12mmSW10
1.Button_Switch_THT:SW_PUSH-12mmSW8
10Button_Switch_THT:SW_PUSH-12mmSW9
11Button_Switch_THT:SW_PUSH-12mmSW4
110uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC7
11uFCapacitor_SMD:C_0805_2012MetricC13
12Button_Switch_THT:SW_PUSH-12mmSW5
1220Resistor_SMD:R_0805_2012MetricR3
122uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC8
13Button_Switch_THT:SW_PUSH-12mmSW6
14Button_Switch_THT:SW_PUSH-12mmSW1
14.7uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC14
15Button_Switch_THT:SW_PUSH-12mmSW2
16Button_Switch_THT:SW_PUSH-12mmSW3
17Button_Switch_THT:SW_PUSH-12mmSW13
18Button_Switch_THT:SW_PUSH-12mmSW14
18MHzCrystal:Crystal_SMD_EuroQuartz_MQ2-2Pin_7.0x5.0mmY1
19Button_Switch_THT:SW_PUSH-12mmSW15
1<Button_Switch_THT:SW_PUSH-12mmSW19
1<-Button_Switch_THT:SW_PUSH-12mmSW12
1=Button_Switch_THT:SW_PUSH-12mmSW7
1>Button_Switch_THT:SW_PUSH-12mmSW27
1AMS1117-3.3Package_TO_SOT_SMD:SOT-223-3_TabPin2U2
1Conn_01x09Display:CR2013-MI2120J2
1LEDLED_SMD:LED_0603_1608MetricD1
1MButton_Switch_THT:SW_PUSH-12mmSW16
1OKButton_Switch_THT:SW_PUSH-12mmSW23
1STLINKConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ3
1STM32F411CEUxPackage_DFN_QFN:QFN-48-1EP_7x7mm_P0.5mm_EP5.6x5.6mmU3
1V_BatteryConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ1
1^Button_Switch_THT:SW_PUSH-12mmSW22
1delButton_Switch_THT:SW_PUSH-12mmSW11
1vButton_Switch_THT:SW_PUSH-12mmSW24

Similar boards

  • 2 layers290.1 × 130 mmPro V2, the printed circuit board in 3D

    Pro V2

    kata0510/Lily58

    6×4+4keys column-staggered split keyboard.

    312 parts2.3k
  • 2 layers26.2 × 45.5 mmPL18 multiprotocol, the printed circuit board in 3D

    PL18 multiprotocol

    pascallanger/DIY-Multiprotocol-TX-Module

    Multiprotocol TX Module (or MULTI-Module) is a 2.4GHz transmitter module which controls many different receivers and models.

    24 parts1.9kGPL-3.0
  • 4 layers99 × 53.3 mmPSLab, the printed circuit board in 3D

    PSLab

    fossasia/pslab-hardware

    PSLab Hardware Design and Schematics https://pslab.io

    199 parts1.7kApache-2.0
  • 4 layers85 × 56 mmPslab mini, the printed circuit board in 3D

    Pslab mini

    fossasia/pslab-mini-hardware

    PSLab Mini Hardware https://pslab.io

    182 parts1.2kApache-2.0
  • 4 layers100 × 54 mm32Bit shift register, the printed circuit board in 3D

    32Bit shift register

    MaltWhiskey/Mega-Cube

    16x16x16 PL9823 Cube with Teensy 4.0 and FlexIO driver

    64 parts766
  • 2 layers44.2 × 29.3 mmI2c tiny usb, the printed circuit board in 3D

    I2c tiny usb

    harbaum/I2C-Tiny-USB

    Cheap and simple I²C to USB interface

    27 parts454
  • 2 layers78 × 60 mmIce viz, the printed circuit board in 3D

    Ice viz

    muni-works/vcad

    BRep CAD kernel in Rust/WASM

    44 parts442Apache-2.0
  • 2 layers59.1 × 99.9 mmCheap FOCer 2 60mm, the printed circuit board in 3D

    Cheap FOCer 2 60mm

    shamansystems/Cheap-FOCer-2

    Low-Cost Motor Controller based on the VESC 6

    193 parts407

Questions

How big is the ComplexCalc PCB?

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

What parts does the ComplexCalc use?

50 parts, built around the AMS1117-3.3. 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 ComplexCalc KiCad files?

From the UAA-F14/ComplexCalc-HW repository on GitHub, at the commit this page was made from: the board is design/ComplexCalc/ComplexCalc.kicad_pcb and its schematic design/ComplexCalc/ComplexCalc.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the ComplexCalc design in my own project?

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