KiCad Nightly 7.99 and 7.0.1 do not read all valid VDMOS models
Description
When running the attached project and attaching a model to the MOS power transistor, only 2 out of 5 model parameter sets are recognized. The others deliver nonsense statements to ngspice.
Steps to reproduce
- Load the project
- Attach a model from file IRF-Power-VDMOS.mod
- Inspect --> Simulator --> Simulation --> Show Spice Netlist
Only models number 1 and 5 do attach o.k., even if no. 4 is standard (nchan is never given in model parameter collection like http://bordodynov.ltwiki.org/standard.mos.XVII.txt).
* VDMOS models
* no. 1 ---> o.k.
.model IRF9540_1 vdmos pchan VTO=-3.192 RS=0.05098 KP=13.966 RD=0.0985 RG=21.486 mfg=International_Rectifier Vds=-100 CGDMAX=2.00n CGDMIN=2.00E-11 Cjo=5.13E-10 IS=2.39e-27 Rb=0.0447 TT=1.465e-07 Cgs=1.27E-09 Ksubthres=0.1
* no. 2 ---> fail
.model IRF9540_2 vdmos (pchan VTO=-3.192 RS=0.05098 KP=13.966 RD=0.0985 RG=21.486 mfg=International_Rectifier Vds=-100 CGDMAX=2.00n CGDMIN=2.00E-11 Cjo=5.13E-10 IS=2.39e-27 Rb=0.0447 TT=1.465e-07 Cgs=1.27E-09 Ksubthres=0.1)
* no. 3 ---> fail
.model IRF9540_3 vdmos ( pchan VTO=-3.192 RS=0.05098 KP=13.966 RD=0.0985 RG=21.486 mfg=International_Rectifier Vds=-100 CGDMAX=2.00n CGDMIN=2.00E-11 Cjo=5.13E-10 IS=2.39e-27 Rb=0.0447 TT=1.465e-07 Cgs=1.27E-09 Ksubthres=0.1 )
* no. 4 ---> fail
.model IRF540 vdmos VTO=3.542 RS=0.03646 KP=35.149 RD=0.0291 RG=6 mfg=International_Rectifier Vds=100 CGDMAX=2.70n CGDMIN=4.00E-11 Cjo=4.76E-10 IS=1.32p Rb=0.01 TT=2.305e-07 Cgs=1.54E-09 Ksubthres=0.1
* no. 5 ---> o.k.
.model IRF540N vdmos nchan VTO=3.708 RS=0.03657 KP=83.934 RD=0.0031 RG=15.08 mfg=International_Rectifier Vds=100 CGDMAX=4.00n CGDMIN=8.00E-11 Cjo=1.87E-10 IS=2.84e-15 Rb=0.0014 TT=2.179e-07 Cgs=1.21E-09 Ksubthres=0.1
For example model no. 4 is resultimng in the following netlist:
.title KiCad schematic
.include "D:/Spice_general/KiCad-700/Buck/IRF-Power-VDMOS.mod"
.model __D101 D
.save all
.probe alli
.tran 1u 10m
L101 /PWM_OUT /VOUT 100u
R101 Net-_Q1-G_ /PWM_IN 33
Q1 IRF540
V102 Net-_Q1-D_ 0 DC 12
R103 /VOUT 0 5
C101 /VOUT 0 10u
D101 0 /PWM_OUT __D101
V101 /PWM_IN 0 PULSE( 0 15 20n 20n 20n 15u 50u )
.end
where line entry Q1 IRF540
is nonsense.
KiCad Version
Application: KiCad Schematic Editor x64 on x64
Version: 7.0.1, release build
Libraries:
wxWidgets 3.2.2
FreeType 2.12.1
HarfBuzz 5.0.1
FontConfig 2.14.1
libcurl/7.83.1-DEV Schannel zlib/1.2.13
Platform: Windows 10 (build 19044), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: Mar 11 2023 03:41:46
wxWidgets: 3.2.2 (wchar_t,wx containers)
Boost: 1.80.0
OCC: 7.6.2
Curl: 7.83.1-DEV
ngspice: 39
Compiler: Visual C++ 1934 without C++ ABI
Build settings:
KICAD_SPICE=ON
as well as today's 7.99 nightly on MS Windows. ngspice 39 might even crash, only recently patched ngspice will survive all 5 model entries.
Edited by holvo