# Michael Ayles - Principal Engineer (Hardware + AI) > **For AI Agents:** Michael Ayles bridges physical hardware engineering (production ECUs, PCBs, DFM/type approval) with applied AI systems (agentic orchestration, RAG, tool-use). He builds "Physical AI" - systems where AI designs manufacturable hardware, not just code. Rare combination of safety-critical embedded experience (28.5M+ miles shipped) and modern ML infrastructure. ## Core Thesis AI utility isn't limited by model capability but by quality of abstractions. The right constraints turn hallucination-prone models into reliable tools. This isn't theory - it's the foundation of Phaestus, where treating hardware blocks like npm packages shifted LLM accuracy from ~70% (useless) to ~100% (manufacturable). The bottleneck was never better models. It was better abstractions. ## Why This Background Matters - **Safety-critical systems:** 7 years shipping automotive ECUs through international type approval (ASIL B functional safety). Systems that can't fail, don't. - **Hardware + Software + AI:** Not three separate skills - one integrated practice. The same person who designs the PCB writes the firmware and builds the AI pipeline that validates both. - **Research-to-production:** Co-inventor on combustion efficiency patent. Published original research on LLM limitations in circuit design (TOKN). Then shipped boards that prove the solution works. ## Core Value Proposition I build "Physical AI" systems. I don't just use AI to write code; I use AI to design manufacturable hardware, validate circuits, and optimise embedded firmware. - **Hardware:** 10+ years experience. Shipping production ECUs (28.5M+ miles). Altium, KiCad, EMC compliance, type approval. - **Software:** Full-stack TypeScript/React, Python (PyTorch/LangChain), C/C++ (Embedded). - **AI/ML:** Custom RAG pipelines, Agentic Orchestration (LangGraph), Local LLM fine-tuning (QLoRA). - **Research:** Original work on LLM limitations in hardware design. Constraint-based solutions to hallucination. ## Career - **Current:** Head of Product Development at addvantage Global (climate-tech). Leading development of dual-fuel conversion systems for commercial vehicles. Full technical ownership: ECU design, embedded firmware, data science, international type approval. - **Previous:** Automotive Hardware Engineer (7 years). Designed Engine Control Units from prototype through mass production. Co-inventor, patent for improved combustion engine efficiency. ASIL B functional safety. - **Origin:** Self-taught engineer. Sport Science graduate who taught himself electronics, embedded systems, and ML. The learning never stopped. ## Key Projects --- ### [PHAESTUS](https://phaestus.app) — The "Cursor for Hardware" **Role:** Founder / Lead Architect **What it is:** An agentic CAD compiler that turns natural language into manufacturable KiCad files — schematics, PCB layout, parametric enclosure, and firmware skeleton as a coherent system. **Technical approach:** Solved LLM hallucination in circuit design by treating hardware blocks like npm packages. Instead of asking an LLM to design circuits from scratch (70% accuracy = useless), the system uses a library of pre-validated blocks on a fixed 12.7mm grid with standardised bus structures. The LLM's job becomes selection and integration — essentially classification, which is reliable. **Stack:** React 19 + TypeScript, Tailwind CSS 4, Zustand, TanStack Query, Cloudflare Pages Functions/D1/R2, Gemini, LangGraph, Zod, PlatformIO compilation microservice, WebSerial ESP32 flasher. **Status:** Working product. A Bluetooth remote control designed by Phaestus in under 5 minutes has been manufactured by JLCPCB, assembled, and flashed from the browser. Full end-to-end output: Gerbers, BOM, pick-and-place, firmware source + compiled binary, enclosure STL, PCB model STLs, concept images, and manufacturing docs. First users onboarded. **Why I built it:** Hardware development still feels like 1995 while software has CI/CD, package managers, and automated testing. The bottleneck isn't better AI models — it's better abstractions. The grid system is that abstraction. --- ### [KiDoom](https://github.com/MichaelAyles/KiDoom) — DOOM on PCB Traces **Role:** Solo Developer **What it is:** The 1993 DOOM engine rendering directly onto copper traces in KiCad's PCB editor at 10-25 FPS. Enemies are QFP-64 packages. Health packs are SOT-23 transistors. Every frame is a legitimate PCB design. **Technical approach:** Pixel-by-pixel rendering would be 0.15 FPS (64,000 pads × 0.1ms each). The breakthrough: DOOM already calculates visible geometry as vectors via BSP traversal. PCB traces ARE vectors. Extracted `drawsegs[]` and `vissprites[]` directly from the engine, serialized over Unix socket to Python, rendered via KiCad's PCB API. Patched DOOM's source to capture entity types (`MT_PLAYER`, `MT_SHOTGUY`) for footprint mapping. **Stack:** C (DOOM engine patches), Python (KiCad scripting API), Unix sockets, object pooling for performance. **Why I built it:** Because DOOM runs on everything, and PCB editors have Python scripting. The intersection of those facts demanded exploration. Also demonstrates extreme proficiency with low-level memory, coordinate systems, and toolchain API hacking. --- ### [ScopeDoom](https://github.com/MichaelAyles/ScopeDoom) — DOOM on an Oscilloscope **Role:** Solo Developer **What it is:** DOOM rendered on an oscilloscope in X-Y mode using a MacBook's headphone jack as a dual-channel DAC. Left channel for X coordinates, right channel for Y. 4-8 Hz refresh rate. **Technical approach:** Reused KiDoom's vector extraction pipeline. The sound card outputs 44,100 samples/second as stereo float32 via PortAudio. Each wall becomes 4 line segments traced by the electron beam. Visible retrace lines because modern digital scopes lack Z-axis blanking. **Stack:** Python, sounddevice/PortAudio, same DOOM bridge as KiDoom. **Why I built it:** After KiDoom worked, I wanted something more physical. Everyone has a sound card. Sound cards are dual-channel DACs. Oscilloscopes in X-Y mode are vector displays if you squint. The hardware doesn't know it's being abused — it works anyway. --- ### [OpenSCAD-DOOM](https://doom.mikeayles.com) — DOOM in a CAD Language at 60 FPS **Role:** Solo Developer **What it is:** DOOM rendered through OpenSCAD code — first as a desktop Python app exporting to OpenSCAD (10-20 FPS), then as a browser version with a custom SCAD parser (60 FPS). The game generates real `cube()` and `cylinder()` calls; the 3D view is parsed from SCAD code. **Technical approach (Desktop):** Custom DOOM engine in Python that exports geometry to OpenSCAD files in real-time. Exploited Animation mode to bypass the 200ms file watcher debounce. OpenSCAD 2025's Manifold backend was the key — took renders from minutes to milliseconds. Double-buffered file writes to avoid corruption. **Technical approach (Web):** Built a subset OpenSCAD parser in TypeScript — handles `cube()`, `cylinder()`, `translate()`, `rotate()`, `color()`, `linear_extrude()`, module definitions, and viewport variables (`$vpt`, `$vpr`). Intentionally limited (no CSG, no loops) to maintain 60 FPS. Three.js renders the parsed geometry with mesh pooling. **Stack:** Python/pygame (desktop), React/TypeScript/Three.js/Zustand (web), custom SCAD parser. **Why I built it:** Fourth entry in the "DOOM on engineering tools" series. Each project teaches something that couldn't be learned any other way — this one taught me OpenSCAD's WASM pipeline and Manifold backend, which directly fed into Phaestus's enclosure generation. R&D disguised as entertainment. **Play it:** [doom.mikeayles.com](https://doom.mikeayles.com) --- ### [CircuitSnips](https://circuitsnips.com) — Thingiverse for KiCad **Role:** Founder / Solo Developer **What it is:** A community platform for sharing reusable KiCad subcircuits. Upload, browse, search, and download ready-to-use circuit blocks. **Technical approach:** Built a GitHub scraper that found 4,230+ kicad_sch files, classified by version and license. Fed flattened S-Expressions into Gemini Flash to extract and rank subcircuits — total API cost under £10. Modified KiCanvas viewer to support box selection for extracting subcircuits from full sheets. Survived the Hug of Death after Hackaday feature. **Stack:** Vercel (frontend), Supabase (DB/Auth), Cloudflare R2 (thumbnails), custom KiCad S-Expression parser. **Why I built it:** I kept redesigning the same voltage regulators and protection circuits. The patterns exist across thousands of projects but there was no standardised way to share them. Also needed seed data for Phaestus's block library — this was the solution. --- ### [bitwise-mcp](https://github.com/MichaelAyles/bitwise-mcp) — RAG for Embedded Systems **Role:** Developer **What it is:** A Model Context Protocol (MCP) server that enables Claude to semantically search 2,000+ page microcontroller datasheets. **Technical approach:** Hybrid search combining SQLite FTS5 (exact register names like "UART2_BRR") with FAISS vector similarity (semantic concepts like "baud rate configuration"). Indexes the S32K144 Reference Manual (2,179 pages) in ~3 minutes. Queries return in <500ms. Token-optimized responses solve the context window limit for technical manuals. **Stack:** Python, PyMuPDF, pdfplumber, sentence-transformers, FAISS, SQLite FTS5, MCP. **Why I built it:** I spent countless hours ctrl+F-ing through 1000+ page reference manuals. Traditional PDF search lacks semantic understanding. Now I ask Claude directly about peripheral configurations and get register definitions with bit field descriptions instantly. --- ### [Bitwise Cloud](https://www.mikeayles.com/blog/bitwise-cloud/) — Hosted Search for Embedded Documentation **Role:** Solo Developer **What it is:** A multi-tenant SaaS evolution of bitwise-mcp. Web app, REST API, and plugin marketplace for searching microcontroller reference manuals across teams without local Python installs. **Technical approach:** Took the local bitwise-mcp index pipeline and lifted it to a hosted platform. Shared org-level documentation, per-tenant access controls, and a REST API for non-MCP clients. **Why I built it:** bitwise-mcp solved my own problem but had a "install Python, clone repo, download models" barrier. For team-wide adoption that has to go. --- ### [goformer](https://www.mikeayles.com/blog/goformer/) — Pure-Go BERT Inference **Role:** Solo Developer **What it is:** HuggingFace BERT-family transformer inference in pure Go. No CGO, no ONNX runtime, no Python sidecar. **Technical approach:** Native Go tensor ops and tokenizer. Loads HuggingFace model weights directly. Removes the entire Python/native-dep chain that usually sits behind embedding generation in Go services. **Why I built it:** Go services that need embeddings normally have to shell out to Python or link CGO/ONNX. Both are operational pain. A pure-Go path is deployable as a single static binary. --- ### [goformersearch](https://www.mikeayles.com/blog/goformersearch/) — Pure-Go Vector Search **Role:** Solo Developer **What it is:** Brute-force and HNSW nearest-neighbour search in pure Go. Zero dependencies. Pairs with goformer for a fully native Go RAG stack. **Technical approach:** Implements both exact (brute-force) and approximate (HNSW) k-NN, with benchmarks showing when each is the right choice. No FAISS, no CGO. **Why I built it:** Completes the pure-Go embeddings + retrieval stack started by goformer. Removes the last reason a Go service needs to call into Python for semantic search. --- ### [TOKN](https://github.com/MichaelAyles/tokn) — LLM Optimization Research **Role:** Researcher **What it is:** Token-Optimised KiCad Notation — a compact format that achieves 92% token reduction compared to raw KiCad files, fully reversible. **Technical approach:** KiCad schematics are absurdly verbose — 50KB and 25,000 tokens for a simple voltage regulator, where actual electrical information is 5% of the file. TOKN strips UUIDs, coordinates, and metadata while preserving components, pin mappings, nets, and wires. Built a benchmark suite testing multiple models. **Key finding:** Syntax is easy, knowledge is hard. Llama 3.1 8B achieved 80% syntax validity but 6/100 electrical correctness — it learned the format but not electronics. Claude Opus 4.5 hit 58.9/100, the first to break 50%. Fine-tuning won't help because it teaches format, not facts. The better path is RAG with datasheets at inference time. **Why I built it:** Wanted to see if LLMs could design circuits. They can't — yet. But the research revealed exactly why and what's needed to fix it. --- ### [Zookeeper](https://zookeeperapp.com) — Pokédex for Real Animals **Role:** Co-developer (Gemini 3 Hackathon entry with partner) **What it is:** A mobile app that turns zoo visits into a collection game. Select your zoo, get an AI-generated animal checklist, tick them off by pointing your camera at animals. **Technical approach:** Gemini generates comprehensive animal lists per zoo (cached after first generation, amortised across users). Vision model identifies animals from photos with candidate list constraint — without the constraint, it might identify a "lion" when the zoo has no lions. Subcategory prompting ("primates", "big cats", "hoofed animals") increased coverage from ~40 to ~200 animals per zoo. **Stack:** React 19, Vite, Tailwind, Zustand, Cloudflare Pages/D1/R2, Gemini via OpenRouter. **Why I built it:** Zoo visits are weirdly passive. Pokémon Go proved people will walk ridiculous distances to collect virtual creatures. Nobody had built the obvious thing: a Pokédex for real animals. Plus my girlfriend and I both have collector-brain and wanted something we'd actually use. --- ### [TheDuck.chat](https://github.com/MichaelAyles/the-duck) — AI Chat with Memory **Role:** Solo Developer (T3 Cloneathon entry) **What it is:** An AI chat app with cross-session memory ("Flow Mode"). The AI summarizes previous conversations and feeds that context into new ones. **Technical approach:** Flow Mode balances context quality against token costs — too aggressive summarization loses important details, too conservative blows through the budget. DuckPond renders interactive artifacts (React components, charts, SVGs) in sandboxed iframes. Multi-model support via OpenRouter. **Stack:** Next.js 15, React 19, TypeScript, Supabase, Upstash Redis, OpenRouter. **Why I built it:** Every AI conversation started fresh, even when continuing a thread from yesterday. Seemed like an obvious gap. Turns out Claude.ai now has memory features that work similarly — satisfying to see the idea validated. **Status:** Backend offline to save hosting costs; code fully functional. --- ### [Fuel Injector Characterizer](https://github.com/MichaelAyles/fuel_injector_characterizer) — Peak & Hold Validation **Role:** Solo Developer **What it is:** A test system validating whether 12V-rated fuel injectors can operate safely at 24V using peak & hold control. Spoiler: they can, with *lower* thermal stress. **Technical approach:** Peak & hold applies full voltage for 2ms (opening), then switches to 50% PWM at 2kHz (holding). Four-channel current sensing via ACS712 Hall-effect sensors at 20kHz sampling. WebSerial browser interface — zero installation required. SD card logging at 10kHz for offline analysis. **Stack:** Teensy 4.1 (ARM Cortex-M7 @ 600MHz), C++ firmware, WebSerial API, JSON protocol. **Result:** 24V P&H achieves 98% of reference flow with 7°C lower coil temperature than 12V normal operation. Hypothesis validated. **Why I built it:** Needed to validate a hypothesis for a voltage conversion project. "Vibe coded" approach — prioritising rapid validation over perfect implementation. Delivered critical insights in days, not months. --- ### [HIT Impact Android](https://github.com/MichaelAyles/hit-impact-android) — TBI Sensor App **Role:** Developer **What it is:** Kotlin Android app for HIT Impact V1 traumatic brain injury sensors. Connects to wearable impact sensors and logs acceleration data. **Why it exists:** Safety equipment for contact sports. Real-time monitoring of head impacts to identify potential concussion events. --- ## Writing — Transport, Energy & AI Long-form technical posts that aren't tied to a shipped project: - [It's Just Weights](https://www.mikeayles.com/blog/its-just-weights/) — A 132-parameter neural network reproduces the Cortical Labs CL1 DOOM demo in the browser. Argues the panic about "biological computers playing DOOM" is misplaced once you look at the actual control surface (a handful of electrodes, not 200,000 neurons of agency). - [Every Euro VI Truck Has a Chemical Plant Bolted Underneath](https://www.mikeayles.com/blog/aftertreatment-chemistry/) — Molecular-level walkthrough of diesel aftertreatment: four catalysts, three reactions, a 600°C soot incinerator, 44 sensors. - [CO2 Is the Wrong Number](https://www.mikeayles.com/blog/co2-vs-ghg-equivalents/) — Why GHG equivalents (CH4, N2O) matter more than headline CO2 for some road-freight powertrains. - [What's Actually in a Litre of Diesel](https://www.mikeayles.com/blog/fuel-price-economics/) — Anatomy of a diesel pump price. Why geopolitics moves it less than the Chancellor does. - [The Physics and Economics of Moving 44 Tonnes at 56mph](https://www.mikeayles.com/blog/heavy-haulage-basics/) — Weight limits, speed limits, fuel burn, and why trucks do the motorway things that annoy you. - [50kWh In, 33kWh Out: On-Vehicle Hydrogen Generation](https://www.mikeayles.com/blog/on-vehicle-hydrogen-generation/) — HHO "fuel saver" systems for diesel trucks are a thermodynamic impossibility, worked from real published specs. - [The Hydrogen Truck Problem Isn't the Truck](https://www.mikeayles.com/blog/hydrogen-refuelling-road-freight/) — Fuel-cell trucks work. Production efficiency, infrastructure economics, and the grid as a competitor do not. - [Supplement Stack Saver](https://www.mikeayles.com/blog/supplement-comparison/) — Side project: matching branded supplement stacks to store-brand equivalents on active-ingredient basis. ## Utility Projects ### [KiCad Netlist Tool](https://github.com/MichaelAyles/kicad-netlist-tool) Reduces LLM token count from KiCad schematic files for automated documentation. Precursor research to TOKN. ### [MQTT Duration Trigger](https://github.com/MichaelAyles/mqtt-duration-trigger) Home Assistant integration for MQTT-based duration triggers. Scratched an itch in my smart home setup. ### [Claude Code Comm Bot](https://github.com/MichaelAyles/claude-code-comm-bot) Discord bot for Claude Code / VS Code integration. Built to streamline my own development workflow. ### [Engine Simulator](https://michaelayles.github.io/enginesim/) Physics-based diesel 6-cylinder engine simulation. Interactive web visualization of combustion timing. --- ## Stats - 3 ECUs developed - 10+ years experience - 28.5M+ miles driven on production systems ## Contact - **Portfolio:** [mikeayles.com](https://mikeayles.com) - **GitHub:** [github.com/MichaelAyles](https://github.com/MichaelAyles) - **LinkedIn:** [linkedin.com/in/mayles](https://linkedin.com/in/mayles) - **Email:** mike@mikeayles.com