Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

OpAmp pre-amp : LTSpice simulations problems, tips

Status
Not open for further replies.

Willen

Well-Known Member
The circuit was fixed to mix Microphone plus music and amplified with 'pre-emphasis' for a FM transmitter project. Thank you for Audioguru a lot for the help. Here's a schematic attached based on TL072 OpAmp. Problem is my friend made the preamp he's not getting expected audio out. Then I did a simulation, but simulation is not working. Attention at my simulation because I used LT1057 OpAmp in the place of TL072 (I didn't find LTSpice model so). What would be the problem? If you have a model of TL072 then re-simulate please and give me the model of TL072 too.
EDIT: Post #2 has simulation file attached. (I cannot upload multiple files in a post- using Java Operamini)
 

Attachments

  • Last and FInal Preamp by AG.gif
    Last and FInal Preamp by AG.gif
    37.2 KB · Views: 805
Simulation file of the pre-amp (Hope you will use TL072 instead of LT1057):
 

Attachments

  • LT1057- preamp.asc
    3.4 KB · Views: 245
Morning Willen,
Your OPA amps have their power rails crossed over,!!!
E

EDIT:
Unzip the zip for TL072 models
 

Attachments

  • LT1057- preamp2.asc
    3.3 KB · Views: 202
  • willen1.zip
    1.9 KB · Views: 243
  • AAesp01.gif
    AAesp01.gif
    53.6 KB · Views: 779
Last edited:
Morning Willen,
Your OPA amps have their power rails crossed over,!!!
E

EDIT:
Unzip the zip for TL072 models
Good afternoon ericgibbs,
Hahaha sorry, I never hoped that I can be so much silly! :D

Thank you for the simulation model. I will be experimenting... Will be here again if got trouble.

One more thing, when I tried to download model, I got some lines of codes, like this-- http://ltwiki.org/images/f/f0/TL072.sub

I clicked in the link to get file but I saw lines of codes in the browser. How Can I use these codes or...?

The codes are:
* TL072 OPERATIONAL AMPLIFIER
"MACROMODEL" SUBCIRCUIT
* CREATED USING PARTS RELEASE 4.01 ON
06/16/89 AT 13:08
* (REV N/A) SUPPLY VOLTAGE: +/-15V
* CONNECTIONS: NON-INVERTING INPUT
* | INVERTING INPUT
* | | POSITIVE POWER SUPPLY
* | | | NEGATIVE POWER SUPPLY
* | | | | OUTPUT
* | | | | |
.SUBCKT TL072 1 2 3 4 5
*
C1 11 12 3.498E-12
C2 6 7 15.00E-12
DC 5 53 DX
DE 54 5 DX
DLP 90 91 DX
DLN 92 90 DX
DP 4 3 DX
EGND 99 0 POLY(2) (3,0) (4,0) 0 .5 .5
FB 7 99 POLY(5) VB VC VE VLP VLN 0
4.715E6 -5E6 5E6 5E6 -5E6
GA 6 0 11 12 282.8E-6
GCM 0 6 10 99 8.942E-9
ISS 3 10 DC 195.0E-6
HLIM 90 0 VLIM 1K
J1 11 2 10 JX
J2 12 1 10 JX
R2 6 9 100.0E3
RD1 4 11 3.536E3
RD2 4 12 3.536E3
RO1 8 5 150
RO2 7 99 150
RP 3 4 2.143E3
RSS 10 99 1.026E6
VB 9 0 DC 0
VC 3 53 DC 2.200
VE 54 4 DC 2.200
VLIM 7 8 DC 0
VLP 91 0 DC 25
VLN 0 92 DC 25
.MODEL DX D(IS=800.0E-18)
.MODEL JX PJF(IS=15.00E-12 BETA=270.1E-6
VTO=-1)
.ENDS
 
Last edited:
hi,
You would move that linked TL072.sub into your LTSpice ' sub ' folder'
Then add the LTS directive .include TL072.sub to your circuit diagram.
[note I used the TL072.301 in my simulation, thats also a sub model ]

All models are text files.

E

EDIT:
Added AC sweep image
 

Attachments

  • AAesp02.gif
    AAesp02.gif
    55.5 KB · Views: 475
Last edited:
hi,
You would move that linked TL072.sub into your LTSpice ' sub ' folder'
Then add the LTS directive .include TL072.sub to your circuit diagram.
I am being confused, I cannot get the TL072.sub file from the link I posted, I just get text instead in my browser (Operamini). Then do I need to copy the text and paste in notepad and save it with '.sub' file extension? And then....? Will you tell me step by step please?
[note I used the TL072.301 in my simulation, thats also a sub model ]

All models are text files.
Oh Yes! I already have 'TL072.301' file but I thought it is a file for other simulation program. I cannot use the file on LTSpice too.

EDIT:
Added AC sweep image
I just can see 'DC transient analysis' and can understand. What is the information I need to understand from the AC sweep image?
(Sorry for back to back questions)
 
Then do I need to copy the text and paste in notepad and save it with '.sub' file extension?

hi,
Yes do that, save it in your LTSpice sub folder, then add .include TL072.sub to your circuit
[I have already posted a TL071.sub file in that zip], why not use that.?
For the TL071.301 add that to your sub folder and then add .include TL072.301 to your circuit

You cannot add the .include for BOTH the .301 and .sub,,, choose the one you prefer.

What is the information I need to understand from the AC sweep image?

The AC sweep shows the frequency response curve of your amplifier, it is important to know the response and also the Bandwidth

E
 
Last edited:
hi,
Yes do that, save it in your LTSpice sub folder, then add .include TL072.sub to your circuit
Sorry that I am not getting way to add .include TL072.sub in a circuit. How/where to write the function?
[I have already posted a TL071.sub file in that zip], why not use that.?
Just want to learn for other models. I have downloaded a HUGE pack of models (more than 10MB) and thousands of models are there. But I was not getting them working simply by pasting file in 'sub' and 'sym' folders in LTC. Feeling excited that learning about to add '.include' function, I will get thousands of these models are working!!

However, I am being failed to download your attached 'willen1.zip' file everytime, it's amazing. Everytime it says 'downloading failed', all other files here are being downloaded. As I said before I have TL072.301 file in the huge pack already, just remaining thing is to learn to add .include.
 
Last edited:
hi,
To display the edit text box, press s on your keyboard, you should see a window like the attached image.

Type in that window .include TL072.sub [ note that starts with a 'dot' ], make sure that the radio button Spice Directive' is ticked, then press OK button

if you want to use the TL072.301, type that in the text box instead of the TL072.sub.

OK
E
 

Attachments

  • AAesp05.gif
    AAesp05.gif
    9.1 KB · Views: 344
I did as you suggested. I placed a TL072.301 file to 'sub' folder and placed TL072_TI.asy file to 'sym' folder. Then wrote .include TL072.301 (or .inc TL072.301) and clicked on run the preamp of above. But got this notification, image attached.

You can see a location link in the attached image, amazingly it's showing a location where I have stored the huge pack of models. (I copied two files as I said and pasted to LTSpice program's 'Sub' (TL072.301) and 'Sym' (TL072_IT.asy) folders. )
 

