Skip to the content
2 layers50 × 18 mmMajestouch stm32, the printed circuit board in 3D

Drop-in replacement controller for the full-size Filco Majestouch: STM32F072, QMK with NKRO over USB. KiCad 9 board, hand-solderable.

Size
50 × 18 mm
Copper layers
2
Thickness
1.6 mm
Parts
20
Nets
51
Pads
125
Tracks, vias
209, 23
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
30 Sep 2026
Updated
22 Oct 2026

Overview

Majestouch stm32 is an open-source printed circuit board by mbtech-nl, from the mbtech-nl/majestouch-stm32 repository on GitHub, published under the MIT licence. It is a 2-layer board of 50 × 18 mm with 20 parts on 51 nets, routed with 209 tracks and 23 vias.

It is built around the STM32F072CBT6, AP2112K-3.3 and USBLC6-2SC6. Its parts include 9 capacitors, 4 resistors, 4 connectors and 3 ICs. It belongs with the keyboards and input boards and the STM32 boards of this library.

Main components

3

README

README.md

majestouch-stm32

A drop-in replacement controller for the full-size Filco Majestouch, built around an STM32F072. It replaces the stock daughterboard, plugs into the same 36-pin header on the main PCB and runs QMK; the QMK keyboard definition is included.

Download: the latest release has everything needed to build the controller: the Gerber package to order the board from any PCB fab, the parts list (BOM) and the ready-built QMK firmware (.bin). See Making one for how to order, assemble and flash it.

Component side: STM32F072 at 45 degrees between the two header rows, USB ESD chip, LDO and LED resistors Outward side: decoupling capacitors, BOOT and RST jumper holes, name, version and a QR code to this repository

Component side (faces the main PCB) and outward side, rendered from the KiCad board.

Background

My 2010 Majestouch was getting on, so I went looking for a replacement. Nothing on offer today quite suited my taste, and every switch still worked. Maybe a good clean and a fresh set of keycaps would hold me over for the next 15 years?

Still, all those modern keyboards did NKRO over USB, and that reminded me: mine used to do NKRO too, back when it was plugged in over PS/2. PS/2 left my desk a long time ago, and over USB the stock controller only does 6KRO. Reading up on it, I came across the Kitten Paw (ATmega32U2 + 74HC154), the replacement controller for Costar boards such as the Filco, about a decade after everyone else did. I also found Majestouch-2-TKL-Replacement-Controller, which does the same for the Majestouch 2 TKL with an STM32.

So I designed my own replacement controller, taking that STM32 approach to the full-size board. It's my first open source hardware project, and the design turned out to be quite straightforward. Did I need NKRO? Honestly, I never noticed it was missing. Am I happy with the result? Definitely.

The board keeps it simple:

  • STM32F072CBT6: crystal-less USB (HSI48 + clock recovery), internal flash, ROM bootloader with USB DFU, and 5 V-tolerant pins for the lock LEDs. All 26 matrix lines are scanned directly, with no decoder chip.
  • NKRO over USB (on by default in the QMK definition), where the stock controller only did 6KRO over USB.
  • 16 components, LQFP-48 and 0603/0805 passives: hand-solderable.
  • USB ESD protection (USBLC6-2SC6) and a 3.3 V LDO (AP2112K-3.3).
  • 50 × 18 mm, 2 layers, standard process at any PCB fab.

Compatibility

Built for and measured on a full-size ANSI Majestouch with main PCB CST 104/5/6 Main PCBA Rev 1.2 and stock daughterboard CST-DAUGHTER PCBA Rev 3.1 ESD.

The full-size Filcos below share the same 36-pin header and matrix according to deskthority, and the Kitten Paw is listed for the same main PCBs, so they are expected to work, but are untested with this board:

KeyboardMain PCB
Majestouch (FKBN104/105)CST-FKB/N-104/5/6 Main PCBA Rev 1.0 / 1.2 (2010)
Majestouch Linear RCST-F104/5/6/8 Main PCB Rev 2.1 (2010)
Majestouch 2CST-F104/5/6/8 Main PCB Rev 3.0 (2012)

Full NKRO needs a diode per key. Filco marks those boards with an N in the model code (FKBN…, "N-key rollover using separate diodes"); the cheaper 2KRO models without it work too, but ghost on some key combinations.

Compare your stock controller with the pinout below before fitting. The QMK definition has the ANSI layout; ISO boards work electrically, but the two extra ISO keys need a layout of your own. The Majestouch TKL uses a different header and does not fit.

Repository

text
kicad/                       KiCad 9 project (schematic, board, design rules)
firmware/majestouch_stm32/   QMK keyboard definition
tools/check.py               validation: schematic, firmware pins and board
tools/fab.py                 fabrication package (Gerbers, drill, BOM)
docs/                        board renders, photos of the stock controller

tools/check.py checks the schematic against the STM32 datasheet pinout and the Filco header map, checks that every pin in the QMK definition lands on the right net, and runs KiCad's design rule check on the board. It needs KiCad 9 (kicad-cli and the pcbnew Python module).

