Skip to the content
PCBKitNew board
4 layers37 × 18 mmTouch shield, the printed circuit board in 3D

A very basic NixOS setup

Size
37 × 18 mm
Copper layers
4
Thickness
1.6 mm
Parts
23
Nets
23
Pads
78
Tracks, vias
160, 7
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
23 May 2025
Updated
19 Sep 2026

Overview

Touch shield is an open-source printed circuit board by cmerbach, from the cmerbach/nixos-test repository on GitHub. It is a 4-layer board of 37 × 18 mm with 23 parts on 23 nets, routed with 160 tracks and 7 vias.

It is built around the TTP223-BA6. Its parts include 6 capacitors, 3 resistors, 3 ICs, 3 diodes and 2 connectors.

Main components

1

README

README.md

NixOS

Quick and dirty setup guide for testing

Download and run a vm

sh
# create a tmp folder
mkdir -p tmp

# download the current version of nixos
test ! -f tmp/nixos.iso && wget https://channels.nixos.org/nixos-24.11/latest-nixos-minimal-x86_64-linux.iso -O tmp/nixos.iso || echo "Nothing todo!"

# create the device for install the os
test ! -f tmp/nixos.img && qemu-img create -f raw tmp/nixos.img 100G || echo "Nothing todo!"

Run the vm

[!NOTE] cpu : Specify a processor architecture to emulate. To see a list of supported architectures, run: qemu-system-x86_64 -cpu
cpu host : (Recommended) Emulate the host processor
smp : Specify the number of cores the guest is permitted to use. The number can be higher than the available cores on the host system. Use -smp $(nproc) to use all currently available cores

sh
# ---( Option A)--- #
# run the boot command with gui
qemu-system-x86_64 -enable-kvm -hda tmp/nixos.img -smp 8 -m 16G -nic user,hostfwd=tcp::8888-:22 -cdrom tmp/nixos.iso -boot d

#---( set a password to root in the vm )--- #
#~$ passwd
sh
# ---( Option B)--- #
# run the boot command just in plain terminal
qemu-system-x86_64 -enable-kvm -hda tmp/nixos.img -smp 8 -m 16G -nic user,hostfwd=tcp::8888-:22 -cdrom tmp/nixos.iso -boot d -nographic -serial mon:stdio

#---( set a password to root in the vm )--- #
#~$ passwd

Login to vm

sh
ssh-keygen -f "/home/user/.ssh/known_hosts" -R "[127.0.0.1]:8888" && \
sshpass -p '123' \
ssh -o StrictHostKeyChecking=no -o PreferredAuthentications=password nixos@127.0.0.1 -p 8888

Run install

[!IMPORTANT]
The default repo you are using is: nixos

[!CAUTION] To run disko needs 2GB of additional space

install by hand
sh
# set env variables
export ACCOUNT=
export BRANCH=
# run the install 
nix --experimental-features "nix-command flakes" run --refresh --no-write-lock-file git+https://github.com/$ACCOUNT/nixos?ref="$BRANCH"#install
install by copy and paste
sh
# set env variables
read -p 'Account: ' ACCOUNT && export ACCOUNT && \
read -p 'REPO: ' REPO && export REPO && \
read -p 'BRANCH: ' BRANCH && export BRANCH && \
read -p 'PASSWORD: ' PASSWORD && export PASSWORD && \
# run the install 
ACCOUNT="$ACCOUNT" PASSWORD="$PASSWORD" nix --experimental-features "nix-command flakes" run --refresh --no-write-lock-file git+https://"$ACCOUNT":"$PASSWORD"@github.com/$ACCOUNT/$REPO?ref="$BRANCH"#install
install by runme
sh
# load env variable
source .env.local
# run the install
ssh-keygen -f "/home/user/.ssh/known_hosts" -R "[127.0.0.1]:8888" && \
sshpass -p '123' \
ssh -t -o StrictHostKeyChecking=no -o PreferredAuthentications=password nixos@127.0.0.1 -p 8888 \
" export REPO='$REPO' && \
export ACCOUNT='$ACCOUNT' && \
export BRANCH='$BRANCH' && \
export PASSWORD='$PASSWORD' && \
ACCOUNT=\"\$ACCOUNT\" PASSWORD=\"\$PASSWORD\" \
nix --experimental-features \"nix-command flakes\" run --refresh --no-write-lock-file git+https://\"\$ACCOUNT\":\"\$PASSWORD\"@github.com/\$ACCOUNT/\$REPO?ref=\"\$BRANCH\"#install"

Reboot and start the system