Attachments

  • FAILED.GIF
    FAILED.GIF
    6.7 KB · Views: 331
Here are these two files attached, try it once in your system please. If you got failed too, then I have to say corrupted files. (I opened TL072.301 file with notepad, it shows fine codes I think.)
 

Attachments

  • TL072.ZIP
    1 KB · Views: 216
hi,
You have placed the .301 and sub files in the wrong folder, it is not sym folder but sub folder.
Also you are mixing
TL072.301 and TL072_TI.asy , you cannot do that, it will give an error message.

Look at this image from my LTSpice folder.

Can you post an image of your LTSpice folder tree.??

E
 

Attachments

  • AAesp06.gif
    AAesp06.gif
    15.1 KB · Views: 334
  • Failed.gif
    Failed.gif
    6.8 KB · Views: 342
hi,
I would recommend that you create a main folder named 'MyWork' inside the main LTSpice folder and keep all your .asc files in sub folders.
For example: Program Files/ LTpiceIV/ MyWork/Audio and another sub folder say /Tutorials etc....
 
Hi

Suggestion...

Eric:
Remember, when you use an ".include" statement, it will only search the current folder unless you specify
a path along with the filename.
1. Create a zip file with all the required files so that when its unzipped, all files will end up in the same directory.

Willen:
1. Create a new folder named "C:\Circuits" (do not create it below "program files" folder, that way you avoid potential permission issues.).
2. Then create another folder inside "Circuits" named "Preamp".
3. Place the zip file Eric gives you inside the "Preamp" folder, then unzip the file. By default, It will create another folder inside
the "Preamp" folder with the same name as the zip file name. Once unzipped, all necessary files should be in this folder.
4. Now launch LTspice, open the .asc file and simulate.

