Update for ngspice on Windows 10

There is an “update” for ngspice (Windows 10 only, sorry) available at http://ngspice.sourceforge.net/download.html#kicad .

It contains all bug fixes up to yesterday. It is experimental code from the ngspice git branch pre-master, but stable enough to give it a try.

A howto ist included in the zip file.

If you closely follow the installation procedure, there will be no problem to revert the install.

2 Likes

There is just a new ngspice for KiCad upgrade available at http://ngspice.sourceforge.net/download.html#kicad

1 Like

I know this is an old thread, but it is the best I could Google so far.
I think Holger’s link is outdated or something, also there is no mention of Windows 10 or KiCad even though that is suggested from the link address.
Originally got the suggestion from this video (https://www.youtube.com/watch?v=90Z6ffxzDz8&t=918s) to try and upgrade ngspice, with a vague reference to “the forum”…

Actually I am running Kicad 5.1.9 so I am also not sure if I need to upgrade at all, but in the same video it is also suggested that I add a line “set ngbehavior=ps” to a file called spice.rc except I cannot find that file in the corresponding dirctory on my PC.
I feel like I’m running my head against a brick wall for every step I am taking trying to do simulations, I guess I’d like to get my hands on a good tutorial on the KiCad-Spice-Library.

EDIT:
After some further googling over at youtube I finally found a link that leads to some useful information:
http://ngspice.sourceforge.net/ngspice-eeschema.html

That video is 2 years old when KiCad 5.1.2 was current, so the references are going to be out of date. The vague reference you are referring to was supposed to be this thread “on the forums”:

Which links to the same spot as the link in your EDIT above. So you are at least on the right track now. The spice.rc file needs to be created as a new blank text file.


As for updating the ngspice that ships with KiCad 5.1.9 (ngspice-32) and if you really need to…I would say it’s worth it but it would be better to uninstall KiCad 5.1.9 and simply install KiCad 5.1.10 which already ships with ngspice-34.

The reason why Holger’s #kicad download link is not currently working is because it was temporary. It was for giving us options to test pre-release builds of ngspice, which fixed critical bugs, along with KiCad. Now that the latest ngspice-34 is available through the standard update process (found in Step 1 of the link you found), the #kicad specific download link is not needed until there are new pre-release builds he thinks will be useful for end-users to test or which can’t wait until the next official release cycle.

2 Likes

Thanks for the clarification. At least next time someon else who is in same situation will have clue.
After creating the spice.rc file I got it working.
My only issue now is that some spice models will cause nonsense errors or even cause kicad to crash without warning but I guess that should rather be reported to the ngspice dev forum.

It would be of great interest to learn about these problems. Please report these here, but open a new thread with an appropriate title.

Some models may create convergence errors, we continuously improve ngspice to remove them.

KiCad should never crash when using ngspice. So again we need to learn about the reasons, and the Eeschema-ngspice interface is best being discussed here.

1 Like