BIOS
sh
# run in ui remove: -nographic -serial mon:stdio
qemu-system-x86_64 -enable-kvm -hda tmp/nixos.img -smp 8 -m 16G -nic user,hostfwd=tcp::8888-:22 -nographic -serial mon:stdio
UEFI
sh
# run in ui remove: -nographic -serial mon:stdio
cp "$(ls /nix/store/*qemu*/share/qemu/edk2-i386-vars.fd | head -1)" /tmp/efi-vars.fd && \
chmod 777 /tmp/efi-vars.fd && \
qemu-system-x86_64 \
  -enable-kvm \
  -machine q35 \
  -cpu host \
  -smp 8 \
  -m 16G \
  -drive if=pflash,format=raw,readonly=on,file="$(ls /nix/store/*qemu*/share/qemu/edk2-x86_64-code.fd | head -1)" \
  -drive if=pflash,format=raw,file=/tmp/efi-vars.fd \
  -drive file=tmp/nixos.img,format=raw \
  -nic user,hostfwd=tcp::8888-:22 \
  -nographic -serial mon:stdio

Arduino

Arduino Pro Micro (ATmega32U4)


[!TIP] Arduino Pro Micro (ATmega32U4)
USB C Adapter


Circuit diagram

circuit-diagram-basis circuit-diagram-touch-modul


PCB Design

pcb-diagram pcb-front pcb-front

[!NOTE]
You can go to JLCPCB and upload the files and be production ready


Case

3D View of OpenSacd Print Model for BambuLab A1 Print Model GeSliced with Supports Top View Print Model GeSliced with Supports Bottom View


Final Product

Final Product Parts Touch Sensor


Code

sh
# open the arduino ide
arduino-ide

[!IMPORTANT]

  • Board Manager -> Arduino AVR Boards -> Install
  • Libary Manager -> Keybaord -> Install
  • Tools -> Board -> Arduino AVR Boards -> Arduino Leonardo
  • Tools -> Port -> /dev/ttyACM0

A simple script for the USB HID (Human Interface Device) functionality of the Arduino Pro Micro. This code sends a text message whenever the board is connected to a computer.


Simple example
cpp
#include <Keyboard.h>

void setup() {
  Keyboard.begin(); // init keyboard
  delay(1000); // wait 2 secounds for the system to be ready
  Keyboard.print(""); // send Text without linebreak
  Keyboard.write(KEY_RETURN); // simulate the Enter key
  Keyboard.end(); // end keyboard
}

void loop() {
  // nothing in the loop, since we only want to send once at startup
}


Code for Production

[!CAUTION] Think about the keyboard layout! It only works with us layout
Also think about that you are using the us layout when typing!

[!TIP] workaround in my case for GNOME/KDE:
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us')]"
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'de')]"

Upload the Code to the Arduino Pro Micro. Don't forget to update the token for your GitHub account accordingly.

[!NOTE]
const char* TOKEN = "...";
create a GitHub Token, go to:
Settings -> Developer Settings -> Personal access tokens -> Fine-grained tokens -> REPO -> Repository permissions -> Contents -> read-only -> Generate Token

Renovate

[!TIP] Setting up renovate for specific repos:
Profile -> Settings -> Integrations -> Applications -> Renovate -> Configure

Corne Cherry v3 Keyboard

[!TIP] Videos for help to build:
How To Build A Corne Keyboard: The Complete Beginner's Guide
How to Build a Wireless Corne Keyboard
Corne Wireless Split Keyboard Build
Guide for soldering all components

Build ZMK

[!IMPORTANT] Default Values

sh
bash -c "$(curl -fsSL https://zmk.dev/setup.sh)"
# -> 17) Corne -> 10) nice!nano v2 -> Y) Enter -> Y) Enter -> Y) Enter
# rm .github for using local

[!TIP] ZMK System Configuration for Bluetooth and USB ZMK Split Configuration

Custom Build Pipeline

This repository uses a custom GitHub Actions workflow to build ZMK firmware for the Corne Cherry v3 keyboard with Nice!Nano controllers. The pipeline generates two firmware files: corne_left.uf2 and corne_right.uf2.

[!NOTE] Default config is for bluetooth connection If using [config:usb]in the commit message you get the config for usb connection

Flashing Process
  1. Flash Slave (Left Side) First
  • Double-press reset button on Nice!Nano to enter bootloader mode
  • Copy the corne_left.uf2 file to the mounted drive
  • Wait for automatic disconnect
  1. Flash Master (Right Side)
  • Double-press reset button on Nice!Nano to enter bootloader mode
  • Copy the corne_right.uf2 file to the mounted drive
  • Wait for automatic disconnect
  1. Connection Sequence
  • Power on the master
  • Power on the slave via usb or trrs cable
  • Slave should automatically connect to master via Bluetooth
  • Connect keyboard to computer via Bluetooth (only master will appear in device list)
