Quick question about LTSpice

Thread Starter

jean28

Joined Sep 5, 2012
76
Hey guys quick question about LTSpice. How do I change the characteristics of an NPN 2N2222 transistor in LTSpice?

I tried right clicking it and then selecting "pick new transistor" but I can only choose different transistors and none of them have the characteristics that I want.

Is this possible in LTSpice or should I try another simulator like Multisim?

Thanks.
 

Papabravo

Joined Feb 24, 2006
21,228
Each of the model files is an ordinary text file so you can modify them if you want to. You can also import models from various manufacturers and add those models to the standard library. The help files and the yahoo group can guide you through the process.
 

Brownout

Joined Jan 10, 2012
2,390
Alternatively, you can use the .model directive for a single transistor instance, though I don't recommend it. This allows you to change the parameters for a single transistor. Use the .model for each transistor you need to change. Otherwise, either import the model for your transistor or create a new transistor model with the parameters of your particular transistor. If you need more help, I'll need to get to my computer at home on which I run LTSpice.
 

Ron H

Joined Apr 14, 2005
7,063
1. Place an NPN on the schematic.
2. Right-click on the symbol, then select Pick New Transistor
3. When the list of transistors opens, highlight the entire line for 2N2222 by left-clicking on it..
3. Copy it to the clipboard with ctrl-c.
4. Cancel the models window, then cancel the Pick New Transistor window.
5. Click on the .op icon on the tool bar, and paste the model you just copied into it (ctrl-v).
6. Edit the name of the model (I used my2N2222) and the parameter you want to change the value of (I changed Bf to {beta}), then click OK.
7. Place the new model on the schematic.
8. Edit the name of the NPN (right click on NPN) to match the name of the model you just created.

If I described all that correctly, you're ready to go.:D
Open the attached .asc file to see what I did.
 

Attachments

Last edited:

Audioguru

Joined Dec 20, 2007
11,248
I think each model of a transistor should have minimum and maximum specs in addition to "typical" specs. Then when you do not know how to design a circuit properly the SIM program will show you that your circuit will work only sometimes.

SIM programs are a crutch. "Look boss, the Sim says my designed circuit works". But it doesn't say that it works only 'sometimes'.
 

Ron H

Joined Apr 14, 2005
7,063
I think each model of a transistor should have minimum and maximum specs in addition to "typical" specs. Then when you do not know how to design a circuit properly the SIM program will show you that your circuit will work only sometimes.

SIM programs are a crutch. "Look boss, the Sim says my designed circuit works". But it doesn't say that it works only 'sometimes'.
A simulator CAN be a useful tool.
Suppose I want to know the sensitivity to beta of a simple collector-feedback bias circuit. I can do the math, and it's pretty simple, admittedly. Still, I like pictures, plus, the simulator may be faster, in many cases, than doing the math. A graph makes some things clearer for me than a table of numbers. OK, for this example, probably all I need is the minimum beta calculation, but it still makes the point. I vary the beta, I see what happens to the collector voltage. The simulator did the math for me. It's the same math you would have done by hand with a couple of values of beta, but it also takes into account other parameters that I'll bet you would ignore, like beta change vs Vce and Ic and change in Vbe vs Ib (try doing that by hand). Yeah, I know, those are second order effects, but my point is, the simulator does the math. Sure, the ultimate test is a breadboard, but I like to design circuits and play with them. Very few get as far as breadboards. The ones that do have a lot of potential subtle bugs already worked out of them, thanks to the simulator.
PS very few of the circuits I design are audio-related. Most of them contain a lot of (intentionally) nonlinear circuits. You and I are from very different backgrounds.

OK, I'm off my soap box.
 

Attachments

crutschow

Joined Mar 14, 2008
34,470
I think each model of a transistor should have minimum and maximum specs in addition to "typical" specs. Then when you do not know how to design a circuit properly the SIM program will show you that your circuit will work only sometimes.

SIM programs are a crutch. "Look boss, the Sim says my designed circuit works". But it doesn't say that it works only 'sometimes'.
Calculators are a crutch also. Do you not use them? :rolleyes:

Simulators are a very good tool to help verify a proper design. You can readily use worst-case values for resistor, capacitor values, and transistor gains to see the effect they have on the circuit operation. Some Spice programs have Monte Carlo programs to vary all the parameters at random to see the overall effect on circuit operation.

You can breadboard your circuit and say "See, it works." but that's also not proof that it doesn't just work "sometimes" since your breadboard doesn't contain worst-case components.
 

Audioguru

Joined Dec 20, 2007
11,248
Teachers are not teaching anything today.
Most kids use only "typical" models in a SIM and think that it will work with ANY transistor with the same part number.
 

crutschow

Joined Mar 14, 2008
34,470
Teachers are not teaching anything today.
Most kids use only "typical" models in a SIM and think that it will work with ANY transistor with the same part number.
If "most kids" do that it's the fault of the teacher not the tool. You don't blame the tool for its misuse.
 

Audioguru

Joined Dec 20, 2007
11,248
Kids do not understand about the hFE of a transistor which is a minimum of 100 and a maximum of 300 for a 2N3904 transistor for example. They wrongly think the hFE will change from 100 to 300 while the transistor is operating. They do not know that each transistor is different, even if many have the same part number. They do not know that some weaker transistors will have an hFE of 100 and some stronger transistors will have an hFE of 300 and others will be in between.

The kids need to learn how we design a circuit so it works perfectly with any transistor even if the hFE is 100 , 200 or 300 for the part number 2N3904 for example.
 

thatoneguy

Joined Feb 19, 2009
6,359
Should SPICE models have optional fields for ranges to test on each component? That would slow down analysis by huge amounts once more than a few components with variable parameters needed to be taken into account. I'm referring to the standard library components, rather than modifying each one to step through ranges in sim.

It would be nice to have a circuit perform exactly as in the simulator, but people new would probably be more confused by that than helped.
 

Brownout

Joined Jan 10, 2012
2,390
Any analysis method involves compromises. No one is ever perfect, as pointed out by some very insightful people on this very thread. It's important to remember that simulators are only tools, they can be useful or un-useful.

The old guys are just pissed-off because they didn't have simulation softare :)
 

crutschow

Joined Mar 14, 2008
34,470
........................
The old guys are just pissed-off because they didn't have simulation softare :)
Possibly true. Some that had to do it the hard way, think everyone should still do that. I would have given an eye tooth to have even an HP-35 when I was in college but the best available was a slide-rule (which cost at least a couple hundred US bucks in today's dollars). But I'm certainly glad I had computers available for simulation, word processing, etc. later on. It eliminated much of the design drudgery and made my work immensely easier as compared to the first years.
 

Ron H

Joined Apr 14, 2005
7,063
Possibly true. Some that had to do it the hard way, think everyone should still do that. I would have given an eye tooth to have even an HP-35 when I was in college but the best available was a slide-rule (which cost at least a couple hundred US bucks in today's dollars). But I'm certainly glad I had computers available for simulation, word processing, etc. later on. It eliminated much of the design drudgery and made my work immensely easier as compared to the first years.
My sentiments exactly.:)
Technology would not be where it is today without simulators.
 

crutschow

Joined Mar 14, 2008
34,470
..................
The kids need to learn how we design a circuit so it works perfectly with any transistor even if the hFE is 100 , 200 or 300 for the part number 2N3904 for example.
True. But the only reasonable way to determine how the circuit likely operates with the parts at their tolerance limit is with simulation. It's not really practical to cull actual parts to find those at their limits for breadboard testing.
 
Top