

Touch shield
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
1README
README.mdNixOS
Quick and dirty setup guide for testing
Download and run a vm
# 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
# ---( 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# ---( 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 )--- #
#~$ passwdLogin to vm
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 8888Run install
[!IMPORTANT]
The default repo you are using is: nixos
[!CAUTION] To run disko needs 2GB of additional space
install by hand
# 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"#installinstall by copy and paste
# 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"#installinstall by runme
# 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
# 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:stdioUEFI
# 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:stdioArduino
Circuit diagram
PCB Design
[!NOTE]
You can go to JLCPCB and upload the files and be production ready
Case
Final Product
Code
# 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
#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
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
- 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
- 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
- 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
[!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 = trueLabeled keycaps you find in the file: keycaps-functional.3mf Additionally case: case.scad
Layout
[!TIP] Keymap Editor Keyboard Layouts
Parts
23| Qty | Value | Footprint | References |
|---|---|---|---|
| 6 | SolderJumper_2_Open | Jumper:SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mm | A1, A2, A3, B1, B2, B3 |
| 3 | 1K | Resistor_SMD:R_0805_2012Metric | R1, R2, R3 |
| 3 | 1uF | Capacitor_SMD:C_0805_2012Metric | C2, C4, C6 |
| 3 | 30pF | Capacitor_SMD:C_0402_1005Metric | C1, C3, C5 |
| 3 | TTP223-BA6 | extra:TTP223-BA6 | U1, U2, U3 |
| 1 | Conn_01x12_Socket_left | Connector_PinSocket_2.54mm:PinSocket_1x12_P2.54mm_Vertical | J1 |
| 1 | Conn_01x12_Socket_right | Connector_PinSocket_2.54mm:PinSocket_1x12_P2.54mm_Vertical | J2 |
| 1 | LED - Blue | LED_SMD:LED_0805_2012Metric | D2 |
| 1 | LED - Green | LED_SMD:LED_0805_2012Metric | D3 |
| 1 | LED - Red | LED_SMD:LED_0805_2012Metric | D1 |
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 layers

- 4 layers46.7 × 19.3 mm

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 mm

- 4 layers83.1 × 31.9 mm

- 2 layers50 × 75 mm

- 2 layers92.8 × 100 mm

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 mm

- 2 layers200.3 × 96 mm

ESP32C5 iot switch
mynameisbrozu/esp32-based-iot-switch
Personal project - Iot switch with esp32c5 and 3.7" epaper display
89 partsMIT















