I noticed that the old version of ngSpice is being used with the kicad_5.0.2 package from the repository (that does not support VDMOS models).
So, I made a new version of the package libngspice-kicad with ngSpice 30. I used the original source package and just replaced the source code of ngSpice, incremented the version numbers and added new entry in the changelog.
libngspice-kicad_0.2-30_amd64.deb (1.9 MB)
libngspice-kicad_0.2-30_amd64.deb.sha512sum (166 Bytes)
I also built again the kicad_5.0.2 package. The kicad_5.0.2 from the repository is working with the new library, however I am not sure if it’s correct to use it with the newer ngspice library.
Download from Google Drive (download all at once link):
Packages are built on Ubuntu 16.04.5 LTS.
First, I built and installed the new version of the ngspice library (version 30):
$ sudo dpkg -i libngspice-kicad_0.2-30_amd64.deb
$ sudo dpkg -i libngspice-kicad-doc_0.2-30_amd64.deb
Then, I installed most of the packages from the repository (except kicad - note the sign “-” after the “kicad”):
$ sudo apt-get install kicad-doc-en kicad-footprints kicad-packages3d kicad-symbols kicad-templates kicad-
Then, I built and installed my version of the kicad.
$ sudo dpkg -i kicad_5.0.2-stable-201811280958+bee76a0~70~ubuntu16.04.1_amd64.deb
Here is the list of installed “kicad” packages on my system:
valentin@computer:~$ apt list --installed | grep kicad
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
kicad/xenial,now 5.0.2-stable-201811280958+bee76a0~70~ubuntu16.04.1 amd64 [installed]
kicad-doc-en/xenial,xenial,now 5.0.2-stable-201812071423+1518~17~ubuntu16.04.1 all [installed]
kicad-footprints/xenial,xenial,now 5.0.2-stable-201812071423+5bf695a~9~ubuntu16.04.1 all [installed]
kicad-packages3d/xenial,xenial,now 5.0.2-stable-201812071618+c24f4c5~7~ubuntu16.04.1 all [installed]
kicad-symbols/xenial,xenial,now 5.0.2-stable-201812071435+84cd7f9~6~ubuntu16.04.1 all [installed]
kicad-templates/xenial,xenial,now 5.0.2-stable-201812071430+31b13f2~8~ubuntu16.04.1 all [installed]
libngspice-kicad/now 0.2-30 amd64 [installed,local]
libngspice-kicad-doc/now 0.2-30 amd64 [installed,local]
valentin@computer:~$
I did not rebuilt all the packages, because I think there is no need to do it.
I did not installed kicad-dbg_5.0.2
and kicad-demo_5.0.2
, because they are not critical.
Checksums:
ba4752f70ee89e85ec7adbab8bb7d1542c90bdff7b60720ca66a8a491f8e4f7174ccc1795d971a22f807ef903af532fb843edb65080ec9c76250b1d796b42026 ./libngspice-kicad_0.2-30_amd64.deb
feb484a5348732bb48ee49e9ed133601bb0316d64757ecf44d19e48c677a332a31b01849bc548f781292db1f15f407a782ba7b7638dd2c570d84f7eb305642db ./libngspice-kicad-doc_0.2-30_amd64.deb
bb3dce4860e7633b0bc6dc11fd6b8ce9a028935bef2ed2ec9862e2775c0036340bf3d45895be35c5c889a8f677c13f38567f7cdbc725bda4650d8aa2b6d45ce8 ./kicad_5.0.2-stable-201811280958+bee76a0~70~ubuntu16.04.1_amd64.deb
aa0a2ee8e7b6ba029dbbe7359c4cd7826b78959a95d241534af5abe1f7c35650c8ad3ffc4198af21b5b50d2acccdf2e1310fd66e4c91b5229894a2034f985925 ./kicad-dbg_5.0.2-stable-201811280958+bee76a0~70~ubuntu16.04.1_amd64.deb
cc567cae7619cd741aa38c4f89fbc5569d0a51e02e2f97c5df9d0dfc1c79d4506aa0d007fa3233cf6e13b770eb24ef5c73648224a6d54222e587c7c2d5d9eef9 ./kicad-demo_5.0.2-stable-201811280958+bee76a0~70~ubuntu16.04.1_all.deb
I tested it and it works with some subcircuits. But with other subcircuits KiCad crashes (segmentation fault).
Example of subcircuit that induces crash:
.SUBCKT Transistor 1 2 3
M5 1 2 3 Si4842DY
.model Si4842DY VDMOS(Rg=3 Rd=2.4m Rs=1.8m Vto=2 Kp=98 Cgdmax=1n Cgdmin=.13n Cgs=1.7n Cjo=.5n Is=50p Rb=3m mfg=Siliconix Vds=30 Ron=6m Qg=25n)
.ENDS Transistor
Example of subcircuit that does not induce crash (but is wrong and the program return error message):
.SUBCKT Transistor 1 2 3
V5 1 2 3 Si4842DY
.model Si4842DY VDMOS(Rg=3 Rd=2.4m Rs=1.8m Vto=2 Kp=98 Cgdmax=1n Cgdmin=.13n Cgs=1.7n Cjo=.5n Is=50p Rb=3m mfg=Siliconix Vds=30 Ron=6m Qg=25n)
.ENDS Transistor
The error message is:
Error on line 0 :
v.xm1.v5 vds vgs 3 3 si4842dy
unknown parameter (3)
Archive of the project (if you want to test it).
When I use transistors defined as MOSFET (without subcircuit) it works. For example:
.model Si4842DY VDMOS(Rg=3 Rd=2.4m Rs=1.8m Vto=2 Kp=98 Cgdmax=1n Cgdmin=.13n Cgs=1.7n Cjo=.5n Is=50p Rb=3m mfg=Siliconix Vds=30 Ron=6m Qg=25n)