Skip to the content
4 layers46.7 × 19.3 mmQFN Touch TTP223, the printed circuit board in 3D

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.

Size
46.7 × 19.3 mm
Copper layers
4
Thickness
1.6 mm
Parts
24
Nets
25
Pads
84
Tracks, vias
130, 15
Pours
4
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
23 Apr 2024
Updated
30 Apr 2026

Overview

QFN Touch TTP223 is an open-source printed circuit board by Paschalis, from the Paschalis/Hardware-Login-Key repository on GitHub, published under the GPL-3.0 licence. It is a 4-layer board of 46.7 × 19.3 mm with 24 parts on 25 nets, routed with 130 tracks and 15 vias.

It is built around the ATTINY85-20MU, TTP223-BA6 and M50-3930642. Its parts include 6 capacitors, 4 resistors, 3 connectors, 2 ICs and 2 diodes. It belongs with the interfaces and adapters boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

3

README

README.md

🔐 Hardware Login Key

Hardware Login Key preview
Build status MCU ATtiny85 V-USB firmware Firmware size 1.86 KB flash Flash usage 22% License

Press or tap to auto-type your password suffix — the full password never exists in one place.
The prefix stays in your mind, the suffix lives in your hand.

Introduction

This project offers a straightforward solution for reducing password exposure when logging into a system or website. By pressing a physical button (or touching a capacitive pad) connected to an ATtiny85 microcontroller, the device automatically types a pre-stored password suffix, completing the login without exposing the full credential to observers.

Alt Text

Pressing the tactile switch on the breadboard prototype sends a keystroke that appears in the terminal.

🎯 Purpose

The aim is to provide a practical alternative to manually typing long or complex passwords in environments where shoulder surfing or observation is a risk. The key injects only a suffix. The prefix stays in the user's memory, so physical possession of the device alone is not enough to authenticate.

Benefits

  • Reduced exposure — the full password is never typed in one place or stored in one location
  • Convenience — complex suffixes are entered automatically with a button press
  • Privacy — reduces shoulder surfing risk in public or shared environments
  • Portability — a USB key fits on a keyring and works on any host

⚠️ Security Model & Limitations

This device is a convenience tool, not a cryptographic security device.

What it protects against: shoulder surfing and partial credential capture.

What it does NOT protect against:

  • Flash extraction — the suffix is stored as plaintext in ATtiny85 flash memory. An attacker with physical access and a standard programmer can dump it in under a minute with AVRDUDE. There is no encryption, no secure boot, and no hardware protection on the ATtiny85.
  • Compromised host — keystroke injection via USB HID is visible to any software-level keylogger running on the host.

[!WARNING] The ATtiny85 has no hardware security primitives. This device is appropriate for personal, low-threat scenarios. For threat models involving physical access by a motivated attacker, a device with secure boot and encrypted storage is required.

See SECURITY.md for the full threat model.

How it Works

The hardware key utilizes an ATtiny85 microcontroller with the V-USB library to implement USB Human Interface Device (HID) keyboard functionality. This allows the ATtiny85 to act as a keyboard when connected to a computer via USB. When the button connected to the ATtiny85 is triggered, it injects a pre-stored password suffix followed by Enter.

Alt Text

Sequence: (1) user types the prefix, (2) user triggers the device (tactile button or TTP223), and (3) the ATtiny85 injects suffix + Enter via USB HID. The host concatenates the parts to form the full credential.

Alt Text

From code to reality! The ATtiny85 Hardware Login Key project and its various prototypes. What started as a simple idea is now a fully functional set of secure login devices.

Firmware Variants

VariantTriggerFolder
Tactile switchPush button on PB1 (active-low, internal pull-up)C_implementation/tactile_switch/
Touch padTTP223 capacitive sensor on PB1 (active-high)C_implementation/touch_pad/

Both variants share the same V-USB HID keyboard implementation and the same two-piece password concept.

Compilation Instructions

