Skip to the content
2 layers285 × 94.6 mmSgh60, the printed circuit board in 3D

USB HID keyboard firmware for tinygo

Size
285 × 94.6 mm
Copper layers
2
Thickness
1.6 mm
Parts
155
Nets
96
Pads
687
Tracks, vias
1,434, 60
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
9 Dec 2022
Updated
1 Nov 2026

Overview

Sgh60 is an open-source printed circuit board by sago35, from the sago35/tinygo-keyboard repository on GitHub, published under the MIT licence. It is a 2-layer board of 285 × 94.6 mm with 155 parts on 96 nets, routed with 1,434 tracks and 60 vias.

Its parts include 79 diodes, 69 switches and 2 ICs. It belongs with the keyboards and input boards and the RP2040, nRF52 and nRF5x and SAM D and SAM boards of this library.

README

README.md

USB HID Keyboard firmware for TinyGo

The API is not yet fixed.

The following are supported.

  • key input
    • squared matrix scan
    • matrix scan
    • duplex-matrix scan
    • rotary encoder
    • GPIO
    • UART
    • Shifter (tinygo.org/x/drivers/shifter)
  • layer feature by mod key
  • mouse click / mouse wheel
  • support TRRS (UART)
  • support Vial

Microcontrollers

The following microcontrollers are supported.

  • rp2040
  • nrf52840
  • samd51
  • samd21

Tutorial

Additional Resources

sgkb-0.4.0

text
# sgkb-0.4.0
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/sgkb/left/
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/sgkb/right/

# sgkb-0.3.0 or before
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/sgkb/left-0.3.0/
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/sgkb/right/
nameamount
Cherry MX / Kailh Choc V172
key cap (1u)68
key cap (1.5u)1
key cap (1.75u)1
key cap (2u)1
key cap (ISO-ENTER)1
Stabilizer (2u)2
diode 1N414872
xiao-rp20402
pin header 1x74
TRRS connector2
TRRS cable1

sg48key

text
tinygo flash --target xiao --size short --stack-size 8kb ./targets/sg48key/

sgh60

text
tinygo flash --target waveshare-rp2040-zero --size short --stack-size 8kb ./targets/sgh60/

wiokey-0.1.0

text
$ tinygo flash --target wioterminal --size short --stack-size 8kb ./targets/wiokey/
nameamount
Cherry MX / Kailh Choc V16
key cap6
diode 1N41486
wioterminal1
pin socket 2x202

sgkey-0.1.0

text
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/sgkey/
nameamount
Cherry MX / Kailh Choc V16
key cap6
diode 1N41486
xiao-rp20401
i2c ssd13061
register 10k ohm2

fric10key-0.1.0

text
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/fric10key/
nameamount
Cherry MX / Kailh Choc V127
key cap (1u)26
key cap (2u)1
Stabilizer (2u)1
diode 1N414827
xiao-rp20401

xiao-kb01

text
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/xiao-kb01/

Gopher Badge

text
$ tinygo flash --target gopher-badge --size short --stack-size 8kb ./targets/gopher-badge/

GoBadge / PyBadge

text
$ tinygo flash --target gobadge --size short --stack-size 8kb ./targets/gobadge

MacroPad RP2040

text
$ tinygo flash --target macropad-rp2040 --size short --stack-size 8kb ./targets/macropad-rp2040/

Restore default keymap

Set the key with the key code of 0x7C03, and then press it.
Then a reset will restore the default keymap.
See #8.

Restore default keymap (tinygo flash)

Restore default keymap each time it is reset by specifying --tags reset_to_default.
Note that in this setting, any changes made from Vial or other sources will immediately revert to the original setting.

text
$ tinygo flash --target wioterminal --size short  --tags reset_to_default ./targets/wiokey

Note

  • Basically, the --stack-size 8kb settings is required.
  • If changing the version of tinygo-keyboard causes it to not work properly, please perform the Restore default keymap procedure.

LICENSE

MIT

Parts

