3
\$\begingroup\$

I want to simulate a schematic with an AD8677. I found the Spice model here. I renamed the model in ad8677.lib and placed it to my library folder.

Then I made a copy of the generic opamp model opamp2.asy (LTspiceXVII\lib\sym\OpAmps), changed the pin list, edited the attributes as it follows here and renamed it to ad8677.asy

enter image description here

enter image description here

In the simulation, I add the directive

.inc ad8677.lib

When i start a transient simulation i get the following error message:

enter image description here

I do not understand this, because I have defined five PINs in my symbol and gave the same numbering as stated in the ad8677.lib file.

enter image description here

Would be great if someone can point out my mistake.

Thanks!

\$\endgroup\$
1
  • \$\begingroup\$ If you wanted automatic library discovery (without user's .lib) then delete the SpiceModel and add it to the ModelFile. \$\endgroup\$ Commented Sep 30, 2022 at 14:18

2 Answers 2

3
\$\begingroup\$

I think the problem is your SpiceOrder parameters in the symbol. What you've done there is told SPICE that the pin "In+" is the first terminal in the definition, "In-" is the second terminal in the definition, and then that "OUT" is the thirty-ninth terminal in the definition. Since there are only five terminals in the definition, none of them is the thirty-ninth, and the simulator gives up and throws an error message. Obviously the fact that you've said that "V-" is the fiftieth terminal and that "V+" is the ninety-ninth would cause problems as well, but it doesn't even get there.

The numbers used in there are not the correct SpiceOrder parameters to use, they're just the internal names of the nodes in the subcircuit. The correct SpiceOrder for the output would be 5, as it's the fifth terminal in the definition, even though the name of the node connected to it might be 39. That node name could just as well be "Q" or "out" or "Frederick"--it doesn't matter, all that matters to you is that it's the fifth terminal listed in the definition.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you for pointing out my mistake of numbering the pins. \$\endgroup\$
    – sepplhans
    Commented Oct 3, 2022 at 7:12
2
\$\begingroup\$

I just dropped in the entire Spice model, exactly as I got it from the web site you mentioned, and things are working. (The model doesn't work well, but I can get it to run.)

I've set the input frequency to \$1\:\text{Hz}\$ and the gain to \$-2\$ using an inverting input topology. I also needed to set the integration strategy to gear.

Here is what I see for a simple circuit:

enter image description here

Which is what I expected. And I didn't get any errors, at all.

But it runs slowly and it is finicky. I think the model needs work.

I'm not getting the errors you got. So we did something differently. In my case, I just pasted the entire Spice model right onto the schematic, directly. I didn't create a separate file on disk for it. Then I just changed the opamp2 name to AD8677. (I didn't change the .ASY from cell to block, which it appears you did do. And I didn't put anything into the SpiceModel line or the ModelFile line. Neither should you.) That's about all I did.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.