I am relatively new to KiCad, having created and ordered my first PCB designed using KiCad only a week ago!
As a hobbyist, up until now I have been using LT Spice for SPICE simulation. Now that I am using KiCad for PBC layout, this means having to design and test the schematic in LT Spice and then re-drawing it a second time in Eeschema in order to be able proceed to the PCB design stage. It therefore seemed like a good idea to experiment with the KiCad integrated ngspice simulator as that way the schematic would only have to be drawn once. I am presently running KiCad 5.0.0 on Linux.
I was able to successfully test the RC Ladder example in the tutorial here so it seems that the simulator is working:
http://ngspice.sourceforge.net/ngspice-eeschema.html
The first thing that somewhat surprised when I started drawing my own schematic (which has already been tested successfully in LT Spice) was that there was not model for a 1N4148 diode or a BC109 transistor. Ok, so spice models can be found online and I already had some of them so I found a standard.bjt library which included the BC109, I copied the 1N4148 model from LT Spice, and used the third party LM386 model that I already had downloaded for the existing project in LT Spice. For the LM386, I made sure to set up the alternative Spice Node Sequence to match the model. Having got rid of any errors relating to model configuration I then got this:
Circuit: KiCad schematic
Original line no.: 1, new internal line no.: 4:
Undefined number [ONSEMI]
Original line no.: 1, new internal line no.: 4:
Cannot compute substitute
Original line no.: 57, new internal line no.: 125:
Undefined number [PHILIPS]
Original line no.: 57, new internal line no.: 125:
Expression err: philips)
Original line no.: 57, new internal line no.: 125:
Cannot compute substitute
Copies=392 Evals=395 Placeholders=3 Symbols=7 Errors=5
Numparam expansion errors: Problem with input file.
Error: ngspice.dll cannot recover and awaits to be detached
Note: canāt find init file.
** ngspice-27 shared library
** Creation Date: Mon Dec 11 08:26:09 UTC 2017
Error: there arenāt any circuits loaded.
At present I am doing a transient simulation and setting up the parameters in Settings in the simulator GUI, time step 1u, final time 100msec. Iām told these line numbers relate to the āinternalā parsed file that is passed to ngspice. In an attempt to debug this further and show this listing, I added the following to the schematic text:
+PSPICE
.control
listing
.endc
Unfortunately, it made no difference.
Not sure how to proceed from here, so any help would be appreciated.