Help Adding a Spice Model - Worked Example for a TL431

Help Adding a Spice Model - Worked Example for a TL431

Michael_Dalby6FK4J
Participant Participant
474 Views
3 Replies
Message 1 of 4

Help Adding a Spice Model - Worked Example for a TL431

Michael_Dalby6FK4J
Participant
Participant

Hi Everyone,

 

I wonder if you could help me with a process to add a spice model to a library component for an TL431 (Shunt regulator)?

I have tried to do this several times and failed to get a working simulation yet. 

 

I know how to create a part , but I a bit lost when it comes to successfully adding the spice model.

 

From looking at several blogs and tutorials for simple parts like diodes, it looks fairly straight forward.... but when it comes to my part I am a bit lost.  

 

For the Spice type (when I add the load Spice model) do I chose 'X: Subcircuit' as the model type (as nothing else in the list matches the description of the device)?

Michael_Dalb_0-1699536901117.png

 

I have downloaded the Ti spice model and mapped it.

Michael_Dalb_2-1699537672092.png

 

 

All seems to be okay. but when I run the simulator I get the following error:

Michael_Dalb_1-1699537491953.png

 

The Model is pretty short:

*****************************************************************************
* TL431 MACROMODEL ***************3-26-92************************************
* REV N/A ****************************************************************DBB
*****************************************************************************
* REFERENCE
* | ANODE
* | | CATHODE
* | | |
.SUBCKT TL431 1 2 3
V1 6 7 DC 1.4V
I1 2 4 1E-3
R1 1 2 1.2E6
R2 4 2 RMOD 2.495E3
R3 5 7 .2
D1 3 6 DMOD1
D2 2 3 DMOD1
D3 2 7 DMOD2
E1 5 2 POLY(2) (4,2) (1,2) 0 710 -710
.MODEL RMOD RES (TC1=1.4E-5 TC2=-1E-6)
.MODEL DMOD1 D (RS=.3)
.MODEL DMOD2 D (RS=1E-6)
.ENDS

 

Any help that you can offer will be appreciated?

 

Kind regards

Michael

 

 

 

 

0 Likes
475 Views
3 Replies
Replies (3)
Message 2 of 4

holger.vogt
Advocate
Advocate

Probably you are still using the old ngspice-26, which does not understand several PSPICE constructs. Newer ngspices do automatically understand, current version is ngspice-41.

 

Here you might help yourself by editing the model.

 

Comment out the following 2 lines by a leading asterisk:

 

*R2 4 2 RMOD 2.495E3

...

*.MODEL RMOD RES (TC1=1.4E-5 TC2=-1E-6)

 

Add the line

R2 4 2 2.495E3 TC1=1.4E-5 TC2=-1E-6

 

This will give the same results as the original lines.

0 Likes
Message 3 of 4

Michael_Dalby6FK4J
Participant
Participant

Hi Holger,

 

Many thanks for the response. I have a very new installation of Fusion 360 (days old) .... how can I tell if it is using the old ngspice 26 or the new -41? ..... If I am using the old one then how do I go about updating it?

 

Kind regards

 

Michael

0 Likes
Message 4 of 4

holger.vogt
Advocate
Advocate

If you are on MS Windows:

Goto

C:\users\<your name>\Appdata\

Search for ngspice.exe

When you have found it, open its directory. Double click onto ngspice.exe. And you will see the version.

 

For an update, you may have a look at https://ngspice.sourceforge.io/download.html#eagle.

 

To state it clearly: This update is not endorsed by Autodesk, your are alone responsible for any issues.

 

If you are not on MS Windows, I do not have any concise solution available.

0 Likes