

74hc165-input
All in one hardware development platform
- Size
- 120 × 80 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 9
- Nets
- 13
- Pads
- 40
- Tracks, vias
- 0, 0
- Routed
- Not yet
- KiCad
- KiCad 1.0 (file 20240108)
- Created
- 10 Feb 2026
- Updated
- 26 Feb 2026
Overview
74hc165-input is an open-source printed circuit board by photon-cat, from the photon-cat/sparkbench repository on GitHub. It is a 2-layer board of 120 × 80 mm with 9 parts on 13 nets.
README
README.mdSparkBench
All-in-one hardware development platform powered by Claude Opus 4.6
SparkBench combines what normally takes 5 separate tools into one browser-based workbench: a code editor, circuit simulator, MCU emulator, EDA/PCB designer, and an AI engineering partner — all working together so you can go from idea to tested hardware in minutes instead of days.
What It Does
- Prompt-to-Circuit: Describe what you want to build. Sparky (the AI agent) designs the schematic, writes the firmware, and presents a diff for your review.
- Cycle-Accurate Simulation: Run your Arduino code on an AVR emulator with 13+ simulated components (LEDs, servos, encoders, displays, sensors, shift registers).
- KiCAD-Compatible PCB Editor: Our custom-built PCB editor reads and writes native
.kicad_pcbfiles. Built as a fork of KiCanvas with a full editing layer — component drag-and-drop, footprint rotation/flip, board outline editing (rectangle or SVG import), interactive trace routing, zone drawing, layer management, ratsnest display, courtyard DRC, undo/redo, and a 3D board preview. Everything stays in the KiCAD s-expression format so you can open your boards directly in KiCAD. - DeepPCB Autorouter Integration: One-click AI-powered autorouting via DeepPCB. Send your board to DeepPCB's cloud autorouter directly from the PCB editor or let Sparky handle it conversationally. Extracts constraints, validates, runs placement and routing, and pulls back the routed board — all streamed with live progress.
- Headless CI Testing: Write YAML test scenarios and run them against the simulator — no hardware needed. AI-powered fuzz testing presses all the buttons and reports what broke.
- Full-Context AI Agent: Sparky has access to your entire project (schematic, code, PCB, libraries) and can debug, refactor, add features, route your PCB, or explain your circuit.
Tech Stack
- Frontend: Next.js 16, React 19, Monaco Editor, Three.js (3D PCB viewer)
- Simulation: avr8js (AVR emulator), @wokwi/elements (component visuals)
- PCB Editor: Custom KiCanvas fork with full editing — reads/writes
.kicad_pcbs-expression format natively. Clipper2 for polygon math, WebGL2 rendering. - Autorouter: DeepPCB MCP integration — AI-powered PCB routing via SSE transport
- AI: Claude Opus 4.6 via @anthropic-ai/claude-agent-sdk, custom MCP server for simulation control, DeepPCB MCP server for autorouting
- Build: PlatformIO (AVR compilation), runs entirely in the browser except compilation
Architecture
┌─────────────────────────────────────────────────────────────┐
│ SparkBench Web │
│ ┌──────────┐ ┌──────────────┐ ┌───────────────────────┐ │
│ │ Monaco │ │ Diagram │ │ Sparky Chat │ │
│ │ Editor │ │ Canvas │ │ (Claude Opus 4.6) │ │
│ │ │ │ + Wires │ │ Agent SDK + MCP │ │
│ └──────────┘ └──────────────┘ └───────────────────────┘ │
│ ┌──────────┐ ┌──────────────┐ ┌───────────────────────┐ │
│ │ Serial │ │ PCB Editor │ │ 3D Board Viewer │ │
│ │ Monitor │ │ (KiCanvas │ │ (Three.js) │ │
│ │ │ │ fork) │ │ │ │
│ └──────────┘ └──────────────┘ └───────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ AVR Simulation Engine ││
│ │ avr8js + I2C bus + SPI + USART + ADC + Timer/PWM ││
│ │ Wire components: LED, servo, encoder, SSD1306, ... ││
│ └─────────────────────────────────────────────────────────┘│
│ │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ DeepPCB Autorouter (via MCP SSE) ││
│ │ Extract constraints → Validate → Place → Route → Done ││
│ └─────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘PCB Editor
The PCB editor is a custom-built KiCAD-compatible editor, not a wrapper around existing tools. It reads and writes .kicad_pcb files natively using our own s-expression parser/serializer.
Features
- Component placement — Click-to-select via pad proximity, drag with crosshair preview, grid snapping (0.5mm)
- Footprint editing — Rotate (R), flip front/back copper (F), delete, courtyard overlap detection
- Board outline — Set rectangle dimensions or upload custom SVG outlines, converted to KiCAD Edge.Cuts
- Trace routing — Interactive routing with orthogonal and 45° diagonal modes, via insertion, layer switching
- Zone drawing — Copper pour zones with net auto-detection from pad clicks
- Layer management — Full KiCAD layer stack (F.Cu, B.Cu, silkscreen, masks, etc.) with visibility toggles and highlighting
- Ratsnest — Displays unrouted connections as airline wires
- Undo/redo — 50-level snapshot-based undo stack
- 3D preview — Three.js-based 3D board viewer with component models
- Export — Download
.kicad_pcbfiles that open directly in KiCAD
DeepPCB Autorouter
The PCB editor integrates with DeepPCB for AI-powered autorouting. Two ways to use it:
From the UI: Click "Route with DeepPCB" in the PCB editor's right panel. The board is sent to DeepPCB's cloud autorouter, progress streams back in real-time, and the routed board is loaded back into the editor automatically.
From Sparky: Ask the AI agent to route your board (e.g., "route my PCB with DeepPCB"). Sparky uses DeepPCB's MCP tools directly — extracting constraints, validating, running placement/routing, and saving the result.
The autorouter workflow:
- Extract constraints from the
.kicad_pcbfile - Validate constraints for correctness
- Run placement — AI-optimized component positioning
- Run routing — AI-powered trace routing
- Monitor progress — live status updates streamed to the UI
- Retrieve result — best routed board saved back to the project
Getting Started
Prerequisites
- Node.js 20+
- PlatformIO Core (for compilation)
- Anthropic API key (for Sparky agent)
- DeepPCB API key (optional, for autorouting)
Setup
git clone https://github.com/photon-cat/sparkbench.git
cd sparkbench
npm install
cp .env.example .env.local
# Edit .env.local with your keys:
# ANTHROPIC_API_KEY=sk-ant-...
# DEEPPCB_API_KEY=... (optional, enables autorouter)
npm run devOpen http://localhost:3000 to start building.
SparkBench CLI
SparkBench includes a command-line tool for running tests and AI-powered security fuzzing directly from your terminal.
# Run it via npm
npm run sparkbench -- help
# Or directly with tsx
npx tsx scripts/sparkbench-cli.ts helpCommands
sparkbench test <project> [--scenario <file>] Run a YAML test scenario
sparkbench fuzz <project> AI security fuzzer (SparkyFuzzer)
sparkbench list List all projects
sparkbench help Show helpRunning Tests
Compile firmware with PlatformIO, then run a YAML test scenario against the headless AVR simulator:
npm run sparkbench -- test combo-safeTest scenarios support: delay, set-control (buttons, encoders, pots, sensors), send-serial, wait-serial, expect-serial, expect-display, and clear-serial.
SparkyFuzzer (AI Security Auditor)
SparkyFuzzer uses Claude Opus 4.6 to analyze your firmware source code, identify security vulnerabilities, and generate exploit scenarios that run against the headless simulator to prove exploitability.
# Set your API key
export ANTHROPIC_API_KEY=sk-ant-...
# Fuzz the combo-safe demo (has 3 intentional vulnerabilities)
npm run sparkbench -- fuzz combo-safeThe fuzzer:
- Sends your
sketch.inoanddiagram.jsonto Claude Opus 4.6 - Claude identifies potential vulnerabilities (timing side-channels, integer overflows, backdoors, buffer overflows, etc.)
- Claude generates YAML test scenarios that exploit each vulnerability
- SparkBench runs each scenario headlessly against the AVR simulator
- Claude analyzes the results and writes a security report
Reports are saved to projects/<slug>/fuzzer-report/.
Simulated Components
| Component | Simulation |
|---|---|
| LED | GPIO state → visual on/off |
| Pushbutton | INPUT_PULLUP, interactive click |
| Potentiometer | ADC voltage via slider |
| Servo | PWM pulse width → angle display |
| Rotary Encoder (KY-040) | Quadrature CLK/DT signals |
| SSD1306 OLED | Full I2C controller, pixel display |
| 74HC595 | Serial-in/parallel-out, daisy chain |
| 74HC165 | Parallel-in/serial-out |
| DHT22 | One-wire temp/humidity with sliders |
| MPU6050 | I2C accel/gyro with sliders |
| 7-Segment Display | Via HC595 outputs |
| Buzzer | GPIO state detection |
| Slide Switch | Toggle state |
Project Structure
sparkbench/
├── app/ # Next.js app router
│ ├── api/chat/ # Sparky agent endpoint (Agent SDK)
│ ├── api/deeppcb/ # DeepPCB autorouter endpoint
│ ├── api/projects/ # Project CRUD + build API
│ └── projects/[slug]/ # Workbench page
├── components/ # React components
│ ├── DiagramCanvas.tsx # Schematic editor with wiring
│ ├── SparkyChat.tsx # AI chat panel with diff review
│ ├── KiPCBEditor.tsx # PCB editor (KiCanvas fork)
│ ├── KiPCBCanvas.tsx # WebGL2 board renderer
│ ├── KiPCBToolPalette.tsx # PCB tool sidebar
│ ├── KiPCBLayerPanel.tsx # Layer visibility/selection
│ ├── PCB3DViewer.tsx # 3D board viewer (Three.js)
│ └── SimulationPanel.tsx # Simulation controls + tabs
├── hooks/ # React hooks
│ ├── useKiPCBDrag.ts # Footprint drag + courtyard DRC
│ ├── useKiPCBRouting.ts # Interactive trace routing
│ ├── useKiPCBZoneDraw.ts # Copper zone drawing
│ └── useKiPCBBoardOutline.ts # Board outline editing
├── lib/ # Core logic
│ ├── avr-runner.ts # AVR emulator wrapper
│ ├── wire-components.ts # Part simulation bindings
│ ├── scenario-runner.ts # CI test runnerHackathon Track
Problem Statement Two: Break the Barriers — Hardware development requires expensive tools (Altium, oscilloscopes), deep expertise (PCB layout, embedded C), and physical prototyping cycles. SparkBench puts the full hardware development workflow in everyone's hands with an AI partner that understands embedded systems.
Built With
Built entirely during the Claude Code Hackathon using Claude Opus 4.6 and Claude Code.
Team
- photoncat (Jacob Armstrong)
License
MIT
Parts
9| Qty | Value | Footprint | References |
|---|---|---|---|
| 7 | SW-SPDT-THT | SW-SPDT-THT | sw1, sw2, sw3, sw5, sw6, sw7, sw8 |
| 1 | DIP-16 | DIP-16 | sr1 |
| 1 | Header-1x03 | Header-1x03 | sw4 |
More from photon-cat/sparkbench
5- 2 layers120 × 100 mm