[!TIP] First time working with the ATtiny85?

Before diving into this project, it's highly recommended to test your hardware setup and compilation process with a simpler program. The ATtiny85_Simple_Code_Test project is a perfect "Hello, World!" for your hardware. It plays music through a speaker and confirms that your ATtiny85, programmer, and toolchain are all working correctly before you tackle the more complex V-USB library.

You can modify the permissions of /dev/ttyACM0 to facilitate communication with your serial device. For detailed instructions, click here.

[!IMPORTANT] One-Time Fuse Setup for External Crystal

The ATtiny85 must be configured to use the external 16MHz crystal. This is done by setting its "fuse bits." This is a one-time operation for each chip. Run this once on each fresh chip.

  1. Connect your programmer to the ATtiny85.
  2. Run the following command to set the fuses for a 16MHz external crystal:
    bash
    avrdude -c avrisp -p attiny85 -P /dev/ttyACM0 -b 19200 -U lfuse:w:0xFF:m -U hfuse:w:0xDD:m

lfuse 0xFF selects the external crystal (8–16 MHz, full swing, maximum startup delay). hfuse 0xDD enables SPI programming, keeps the RESET pin active, and enables the Brown-Out Detector at 2.7 V — which prevents the chip from executing with an unstable supply during USB plug/unplug events.

How to Revert to the Internal Oscillator

If you later wish to use this ATtiny85 for a different project that does not require an external crystal, you can revert it to use its internal 8MHz oscillator.

To revert to the internal 8 MHz oscillator (no crystal needed), run the following command:

bash
avrdude -c avrisp -p attiny85 -P /dev/ttyACM0 -b 19200 -U lfuse:w:0xE2:m -U hfuse:w:0xDF:m

This restores the chip to use its internal 8MHz clock source, which is a common setting for many projects (like the ATtiny85_Simple_Code_Test).

[!WARNING] Be extremely careful when setting fuses. Incorrect fuse values can prevent the chip from being reprogrammed via ISP. Always verify values before running the command. Use https://www.engbedded.com/fusecalc/ to double-check.

Install the toolchain:

bash
# Linux
sudo apt-get install make gcc-avr binutils-avr avr-libc avrdude

# macOS
brew tap osx-cross/avr && brew install avr-gcc avrdude

Build and flash (from inside a variant folder):

bash
cd C_implementation/tactile_switch    # or touch_pad
make          # compile
make upload   # flash via Arduino-as-ISP

For detailed programmer wiring, port configuration, and manual build reference, see INSTRUCTIONS_C.md and C_Makefile_Instructions.md.

📋 Usage — Two-Piece Password

This hardware key uses a "Two-Piece Password" approach for enhanced security. The device does not store your full password. Instead, it stores only the complex second half, while you remember and type the simpler first half. This makes the physical key useless if it is ever lost or stolen.

[!IMPORTANT] The device stores only the complex suffix of a password. The simpler prefix lives in the user's memory. The full credential never exists in a single place.

The Concept in Action

Let's imagine your full, desired password is: Key_!#2025_complex

  • The part you remember and type first (The Prefix): Key_
  • The part stored on your hardware key (The Suffix): !#2025_complex

