I may be missing something obvious, or my install is broken. I can get generic BJT models working fine with
.model qnpn npn
.model qpnp pnp
but when I try a generic mosfet, I get “could not find a valid modelname” error. According to ngspice-27 manual, chapter 11.2 MOSFET models (NMOS/PMOS) a minimal model is
Each model is invoked with a .model card. A minimal version is:
.model MOSN NMOS level=8 version=3.3.0
Ha! The Law of Sod says I find the answer just after posting
The problem is not really the modelname ! ngspice is expecting 4 nodes for the mosfet, so it thinks pmos is the 4th node, and the model name is blank. Of course a blank name is not found…
The error message might be strictly correct, but completely confusing. Since modelname is mandatory parameter, a message “insufficient parameters supplied” would be better.
Answer: The latest KiCad pspice.lib has the mosfet symbols with the substrate pins. For own symbols, use a MOSFET symbol with 4 pins, in the order specified in Chapter 11.1 MOSFET devices
nice, was able to get mosfets working for first time on a project with your example; still haven’t figured out how to use all the types like vdmos, etc.
yes, installed ngspice 30 from http://ngspice.sourceforge.net/tutorials.html
and then kicad 5 which is said to have ng 30 built in. trying to figure how to check version of ng running…
Installing ngspice according to the tutorials.html does not help. Please have a look at the eeschem/ngspice tutorial cited above.
Installing KiCad under Windows will install ngspice as libngspice-0.dll into KiCad/bin. This is still version 27. You have to overwrite it by the procedure described in http://ngspice.sourceforge.net/ngspice-eeschema.html.