- 2 layers68.6 × 53.3 mm

- 2 layers100 × 100 mm

- 2 layers100 × 100 mm

- 2 layers68.6 × 53.3 mm

Similar boards
- 2 layers103 × 30.5 mm

- 2 layers31.8 × 47.6 mm

- 2 layers24 × 27.3 mm

Expansion Card Retrofit
FrameworkComputer/ExpansionCards
Reference designs and documentation to create Expansion Cards for the Framework Laptop
9 parts1.1kCC-BY-4.0 - 2 layers15.6 × 17.3 mm

SKR Mini TFT Thermistor Board
VoronDesign/Voron-Hardware
Cool Hardware designed by the Voron Design group
9 parts1.1kGPL-3.0 - 2 layers39.1 × 49.5 mm

Learnoliver
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
9 parts915 - 2 layers17.4 × 16.9 mm

- 2 layers9.8 × 108 mm

- 2 layers

Keyboard after
adamws/kicad-kbplacer
KiCad plugin for automatic keyboard's key placement and routing
9 parts547GPL-3.0
Questions
How big is the 74hc165-input PCB?
It measures 120 × 80 mm and has 2 copper layers, 1.6 mm thick.
What parts does the 74hc165-input use?
9 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 74hc165-input KiCad files?
From the photon-cat/sparkbench repository on GitHub, at the commit this page was made from: the board is projects/74hc165-input/board.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the 74hc165-input design in my own project?
Its repository states no licence, so its author keeps all rights: ask photon-cat before reusing the design.