Bluetooth Bond Management
Clear Bonds via Config

[!IMPORTANT]

  • Temporarily enable CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START=y in corne.conf
  • Flash firmware, press reset button once to boot and clear all bonds, then re-comment the line and flash again
Clear Bonds via Keymap

[!CAUTION]

  • Lower layer + A key: &bt BT_CLR (clears all stored Bluetooth connections)
  • Use when device won't reconnect after being removed from computer's Bluetooth list
  • This is extremely needed to clear the device for a reconnect

Keycaps

Keycap Top View Keycap Bottom View

[!NOTE] File: keycaps.scad If you don't want a socket just set: base_platform = false
For a longer keycap simply set the variable: wide_keycap = true Labeled keycaps you find in the file: keycaps-functional.3mf Additionally case: case.scad

Layout

Keycaps Blank Layout

[!TIP] Keymap Editor Keyboard Layouts

Parts

23
QtyValueFootprintReferences
6SolderJumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mmA1, A2, A3, B1, B2, B3
31KResistor_SMD:R_0805_2012MetricR1, R2, R3
31uFCapacitor_SMD:C_0805_2012MetricC2, C4, C6
330pFCapacitor_SMD:C_0402_1005MetricC1, C3, C5
3TTP223-BA6extra:TTP223-BA6U1, U2, U3
1Conn_01x12_Socket_leftConnector_PinSocket_2.54mm:PinSocket_1x12_P2.54mm_VerticalJ1
1Conn_01x12_Socket_rightConnector_PinSocket_2.54mm:PinSocket_1x12_P2.54mm_VerticalJ2
1LED - BlueLED_SMD:LED_0805_2012MetricD2
1LED - GreenLED_SMD:LED_0805_2012MetricD3
1LED - RedLED_SMD:LED_0805_2012MetricD1

Questions

How big is the Touch shield PCB?

It measures 37 × 18 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Touch shield use?

23 parts, built around the TTP223-BA6. 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 Touch shield KiCad files?

From the cmerbach/nixos-test repository on GitHub, at the commit this page was made from: the board is arduino/pcb/touch-shield/touch-shield.kicad_pcb and its schematic arduino/pcb/touch-shield/touch-sensor-blue.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Touch shield design in my own project?

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

Similar boards

  • 2 layersAmulet, the printed circuit board in 3D

    Amulet

    mitxela/amulet

    Source code and KiCad design files for the UV Protection Amulet.

    31 parts42
  • 4 layers46.7 × 19.3 mmQFN Touch TTP223, the printed circuit board in 3D

    QFN Touch TTP223

    Paschalis/Hardware-Login-Key

    The Hardware Login Key is an ATtiny85-based USB device that securely automates password entry using a physical button or touch sensor. It offers a simple, hardware-driven way to log into systems or websites.

    24 parts3GPL-3.0
  • 2 layers91.9 × 77.8 mmKeychain, the printed circuit board in 3D

    Keychain

    adonutartist/Nemo-PCB-Keychain

    as the title says its a pcb and a keychain

    11 parts1
  • 4 layers83.1 × 31.9 mmWeighingScalePCB, the printed circuit board in 3D

    WeighingScalePCB

    meepdong/Weighing-Scale-Coaster

    Coffee Weighing Scale using HX711

    41 parts1
  • 2 layers50 × 75 mmZapper, the printed circuit board in 3D

    Zapper

    hanebuechenes/ZapZap

    Ein Blutzapper nach Dr. Robert C. Beck CC/CV Akku OLED

    78 partsGPL-3.0
  • 2 layers92.8 × 100 mmFreakeyboard, the printed circuit board in 3D

    Freakeyboard

    kasasiki3/Freakeyboard

    You enter keys into your PC by swiping and touching just like on a smartphone keyboard.

    94 parts
  • 2 layers143 × 86.9 mmGamingControler, the printed circuit board in 3D

    GamingControler

    kubascikmichal/smartclass-pcb

    KiCad projects of PCBs for smartclass

    65 parts
  • 2 layers200.3 × 96 mmESP32C5 iot switch, the printed circuit board in 3D

    ESP32C5 iot switch

    mynameisbrozu/esp32-based-iot-switch

    Personal project - Iot switch with esp32c5 and 3.7" epaper display

    89 partsMIT