velxio/docs
davidmonterocrespo24 ed9911dcc3 feat: electrical simulation via ngspice-WASM (eecircuit-engine)
Adds full SPICE-accurate electrical simulation to Velxio, behind a lazy-
loaded  toolbar toggle. Arduino / ESP32 / RP2040 sketches now co-simulate
with real analog behaviour: correct voltages on wires, real I–V curves on
LEDs, working potentiometers, NTC thermistors read by analogRead(), PWM
driving RC filters, transistors, op-amps, diodes, MOSFETs, etc.

Engine: eecircuit-engine (ngspice compiled to WebAssembly). Main bundle
stays at 2.4 MB; the 20 MB SPICE chunk only loads when the user activates
electrical mode. Disabled at build time via VITE_ELECTRICAL_SIM=false.

Frontend additions:
- simulation/spice/: SpiceEngine wrapper + lazy entry, NetlistBuilder with
  UnionFind over wires, componentToSpice mapping (24 metadataIds incl.
  real part numbers: 2N2222, 2N3055, BC547, IRF540, 2N7000, 1N4148,
  1N4007, 1N4733, LEDs, NTC, op-amp ideal), CircuitScheduler with
  debounced coalescing, AVRSpiceBridge for quasi-static co-simulation.
- store/useElectricalStore: Zustand slice, feature-flag aware.
- components/analog-ui/:  toolbar toggle + SVG voltage overlay.
- components/components-instruments/: Voltmeter, Ammeter probes.
- 62 tests (spice-*, netlist-builder, component-to-spice, instruments).

Sandbox (test/test_circuit/): 47-test validation sandbox that proved
the approach (hand-rolled MNA baseline + ngspice pipeline) before
porting to the app. Kept as reference.

Docs: docs/wiki/circuit-emulation-*.md (13 engineering pages covering
architecture, solvers, components, AVR bridge, gotchas, performance,
integration plan, API reference, appendix) + electrical-simulation-
user-guide.md (end-user facing).

Reference plan: test/test_circuit/plan/phase_8_velxio_implementation.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 12:11:54 +00:00
..
examples Translate Spanish docs to English and add SEO-optimised URL routing for documentation 2026-03-11 18:46:42 +00:00
img/boards Refactor code structure for improved readability and maintainability 2026-03-16 14:28:16 -03:00
wiki feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
ARCHITECTURE.md Merge doc/ into docs/ — eliminate duplicate documentation folders 2026-03-11 17:03:51 +00:00
ESP32C3_WIFI_BLUETOOTH.md feat: add ESP32 WiFi/BLE emulation with ESP-IDF compilation pipeline 2026-03-31 20:53:56 -03:00
ESP32_EMULATION.md feat: update ESP32-C3 simulator and add emulation tests 2026-03-18 23:30:45 -03:00
ESP32_WIFI_BLUETOOTH.md fix: update gateway IP in documentation and mark submodules as dirty 2026-03-31 23:08:54 -03:00
MCP.md Merge doc/ into docs/ — eliminate duplicate documentation folders 2026-03-11 17:03:51 +00:00
MICROPYTHON_IMPLEMENTATION.md feat: add comprehensive MicroPython implementation documentation for RP2040, ESP32, ESP32-S3, and ESP32-C3 boards 2026-03-29 23:50:55 -03:00
RASPBERRYPI3_EMULATION.md Refactor code structure for improved readability and maintainability 2026-03-16 14:28:16 -03:00
RISCV_EMULATION.md feat: update ESP32-C3 simulator and add emulation tests 2026-03-18 23:30:45 -03:00
RP2040_EMULATION.md Refactor code structure for improved readability and maintainability 2026-03-16 14:28:16 -03:00
SETUP_COMPLETE.md Translate Spanish docs to English and add SEO-optimised URL routing for documentation 2026-03-11 18:46:42 +00:00
WOKWI_LIBS.md Fix nginx /docs routing conflict, move FastAPI Swagger to /api/docs, complete SEO meta tags 2026-03-11 18:55:18 +00:00
analytics.md feat: add GA4 key events tracking (run_simulation, open_example, create_project, compile_code, visit_github) 2026-03-12 22:02:24 +00:00
components.md Create documentation page accessible at /docs 2026-03-11 15:56:06 +00:00
emulator.md Create documentation page accessible at /docs 2026-03-11 15:56:06 +00:00
getting-started.md Refactor code structure for improved readability and maintainability 2026-03-16 14:22:23 -03:00
img1.png Merge doc/ into docs/ — eliminate duplicate documentation folders 2026-03-11 17:03:51 +00:00
img2.png Merge doc/ into docs/ — eliminate duplicate documentation folders 2026-03-11 17:03:51 +00:00
img3.png Merge doc/ into docs/ — eliminate duplicate documentation folders 2026-03-11 17:03:51 +00:00
img4.png Merge doc/ into docs/ — eliminate duplicate documentation folders 2026-03-11 17:03:51 +00:00
img5.png Refactor code structure for improved readability and maintainability 2026-03-16 18:31:46 -03:00
img6.png Refactor code structure for improved readability and maintainability 2026-03-23 23:24:14 -03:00
intro.md Refactor code structure for improved readability and maintainability 2026-03-16 14:22:23 -03:00
roadmap.md Create documentation page accessible at /docs 2026-03-11 15:56:06 +00:00