Skip to the content
2 layers33.7 × 12 mmT85-usb, the printed circuit board in 3D

ATTiny85 HID automation keyboard both firmware and hardware design in baremetal C and KICAD 10 respectively.

Size
33.7 × 12 mm
Copper layers
2
Thickness
1.6 mm
Parts
16
Nets
11
Pads
34
Tracks, vias
100, 16
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
2 Jun 2026
Updated
1 Jul 2026

Overview

T85-usb is an open-source printed circuit board by 69series, from the 69series/attiny85-usb-hid repository on GitHub, published under the MIT licence. It is a 2-layer board of 33.7 × 12 mm with 16 parts on 11 nets, routed with 100 tracks and 16 vias.

It is built around the ATTINY85-20SU. Its parts include 4 resistors, 3 diodes, 1 capacitor, 1 IC and 1 connector. It belongs with the keyboards and input boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

ATtiny85 USB HID Keyboard

A fully custom USB HID keyboard dongle built on ATtiny85 — bare metal C firmware, custom PCB designed in KiCad 10, no Arduino, no HAL, no bootloader abstractions. Plug it into any USB port and it enumerates as a real HID keyboard device.


ATtiny85 USB HID Keyboard

MCU USB Firmware Tool Programmer License

A fully custom USB HID keyboard dongle...

What it does

Plugs directly into a USB-A port and acts as an autonomous HID keyboard. Planned automation payloads (see firmware/ for examples):

  • One-click temp folder cleaner (Win+R → %temp% → Ctrl+A → Shift+Del)
  • Stored credential injector (password manager dongle)
  • Custom keyboard macro sequences
  • Any HID keystroke automation — limited only by firmware logic

Hardware

PartValuePackage
U1ATtiny85-20SUSOIC-8
R1, R268Ω1206
R31.5kΩ (pull-up)1206
R41.5kΩ (LED)1206
C1100nF0805
D1, D23.6V ZenerSOD-123
D3LED0402
J1USB-FXCustom PCB-edge footprint

PCB: 31.31 × 11.8 × 0.8mm — slides directly into USB-A female socket. Custom USB-FX footprint — PCB edge pads act as USB-A plug contacts. Designed in KiCad 10. Ground pour on F.Cu.

Schematic: docs/schematic.png PCB Layout: docs/pcb.png 3D Render: docs/3dpcb_front.png / docs/3dpcb_back.png Gerbers + BOM: hardware/fabrication/


Schematic

Schematic

PCB Layout

PCB Layout

3D Render

PCB Front PCB Back

Firmware

Pure bare-metal C. No Arduino core, no HAL, no bootloader. Uses the V-USB library (obdev, v20121206) for software USB bit-banging on PB3/PB4.

Toolchain: avr-gcc (WinAVR), avrdude, VS Code

Build and flash

bash
cd firmware
make
make fuses
make flash

Or use the included automation script:

bash
69s.bat -unlock -17A

Fuse bits

bash
avrdude -c usbasp -p attiny85 -U lfuse:w:0xE1:m -U hfuse:w:0xDD:m
  • lfuse 0xE1 — internal 16.5MHz PLL oscillator (required for V-USB timing)
  • hfuse 0xDD — RESET enabled, SPI programming on

Pin mapping

ATtiny85 PinFunction
PB3 (pin 2)USB D−
PB4 (pin 3)USB D+
PB2 (pin 7)Status LED
PB0 (pin 5)ICSP MOSI / TP2
PB1 (pin 6)ICSP MISO / TP3
PB2 (pin 7)ICSP SCK / TP4
PB5 (pin 1)RESET / TP5

Project Structure

text
attiny85-usb-hid/
├── docs/                     # Schematic, PCB renders, design notes
│   ├── schematic.png
│   ├── pcb.png
│   ├── 3dpcb_front.png
│   ├── 3dpcb_back.png
│   └── design-notes.md
├── firmware/                 # Bare metal C firmware
│   ├── main.c                # Main application
│   ├── usbconfig.h           # V-USB hardware configuration
│   ├── Makefile
│   ├── 69s.bat               # One-shot build+flash automation
│   └── usbdrv/               # V-USB library (obdev v20121206)
├── hardware/
│   ├── fabrication/          # Gerbers, BOM, positions for JLCPCB
│   │   ├── t85-gerber.zip
│   │   ├── bom.csv
│   │   └── positions.csv
│   ├── hardware_prototype/   # Prototype build photos, all versions
│   │   ├── spider_config.jpeg        # Initial 6-wire ICSP test setup
│   │   ├── vers_1_front.jpeg         # Version 1 prototype
│   │   ├── vers_1_back.jpeg
│   │   ├── final_cleanup_version_front.jpg  # Final build (PB4 hot-wired)
│   │   └── final_cleanup_version_back.jpg

Key Design Decisions

Why ATtiny85? 8-pin SOIC, 8KB flash, runs at 16.5MHz via internal PLL — no external crystal needed, freeing PB3/PB4 for USB D+/D−.

Why bare metal C? Full control over every cycle. No Arduino abstraction layer, no bootloader overhead. USB enumeration, HID descriptors, OSCCAL calibration — all implemented and understood at the register level.

Why V-USB? ATtiny85 has no hardware USB peripheral. V-USB bit-bangs USB low-speed (1.5 Mbit/s) in software using hand-tuned AVR assembly timed to the exact cycle. This is the same approach used by Digispark.

USB signal conditioning: ATtiny85 GPIO swings 0–5V but USB data lines must not exceed 3.3V. D1/D2 (3.6V zeners) clamp the high state. R1/R2 (68Ω) provide impedance matching for the transmission line.

