EEVblog Electronics Community Forum

Electronics => PCB/EDA/CAD => KiCad => Topic started by: SpeedrunnerG55 on October 06, 2022, 07:24:16 pm

Title: csd17506q5a spice model
Post by: SpeedrunnerG55 on October 06, 2022, 07:24:16 pm
I don't know much about getting transistor models into spice.
But I downloaded the spice model for the CSD17506Q5A n channel power MOSFET from the Texas Instruments website.
I tried to use it but it does not work.

it seems to me there are more steps involved that are not apparent when I look up tutorials

> Compatibility modes selected: ps lt
> warning, can't find model 'csd17506q5a' from line
> q2 net-_d2-pad2_ net-_d2-pad2_ net-_d2-pad2_ net-_l4-pad2_ /cap csd17506q5a
> warning, can't find model 'csd17506q5a' from line
> q4 gnd gnd gnd net-_b1-pad1_ net-_d2-pad2_ csd17506q5a
> warning, can't find model 'csd17506q5a' from line
> q3 gnd gnd gnd net-_b2-pad1_ net-_d1-pad2_ csd17506q5a
> warning, can't find model 'csd17506q5a' from line
> q1 net-_d1-pad2_ net-_d1-pad2_ net-_d1-pad2_ net-_l1-pad2_ /cap csd17506q5a
> Circuit: KiCad schematic
> Error on line 5 :
> q2 net-_d2-pad2_ net-_d2-pad2_ net-_d2-pad2_ net-_l4-pad2_ /cap csd17506q5a
> could not find a valid modelname
> Background thread stopped with timeout = 0
> Error: circuit not parsed.

any ideas?
Title: Re: csd17506q5a spice model
Post by: Benta on October 06, 2022, 11:57:18 pm
Too little information.
Just downloading is not enough, the model needs to integrated in your schematic's device. Tell us what you've done.
As you're posting in the KiCAD section, I expect we're talking ngspice?

Title: Re: csd17506q5a spice model
Post by: SpeedrunnerG55 on October 07, 2022, 12:44:43 am
Yes ngspice

I selected the lib file for each of the symbols.

I just noticed the model was set to BJT... not sure why. changed that to subcircuit.
changed the alternate node sequence to 5 4 1

but now it's giving me different messages

Code: [Select]
Compatibility modes selected: ps lt
Circuit: KiCad schematic
Original line no.: 0, new internal line no.: 116:
Undefined number [pwidthp]
Original line no.: 0, new internal line no.: 116:
Cannot compute substitute
Original line no.: 0, new internal line no.: 122:
Undefined number [pwidthp]
Original line no.: 0, new internal line no.: 122:
Cannot compute substitute
Original line no.: 0, new internal line no.: 148:
Undefined number [ptrc1]
Original line no.: 0, new internal line no.: 148:
Cannot compute substitute
Original line no.: 0, new internal line no.: 116:
Undefined number [pwidthp]
Original line no.: 0, new internal line no.: 116:
Cannot compute substitute
Original line no.: 0, new internal line no.: 122:
Undefined number [pwidthp]
Original line no.: 0, new internal line no.: 122:
Cannot compute substitute
Original line no.: 0, new internal line no.: 148:
Undefined number [ptrc1]
Original line no.: 0, new internal line no.: 148:
Cannot compute substitute
Original line no.: 0, new internal line no.: 116:
Undefined number [pwidthp]
Original line no.: 0, new internal line no.: 116:
Cannot compute substitute
Original line no.: 0, new internal line no.: 122:
Undefined number [pwidthp]
Original line no.: 0, new internal line no.: 122:
Cannot compute substitute
Original line no.: 0, new internal line no.: 148:
Undefined number [ptrc1]
Original line no.: 0, new internal line no.: 148:
Cannot compute substitute
Original line no.: 0, new internal line no.: 116:
Undefined number [pwidthp]
Original line no.: 0, new internal line no.: 116:
Cannot compute substitute
Original line no.: 0, new internal line no.: 122:
Undefined number [pwidthp]
Original line no.: 0, new internal line no.: 122:
Cannot compute substitute
Original line no.: 0, new internal line no.: 148:
Undefined number [ptrc1]
Original line no.: 0, new internal line no.: 148:
Cannot compute substitute
Copies=91 Evals=416 Placeholders=13 Symbols=28 Errors=24
Numparam expansion errors: Problem with input file.
Error: ngspice.dll cannot recover and awaits to be detached
Note: can't find init file.
******
** ngspice-36 shared library
** Creation Date: Sat Jan  1 18:54:42 UTC 2022
******
Error: there aren't any circuits loaded.
Title: Re: csd17506q5a spice model
Post by: hvogt on November 06, 2022, 08:07:38 am
Unfortunately the model in csd17506q5a.lib has syntax incompatible to ngspice (and the PSPICE manual). If you change it (lines 43 ff) like:

Code: [Select]
.PARAM  ptrc1   = 5.5e-3  
.PARAM  ptrc2   = 10.0e-6
.PARAM  pwidthP = 1.972
.PARAM  pwidth  = {pwidthP*1e6}
.PARAM  perimP  = {2.1*pwidthP}
.PARAM  perim   = {perimP*1e6}

(see the '=' token), it will be o.k.. Even better if you add
Code: [Select]
.option gmin=1e-11
to your netlist, e.g. as a text box on the Eeschema canvas.