OpenHW Studio: Intelligent Autowiring & Autocoding System โ
This document outlines the architecture, features, and component support status for the intelligent circuit generation engine.
[LAUNCH] System Overview โ
The autowiring system is a hybrid engine (Rust WASM + TypeScript Worker) designed to automate the connection of complex components to microcontrollers (Arduino/ESP32). It handles both physical routing (wires) and logical initialization (code).
Key Features โ
- Dynamic Helper Injection: Automatically adds required supporting hardware (e.g., L298N Motor Drivers, I2C Pull-up Resistors, External Power Supplies).
- Smart Breadboard Provisioning: Automatically adds and scales breadboards (Mini/Half/Full) based on circuit complexity.
- Anchor-Pin Snapping: Precisely aligns components to the breadboard hole grid for professional-grade layouts.
- Manhattan Routing Engine: Generates orthogonal, non-overlapping wiring paths with high-fidelity lane spacing (7px).
- Universal Attribute Bridge: Ensures high-fidelity serialization of electrical properties (e.g., 12V PSU readout, resistor color bands).
๐ Component Support Status โ
[OK] Fully Implemented (Autowiring + Autocoding) โ
These components feature automatic wiring, helper injection, and ready-to-run Arduino code.
| Component | Helper(s) Injected | Code Features |
|---|---|---|
| DC Motor | L298N Driver + 12V PSU | PWM speed control + Direction logic |
| Stepper Motor | L298N Driver + 12V PSU | Step sequencing + External power |
| SSD1306 OLED | 4.7kฮฉ I2C Pull-ups | Adafruit GFX/SSD1306 Initialization |
| Servo Motor | None (Direct) | Servo library sweep logic |
| Potentiometer | None (Direct) | Analog read + Serial monitoring |
| Pushbutton | 10kฮฉ Pull-down | Input pullup/down logic |
| Ultrasonic (HC-SR04) | None (Direct) | Distance calculation (cm) |
| LED | 220ฮฉ Resistor | Basic blink/PWM logic |
| Buzzer | None (Direct) | Tone generation logic |
| RGB LED | 3x 220ฮฉ Resistors | Multi-color cycle (Red/Green/Blue) |
| Photoresistor (LDR) | 10kฮฉ Voltage Divider | Analog light intensity (Lux) |
| Temp Sensor (NTC) | 10kฮฉ Voltage Divider | Beta-model temperature (Celsius) |
๐ง Partially Implemented (Universal Fallback) โ
These components use the universal wiring engine but may require manual code tweaks or manifest refinement.
| Component | Current Status | Notes |
|---|---|---|
| PIR Sensor | Wiring Only | Digital read implemented |
| SD Card Module | Wiring Only | SPI connections established |
| MPU6050 Accel/Gyro | Wiring Only | I2C connections established |
[PENDING] Planned / Pending โ
- Keypad 4x4: Matrix wiring logic.
- Relay Module: Opto-coupler and high-power isolation logic.
- ESP32 Support: Mapping logic for 3.3V logic levels and WiFi initialization.
๐ Design Standards โ
- Lane Spacing: 7px (High-fidelity signal separation).
- Safety Offset: 10px from pin centers to prevent wire-on-pin collisions.
- Wire Colors:
Red: 5V / 3.3VBlack: GNDOrange: Digital SignalsGreen: Analog Signals / Motor TerminalsBlue: I2C / Special Signals
๐งช Documentation & Walkthroughs โ
- Detailed implementation notes can be found in
C:\Users\Danish\Documents\simulator\openhw-studio-autowiring-engine\README.md. - Historical progress is tracked in the project's internal
walkthrough.md.