Login Steps

  1. Navigate to the password field of the login form.
  2. Manually type the first part of your password (e.g., Key_).
  3. Plug in your hardware key.
  4. Press the button on the key.
  5. The key will automatically type the complex second half of the password (!#2025_complex) and press Enter, logging you in securely.

PCB Designs

In KiCad

Alt Text

The hardware key is available in multiple PCB package versions to accommodate different assembly preferences:

  • Through-Hole (DIP): Easy to hand-solder, ideal for prototyping.
    • Through-Hole PCB With tactile switch.
  • SMD (SOIC): Compact and solderable by hand with a fine-tip iron.
    • SMD SOIC PCB With tactile switch.
  • SMD (QFN): Smallest footprint with push button.
    • QFN PCB With tactile switch.

    • QFN PCB QFN PCB designed for a touch pad using the TTP223 IC for enhanced reliability.

      • Uses a simple high/low output for touch detection, similar to a tactile switch, providing a straightforward 0 or 1 output.
      • The PCB is designed with 4 layers to optimize signal integrity and reliability.

🛒 Requirements

Through-Hole (DIP)

ReferenceValueFootprintQty
C1, C222 pFC_Disc_D5.0mm_W2.5mm_P5.00mm2
C3100 nFC_Disc_D5.0mm_W2.5mm_P5.00mm1
C410 µFCP_Radial_D4.0mm_P2.00mm1
D1, D23V6 ZenerD_DO-15_P10.16mm_Horizontal2
J1USB-AM-S-X-X-THSAMTEC_USB-AM-S-X-X-TH1
J2Conn 1×06Molex_PicoBlade_53047-06101
R1, R268 ΩR_Axial_DIN0204_P5.08mm2
R310 kΩR_Axial_DIN0204_P5.08mm1
R41.5 kΩR_Axial_DIN0204_P5.08mm1
S1B3F-1000SW_B3F-10001
U1ATtiny85-20PDIP-8_W7.62mm1
Y116 MHzCrystal_HC49-4H_Vertical1

Through-Hole PCB

DIP 3D render of the hardware login key’s PCB using the Through-Hole (DIP) package in KiCad

SMD — SOIC-8

ReferenceValueFootprintQty
C1100 nFC_0603_HandSolder1
C2, C322 pFC_0603_HandSolder2
C410 µFC_0805_HandSolder1
D1, D23V6 ZenerD_0603_HandSolder2
J1USB-AM-S-X-X-THUSB_PCB1
J2Conn 1×06JST_SH_SM06B-SRSS-TB1
R1, R268 ΩR_0603_HandSolder2
R31.5 kΩR_0603_HandSolder1
R510 kΩR_0603_HandSolder1
S2PTS525SM15SMTR2LFSSW_PTS525SM15SMTR2LFS1
U1ATtiny85-20PSOIC-8_5.3x5.3mm1
Y216 MHzCrystal_SMD_3225-4Pin1

SMD SOIC PCB

3D model of the hardware login key’s PCB using the SMD (SOIC) package in KiCad.

SMD — QFN-20 with tactile switch

ReferenceValueFootprintQty
C1100 nFC_0603_HandSolder1
C2, C322 pFC_0603_HandSolder2
C410 µFC_0805_HandSolder1
D1, D23V6 ZenerD_0603_HandSolder2
J1USB-AM-S-X-X-THUSB_PCB1
J2Conn 1×06JST_SH_SM06B-SRSS-TB1
R1, R268 ΩR_0603_HandSolder2
R31.5 kΩR_0603_HandSolder1
R510 kΩR_0603_HandSolder1
S2PTS525SM15SMTR2LFSSW_PTS525SM15SMTR2LFS1
U1ATtiny85-20MQFN-20-1EP_4x4mm1
Y216 MHzCrystal_SMD_3225-4Pin1

QFN PCB

3D model of the hardware login key’s PCB using the QFN package in KiCad.

SMD — QFN-20 with TTP223 capacitive touch (4-layer PCB) and Reversible USB Functionality

ReferenceValueFootprintQty
C1100 nFC_0603_HandSolder1
C2, C322 pFC_0603_HandSolder2
C41 µFC_0603_HandSolder1
C530 pFC_0603_HandSolder1
C610 µFC_0805_HandSolder1
D1, D23V6 ZenerD_0603_HandSolder2
J1USB-AM-S-X-X-THUSB_PCB1
J2M50-3930642HARWIN_M50-39306421
R1, R268 ΩR_0603_HandSolder2
R31.5 kΩR_0603_HandSolder1
R510 kΩR_0603_HandSolder1
TP1, TP2Test pointTestPoint_Pad_D3.0mm2
U1ATtiny85-20MQFN-20-1EP_4x4mm1
U2TTP223-BA6SOT23-61
Y216 MHzCrystal_SMD_3225-4Pin1

QFN PCB

3D model of the hardware login key’s PCB using the QFN package in KiCad.
With the TTP223 IC. (Uses simple high/low output for touch detection, similar to a tactile switch, with default code for straightforward 0 or 1 output.)

🏗️ 3D Printed Enclosure

Enclosure

A 3D printed case is available for the hardware key. To use it, follow these steps:

  1. Open the 3d_printed_case folder.
  2. Load the hardware_key_case.stl file into your 3D printer software.
  3. Print the case using your 3D printer.
  4. Once printed, assemble the hardware key inside the case for added protection and aesthetics.

📄 System Requirements Specification

SRS Cover

Click the image to open the full SRS (PDF).

🧑‍💻 Authors

  • Paschalis M.

👥 Contributors

🙏 Acknowledgements

This project stands on the shoulders of giants. A special thank you to the developers and communities behind these essential open-source tools:

  • V-USB: The core USB functionality of this hardware key is made possible by the V-USB library, a firmware-only USB driver for AVR microcontrollers from Objective Development.
  • KiCad: All PCB designs were created using KiCad, a powerful, free, and open-source electronics design automation (EDA) suite. Learn more at the KiCad website.

📜 License

This project is licensed under the GPLv3 License - see the LICENSE file for details.

Thank you for visiting Hardware-Login-Key! 🔐✨

Parts

24
QtyValueFootprintReferences
222pFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC2, C3
23V6Diode_SMD:D_0603_1608Metric_Pad1.05x0.95mm_HandSolderD1, D2
268RResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R2
2SolderJumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mmJP1, JP2
2TestPointTestPoint:TestPoint_Pad_D3.0mmTP1, TP2
2USB-AM-S-X-X-THUSB-AM-S-X-X-TH:USB_PCBJ1, J5
1clipboard:544f3dde-eb4d-425a-90ee-0f59484c1ccb
1100nFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC1
110kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR5
110μFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC6
116MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY2
11k5Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR3
11uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC4
130pFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC5
1ATtiny85-20MPackage_DFN_QFN:QFN-20-1EP_4x4mm_P0.5mm_EP2.5x2.5mm_ThermalViasU1
1LOGOlogo:logoG***
1M50-3930642M50-3930642:HARWIN_M50-3930642J2
1TTP223-BA6TTP223-BA6:SOT23-6U2

More from Paschalis/Hardware-Login-Key

3
  • 2 layers40.6 × 16.3 mmQFN, the printed circuit board in 3D

    QFN

    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.

    15 parts3GPL-3.0
  • 2 layers40.6 × 16.3 mmSOIC, the printed circuit board in 3D

    SOIC

    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.

    15 parts3GPL-3.0
  • 2 layers53.1 × 15.2 mmThrough Hole DIP, the printed circuit board in 3D

    Through Hole DIP

    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.

    15 parts3GPL-3.0

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
  • 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
  • 4 layers37 × 18 mmTouch shield, the printed circuit board in 3D

    Touch shield

    cmerbach/nixos-test

    A very basic NixOS setup

    23 parts
  • 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

Questions

How big is the QFN Touch TTP223 PCB?

It measures 46.7 × 19.3 mm and has 4 copper layers, 1.6 mm thick.

What parts does the QFN Touch TTP223 use?

24 parts, built around the ATTINY85-20MU, TTP223-BA6 and M50-3930642. 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 QFN Touch TTP223 KiCad files?

From the Paschalis/Hardware-Login-Key repository on GitHub, at the commit this page was made from: the board is PCB_Designs/SMD_QFN_Touch_TTP223/QFN_Touch_TTP223.kicad_pcb and its schematic PCB_Designs/SMD_QFN/QFN.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the QFN Touch TTP223 design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).