Things you should know about LTSpice

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
total rail current can be read by placing the cursor over the voltage source. when you see a current probe symbol, click on it. or you can measure the device current in the same way. hold the cursor over the collector pin (or emitter, or emitter resistor) and click when you see the current probe symbol. the voltage probe is pointy, the current probe is a loop. this is, of course AFTER you have run a sim of the circuit. the emitter current will be a bit different than the collector current, because it will be the sum of the collector current and the base current.

you may want to run a sim with no signal if you just want to check the idle current. also be aware, that since it IS a sim, you can run ANY transistor far beyond it's rated current without any indication of a problem (it's interesting to see a 2N2222 running at 20A collector current with no ill effects:spin: ).
 
Last edited:
You can also insert a voltage source into a net as a current probe. Set the DC voltage=0, then measure the current as explained by uncleje613 above. This is rarely needed, but handy where you want to see the total current going into multiple devices, for example looking at the total rail current for the front end of an amp separate from the rail current for the output stage.
 
keantoken and mightydub,

On "Common Issues ...." it says:" LTSpice uses perfect resistors, capacitors and inductors by default," Actually, by default, inductors include a .001 ohm resistor. You can change it to whatever you want by right clicking on the component and inserting what you want in the box.

Rick
 
Hi everyone, I just thought I'd echo this post from the LTSpice yahoo group.

It sounds like a rant, but give it due process. There are multiple people with this opinion, and it's more or less the basis of this project.

Thanks for the work. It would be a great help, I look forward to using it and seeing what is in it so far.

I would just make one suggestion.. ..your first recommendation, that the beginner look in the Help, is crap. I would use stronger language, but I don't want to violate the anti-swearing policy.

It is also insulting and offensive. The Help file is worthless for beginners. That's the fact, and I've gotten tired of people - who are usually experienced programmers - pretending it's anything but worthless.

I have never....neverrrrrr r....found the help file to be useful. What I HAVE found to be very useful is helpful tips from more experienced ltspice users, who kindly tip me off that I have to change a hidden attribute - and how to do it, which is also a secret - to get a subcircuit to run when using a symbol that is set up for a model...or who clue me in to how to change the maximum time step to get a sim to run fast in initial testing, then fine tune it later....or how to change the cursor to get dissipation readings...the list goes on and on...

Yeah, I'm sure all the information is there in Help to everything I listed as examples above. But, I, like most other beginners, don't have a month of free time to sift through every word of Help until we find that one little kernel...if we could recognize it as the kernel we're looking for in the first place...because:

notice how most of the problems beginners run into are ... problem oriented! We run into a problem...and we ask for help. Looking in HELP does no good, because it is not problem oriented. It is information oriented for a person who already knows spice or programming, and who knows where to look to get the solution to a problem. But, if you're a beginner, you don't know where to look. And typing in a key word...or what I, as a beginner, guessed might BE the key word...has never worked for me yet.

All of us beginners encounter the same problems, over and over and over again.

I've given up importing libraries, because I can never figure out how to get them to run when they...don't. I just paste subcircuits right into the schematic now; if it doesn't run, at least I don't have to deal with hierarchy in figuring out why not, I can at least concentrate on the subcircuit syntax itself.

What beginners need is a problem-oriented wiki. All you have to do is go through the last year of this forum, and answer all the beginner's questions in the wiki. It would be a godsend, and we'd all be eternally grateful.

But first take out that offensive suggestion we look in help first. That is now the LAST place I would ever look.

best, charlie

My observation is that the help file isn't that great really, it never helped me get subcircuits working.

A little more context:

There's nothing wrong with a guide for beginners for ltspice. If they didn't want ltspice to be used by beginners, then make the $#@!! thing proprietary for analog device customers.

But if someone is going to create a wiki for beginners on ltspice, with a beginners guide, I just find it super irritating to see the first line of advice...for beginners... be to go to Help. Help won't help a beginner. It didn't help me, and now that I know a bunch of ...beginners. .. trhying to use ltspice, it's not helping any of them either. As a matter of fact, I find it pretty funny that some of them actually ask me for help on ltspice...now, that's funny!!!! The Help file must be pretty pathetic for them to turn to a total dummy like me for help!!

To me, it's just knee-jerk subservience to pretend the help file is of any use to beginners at all. Note by beginner I include non-programmers and non-engineers, since presumably engineers have had training in spice, and surely a programmer would have the inside scoop and know where to look in a help file. I have great respect for the old tale of the Emperor's New Clothing, I think one of the problems with our society today is I see naked emperor's running all over the place and nobody has the guts to just tell it the way it is.

