Circuit Doctor
About the project
Viewed README.md:1-100
Here is a comprehensive and structured project description formatted specifically for Hacktoberfest / Hackathon project submissions (e.g. GitHub README, Devpost, or submission portals):
⚡ CircuitDoctor — Project Submission
🏷️ Short Tagline
The AI Hardware Engineering Platform: From natural language ideas to interactive schematics, starter firmware, and physical circuit diagnosis.
💡 Elevator Pitch (Short Description)
CircuitDoctor bridges the gap between software engineers and physical hardware. It lets anyone describe a hardware project idea in natural language, automatically architecting a complete Bill of Materials (BOM), interactive circuit schematic, pin-to-pin wiring diagram, and starter firmware. It also features Circuit Doctor, a multimodal visual diagnostic engine that analyzes physical breadboard photos and generates multimeter verification steps to troubleshoot real-world circuits.
❓ The Problem & Inspiration
Getting started with physical computing and embedded electronics is notoriously intimidating:
- Wiring Errors & Fried Components: Beginners struggle to understand pin semantics (pull-up resistors, ADC limitations, voltage rail differences like 3.3V vs 5V).
- Disconnected Toolchains: Schematics are in Fritzing or KiCad, firmware is in the Arduino IDE, and troubleshooting requires scouring forum threads.
- Debugging Physical Hardware is Hard: When a breadboard circuit doesn’t work, there are no software stack traces — only silence or burnt silicon.
We built CircuitDoctor to unify hardware architecture, schematic design, firmware authoring, and physical troubleshooting into a single, cohesive developer workspace.
✨ Key Features
1. 🤖 AI Project Builder (/builder)
- Natural Language Architecture: Input a project idea (e.g., “Smart greenhouse with soil moisture monitoring and OLED display”), target MCU (ESP32, Arduino Uno, Raspberry Pi Pico), and budget.
- Hardware Generation: Powered by Google Gemma & Gemini, it generates a structured hardware plan with a complete Bill of Materials (BOM with pricing in ₹ INR), build steps, and safety warnings.
- Minimal Diagram & Instant Simulation: Previews the topological schematic with auto-layout and interactive sensor simulation before opening in full studio.
2. 🔌 Interactive Circuit Studio (/circuit-studio)
-
Node & Wire Canvas: Built on
@xyflow/react(React Flow) with custom hardware nodes, live pin semantics (color-coded rails: Power, Ground, I2C, SPI, Analog, PWM), and interactive wires. -
Full History Engine: Native 30-step immutable Undo / Redo support with keyboard shortcuts (
Cmd+Z,Cmd+Shift+Z) and drag-and-drop component positioning. - Design Rule Checking: Real-time warnings for floating inputs, missing power rails, or unconnected components.
- Embedded Serial Monitor & Virtual Sensors: Test sensors (LDR, DHT22, Ultrasonic, Potentiometers) in real time with animated waveform plotting.
3. 🔬 Circuit Doctor — Multimodal Vision Diagnosis (/circuit-doctor)
- Photo-to-Diagnosis: Upload a photo of your physical breadboard or PCB. Using Gemini Multimodal Vision, CircuitDoctor inspects wire connections, IC orientations, and power rails.
- Evidence-Based Reasoning: Strictly separates Directly Observed, Likely, and Uncertain evidence to avoid unsafe assumptions.
- Interactive Multimeter Procedures: Provides step-by-step continuity and voltage test points with expected resistance/voltage readings, allowing engineers to record physical test results (Pass, Fail, Inconclusive).
4. 💻 Firmware IDE & Pin Cross-Checking
- Integrated Code Editor: Syntax-highlighted Arduino/C++ editor.
-
Pin Consistency Linter: Automatically parses
#defineandpinMode()calls from firmware and cross-references them against Circuit Studio wire connections, flagging mismatched or unused GPIOs.
🛠️ Technology Stack
| Layer | Technology |
|---|---|
| Frontend | Next.js 16 (App Router, Turbopack), React 19, TypeScript |
| Styling | Vanilla CSS, Tailwind CSS v4, Lucide Icons, Glassmorphic Dark Theme |
| Visual Canvas |
@xyflow/react (React Flow) with custom SVG hardware nodes |
| AI Models |
Google Gemma (gemma-4-26b-a4b-it) for hardware architecture, Gemini 3.5 Flash for multimodal visual circuit diagnostics |
| Database | PostgreSQL (Neon serverless connection pooler / Render Postgres), with auto-bootstrapping DDL and in-memory resilience |
| Validation | Zod schemas for AI outputs & database models |
🧗 Challenges We Overcame
- Interactive Circuit Topology: Converting unstructured AI JSON plans into clean, collision-free schematic layouts. We built a custom 3-column topology layout algorithm (Sensors on left → MCU in center → Actuators on right).
- Reliable Vision Diagnostics: Ensuring the AI doesn’t hallucinate that a circuit is “safe” from a 2D photo. We constrained the model to strictly propose verifiable physical multimeter test steps.
- State Synchronization: Seamlessly transferring live schematics between Project Builder and the full Circuit Studio using storage caching, resilient refs, and custom component mount guards.
🎯 What We Learned
- Implementing deterministic schematic validation alongside generative AI.
- Structuring strict JSON-schema prompted models with fallback chains.
- Designing responsive, hardware-focused UI nodes that feel tactile and intuitive for beginners.
🚀 What’s Next for CircuitDoctor
- WebSerial Flashing: One-click firmware uploading directly from the browser to USB-connected ESP32 and Arduino boards via WebSerial API.
- Gerber / PCB Export: Converting Circuit Studio canvas schematics directly into KiCad or EasyEDA PCB manufacturing files.
- Community Schematics: Public gallery for users to fork, modify, and share hardware blueprints.
Built with
AI tools
Prize Categories Entered
- Submitted

Best Open-Source AI Project