LM741 mod for LT Spice - Page 1
Forum section: electronics / projects

author: Trailboss
author_rank: Contributor
timestamp: March 19, 2022, 02:44:53 pm
content: I can't seem to find the .mod file for the 741 to add to the LT Spice Library.You would think it would already be in there.Went to the TI site and extracted the snom211_2.zip file.There is no .mod file in the extracted files.Any help appreciated,thanks

author: Ian.M
author_rank: Super Contributor
timestamp: March 19, 2022, 03:04:01 pm
content: LTspice does not enforce extensions for model files or model libraries. Simply extract LM741.lib from that download, place it in the same folder as your sim, add the directive:Code:.lib LM741.libto your schematic, and use theOpamps\opamp2component with its name changed toLM741to refer to the model in LM741.lib.

author: Zero999
author_rank: Super Contributor
timestamp: March 19, 2022, 06:07:57 pm
content: What are you circuit simulating?I wouldn't bother using a specific op--amp model, for the basic 741. Use UniversalOpamp.asy, with the parameters set to match the 741. Refer to \LTspice\examples\Educational\UniversalOpamp.asc for more information.

author: Trailboss
author_rank: Contributor
timestamp: March 19, 2022, 10:02:43 pm
content: Quote from: Ian.M on March 19, 2022, 03:04:01 pmFirst day with LT, just getting my feet wet, need some hand holding till i get up to speed.I added the LM741.lib file to the default install directory: Documents\LTspiceXVII\LM741.lib. This is the same directory my project: .asc file.Where do I add the directive statement?

author: Trailboss
author_rank: Contributor
timestamp: March 19, 2022, 10:13:00 pm
content: Quote from: Zero999 on March 19, 2022, 06:07:57 pm

author: RoGeorge
author_rank: Super Contributor
timestamp: March 19, 2022, 10:13:57 pm
content: The model LM741.lib file should be copied in the same place where you save your .asc schematic.To add the spice directive, when editing your schematic click on the icon ".op" (the last icon, or from menu "Edit" -> "Spice directive"). In the big textbox that opens, typeCode:.lib LM741.libthen click OK. You should see the text ".lib LM741.lib" attached to the mouse pointer, click to add it anywhere you like in your schematic. Adding the model once is enough no matter how many LM741 are in the circuit.

author: Ian.M
author_rank: Super Contributor
timestamp: March 19, 2022, 10:25:25 pm
content: Like any other SPICE . directive: To the schematic of your sim, anywhere it doesn't get in the way!If you are coming from another SPICE simulator that uses a separate pane for directives, well LTspice doesn't do that. Use the [.op] button at the far right of the toolbar to enter directives, SPICElines and even inline models in the dialog textbox it gives you, typing Ctrl-Enter if you need a new line for multi-line directives etc. then when you click  or hit Enter, you must then place the resulting text block on the schematic. You can right click an existing text block to reopen it for editing, and then can also toggle it between netlisted as SPICE Directive (it does stuff) and Comment (its disabled).Also, if a sim has associated custom or 3rd party models or symbols, its a good idea to make a sub-folder in your LTspice working folder, named for the project, and put all the required files + the sim in it to keep them together.Here's the quick test jig I made to confirm the T.I. model was compatible with LTspice, as an example.N.B. for anyone else following this, you'll need to grab the T.I. 741 model from their website.P.S. *PLEASE* be careful when quoting someone, when you type text into a reply and accidentally get it in between the BBcode quote tags, it posts looking like something *THEY* said. You get a free *noob* pass this time, but do try to avoid putting words in other peoples mouths as it results in misunderstandings, disgruntlement and grumbling.--I am not a moderator here, nor do I play one on TV!

author: Trailboss
author_rank: Contributor
timestamp: March 19, 2022, 10:32:01 pm
content: Here's the quick test jig I made to confirm the T.I. model was compatible with LTspice, as an example.N.B. for anyone else following this, you'll need to grab the T.I. 741 model from their websiteWould i be able to ad your 741 to my library as opened in LT: If so how would that be done.

author: Ian.M
author_rank: Super Contributor
timestamp: March 19, 2022, 10:56:15 pm
content: Yes, the directive text *stays* on your schematic.Will you need it on future schematics?Maybe. If you aren't using LM741.lib you obviously don't need it. When you get a bit more experienced, you'll (probably) learn how to create custom symbols either starting from scratch or from an existing similar symbol. A custom symbol can auto-include its model file or library so you don't need an explicit.libdirective on your schematic.Its *POSSIBLE* to add models and symbols to the default libraries, but its a real PITA if you do so when collaborating with others, as its very hard to tell the difference between ones from L.T. (now A.D.) in the standard library, and ones you have added, so whenever you post a sim (or share one with a colleague) for assistance, you risk gettting bitching that you haven't shared the models/symbols it needs which will delay any useful replies till after you've returned to the topic, dug the missing files out of your library folders and posted them.Therefore at *this* stage in your climb up the LTspice learning curve, I would *NOT* recommend doing so.

author: Trailboss
author_rank: Contributor
timestamp: March 19, 2022, 11:01:09 pm
content: Thanks Ian and the group for all the assistance et al.Gonna revisit this in the morning, been at this all day, watched way to many you tubes, getting delirious, and Capt. Morgan is calling me!Gotta make dinner for the family. Nite to all.

author: Zero999
author_rank: Super Contributor
timestamp: March 19, 2022, 11:09:36 pm
content: Quote from: Trailboss on March 19, 2022, 10:13:00 pmWhilst learning to import third party models into LTSpice is a valuable skill, it's not really needed in this case. The generic UniversalOpamp model which comes with LTSpice is perfectly adequate for modelling the 741. You'll gain a lot by learning how to interpret the values on the data sheet and enter them into the UniversalOpamp model. The beauty of this approach is it's easy to tweak the parameters to the typical vs worst case characteristics listed on the datasheet. The LM741 model you've downloaded might just use the typical characteristics and changing it requires knowledge of how it works.

author: Trailboss
author_rank: Contributor
timestamp: March 19, 2022, 11:18:22 pm
content: Thanks Zero,Well versed in data sheets, the first thing I did for my daughter was to inspect the data sheet for the 741 so she understood the operating characteristics and established operating parameters so she understood IE limitations etc,,,thanks!