Installing and using LTspice IV (now including LTXVII). From beginner to advanced.

Just for you to know, I followed the AD tutorial and got to an asy file, that I filed.

But when I wanted to run it I got this message.

Is there a way to convert that square into a standard opamp triangular image?
 

Attachments

  • CIR file message.jpg
    CIR file message.jpg
    165 KB · Views: 177
AX tech editor
Joined 2002
Paid Member
Just for you to know, I followed the AD tutorial and got to an asy file, that I filed.

But when I wanted to run it I got this message.

Is there a way to convert that square into a standard opamp triangular image?

Why hung up on the shape? Follow the tutorial and get it working.

Then afterwards, if you have a lot of time, you can open the .asy and change the shape all you want. It has absolutely no effect on the simulation of course.

BTW You are still on the very old LTspice IV, so some things may be different from the latest version most of us use.

Jan
 
Last edited:
AX tech editor
Joined 2002
Paid Member
Why hung up on the shape? Follow the tutorial and get it working.

Then afterwards, if you have a lot of time, you can open the .asy and change the shape all you want. It has absolutely no effect on the simulation of course.

BTW You are still on the very old LTspice IV, so some things may be different from the latest version most of us use.

Jan

Here's a fun .asy for the AD844A ;-)
Remove .txt

Jan
 

Attachments

  • AD844A.asy.txt
    709 bytes · Views: 51
Why hung up on the shape? Follow the tutorial and get it working.

Then afterwards, if you have a lot of time, you can open the .asy and change the shape all you want. It has absolutely no effect on the simulation of course.

BTW You are still on the very old LTspice IV, so some things may be different from the latest version most of us use.

Jan

Jan,

Completely right in not caring about the shape. But I still don't get it to work, as the message I included showed.

The reason I have both versions of LTSpice is because I was told, by people that supposedly know the program, that the latest version was buggy. For me it's no different, I just want it to work.

The AD844.asy version you enclosed has a tricky shape to run it on the Super Regulator, for instance.
 
I think you are making this too hard. LTspice IV has a built-in generic op amp symbol that can be use with your AD817 model. It's in the Opamps folder named opamp2, and it is triangular shaped. After inserting the symbol into your schematic, change the instance name from opamp2 to AD817.

As Jan said, you can always create a symbol that you like later. For now, it's best to use something that is known to work.
 
Last edited:
Sorry, but LTSpice continues not to find the .lib file, even I can see it there, in that place listed.

No clue on how to make it see the file that already is there.

It's not clear what .lib file you are referring to. I tested the built-in opamp2 symbol along with the subcircuit in post #2320 and it worked fine. Maybe if you post your actual .asc file someone can determine what is wrong. The images in your posts #2321 and #2328 don't tell us a lot.
 
It's not clear what .lib file you are referring to. I tested the built-in opamp2 symbol along with the subcircuit in post #2320 and it worked fine. Maybe if you post your actual .asc file someone can determine what is wrong. The images in your posts #2321 and #2328 don't tell us a lot.
 

Attachments

  • simpler_regulator-jung_30v.psrr.asc
    5.1 KB · Views: 45
  • File location.jpg
    File location.jpg
    71.9 KB · Views: 155
One thing that jumped out immediately is that the .asc file contains no .inc or .lib directives nor any embedded models. These directives are the normal way to include models, subcircuits, and libraries in a simulation file. But with no explicit .inc or .lib directive, the only way I can see that LTspice even knows about your library file is that it must be referenced in the custom opamp symbol. This really isn't a good practice (IMO).

Based only on what you've provided, I would suggest replacing your custom symbol file with the built-in opamp2 symbol, as I recommended before, and adding a .lib directive to tell LTspice where to find the library file (and I would not store a library file in a symbol folder). Simply locating a library file in a certain folder isn't going to ensure that LTspice will be able to process it. In particular, LTspice expects to see .asy file extensions in its symbol folders so it doesn't know what to do with your Ad825_15v.lib file and just skips over it.

To make any sense of this you will need to upload both the library file and the symbol file. Note that the diyAudio forum doesn't allow uploading .asy files so give the symbol file a .txt extension; it will need to be renamed to an .asy file to run the simulation.
 
Ray, you can't imagine how grateful I am for your help, which seems to be adding areas that I have never used until now, or used very little, or understood very little the reason why.

.inc directives I had to use when the component was not listed in the LT directory, like on the case I'm including.

I must confess I never liked that, not only because I didn't quite understand it, as because it added data that I prefer a direct insertion, with no additional data.

It's interesting that for you .inc or .lib directives nor any embedded models is the "normal way" to include models, and for me it looks "imperfect", "dirty", inelegant.

How can we get to a mid-term? I want things to look "good" and "clean", but most of all I want them to work.

I would suggest replacing your custom symbol file with the built-in opamp2 symbol, as I recommended before, and adding a .lib directive to tell LTspice where to find the library file

Please explain in detail how to do that, particularly putting the .lib directive where it should be and work. Or tell me where to find that info.

