I am effectively brand new to Kicad and quite new to the field of electronics - currently distance learning at college of West Anglia.
I now see Kicad as an end to end solution (concept to completion) and simulation as an integral part of that process. But boy has simulation been a bittersweet experience. Whilst some others were turning up at tutorials with sheets of graph paper with hand-drawn creations; me and a couple of other ‘converters’ had plotted and proven schematics to offer with accompanying evidence sheets and plots.
At first, I couldn’t get my head around simulation at all, so resorted to circuit drawing in Kicad - plotting in ltspice - then printing both off separately. Very cumbersome. After spending hours dredging through the www and cobbling bits and pieces of info together I am now getting to grips with Kicad and simulation. Now I need to get a grip of spice directives and ‘of course’ my electronics study!
But without a doubt, Kicad is the way for me and I think some of my chums on the course are coming round to the idea as well.
NB many of the spice models available on the www don’t work with kicad it seems… Comments welcome.
You will need ngspice-30 and set the variable ngbehavior, as described in http://ngspice.sourceforge.net/ngspice-eeschema.html#setting. Then all Spice, PSPICE and TINA models may be used. Most IC companies offer such models. LTSPICE models may be used as well, if they don’t use proprietary devices (e.g. LTSPICE A devices). If so, one has to find a special replacement for this A device.
Unfortunately the current KiCad is delivered with ngspice-27, still not having this compatibility flag. You may vote for the upgrade by supporting my bug report at https://bugs.launchpad.net/kicad/+bug/1821520 by clicking onto the “Does this bug effect you?” button.
ngspice however will not be able to read encrypted models. Unfortunately some semiconductor vendors only offer encrypted models for their more complex ICs, to prevent people from having a look at their internals. These models cannot be made compatible with an open source simulator. You may request for an unencrypted model with the vendor, perhaps you may get it after signing a NDA.
I have already read the into you mention but it refers to Windows and Linux. No mention of MAC. I have already downloaded and installed ngspice-30, but it only seems to work in terminal mode, no GUI.
Can you advise how I can implement ngspice-30 on a MAC
. That would be exceedingly helpful. I’m not much of a computer geek, only just starting to learn spice directives out of necessity to fulfil myself and the forthcoming objectives of the course I am following.
ngspice-30 for KiCad is now available in the current nightly for Windows towards KiCad 6 (see https://bugs.launchpad.net/kicad/+bug/1821520). The macOS package maintainer hopefully will consider this as well (or he has to be alerted to do so). I cannot provide a macOS shared library of ngspice-30.
To get the ngspice version from inside KiCad, you have to do a trick:
Open empty eeschema window.
Edit a text box (T from the right column) and type in the following:
.op $ just a dummy command here
.control
version
.endc
.op just gives a simulation command, the .control section will return the ngspice version.
Now do Tools–>Simulator–>Run Simulation
and you will see the ngspice version.
Unfortunatly, KiCad 5.1.2 stable in macOS (downloaded last month) seems to ship with ngspice26. (I’m not in front of my computer to check the exact version string). I have a homebrew installed ngspice30 but can’t seem to link that to kicad.
It seems to me that homebrew is not offering the shared library version of ngspice-30 that is required for linking with KiCad. libngspice version 28 is available, but that’s not quite what I would recommend. Maybe you can urge the homebrew people to upgrade their libngspice?
TBH, I have never tried building Kicad from source - the instructions seemed rather daunting and I have generally been happy with either the latest stable or testing the odd nightly build of what would become 5 & 5.1 when nearly mature in the development cycle. I have not played much with the simulator yet - it is clearly making a lot of progress but I have tended to fall back on LTSpice and QUCS for something with a GUI on macOS. Patching build scripts in any way that doesn’t involve spoon-feeding me the instructions is probably, sadly, outside my skillset.
@John_Pateman using the build scripts with build.py --target package-kicad-nightly should work out of the box. Then you can patch the relevant file and retry.