Header pinout

From the Filco Majestouch table on deskthority's controller matrix traces page, cross-checked pin for pin against the Kitten Paw schematic. The component side faces the main PCB; seen from that side, pin 1 is top-right, pins 1–18 run right to left, and pin 19 sits directly below pin 1.

PinSignalSTM32PinSignalSTM32
1COL0PA519ROW_KPA3
2ROW_APA620COL1PA2
3ROW_BPA721ROW_LPA1
4ROW_CPB022COL2PA0
5ROW_DPB123COL3PF1
6ROW_EPB224ROW_MPF0
7ROW_FPB1025ROW_NPC15
8ROW_GPB1126ROW_OPC14
9ROW_HPB1227ROW_PPC13
10ROW_IPB1328ROW_QPB9
11ROW_JPB1429COL4PB8
12GND30ROW_RPB7
13USB D+ESD → PA1231COL5PB6
14USB D−ESD → PA1132COL6PB5
15n/c33COL7PB4
16n/c34LED Num LockPB3
17n/c35LED Caps LockPA15
18VBUSLDO in36LED Scroll LockPA14

Pins 15 and 16 are tied to GND on the main PCB; this board leaves 15–17 unconnected.

Stock Filco controller installed in the keyboard, solder side up, next to the lock LEDs and the USB cable connector Stock Filco controller removed, component side: Holtek MCU, crystal and the two header rows CON2 (pins 1-18) and CON1 (pins 19-36)

The stock controller this board replaces: installed, solder side up, next to the lock LEDs and the USB cable connector; and removed, component side, oriented like the render above (CON2 = pins 1–18 on top, pin 1 at the right).

Circuit

  • USB: D+/D− pass through the USBLC6-2SC6 flow-through (in on pins 1/3, out on 6/4), so no route bypasses the clamp. The STM32's internal pull-up handles D+.
  • Power: VBUS → AP2112K-3.3. Each MCU supply pin has its own decoupling cap: 1 µF + 10 nF on VDDA, 100 nF on VDD, VDDIO2 and VBAT.
  • Matrix: 18 rows driven, 8 columns read (QMK COL2ROW). The main PCB has no pull-ups to 5 V on the matrix lines, so the 3.6 V-only pins (PA0–PA7, PB0/PB1) are safe.
  • Lock LEDs: the LED anodes sit on +5 V on the main PCB. The MCU sinks each LED through a 10 k resistor from a 5 V-tolerant pin in open-drain mode, like the stock controller (~0.3 mA).
  • BOOT / RESET: 2.54 mm jumper holes. BOOT0 has a 10 k pull-down, NRST 100 nF to GND.

Board: 50 × 18 mm, 2 layers, 1.2 mm FR-4. 0.15 mm tracks and clearance (0.25 mm for power), 0.3 mm vias, GND pour on both sides. The MCU sits at 45° so each side fans out to one header row. ICs, C1 and the LED resistors are on the component side (facing the main PCB), the other passives on the outward side. The outward side carries the reference designators, BOOT/RST labels and a QR code linking to this repository.

Making one

Board

sh
cd tools
python3 check.py   # validate first
python3 fab.py

This builds kicad/fab/majestouch_stm32-gerbers-<rev>.zip (Gerbers and drill files, accepted by any PCB fab) plus bom.csv with the parts used and what an equivalent needs. Tagged releases have both attached, together with the QMK firmware, built and validated by GitHub Actions (.github/workflows/release.yml).

