LTSpice Model File node labels

Status
Not open for further replies.
I am new to LTSpice so my question may be one due to inexperience.

Two IC model file I have downloaded (AD797 and LMH6321) have differing node numbers to that the physical device has. For example, this is the designation for the AD797 –

* Node assignments
* non-inverting input
* | inverting input
* | | positive supply
* | | | negative supply
* | | | | output
* | | | | | decompensation
* | | | | | |
.SUBCKT AD797S 1 2 99 50 38 14


The actual pinout is 3, 2, 7, 4 and 8 respectively.

There must be a reason why the manufacture has labelled the nodes in such a manner so could anyone enlighten me please.

And the reason I need an answer is that the two circuits I have drawn using these devices do not work and LTSpice indicated that the problem is with these.

Thanks for any answer provided.
 
Are you familiar with the programming concept of "variable scope"? There's a similar idea at work here: the NODE NUMBERS used in a subcircuit model have meaning ONLY within that subcircuit. (Except for node "0" (zero), the global "ground node".)

And then there are three different abstractions related to the component, correlated to each other, but not necessarily in a straightforward manner. These are:

  • The PHYSICAL PART, whose package may have connection pin numbers assigned in a standardized way.
  • The SCHEMATIC SYMBOL which implicitly or explicitly identifies connection pins by their function ("inverting input", "ground", etc). In LTSpice, the physical part's package pin numbers almost never appear on the schematic symbol. (You can certainly add package pin numbers to a schematic symbol if you are so inclined, but these numbers placed on the symbol graphic have no relation to the subcircuit nodes.)
  • The SUBCIRCUIT MODEL used for simulation, whose node numbers have meaning only during the simulation.
Where you are probably having trouble is mapping pins from the schematic symbol, into the subcircuit model definition. The schematic symbol assigns an identifying number to each connecting pin on the SYMBOL, starting with pin "1". These designations of the SYMBOL PINS may - but seldom do - reflect the standard pin numbers of the part's PHYSICAL package. Similarly the SYMBOL pin designations may - but almost never do - reflect the node numbers in the SUBCIRCUIT MODEL definition.

The first line of the subcircuit definition specifies the pin mapping. After the SPICE directive (".SUBCIRCUIT") comes the subcircuit's name. In your example the name is "AD797S". Then comes a list of node numbers that apply ONLY within the .SUBCIRCUIT definition. The simulator assumes the SCHEMATIC SYMBOL's pin number "1" is connected to the first node number in the list (in your case, node "1"). In your example, schematic symbol pin 2 is connected to subcircuit node 2 . . . but schematic symbol pin 3 connects to subcircuit node "99"!

You can verify the SCHEMATIC SYMBOL pin designations by opening the symbol's "*.asy" file. You'll find most of the symbols in the " ..\LTspiceIV\lib\sym\ " directory. If you open the *.asy file in LTSpice itself, go to the "View" drop-down menu and select "Pin Table". There you'll see the pin designations for the schematic symbol. You can also open the *.asy file in any basic text editor. Each pin has an associated "SpiceOrder" attribute, which tells you the pin's designation in the schematic symbol. See atch screen captures.

The standard LTSpice "Universal Opamp" schematic symbol has 5 connection pins. Your subcircuit model for an AD797 lists 6 node numbers. The first 5 node numbers in the subcircuit model agree with the pin order used in the schematic symbol, but you will have to come up with a symbol that has 6 connection pins.

Dale
 

Attachments

  • Pin_Table.PNG
    Pin_Table.PNG
    203.4 KB · Views: 297
Thank you for your replies, both have been of help.

Firstly, I was adding op amps as New Components so Topic 17 was beneficial as I could use the standard 5 pin op amp symbol and a Spice directive to add the component to my circuit (looks far better!)

Moving on from that, for the two devices that have 6 and 4 pins, I created new symbols from the standard 5 pin op amp one. Once I had checked the node allocation was correct, as Dale described above, these were then added as per Topic 17. Both circuits now work so I appear to have got this right!

I would still like to know why the model files have non-standard pin numbers, there must be a reason why the manufactures do this.

Thank again to Mooly and Dale for your help.
 
. . . I would still like to know why the model files have non-standard pin numbers, there must be a reason why the manufactures do this . . . .
As this thread shows, there is NO "standard" for assigning pins in the SPICE subcircuit files for opamps. In my experience the majority of subcircuit models follow the convention used by the LTSpice symbols, but there are enough exceptions that I always verify pin and node assignments when I first use a model. (And, I have edited a few subcircuit files to make them compatible with the LTSpice symbols.)

I can offer only speculation about the choice of pin numbers and order in the model files but I'll give YOU the chance (since you asked the question!) to do the legwork that confirms or disproves my speculations.

Is the most common node numbering and pin assignment an artifact from the original macromodel paper by Boyle, Cohen et al? ("Macromodeling of Integrated Circuit Operational Amplifiers", IEEE Journal of Solid State Circuits Vol SC-9, No 6, Dec 1974) Habit and inertia would tend to perpetuate whatever pin and node assignments were shown in that seminal publication. If I, as a researcher, student, or even casual observer, want to validate my own work by comparing it to the most original source (Boyle et al) the job will be easier if my nodes and pins mimic theirs. After I start building a library of several such models there is a strong disincentive to adopt any other pin or node convention.

(Once you have a copy of the Boyle paper in hand it should be easy to see what pin and node assignments they used in their examples. The original paper occasionally pops up on somebody's web page, but the IEEE is pretty stern about keeping its published works available ONLY through official IEEE channels. A university with a half-way decent engineering library should have the original Journal available for reading or photocopying.)

Of the models where pin and node assignments do NOT conform to the LTSpice symbols, how many of them use pin and node assignments that DO conform to a manufacturers actual physical parts? This can be quickly confirmed with the subcircuit model in one hand and a Data Sheet in the other.

Did the PSPICE "Parts" program have a "standard" for assigning pins and nodes? How many of the published models conform to that standard?

Well, if you're really interested in getting your question answered, those three ideas may get you started.

Dale
 
Status
Not open for further replies.