Please do tell me how to upload a part of my library file and symbol file so I learn how to do things right. No problem to add .txt to the .asc file to upload it. Would it work if I rar or zip it instead of the adding .txt?

I'm ready to anything that is necessary to learn more on LTSpice.
 

Attachments

  • AD745J RIAA preamp_DCservo.AC.asc
    6.2 KB · Views: 53
Member
Joined 2017
Paid Member
Hi carlmart,
I think you simply need to get accustomed to the way the LTSpice is used by the majority of users. Place your model files in the same directory as the asc file and referencing them with an include is the widely accepted way of handling this. I believe you can place them somewhere in one of the program directories and they'll always be available without includes, but this causes two issues.

1) When the program updates, there's a risk of the files being overwritten or deleted. Or so I've read. I don't use this method, so I can't offer practical experience.

2) When sharing files on forums like this, the use of include statements makes the simulation more portable. Otherwise you'll need to find the non-standard models and adjust your files before sharing them.

Also, I suggest you try the newer version of the program. I believe the bugs have been worked out at this point. It's my sense that most users on this forum are on the newer version at this point without any serious problems. Myself included.
 
@carlmart,

SPICE was developed in the early 1970s, long before the personal computer, so it was and remains essentially a text-based application. LTspice and others have added a graphical interface to make it more "user friendly" but under the surface SPICE is still text-based. You can see this by opening a .asc file in a text editor; all of the commands and component descriptions are represented in pure text form.

At the end of the day, LTspice is just a tool so to use it effectively you need to recognize its shortcomings as well as its capabilities. The .inc and .lib directives are the key to using custom and third-party models so I'm afraid this is something you will have to accept if you are going to take advantage of LTspice's considerable power. My advice is to fret less about cosmetics and let the tool work for you.

I rarely embed a model in a .asc file unless I'm sharing it with someone and don't want to include multiple files. But the .inc or .lib approach also lets you reuse subcircuit and library files among multiple LTspice simulations. If you need to change a model or library then you only have to edit one file and all .asc files that "include" it will automatically get the update. If you have a lot of custom or third-party models, this is a definitely a more efficient way to work.

Opinions will vary about how best to use LTspice, but my own approach with third party models is to use a generic symbol whenever possible and assign an instance name that matches the subcircuit name in the library file that has been included. You can create a symbol for a specific device by including the model file in the symbol attributes, but this results in a lot of individual symbol files when only a few are actually needed. Your attached RIAA file is a good example of what I would not do; you have apparently created a symbol for the LM4562 (since LTspice complains that it can't find it) instead of using the symbol built in to LTspice. All that is needed to use the built-in symbol is to include the subcircuit file for the LM4562 and name the instance accordingly. As an aside, there appears to be an error in your include directive for the AD745J; there is an extra dot after .inc.

To answer your specific questions, you can upload any file to the forum the same way you uploaded your RIAA .asc file. If the forum complains that the file type is unsupported, just add a .txt extension. As an example, for a symbol file you would upload it as symbol.asy.txt. The .inc or .lib directive can be added anywhere on the schematic. I tend to put all directives at the bottom of the schematic so I don't have to look around for them but that's just my own preference. Make sure that the complete path is included unless the file is stored in one of the LTspice default folders.

Good luck.
 
LTSpice Model for ZVN3310A

Thank you for your help, Ian! I really appreciate it :) I don't know why I asked about the PMOS (clearly I am sleep deprived) but I am actually battling with the NMOS. When I place it in a CMOS inverter circuit, it does not pull my output down to ground.

Hi u13056647,

An LTspice (VDMOS) model is available in Alexander Bordodynov's library. See Post 2289 for installing it.
Alternatively paste this in your circuit file:
Code:
*VDMOS with subthreshold (c) Ian Hegglun
.model ZVP2110G VDMOS (pchan Rg=65 Vto=-2.8 Kp=0.17
+ Rs=2 Ksubthres=0.15 Mtriode=0.5 Rd=2.5 Lambda=6m
+ Bex=-2.3 Vtotc=6m Tksubthres1=4m Trs1=3.5m Trd1=8m
+ Cgdmax=20p Cgdmin=3p a=0.5 Cgs=140p Cjo=50p
+ m=0.5 Vj=0.75 Is=5p N=3 Eg=2.8 Rb=1 Trb1=1m
+ Vds=-100 Ron=8 Qg=2n mfg=DioIncIH1907)
 
AX tech editor
Joined 2002
Paid Member
For LTspice there is no reason to put models and subcircuits on the schematic. I am using my own directory for symbols and library files which of course never gets overwritten.
I put the path to those files in LTspice on Tools|Control Panel|Sim & Lib search paths , see attached. You can use any number of folders and search paths as you like.

The only reason to clutter the schematic with model stuff is to make the schematic portable between people. If you send the .asc to someone, the receiver most probably has his own folder system, and by putting models on the schematic, LTspice has them right there.

I should also mention that ALL the problems discussed here are clearly described in the Help file.

Jan
 

Attachments

  • paths.PNG
    paths.PNG
    59.4 KB · Views: 94