Skip to content

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.

ComponentHelper(s) InjectedCode Features
DC MotorL298N Driver + 12V PSUPWM speed control + Direction logic
Stepper MotorL298N Driver + 12V PSUStep sequencing + External power
SSD1306 OLED4.7kฮฉ I2C Pull-upsAdafruit GFX/SSD1306 Initialization
Servo MotorNone (Direct)Servo library sweep logic
PotentiometerNone (Direct)Analog read + Serial monitoring
Pushbutton10kฮฉ Pull-downInput pullup/down logic
Ultrasonic (HC-SR04)None (Direct)Distance calculation (cm)
LED220ฮฉ ResistorBasic blink/PWM logic
BuzzerNone (Direct)Tone generation logic
RGB LED3x 220ฮฉ ResistorsMulti-color cycle (Red/Green/Blue)
Photoresistor (LDR)10kฮฉ Voltage DividerAnalog light intensity (Lux)
Temp Sensor (NTC)10kฮฉ Voltage DividerBeta-model temperature (Celsius)

๐Ÿšง Partially Implemented (Universal Fallback) โ€‹

These components use the universal wiring engine but may require manual code tweaks or manifest refinement.

ComponentCurrent StatusNotes
PIR SensorWiring OnlyDigital read implemented
SD Card ModuleWiring OnlySPI connections established
MPU6050 Accel/GyroWiring OnlyI2C 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.3V
    • Black: GND
    • Orange: Digital Signals
    • Green: Analog Signals / Motor Terminals
    • Blue: 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.

Released under the MIT License.