0
\$\begingroup\$

I am trying to make a model for an op-amp (AD8000) in LT SPICE. So far here is what i did:

First I downloaded the model from https://www.analog.com/en/products/ad8000.html and opened it from my downloads: enter image description here

Which then gave me this page with text. I right clicked AD8000

enter image description here

and clicked create symbol

enter image description here

then I went to documents>LTSPICEXVII>lib>sym>Autogenerated>AD8000 I right clicked on AD8000 and then hit open with NOTEPAD

enter image description here

I went to documents>LTSPICEXVII>lib>sym>OpAmps then right clicked on LTC6253-7 and clicked open with NOTEPAD like i did with AD8000

Then I highlighted everything from the line that says "version 4" to the line above "windows", copied enter image description here

and pasted it to everything on the AD8000 file above "windows"

enter image description here

then highlighted everything from the following section of the LTC6253-7 NOTEPAD file:

enter image description here

And pasted it into the following AD8000 file below the last line that says SYMATTR

enter image description here

then i closed both of the notepad files and opened up a new LTSPICE window and, on the menu bar of LTSPICE at the top, I clicked file>open then selected documents>LTSPICEXVII>lib>sym>Autogenerated>AD8000

which gave me the aesthetically pleasing Op-Amp-esque symbol for my AD8000 that was derived from LTSPICE's built in LTC6253-7 meaning that it came with a shutdown pin.

enter image description here

I went ahead and removed the "!S" logo.

enter image description here

Now the important question i have: How do I know if the inverting pin on that symbol really corresponds to the inverting pin, if the non-inverting pin corresponds to the non-inverting pin, etc. from the following:

enter image description here

edit: I opened the symbol for LTC6253-7 and right clicked each pin. The pin assignments were copied and pasted to the AD8000. The picture above of the model file for AD8000 lists the order as noninverting (1), inverting(2), positive supply(3), negative supply(4), output(5), and powerdown(6). However, when i right clicked each pin from LTC6253-7 and the newly created symbol for AD8000, the pin assignments are: output(1), negative supply(2), inverting(3), non-inverting(4), shutdown(5), and positive supply(6). Should I switch the pin order of the AD8000 symbol so it matches its model file?

edit 2: This edit is for anyone other than myself who encounters this problem in the future. I followed @periblepsis suggested technique and I got the same results they did. Initially I ran into the problem "could not open Ad8000.lib". To fix this problem, I went to Tools>control panel> sym. & lib. search paths. Under library search path I copy and pasted the directory containing the AD8000 model I downloaded "...LTspiceXVII\lib" (I of course did this after moving the AD8000.lib file from the download folder to ...LTspiceXVII\lib) and it fixed the problem. Prior to doing this, the search paths for symbol and library were both empty. This may explain why LTSPICE could not fine my model file.

\$\endgroup\$
1
  • 3
    \$\begingroup\$ The answer to the question "Should I switch the pin order of the AD8000 symbol so it matches its model file?" is "yes", and it's always "yes" for any symbol and model file pair. \$\endgroup\$
    – Ste Kulov
    Commented Jun 26 at 6:53

1 Answer 1

4
\$\begingroup\$

I've never used the auto-generate capability. Not once. And now that I see how you used it and what you got out of it, I probably never will use it.

This is how I've been creating symbols using the regular editing features in LTspice:

  1. Create a new schematic sheet in LTspice. Hit F2 key to pop up the Select Component Symbol dialog box. Double-click the [OpAmps] folder. Start using the down-arrow key looking for the symbol shape I wanted. Here, I find that the ADA4097-1 device looks promising: enter image description here

  2. Escape out and close down the sheet I just opened. Now, select File/Open or ctrl-O and select the installation folder for LTspice and pick out the ...\lib\sym\OpAmps subdirectory there, looking for a file called ADA4097-1.asy and open it up. enter image description here

  3. Right-click on the text, ADA4097-1, to pop up the Symbol Attribute dialog, double-check that it says it is the <Value> attribute (which it is), cancel out of the dialog, and then delete it entirely. enter image description here

  4. Right-click on the text, S, to pop up the Edit Text on the Symbol dialog and change it to say PD, adjust the size if I want, and then hit OK. Then move it around, if desired. enter image description here

  5. Select the menu option Edit\Attributes\Edit Attributes to load up the Symbol Attribute Editor and change the SpiceModel to the text AD8000 (no extension, as this is the SUBCKT name, and no longer a file name), clear out both Value and Value2, modify the Description as wanted, and put the test AD8000.LIB (which is the name I would give to the file holding the downloaded model) into the ModelFile field. enter image description here

  6. Right-click on each of the pin ports, one by one, to verify that they match up with the downloaded model. Which in this case they luckily do. So nothing needs to be changed. That's good!

  7. Select the menu option Edit\Attributes\Attribute Window to load up the Attribute Window to Add dialog, select SpiceModel and hit OK. Place the AD8000 text somewhere handy: enter image description here

  8. Select the File\Save As option and save it as AD8000.asy.

  9. Close the symbol sheet.

  10. Take the downloaded model file and save it into ...\lib\ as AD8000.LIB.

That's all. Now fake up a new schematic and test things out:

enter image description here

Well, it didn't explode. So maybe I got it added in okay. I'm not familiar with the datasheet, so I didn't try to do anything special here. Just a quick test.

This isn't the only way, of course. But it's how I go. The method here also allows me to add additional models into the same .LIB file, if all of them can use the same symbol drawing. For example, by using this approach for the following PUJT symbol, I'm able to have these two different spice models in the same .LIB file and LTspice will automatically scan the entire file, find all of the model names in it, and show them to me in a drop-down box:

enter image description here

Convenient, at times.

\$\endgroup\$
6
  • \$\begingroup\$ The autogeneration thing is quite useful for other applications, but the questioner used it in a completely superfluous way here. Your method eliminates those completely unnecessary steps and makes everything much more straightforward. \$\endgroup\$
    – Ste Kulov
    Commented Jun 26 at 20:17
  • \$\begingroup\$ the autogeneration technique works fine if I stick to the block diagram generated right clicking Ad8000 in the LTSPICE model file and clicking "create symbol." Its just that if i try modifying the aesthetic of the model in the way i did, it will not work anymore. \$\endgroup\$ Commented Jun 29 at 14:15
  • \$\begingroup\$ @help_me_learn I've shown what I do and it always works for me as well as I've needed or wanted. I'm not willing to waste time beyond sharing what I already know, especially in the case of debugging for you a method I don't use. \$\endgroup\$ Commented Jun 29 at 14:46
  • \$\begingroup\$ I tried your technique but it says "could not open library file AD8000.lib" which is what I saved it as in my downloads. \$\endgroup\$ Commented Jun 29 at 15:04
  • 1
    \$\begingroup\$ @help_me_learn You need to place it where LTspice, by default, will look. If you look at the settings, you will find a tab related to search directories. You can add the directory there, so that it will find the LIB file. Or you can place the LIB file where it already is looking. Or you can use an .INCLUDE card on the schematic. Or you can put the full pathname into the attributes, instead. Four ways to go. \$\endgroup\$ Commented Jun 29 at 18:54

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