velxio/test/test_circuit/test
David Montero Crespo df37fdf6a4 feat: add 40 circuit examples + matching SPICE tests
Adds frontend/src/data/examples-circuits.ts with 40 new examples organized
into 6 categories, each demonstrating a specific analog/digital/electromech
concept that the SPICE engine can simulate end-to-end:

PASSIVE / ANALOG (10):
  voltage-divider, rc-low-pass-filter, wheatstone-bridge,
  ntc-temperature, led-current-limiting, parallel-resistors,
  pot-adc-reader, photoresistor-light, multi-led-bar,
  capacitor-charge-curve

TRANSISTOR / SEMICONDUCTOR (8):
  npn-led-switch, pnp-high-side-switch, mosfet-pwm-led,
  diode-rectifier, zener-regulator, schottky-reverse-protection,
  bjt-common-emitter, darlington-high-current

OP-AMP (5):
  opamp-inverting, opamp-voltage-follower, opamp-comparator,
  opamp-difference, opamp-schmitt-trigger

LOGIC GATES (6):
  and-gate-alarm, xor-toggle-detector, nand-sr-latch,
  full-adder, binary-counter-leds, logic-probe

ELECTROMECHANICAL (4):
  relay-led-switch, optocoupler-signal,
  l293d-motor-control, l293d-speed-pwm

POWER / REGULATOR (3):
  power-supply-7805, lm317-adjustable-psu, battery-voltage-monitor

BOARD-SPECIFIC (4):
  esp32-dual-adc, mega-multi-led, nano-sensor-station,
  esp32-pwm-led-rgb (uses ESP32 LEDC peripheral)

The new examples are appended to exampleProjects[] in examples.ts so the
existing gallery and category filters pick them up automatically.

test/test_circuit/test/spice_examples.test.js validates each example's
analog topology in ngspice — 45 individual assertions covering all 40
examples (plus extra cases for NTC/Zener sweeps and L293D direction).

Sandbox tally: 164 -> 209 tests, 7.9s runtime, all green.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 00:52:51 -03:00
..
avr_blink.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
diodes.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
e2e_pot_pwm_led.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
e2e_thermistor.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
metadata_drift.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
ngspice_smoke.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
passive.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
spice_555_astable.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
spice_ac.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
spice_active.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
spice_analog_advanced.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
spice_avr_mixed.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
spice_boards.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
spice_digital.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
spice_examples.test.js feat: add 40 circuit examples + matching SPICE tests 2026-04-16 00:52:51 -03:00
spice_logic_gates.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
spice_mapped_74hc.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
spice_mapped_gates.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
spice_mapped_l293d.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
spice_mapped_multi_input_gates.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
spice_mapped_opamps.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
spice_mapped_optocoupler.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
spice_mapped_power.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
spice_mapped_relay.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
spice_mapped_schottky_photodiode.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
spice_mapped_transistors.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
spice_passive.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
spice_transient.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
spice_transistors.test.js feat: expand SPICE component catalog (fases 9 + 10) 2026-04-15 22:41:26 -03:00
transient_rc.test.js feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00