Hope that helps...
 
Hi,
This is what works for me, extract from the LTS Help files.
Extract:
An absolute path name may be entered for the filename. Otherwise LTspice looks first in the directory <LTspiceIV> \lib\sub and then in the directory that contains the calling netlist, where <LTspiceIV> is the directory containing the scad3.exe executable, typically installed as C:\Program Files\LTC\LTspiceIV.

I don't get permission problems, also I follow the method set by LTS that places it's Educational *.asc files in C:\Program\LTC\LTspiceIV, ie: MyWork folder sits in the same folder group as Educational, never had a problem in about 7 years of use.
Any newly added sub files are added to the existing sub file.

I am not saying the method you propose will not work, but its only another option.

E
 
Hi,
This is what works for me, extract from the LTS Help files.
Extract:
An absolute path name may be entered for the filename. Otherwise LTspice looks first in the directory <LTspiceIV> \lib\sub and then in the directory that contains the calling netlist, where <LTspiceIV> is the directory containing the scad3.exe executable, typically installed as C:\Program Files\LTC\LTspiceIV.

Hi
I don't get permission problems, also I follow the method set by LTS that places it's Educational *.asc files in C:\Program\LTC\LTspiceIV, ie: MyWork folder sits in the same folder group as Educational, never had a problem in about 7 years of use.
Any newly added sub files are added to the existing sub file.

I am not saying the method you propose will not work, but its only another option.

E

Not saying your method is wrong either...your method works for you just fine.
But there are a lot of variables...different OS's...Folder/File permission settings...different skill levels...etc.
So...some methods won't work for other users without running into problems.

In short, when sharing files, if you place all the required subckt/model files in the same folder as the .asc file there should be no problem with LTspice finding them. However, I wouldn't recommend placing any user files in the "Program Files" Folder.
 
Just putting two files as shown in attached image, and adding '.include TL072.301' shows same error message as attached above (failed.GIF)

Eventually I corrected the problem like this way- The error message (failed.GIF attached above) is showing that the LTSpice cannot open library file in that location: ...sym/EXTRA/AudioOpamp/TI/

Here 'EXTRA' (and its other sub-folders) is my huge model package's folder name but first location folder name 'sym' is not my package name. It means LTSpice is searching 'EXTRA' folder and its sub-folders under 'sym' directory of LTSPICE. So I copied my 'EXTRA' folder (where thousands of models are there) and pasted it inside the 'sym' folder of LTSpice.

Then I saw EXTRA directory in the Add symbol box (from where we add NPN, PNP, MOSFETS, ICs, voltage) and inside the 'EXTRA' directory I also saw these thousands of models! Wow problem solved! :) I don't know which thing force to LTSpice to search predetermined EXTRA folder under its 'sym' directory.
 

Attachments

  • LTC root folder.GIF
    LTC root folder.GIF
    20.9 KB · Views: 443
Last edited:
You made an AC analysis, I also made an AC analysis following your commands. I used LM324 OpAmp instead of TL072 because LM324 is said that the OpAmp is very slow! So I tried its performance from 1Hz to 1Meg. I got two lines on graph (one dotted and one clear) but cannot understand what are they, and what are they showing. I can make concept of graph found in datasheet but this graph is little different. I have attached file LM324- audio preamp.
 

Attachments

  • LM324- preamp.asc
    3.7 KB · Views: 180
when sharing files, if you place all the required subckt/model files in the same folder as the .asc file there should be no problem with LTspice finding them.

Hi etech,
100% agreement on that point when sharing, but IMO would not recommend it as a regular method to the OP, as it quickly becomes a littered folder.

However, I wouldn't recommend placing any user files in the "Program Files" Folder.
Most users I interact with use the LTSpice example of having a sub folder in the Program Files/LTS, whatever works for the user is OK.

Eric
 
Morning Willen,
Will look over your circuit AC analysis plots, let you know.

My advice to you as a newcomer to LTS , is not to 'bloat' your folders with unwanted models, just add models as required as you learn.
Are you a member of the Yahoo/LTspice user group.? It is free to join, it has many tutorials and models.

Could you post an image of your LTSpice folder tree.??

E
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top