Order settings: 2 layers, FR-4, 1.2 mm (the stock board's thickness; 1.6 mm fits too), HASL lead-free or ENIG. The design stays within standard rules (0.15 mm track/space, 0.3 mm drills). If your fab prints an order number on the board (JLCPCB does by default), choose the option without it, so it doesn't land on the QR code. cpl.csv (pick-and-place) is only needed if the fab assembles the board.

Parts

RefPartPackage
U1STM32F072CBT6LQFP-48
U2AP2112K-3.3SOT-23-5
U3USBLC6-2SC6SOT-23-6
C14.7 µF0805
C210 µF0805
C3–C6, C9100 nF0603
C71 µF0603
C810 nF0603
R1–R410 k0603
J1, J22.0 mm pin header, 1 × 40 strip snapped to 2 × 18
J3, J42.54 mm 1 × 2 header (optional)

Any equivalent part works: X5R/X7R capacitors at 10 V or more, 1 % or 5 % resistors.

Assembly

U1, U2, U3, C1 and R2–R4 go on the component side, the other passives on the back; every part is labelled on the silkscreen. Mind the pin-1 triangles on U1, U2 and U3: U2 and U3 short VBUS to GND when rotated. Solder the pin headers last, with the plastic on the component side, then fit the board in place of the stock controller.

Firmware

Each release has a ready-built majestouch_stm32-qmk-<version>.bin with the default keymap; the release notes name the QMK version it was built with. To build it yourself, copy firmware/majestouch_stm32 into qmk_firmware/keyboards/, then:

sh
qmk compile -kb majestouch_stm32 -km default

First flash: bridge the BOOT jumper while plugging in USB (or bridge BOOT and tap RESET) to start the STM32's DFU bootloader, then qmk flash -kb majestouch_stm32 -km default, or for the release binary dfu-util -a 0 -d 0483:df11 -s 0x08000000:leave -D majestouch_stm32-qmk-<version>.bin. After that, hold Esc while plugging in to get back to the bootloader.

The default keymap is a standard full-size ANSI layout. The Caps/Num/Scroll LEDs follow the host's lock state.

Verified on the keyboard

Measured on the target keyboard before ordering:

  • outline and header position match the stock board (1:1 print);
  • no connection from VBUS to any matrix pin on the main PCB;
  • lock LED anodes on +5 V, active low;
  • enough height between the boards; stock board 1.2 mm thick.

Tested with the first board built from these files, in the same keyboard:

  • every key registers, including many keys at once (NKRO);
  • Num/Caps/Scroll LEDs follow the host's lock state;
  • first flash over BOOT + RST, later ones by holding Esc while plugging in.

The assembled board, component side: STM32F072, LDO, USB ESD chip, LED resistors and the two 2.0 mm header rows The board installed in the keyboard, outward side up, next to the lock LEDs and the USB cable connector

The stock Holtek controller above the new STM32 board: same size, same header

The first board: assembled, installed in place of the stock controller (oriented like the photo of the stock one above), and next to the stock controller it replaces. Forgive the prototype-quality soldering.

References

License

MIT, see LICENSE. This covers the hardware, the tools and the QMK keyboard definition. Firmware built with QMK includes QMK itself, which is GPL-2.0-or-later, so compiled binaries fall under the GPL.

Parts

20
QtyValueFootprintReferences
5100nFCapacitor_SMD:C_0603_1608MetricC3, C4, C5, C6, C9
410kResistor_SMD:R_0603_1608MetricR1, R2, R3, R4
110nFCapacitor_SMD:C_0603_1608MetricC8
110uFCapacitor_SMD:C_0805_2012MetricC2
11uFCapacitor_SMD:C_0603_1608MetricC7
14.7uFCapacitor_SMD:C_0805_2012MetricC1
1AP2112K-3.3Package_TO_SOT_SMD:SOT-23-5U2
1BOOTConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ3
1Filco 1-18Connector_PinHeader_2.00mm:PinHeader_1x18_P2.00mm_VerticalJ1
1Filco 19-36Connector_PinHeader_2.00mm:PinHeader_1x18_P2.00mm_VerticalJ2
1RESETConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ4
1STM32F072CBT6Package_QFP:LQFP-48_7x7mm_P0.5mmU1
1USBLC6-2SC6Package_TO_SOT_SMD:SOT-23-6U3

Similar boards

  • 2 layers51.4 × 39.9 mmClock, the printed circuit board in 3D

    Clock

    FBanna/Clock_pcb

    My Clock CAD files

    136 parts
  • 2 layers40 × 40 mmKunlun STM32 MCU Board, the printed circuit board in 3D

    Kunlun STM32 MCU Board

    project802/kunlun

    Technical information about the Kunlun keyboard

    40 parts
  • 2 layers242.9 × 95.3 mmVootington V4N V2, the printed circuit board in 3D

    Vootington V4N V2

    calvin-mcd/vootington

    analog V4N pcb

    344 parts6GPL-3.0
  • 2 layers100 × 100 mmTouchtron, the printed circuit board in 3D

    Touchtron

    lynaghk/touchtron

    Rust touchpad / usb experiments

    120 parts21
  • 2 layers171 × 50.5 mmCtrl M, the printed circuit board in 3D

    Ctrl M

    nuess0r/ctrl-M

    Replacement controller for the famous IBM Model M keyboard based on the STM32F072 microcontroller. Supported by QMK.

    39 parts20
  • 2 layers391.2 × 166.5 mmTakt11800, the printed circuit board in 3D

    Takt11800

    vuckale/takt11800

    Replacement PCB for Cherry G80 11800/Compaq MX 11800 keyboard using QMK firmware and VIA

    284 parts12CERN-OHL-S-2.0
  • 4 layers228.2 × 80.6 mmSnake pcb, the printed circuit board in 3D

    Snake pcb

    1000eyed/snake

    Repository for snake keyboard

    199 parts6
  • 4 layers100 × 50 mmChronolog, the printed circuit board in 3D

    Chronolog

    slemanz/chronolog

    STM32-based temperature data logger with RTC, NOR flash storage, LCD and Wi-Fi. Hardware and firmware.

    95 parts5

Questions

How big is the Majestouch stm32 PCB?

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

What parts does the Majestouch stm32 use?

20 parts, built around the STM32F072CBT6, AP2112K-3.3 and USBLC6-2SC6. 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 Majestouch stm32 KiCad files?

From the mbtech-nl/majestouch-stm32 repository on GitHub, at the commit this page was made from: the board is kicad/majestouch_stm32.kicad_pcb and its schematic kicad/majestouch_stm32.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Majestouch stm32 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).