The way it is is that ltspice's help file is naked, baby, naked as a jay-bird, and somebody needs to say so. Now that I think about it, a guy that is smart enough to create LTSpice should NOT be allowed to write the Help file...nobody lower than genius grade is going to be able to use it.

And a wiki guide for ltspice should just tell the truth, which is that if you're a beginner, going to the help file will just waste your time, frustrate the heck out of you, and sour the experience.

I suggest the following changes to the first line of advice at the wikki site:

1. If you are a beginner, don't bother with the Help file in LTSpice, it'll just make you want to kill your computer. If you are a programmer or engineer, then the Help file is all you need, baby, you don't need this wiki!!

best, charlie

I don't want to argue over the points made in this writing, that's been done enough on the LTSpice group. Rather, I want to consider the concerns of our audience.

I think we should at least mention that many (most?) new users find the help file useless or even frustrating. The Wiki is a help file too, so I think it's fair to suggest that they might find the answers to their questions faster by going through the wiki (I found it very time consuming to try and sift through the help file, which isn't even that large).

Personally, I began using LTSpice with absolutely no working knowledge of electronics. I learned most of what I know through LTSpice, and so I can see why a beginners' guide would certainly be helpful to students of electronics. I don't believe that only experienced people should use it, because it's a great resource for both students and engineers.

- keantoken
 
Interesting.

Ironic that this comes from the Yahoo LTspice group (of which I am a member) where many of the responses are along the lines of "if you'd look at the help file..."