OSCCAL runtime calibration: Internal RC oscillator has ±10% factory tolerance. V-USB requires ±1% at 16.5MHz. calibrateOscillator() uses usbMeasureFrameLength() on every power-up to tune OSCCAL to the exact live USB SOF timing, ensuring reliable enumeration regardless of temperature or chip-to-chip variance.

VID/PID: Uses V-USB's shared free VID/PID pool (0x16C0 / 0x27DB). Appropriate for open-source/personal projects per obdev's usage terms.

Double enumeration init: Two disconnect/reconnect cycles on startup — the first lets the host settle/timeout on an initial connection attempt, the second is the real enumeration. This mirrors the bootloader-exit → user-program-start transition pattern and significantly improves host compatibility, particularly on modern xHCI controllers.

Windows driver binding: Chose PID 0x27DB (matching Digispark's HID keyboard PID) to ensure Windows binds the device to hidusb.sys (the native HID class driver) rather than libusb0.sys. This is critical — a generic libusb driver does not poll the interrupt-IN endpoint at the OS level, so keystrokes never reach the active application regardless of how correctly the USB descriptors enumerate.


Host Compatibility

Tested and working:

HostResult
Windows 11 (ASUS TUF F15, xHCI)✅ Full enumeration, keystrokes delivered
Android (Redmi Note 10 Pro, OTG)✅ Working
Android (Redmi 6, OTG)⚠️ Enumeration succeeds, keystrokes inconsistent

Prototype Notes

Built and tested on perfboard before PCB fabrication. hardware/prototype/spider_config.jpeg shows the initial 6-wire ICSP test harness soldered directly to the chip legs before any perfboard work. final_cleanup_version_* shows the final prototype — PB4 (USB D+) pin was damaged during rework and required a fine wire hot-fix, which held reliably through all testing.


Prototype Photos

Final Prototype Front Final Prototype Back


Debugging Journey

This project involved deep debugging across hardware, firmware, toolchain, and host-compatibility layers. Notable findings:

  • OSCCAL drift caused intermittent enumeration — solved with runtime calibration using usbMeasureFrameLength()
  • Windows driver binding (libusb0 vs hidusb) was the root cause of keystrokes never arriving despite correct USB enumeration — identified by comparing working Digispark sketch logs against our own via UsbTreeView
  • xHCI interrupt-IN scheduling behaves differently from legacy UHCI/OHCI for low-speed software-USB devices — characterized and worked around via double enumeration cycle and correct PID selection

Full debugging notes in docs/design-notes.md.


Future Work

  • Example firmware payloads (temp cleaner, credential injector, macro runner)
  • PCB fabrication and SMD assembly at JLCPCB
  • ICSP test pad verification on real PCB
  • v2.0 PCB with ICSP pads on back copper for in-circuit reprogramming

Author

Narendra Sagolsem — Electronics Engineer Portfolio: s69series-3-0.vercel.app GitHub: 69series


License

Firmware: MIT V-USB library: GPL v2 — see firmware/usbdrv/License.txt Hardware: CERN-OHL-S v2

Parts

16
QtyValueFootprintReferences
6TestPointpad69s:pad-0-8mm69sTP1, TP2, TP3, TP4, TP5, TP6
21k5Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR3, R4
23V6Diode_SMD:D_SOD-123D1, D2
268RResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1, R2
1100nCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1
1ATtiny85-20SPackage_SO:SOIC-8_5.3x5.3mm_P1.27mmU1
1LEDLED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderD3
1~S69S:USB-FXJ1

Similar boards

  • 2 layers65 × 56.5 mmSuperPower RPi KiCAD, the printed circuit board in 3D

    SuperPower RPi KiCAD

    SensorsIot/SuperPower

    Here you should find the best power supplies for your low-power projects

    122 parts600
  • 2 layers18.8 × 8.1 mmDell charger emulator, the printed circuit board in 3D

    Dell charger emulator

    KivApple/dell-charger-emulator

    Emulator of original Dell charger using ATTINY85

    6 parts154
  • 2 layers14 × 17.3 mmSnopf, the printed circuit board in 3D

    Snopf

    snopf/snopf

    snopf USB password token

    18 parts145GPL-2.0
  • 2 layers43.9 × 29 mmC64Saver2-addon, the printed circuit board in 3D

    C64Saver2-addon

    bwack/C64-Saver-bwack

    C64 Saver v1 and v2 - Overvoltage protection for the C64 and its power brick.

    43 parts124
  • 2 layers61 × 36.8 mmKeebcard, the printed circuit board in 3D

    Keebcard

    rsheldiii/Keebcard

    Home of the KeebCard project - Kicad files, code, and more!

    15 parts112
  • 2 layers200 × 100 mmRegalodilara, the printed circuit board in 3D

    Regalodilara

    valerionew/very-good-uc-doggos

    A special graduation present for a special friend. Six microcontrollers in one devboard

    91 parts50
  • 2 layers134.3 × 140 mmAerospace badge, the printed circuit board in 3D

    Aerospace badge

    AerospaceVillage/avBadge_2020

    Aerospace Village Badge 2020

    20 parts28
  • 2 layers50 × 25 mmLoRa Environmental Sensors, the printed circuit board in 3D

    LoRa Environmental Sensors

    spielhuus/LoRa-Environmental-Sensors

    ATtiny85 based LoRa atmospheric sensor board with BME280

    5 parts28

Questions

How big is the T85-usb PCB?

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

What parts does the T85-usb use?

16 parts, built around the ATTINY85-20SU. 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 T85-usb KiCad files?

From the 69series/attiny85-usb-hid repository on GitHub, at the commit this page was made from: the board is hardware/t85-usb.kicad_pcb and its schematic hardware/t85-usb.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

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