Skip to the content
PCBKitNew board
2 layers100 × 100 mm5x5, the printed circuit board in 3D

A custom 5x5 keyboard

Size
100 × 100 mm
Copper layers
2
Thickness
1.6 mm
Parts
92
Nets
62
Pads
337
Tracks, vias
494, 44
Pours
2
Routed
Yes
KiCad
KiCad 4
Created
15 Jan 2016
Updated
3 Apr 2022

Overview

5x5 is an open-source printed circuit board by dijkstrw, from the dijkstrw/5x5 repository on GitHub. It is a 2-layer board of 100 × 100 mm with 92 parts on 62 nets, routed with 494 tracks and 44 vias.

It is built around the STM32F103C8T6 and LD1117S33CTR-HXY. Its parts include 28 diodes, 25 switches, 13 capacitors, 11 resistors and 4 connectors. It belongs with the keyboards and input boards and the STM32 boards of this library.

Main components

2

README

README.md

5x5 aka Gojira!

This is my first custom keyboard, a 5x5 cherry mx matrix based on the STM32F1 with libopencm3. The project contains firmware, schematics and a board layout in kicad.

Board Front Picture

This project is intended as a platform for custom keyboard development. It supports:

  • usb keyboard scancodes
  • bios boot and nkro
  • system / consumer codes
  • generation of mouse events
  • usb serial interface
  • an automouse mode for fast-clicking
  • programmable macro keys via serial
  • storing current configuration in "userflash"

The board is programmed using a 6-pin TagConnect, that must be wired to a STM Discovery SWD/STLink programming port.

Building

text
git submodule init
git submodule update
make -C libopencm3
make

Features

Keyboards

The board provides 3 types of keyboards via different usb endpoints.

  1. The first is the usb standard bios keyboard definition, which allows the keyboard also to emit key codes to hosts with limited usb hid support. (This used to be the case in <2015 style bioses, hence the name.)

  2. The second keyboard is a n-key-rollover, which exposes a keyboard that allows 224 usb keyboard scancodes to be pressed simultaneously. Also, because we do not need to adhere to the bios boot standard, this endpoint's interval can set much lower = it types much faster.

  3. The third keyboard can emit so called consumer and system codes. Example consumer key codes are PLAY, PAUSE, but also MARK, CLEARMARK, REPEATFROMMARK. So everything the typical multimedia keys emit and then some.

Mouse

Operate the rodent from your keyboard! There is support for x, y, 5 buttons and a vertical and horizontal scrollwheel action.

Serial

The board exposes a serial port for logging, and configuration. Commands available are:

text
? - show a terse description of available commands.

i - show usb info strings; contains the git-describe tag of the
    current firmware, so mission critical to some, useless to
    everybody else.

d - dump the keymap(s).

K - redefine a key in the keymap, takes a hexadecimal argument of
    the form <layer><row><column><type><arg1><arg2><arg3>, with each
    argument being 2 digits long.

m - clear all macro keys.

M - define one macro key, takes an argument of the form
    <number><oftenusedstring>. The number is a two hexdigits, the
    string can be upto 32 7-bit ascii chars long and is terminated
    with a newline.

n - set keyboard mode to bios (default).

N - set keyboard mode to nkro.

R - read configuration from flash

Command interpretation starts after receiving a newline.

Automouse

Automouse is a mouse clicker, with optional speed setting and wiggle amounts. This allows you to click real fast, and wiggle the mouse while using your hands for something else.

Macros

Macros set via serial are lost at power off unless the configuration is written to flash. Loading from flash happens automatically at powerup.

The strings that you provide via serial need to be translated into usb keycodes, so currently only 7-bit ascii strings are supported.

Setting macros via the shell is easy:

text
echo -e "\nM01Nevergonnagiveyouup!\n" > /dev/ttyACM0

Notes:

  • The initial newline is a trick to make sure our M will be considered the start of a command, no matter what has been put to the serial before by you, some driver or the os.
  • This particular example defines the macro for macro key number 1.
  • You need to have a macro key 1 in your keymap, otherwise you have nothing to trigger the macro.

Parts

