Skip to the content
2 layers120 × 80 mm74hc165-input, the printed circuit board in 3D

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.md

SparkBench

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_pcb files. 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_pcb s-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

text
┌─────────────────────────────────────────────────────────────┐
│  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_pcb files 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:

  1. Extract constraints from the .kicad_pcb file
  2. Validate constraints for correctness
  3. Run placement — AI-optimized component positioning
  4. Run routing — AI-powered trace routing
  5. Monitor progress — live status updates streamed to the UI
  6. 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

bash
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 dev

Open 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.

bash
# Run it via npm
npm run sparkbench -- help

# Or directly with tsx
npx tsx scripts/sparkbench-cli.ts help
Commands
text
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 help
Running Tests

Compile firmware with PlatformIO, then run a YAML test scenario against the headless AVR simulator:

bash
npm run sparkbench -- test combo-safe

Test 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.

bash
# Set your API key
export ANTHROPIC_API_KEY=sk-ant-...

# Fuzz the combo-safe demo (has 3 intentional vulnerabilities)
npm run sparkbench -- fuzz combo-safe

The fuzzer:

  1. Sends your sketch.ino and diagram.json to Claude Opus 4.6
  2. Claude identifies potential vulnerabilities (timing side-channels, integer overflows, backdoors, buffer overflows, etc.)
  3. Claude generates YAML test scenarios that exploit each vulnerability
  4. SparkBench runs each scenario headlessly against the AVR simulator
  5. Claude analyzes the results and writes a security report

Reports are saved to projects/<slug>/fuzzer-report/.

Simulated Components

ComponentSimulation
LEDGPIO state → visual on/off
PushbuttonINPUT_PULLUP, interactive click
PotentiometerADC voltage via slider
ServoPWM pulse width → angle display
Rotary Encoder (KY-040)Quadrature CLK/DT signals
SSD1306 OLEDFull I2C controller, pixel display
74HC595Serial-in/parallel-out, daisy chain
74HC165Parallel-in/serial-out
DHT22One-wire temp/humidity with sliders
MPU6050I2C accel/gyro with sliders
7-Segment DisplayVia HC595 outputs
BuzzerGPIO state detection
Slide SwitchToggle state

Project Structure

text
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 runner

Hackathon 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
QtyValueFootprintReferences
7SW-SPDT-THTSW-SPDT-THTsw1, sw2, sw3, sw5, sw6, sw7, sw8
1DIP-16DIP-16sr1
1Header-1x03Header-1x03sw4

More from photon-cat/sparkbench

5
  • 2 layers120 × 100 mmAgentplay, the printed circuit board in 3D

    Agentplay

    photon-cat/sparkbench

    All in one hardware development platform

    13 parts4
  • 2 layers68.6 × 53.3 mmDemo guide, the printed circuit board in 3D

    Demo guide

    photon-cat/sparkbench

    All in one hardware development platform

    12 parts4
  • 2 layers100 × 100 mmSimon game, the printed circuit board in 3D

    Simon game

    photon-cat/sparkbench

    All in one hardware development platform

    12 parts4
  • 2 layers100 × 100 mmAgenttest6, the printed circuit board in 3D

    Agenttest6

    photon-cat/sparkbench

    All in one hardware development platform

    5 parts4
  • 2 layers68.6 × 53.3 mmAgenttest5, the printed circuit board in 3D

    Agenttest5

    photon-cat/sparkbench

    All in one hardware development platform

    3 parts4

Similar boards

  • 2 layers103 × 30.5 mmTS Back Endcap, the printed circuit board in 3D

    TS Back Endcap

    EEVengers/ThunderScope

    ThunderScope GitHub Repo

    9 parts1.3kMIT
  • 2 layers31.8 × 47.6 mmNGC 38 connector, the printed circuit board in 3D

    NGC 38 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    9 parts1.2k
  • 2 layers24 × 27.3 mmExpansion Card Retrofit, the printed circuit board in 3D

    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 mmSKR Mini TFT Thermistor Board, the printed circuit board in 3D

    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 mmLearnoliver, the printed circuit board in 3D

    Learnoliver

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    9 parts915
  • 2 layers17.4 × 16.9 mmToolhead, the printed circuit board in 3D

    Toolhead

    tanaes/whopping_Voron_mods

    9 parts787GPL-3.0
  • 2 layers9.8 × 108 mmExpander, the printed circuit board in 3D

    Expander

    wntrblm/Castor_and_Pollux

    A Juno-inspired dual oscillator

    9 parts587
  • 2 layersKeyboard after, the printed circuit board in 3D

    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.