155
QtyValueFootprintReferences
791N4148foostan/kbd:D3_SMD_v2D1, D2, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D20, D21, D22, D23 +63
67SW_PUSHfoostan/kbd:CherryMX_HotswapS0, S1, S2, S10, S11, S12, S13, S14, S15, S16, S17, S18, S19, S20, S21, S22 +51
3MountingHolexiao:hole_2.5H1, H2, H3
2MountingHolexiao:hole_7x3H4, H5
1SW_PUSHxiao:CherryMX_Hotswap_with_2u_stabilizerS42
1SW_PUSHxiao:CherryMX_Hotswap_with_ISO_Enter_stabilizerS28
1~xiao:RP2040-Zero_reverse_for_sgh60U1
1~xiao:RKJXV122400RU2

More from sago35/tinygo-keyboard

7
  • 2 layers242.9 × 76.2 mmSg48key, the printed circuit board in 3D

    Sg48key

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    110 parts119MIT
  • 2 layers174 × 96 mmSgkb right, the printed circuit board in 3D

    Sgkb right

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    100 parts119MIT
  • 2 layers134 × 96 mmSgkb, the printed circuit board in 3D

    Sgkb

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    75 parts119MIT
  • 2 layers77 × 140 mmFric10key, the printed circuit board in 3D

    Fric10key

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    63 parts119MIT
  • 2 layers90 × 90 mmXiao kb01, the printed circuit board in 3D

    Xiao kb01

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    55 parts119MIT
  • 2 layers91 × 55 mmSgkey, the printed circuit board in 3D

    Sgkey

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    22 parts119MIT
  • 2 layers126 × 57 mmWiokey, the printed circuit board in 3D

    Wiokey

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    16 parts119MIT

Similar boards

  • 2 layers121.5 × 136.5 mmStm32, the printed circuit board in 3D

    Stm32

    eddyem/stm32samples

    Code samples and ready projects based on bare-metal STM32

    155 parts208
  • 2 layers305.9 × 135.1 mmGigan rev2, the printed circuit board in 3D

    Gigan rev2

    Skycode22/HIDs

    HID projects

    155 parts132
  • 2 layers254 × 134.6 mmFPGA Z80 (no traces), the printed circuit board in 3D

    FPGA Z80 (no traces)

    douggilliland/Retro-Computers

    Retro-Computer Designs (Z80, 65C816, etc)

    155 parts87
  • 2 layers334.6 × 122.8 mmProductionPCB, the printed circuit board in 3D

    ProductionPCB

    compressionKeyboards/compression4c

    This repo contains the files to order a custom PCB for (4c), checkout the zmk layout to build firmware!

    155 parts60
  • 2 layers285.4 × 94.9 mmRosaline ortho, the printed circuit board in 3D

    Rosaline ortho

    peej/rosaline-keyboard

    40% staggered through-hole component keyboard PCB for standard 60% cases

    155 parts53MIT
  • 2 layers60.3 × 128.3 mmDAC II, the printed circuit board in 3D

    DAC II

    Blinken-Lights/ASCII

    ASCII Modular hardware and software repo

    155 parts50MIT
  • 2 layers209.6 × 154.9 mmY BUS Ctrl, the printed circuit board in 3D

    Y BUS Ctrl

    cherry-takuan/nlp

    NLP(Nand Logic Processor)のリポジトリ

    155 parts45CC-BY-SA-4.0
  • 2 layers34.1 × 34.2 mmTinyFINITY, the printed circuit board in 3D

    TinyFINITY

    fishpepper/tinyFINITY

    Tiny and opensource video transmitter with integrated graphic OSD

    155 parts42

Questions

How big is the Sgh60 PCB?

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

What parts does the Sgh60 use?

155 parts. 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 Sgh60 KiCad files?

From the sago35/tinygo-keyboard repository on GitHub, at the commit this page was made from: the board is kicad/sgh60/sgh60/sgh60.kicad_pcb and its schematic kicad/fric10key/fric10key/fric10key.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

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