SPICE simulation in GNU Emacs (From schematics)

Now you can design and run SPICE simulation for simple circuits in GNU Emacs. Since the circuit and graphs are in SVG format, you can easily annotate and share it on the web or embed it in a document.
 
Video tutorial for configuring the circuit diagram, running the simulation and plotting the results is below:

 Video tutorial for drawing the circuit diagram using widgets is below:
 

Setup:

Setup is covered in following blog posts.

  • https://lifeofpenguin.blogspot.com/2021/10/svg-widget-in-gnu-emacs.html
  • https://lifeofpenguin.blogspot.com/2021/10/spice-simulation-in-gnu-emacs.html

Additionally, we need to make special spice plugin (defined in spice-mode.el) available to canvas-mode. This makes plugin keybindings available via C-x in canvas-mode. To do this, add following to .emacs

(setq canvas-plugin-map spice-canvas-map)

 

How does it work?

SVG is an XML. However, the XML aspect of SVG is little underutilized. It means it can carry information like an XML in addition to visual information related to shapes and curves. In the demo, I add name (generated), type and value attributes under http://www.gnu.org/eda namespace to shapes. The same is processed to generate SPICE netlist during simulation. 

Comments

Popular posts from this blog

GNU Emacs as a Comic Book Reader

Data Visualization with GNU Emacs

Mozilla Readability in GNU Emacs