Help On LTSpice Tutorial

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Okay so I have built my amplifier on LTSpice. I have read (very very quickly :p) the LT getting started guide and the user manual (And still has no idea how to use it).

I pushed the Run button and I got the .raw window. I put the probe in the input and I got a low amplitude sinewave. I put the probe on the output and I got a high amplitude sinewave. I couldn't figure out what else I could do.

What I want is a step by step tutorial on how to test an amplifier. Because I don't know what it is I should test in order to find out that an amp is really working. Yes, I have seen people give an input sinewave/squarewave and see the output form, but I couldn't find out how to do it.

And I have many ideas to experiment, next is (if my amp is working) using the Aleph ccs as a driver for a mosfet, taking the output current sensed from the output.

Anyone knows of a good website (the link provided by Bonsai on LTSpice tutorial is dead)? Or can anyone give me a brief list of what to do after building the schematic?

Thanks.
 
I understand your frustration. We have all been there, in one way or another. I have been there with LTSpice. But now I think it's truly wonderful and powerful, and well-worth spending MUCH time to learn.

You could look in the Files and messages sections of the LT_Spice discussion group, at yahoogroups.com . But just be careful about asking for help there until you have tried a lot harder to learn it on your own, using the information that is already contained in the Files and Messages sections, there, and the tutorials and manuals, some (mkore) of which might be available from there.

It takes some time and effort to learn the "good" ways to use LTSpice. Just do the work to learn whatever you need, at the time for what you need to do, and you will get there. Eventually you can even send WAV files through your schematic and listen to the result. And you can have the program calculate the THD at whatever frequency you like. And you can put circuits into "block diagram boxes" and use them in any schematic. Etc.

There are also many threads right here on diyaudio.com that discuss how to use LTSpice. And I have some circuits you can download, to possibly save you some work and time, at Spice Component and Circuit Modeling and Simulation . (Yes, you can even copy and paste between schematics!)

But here are a few tidbits, for right now, to get you started better:

Before hitting the Run button, try selecting Simulate, on the menu, and then select Edit Simulation Cmd. First, set it up in the Transient simulation tab by entering just a Stop Time (say 10 seconds). Click somewhere on your schematic to drop the command into it. Then try Run. You should get a time-domain plot of whatever you select. You can also get frequency-response plots (of anything in the circuit), by setting up the AC Analysis tab in the Edit Simulation Cmd menu. For now, just select Decade, 100 points, and enter 10 Hz and 100000 Hz for the start and stop frequencies. You do then have to change your voltage source (right click on it) to have a 1 in the AC Amplitude field. If it's the first time you did AC Analysis, click in your schematic to put the command on it. From then on, you can select Simulate then Edit Simulation Cmd and select either the Transient or AC tab and hit OK, and then Run will do the one you last selected, with the values you already had in there (under the tabs). Later, you will find that you can just "comment out" the one you don't want, right on the schematic, by right-clicking on it and either editing it directly or selecting the other tab.

Here's a nice feature: When a time-domain plot is displayed (from a Transient run), hold down ALT and then click on a component. It will plot the power dissipation. Way cool.

Or how about this: Hold down CTRL and click on a plot heading (in a time-domain plot) and it will perform the appropriate integration or averaging, over whatever interval is selected.

If you want to make a square wave or pulse train, just put a voltage source in (Component button then Voltage then click on schematic) and right click on it. There are many options, then. Select PULSE and fill in the values you want.

For later (maybe much later, but should be mentioned): You might eventually want to make the Maximum Timestep value, in the Transient setup tab, much smaller (1/10th or less) than the period of the highest frequency in your circuit (which can be a lot higher than you think!). If you see weird "artifacts" in time-domain plots, try setting that.

ALSO, "always" include

.options plotwinsize=0

on your schematics, by using the .op button.

Also, later (or sooner), you will want to set up "keyboard shortcuts", probably especially for the editing and component-insertion commands.

[Please note: My comments are all based on a very old version of LTSpice, version 2.18a. So "your mileage may vary".]

Enjoy,

Tom Gootee
 
Last edited:
Thank you very much Tom, I will start to follow that.

