Open Hardware & RISC-V

BetterSPICE introduces real-time open-source circuit simulation with Rust and WebAssembly

Key Takeaway

BetterSPICE provides a real-time, interactive SPICE simulator that uses a Rust-based engine to allow continuous circuit analysis without restarting simulations.

Summary

ARS_Tech has released BetterSPICE, an open-source circuit simulation tool designed to bridge the gap between static schematic modeling and hands-on breadboarding. Unlike traditional simulators that require a full restart after every component change, BetterSPICE allows for continuous interaction, where capacitors and inductors retain their state during adjustments.

The simulator is built on a high-performance engine written in Rust that utilizes device equations from ngspice. By compiling this engine to WebAssembly, the developer has enabled full application functionality within web browsers, while also providing native versions for Linux, macOS, and Windows. It supports professional-grade analysis types and integrates with existing workflows by importing files from KiCad, EasyEDA, and LTspice.

Technical architecture and simulation capabilities

  • Core Engine: Built using Rust and leveraging ngspice device equations, with WebAssembly support for browser-based execution.
  • Stateful Simulation: Supports continuous simulation where components like capacitors and inductors retain charge and current during real-time parameter changes.
  • Verification and Accuracy: Validated against ngspice using 4,647 signals across hundreds of test circuits to ensure mathematical parity.
  • Embedded Integration: Capable of executing code on simulated microcontrollers to interact with analog components, such as regulating a buck converter via PWM.
  • Component Support: Includes a library of over 160,000 SPICE models from more than 70 manufacturers and supports imports from KiCad, EasyEDA, and LTspice.

Why it matters

BetterSPICE provides hardware engineers and embedded systems developers with a high-fidelity, open-source alternative to proprietary simulation suites. Its ability to run in a browser via WebAssembly lowers the barrier to entry for rapid prototyping, while its native Linux support and KiCad compatibility ensure it fits into professional open-hardware workflows.

Original reference: www.hackster.io →