As someone who has picked up LTspice, Eagle PCB, and Speaker Workshop (now there's a tough learning curve, and a minimalist help file) I have a different perspective. Maybe it is a generational thing, or just a philosophical difference, but when my kids ask me "Daddy, how do I spell (insert random word here)" my response is "how do you think it is spelled?" Then they give it a try, and if they get it right, they get the sense of accomplishment and confidence that they figured it out for themselves. And if they get it wrong, I can ask questions like "what's the rule about i before e?" and help them learn something that they can apply next time. So someone who goes off on a rant when it is suggested that they RTFM sounds like a spoiled brat to me. Sorry, Charlie. There's lots of learning, and satisfaction, in figuring out problems yourself.

You don't have to look very far back in the posts to find a perfect example of the sort of question that a new user could have easily answered by opening Help and reading a little bit about the waveform display.

Really, the help file has almost everything you need, though sometimes you have to dig a little bit. I find that in the process of digging for the answer I often come across some nugget to remember for later.

But hey, it's a wiki. I can edit it. Any of you DIYaudio members can edit it, and you SHOULD do so, if you can IMPROVE it. If there's information that is missing, ADD it! Other people have contributed their time and knowledge to putting the information out there. Those who are offended at one line of text (yes I'm the author) that suggests they try to figure out the answer for themselves are welcome to put their energy into improving and expanding the wiki.
 
i agree, the help file isn't helpful like it should be and i don't use it much unless i want to find out how to use a certain command or spice directive.... and i'm an engineer.....

there are things that LTSpice does and error messages that aren't mentioned at all in the help file. i had to do a lot of digging and searching on the yahoo group to find out what DEFCON 1 was. i found the "help" on using and creating subcircuits and symbols to be too vague to be of any use. much of the help file seems to assume you already know SPICE. but when i went to school, SPICE, if it existed at the time , was not taught. i think there should actually be 2 other levels of help file included, one for beginners (and maybe a linked tutorial), and one for troubleshooting LTSpice problems (and possibly a linked tutorial for it, which teaches what all of the control panel settings do). quite often i will ask about why something doesn't seem to work, and get the answer "did you try the alternate solver?". of course i didn't try the alternate solver because i don't know what it does differently from the normal solver.... i just checked, and it seems there's a short blurb about the alternate solver. but the little blurb doesn't help me figure out when it is a good time to try the alternate solver.



there is also a "getting started" guide that cover most of the basics. LT added it in 2008. it looks like a pdf version of a power point slide show, and it has a lot of stuff in it that would have definitely improved my learning curve.
 
Last edited:
There's nothing wrong with a guide for beginners for ltspice. If they didn't want ltspice to be used by beginners, then make the $#@!! thing proprietary for analog device customers.

But if someone is going to create a wiki for beginners on ltspice, with a beginners guide, I just find it super irritating to see the first line of advice...for beginners... be to go to Help. Help won't help a beginner. It didn't help me, and now that I know a bunch of ...beginners. .. trhying to use ltspice, it's not helping any of them either. As a matter of fact, I find it pretty funny that some of them actually ask me for help on ltspice...now, that's funny!!!! The Help file must be pretty pathetic for them to turn to a total dummy like me for help!!

To me, it's just knee-jerk subservience to pretend the help file is of any use to beginners at all. Note by beginner I include non-programmers and non-engineers, since presumably engineers have had training in spice, and surely a programmer would have the inside scoop and know where to look in a help file. I have great respect for the old tale of the Emperor's New Clothing, I think one of the problems with our society today is I see naked emperor's running all over the place and nobody has the guts to just tell it the way it is.

The way it is is that ltspice's help file is naked, baby, naked as a jay-bird, and somebody needs to say so. Now that I think about it, a guy that is smart enough to create LTSpice should NOT be allowed to write the Help file...nobody lower than genius grade is going to be able to use it.

And a wiki guide for ltspice should just tell the truth, which is that if you're a beginner, going to the help file will just waste your time, frustrate the heck out of you, and sour the experience.

I suggest the following changes to the first line of advice at the wikki site:

1. If you are a beginner, don't bother with the Help file in LTSpice, it'll just make you want to kill your computer. If you are a programmer or engineer, then the Help file is all you need, baby, you don't need this wiki!!

Spice wasn't written for beginners. There are entire college level courses that teach spice. If you can't explain the difference between voltage and current, write out Ohm's law and the equations that describe the relationships between voltage and current for capacitors and inductors, or describe the differences between common-base and common-emitter transistor configurations, then step away from the simulator and pick up a basic text book on electrical engineering. Spice isn't going to teach you EE, it's a glorified calculator that assumes you already know at least the basics.

The LTspice Help is just that - help for LTspice the tool, not an all purpose reference course in electrical engineering. Take the time to learn the tool, figure out how to read a spice netlist and draw the circuit diagram that it represents.

Patience, Grasshopper. Understanding takes time. Enlightenment takes longer.
 
Point taken, Mighty.

I understand both arguments better now.

I will contribute to the wiki as I see fit.

- keantoken

You started this whole thing - you'd better contribute! :) I really hope to see many people conribute to this as I'm sure there's a lot that I can still learn.

To anyone thinking of joining the fun, if you're hesitant because you haven't touched a wiki before, please, just jump in. Click the EDIT tab and look at the formatting options. Hit the Preview button to see what effect changes have. If you don't want to change anything, then just don't click Save Changes, use the Back button on your browser and you won't get into trouble. If you do mess it up, it is easy to revert to an earlier version.
 
the yahoo LTSpice group has several tutorials in their files section. there are also some interesting models there for complex functions of simple devices such as behavioral models of incandescent bulbs, neon lamps, and spark gaps. for such simple devices as these, there are a lot of things happening when they are operating...
 
also be aware, that since it IS a sim, you can run ANY transistor far beyond it's rated current without any indication of a problem (it's interesting to see a 2N2222 running at 20A collector current with no ill effects:spin: ).

This was a conscious/deliberate FEATURE put in by the guy who wrote LTSpice. The reasoning behind this feature is that if the simulation should error out when any parameter fails, you lose information. Whereas if the simulation continues even after parameters are exceeded, then you can extract a lot of useful information from it.

e.g. in your case, the simulation tells you that you need a 20A transistor, which you wouldn't have known if the simulation just errored out saying max collector current exceeded.

There are other spice simulators that error out the way you want.
 
i understand that.... it would be nice to have a feature that could be toggled to indicate a problem during a sim. i think a while back on the LTSpice group i suggested an animation of a component "letting the smoke out"....:D i think there is an indication (only when running SMPS simulations with LTC IC's) that devices have gone beyond their ratings. they might have removed that feature since the last time i saw it in operation.
 
Last edited:
inverse RIAA, ckt below. use the values in parenthesis for the most accurate curve. input the signal source on the left, no series resistance for the signal source is required. in LTSpice remember to use MEG instead of M, so the 1M59 will become 1.59MEG if you use the default op amp, set the GBW to 10Mhz
 

Attachments

  • inverse-riaa.jpg
    inverse-riaa.jpg
    72.9 KB · Views: 273
Last edited:

ra7

Member
Joined 2009
Paid Member
let me see if i understand correctly.

i should be connecting the output of my phono preamp in spice to the input of the circuit above. and then look for a flat response on the output of the above circuit.

is that correct?

and yes, i am new to this
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.