92
QtyValueFootprintReferences
251N4148WD_Packages:CHERRY_MX_DIODED11, D12, D13, D14, D15, D21, D22, D23, D24, D25, D31, D32, D33, D34, D35, D41 +9
25SWWD_Packages:CHERRY_PCB_100HSW11, SW12, SW13, SW14, SW15, SW21, SW22, SW23, SW24, SW25, SW31, SW32, SW33, SW34, SW35, SW41 +9
5100nCapacitors_SMD:C_0805C3, C4, C5, C11, C13
31kResistors_SMD:R_0805R5, R6, R7
3Led_SmallLEDs:LED-0805D1, D2, D3
210uCapacitors_SMD:C_1206C2, C12
21uCapacitors_SMD:C_1206C6, C10
220pCapacitors_SMD:C_0805C8, C9
222Resistors_SMD:R_0805R3, R4
24k7Resistors_SMD:R_0805R10, R11
10Resistors_SMD:R_0805R2
1100nCapacitors_SMD:C_1206C1
110kResistors_SMD:R_0805R1
116MCrystals:Crystal_HC49-U_VerticalY1
11k5Resistors_SMD:R_0805R8
11nCapacitors_SMD:C_1206C7
133Resistors_SMD:R_0805R9
1I2CIWD_Packages:Harwin-M702-230642P5
1I2COWD_Packages:Harwin-M702-230642P6
1JTAG_SWDPWD_Packages:TC2030-IDC-NLP1
1LD1117S33CTRTO_SOT_Packages:SOT-223U3
1LOGOWD_Packages:gojiraG***
1MAX3207EHousings_SOT-23_SOT-143_TSOT-6:SOT-23-6U1
1STM32F103C8Housings_QFP:LQFP-48_7x7mm_Pitch0.5mmU2
1SWPin_Headers:Pin_Header_Straight_1x02RESET
1USB-BWD_Packages:FCI-10118193-0001LFP2
1beadCapacitors_SMD:C_0805L1

The 88 most common of 92 parts.

Questions

How big is the 5x5 PCB?

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

What parts does the 5x5 use?

92 parts, built around the STM32F103C8T6 and LD1117S33CTR-HXY. 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 5x5 KiCad files?

From the dijkstrw/5x5 repository on GitHub, at the commit this page was made from: the board is schematic/5x5.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the 5x5 design in my own project?

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

Similar boards

  • 2 layers47.6 × 30.6 mmProgramator spi, the printed circuit board in 3D

    Programator spi

    internax/ukol_divelit

    Původní záměr byl použít ZIF socket, ten se však pro pDIP8 pouzdro prakticky nevyrábí. Zvolil jsem proto přesnou patici z doporučených komponent. Klíčovými kritérii byl nízký odpor kontaktů a zlaté pokovení pinů.

    42 partsMIT
  • 4 layers70.1 × 71 mmMixed signal board, the printed circuit board in 3D

    Mixed signal board

    YJM00/Mixed-Signal-Board-PI-SI-PCB-

    즉, 이 프로젝트는 단순 회로 작성이 아니라 System-level Requirement를 기반으로 실제 제작 가능한 형태의 STM32 Mixed-Signal 보드를 설계한 HW 설계 프로젝트입니다.

    188 parts
  • 2 layers77 × 100 mmBeamer1, the printed circuit board in 3D

    Beamer1

    shufps/diy-projector-clock

    DIY Projector Clock

    283 parts172
  • 4 layers72.4 × 95.3 mmDingoPDM, the printed circuit board in 3D

    DingoPDM

    corygrant/dingoPDM

    Hardware - dingoPDM is an open source, affordable automotive PDM (Power Distribution Module). Pre-assembled and tested units are available or the design can be used to build a DIY version.

    156 parts128MIT
  • 4 layers43.4 × 25.4 mmR820t2 breakout, the printed circuit board in 3D

    R820t2 breakout

    emeb/r820t2

    Breakout PCB design and STM32F0 firmware for the Rafael R820T2 tuner chip

    83 parts85
  • 4 layers40 × 40 mmCANBoard, the printed circuit board in 3D

    CANBoard

    corygrant/CANBoard

    Hardware - CAN enabled small input / output expansion board. Switch panels, steering wheel buttons/knobs, etc.

    83 parts53MIT
  • 2 layers19 × 106 mmPetRockMain1, the printed circuit board in 3D

    PetRockMain1

    jsenzel1/petrock

    Eurorack components and footprints for KiCad.

    117 parts48
  • 2 layers74.8 × 84.7 mm4chord midi, the printed circuit board in 3D

    4chord midi

    sgreg/4chord-midi

    The 4chord USB MIDI Keyboard

    63 parts36