But I don't like the idea of "spending MUCH time to learn" hehehe.

It already took me a long time (well, may be a few hours but frustrated me) just to find out how to input my components to the program. I searched the likely file from C:\MyProgramFiles\ and used direct notepad edit, which might not be the right way to do it.

I know that the LTSpice can be used to do a lot of things. That's why I thought it would be easier if there is one section that focus only on building an amplifier.

My preferred way of learning is to do a simple but complete job, from start to end. The advanced things should be earned with experience or during the process.
 
the google advanced forum search tool could be helpful

you can do boolean search with ltspice, asc (the ltspice circuit file extension), sim/simulation, topics such as fft, distortion, VAS...

many of my own (jcx) sim posts include the Ltspice .asc file as attachments

with all discrete transistor circuits you can get some ideas of clipping behavior, and at least the order of magnitude of some distortion mechanisms with .TRAN and viewing waveforms and fft spectral plots

you can also be fooled by choosing inappropriate settings, bad or omitted modeling of parameters in spice (usually no breakdown V, no self heating effects, Boyle op amp macromodels with no supply pin current...)

so downloading/playing with some "working" sims and seeing how people have used them to illustrate circuit design/operating principles could be valuable


the quickest, "dirty" method of using 3rd party models is to just include the model or subcircuit file's text right on the schematic with the .op spice directive - they are then inlined in the spice netlist and can't get lost

next and more recommended is to put all of your gleanings in a "mymodels" folder and use the .include spice directive with the path


also look in the sticky ltspice thread in the software subforum
 
Last edited:
Thank you very much Tom, I will start to follow that.

But I don't like the idea of "spending MUCH time to learn" hehehe.

It already took me a long time (well, may be a few hours but frustrated me) just to find out how to input my components to the program. I searched the likely file from C:\MyProgramFiles\ and used direct notepad edit, which might not be the right way to do it.

I know that the LTSpice can be used to do a lot of things. That's why I thought it would be easier if there is one section that focus only on building an amplifier.

My preferred way of learning is to do a simple but complete job, from start to end. The advanced things should be earned with experience or during the process.

At first, it might seem like (too) "much time" to learn. But only at the very first. Trust me. Shortly, the "learning time" portions should become much more incremental in nature, and will therefore seem like much less of a problem to you. You'll get over that first big hump, VERY soon, if you stick with it, which I _highly_ recommend.

You might as well get accustomed to that sort of effort, anyway. The worthwhile things in life are often similar, in that way. i.e. There's no good way to get around the fact that good results usually require commensurate effort on your part. Otherwise, everybody else could also do it and what you did wouldn't be worth much! It's Economics 101, or whatever. Better to seek it out than to despise or resist it, in general (according to me). i.e. Consider yourself lucky to have the ability. After that, sit back for a few moments, periodically, and plot your optimal way forward...

I resisted, too, especially when I was younger. But don't worry! As The Borg said, in some Star Trek episode, "You too will be assimilated.". Hey, don't waste another moment, ever! Life is too short!!! Don't ever be "afraid" of devoting effort to things. Always try to find the easiest way forward, but no easier, to paraphrase Einstein. And in today's world, once the "effort" issue is behind you, you can probably easily surpass 99% of the others and achieve (relative) greatness. But don't ever let that hold you back from doing even better.

Going back to what you said, frustration comes and frustration goes. But it GOES more often when you apply time/effort. And eventually, in any detailed area of interest or application that you choose to learn enough about, you will achieve a "critical mass" and frustration will start to automatically be seen as the prelude to the pleasure of its passing, and will often be welcomed as a challenge that you already know you can meet. Well, then it's not really frustration any more, I guess. And after you do that a few times, for different areas or applications to which you decide you need or want to really apply yourself, you will feel much less trepidation at the thought of the effort that might be required for something new, because you will know how well the outcome can go. And then you will have reached a second sort of "critical mass" and will be unstoppable. Just try to always remember (and put in the effort for) the part about periodically plotting your optimal way forward.

Sorry to have blathered-on about all of that, for so long.

Cheers,

Tom Gootee
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.