Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf ·...
Transcript of Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf ·...
![Page 1: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/1.jpg)
6.101Spring2018 Lecture4
IntroductiontoLTspiceAcknowledgment:LTspicematerialbasedinpartbyDevonRosner(6.101TA2014),Engineer,LinearTechnology
![Page 2: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/2.jpg)
SPICE • Simulation Program with Integrated
Circuit Emphasis • Developed in 1973 by Laurence Nagel at
UC Berkeley’s Electronics Research Laboratory
• Dependent on user defined device models
6.101Spring2018 Lecture4 2
![Page 3: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/3.jpg)
Netlists
6.101Spring2018 Lecture4
Components
Commands
3
![Page 4: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/4.jpg)
LTspice • Developed in 1998 by Mike Engelhardt at Linear
Technology Corporation • GUI, simulator, and schematic -> netlist for SPICE • FREE and comes with tons of models
6.101Spring2018 Lecture4
You do this Ltspice makes this
4
![Page 5: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/5.jpg)
Getting Started
6.101Spring2018 Lecture4
THAT’S IT!
These buttons are where you will live
5
![Page 6: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/6.jpg)
Component to Menu Item Matchup
6.101Spring2018 Lecture4 6
![Page 7: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/7.jpg)
NetLabels
6.101Spring2018 Lecture4
By labeling nets you can avoid a giant mess of wires. Always use these for at least your power supplies. When you start making large circuits, your power supplies will provide energy all over your schematic.
7
![Page 8: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/8.jpg)
Adding Other Components
6.101Spring2018 Lecture4
Devices besides basic resistors, capacitors, and inductors are found from this button
8
![Page 9: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/9.jpg)
Op-Amps
6.101Spring2018 Lecture4
There are no “ideal” op-amps in reality. BUT, there are in LTspice.
PAY CLOSE ATTENTION TO THE TEXT You must literally include .lib opamp.sub in your netlist or schematic as a SPICE directive.
9
![Page 10: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/10.jpg)
Op-AmpsThough listed as “ideal” there are still 2 parameters you can tweak.
6.101Spring2018 Lecture4 10
Open Loop Gain: As this number approaches infinity, the Op Amp becomes more “ideal”. Look at some Op Amp data sheets to see some real open loop gains.
Gain Bandwidth: As this number approaches infinity, the Op Amp becomes more “ideal”. To check if this is high enough, multiply your desired Closed Loop Gain by your highest desired output frequency.
![Page 11: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/11.jpg)
Op-AmpsTo more accurately model a real Op Amp not available in LTspice, UniversalOpamp2 has many tweakable parameters.
6.101Spring2018 Lecture4 11
Open loop gain, gain bandwidth, slew rate, current limit, rail-rail voltage, input voltage offset, phase margin, Rin, etc.
![Page 12: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/12.jpg)
Editing Components
6.101Spring2018 Lecture4
Just right click the component
12
![Page 13: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/13.jpg)
Editing Components
6.101Spring2018 Lecture4
This is the basic voltage source menu. Use this for DC sources such as power supplies or bias voltages.
But what about this?
13
![Page 14: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/14.jpg)
Editing Components
6.101Spring2018 Lecture4
Voltage sources can produce many test signals. PWL can be used to construct any signal.
14
![Page 15: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/15.jpg)
Selecting Device Model
6.101Spring2018 Lecture4
There are no “ideal” BJT’s, MOSFET’s, etc. You can select a model (provided by LTspice), download models, or create your own.
15
![Page 16: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/16.jpg)
Simulation: Transient Transient simulation gives Voltage and/or Current vs.time.
6.101Spring2018 Lecture4
These are transient parameters for a voltage source
16
![Page 17: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/17.jpg)
Simulation: Transient
6.101Spring2018 Lecture4
This is all you really need
17
![Page 18: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/18.jpg)
Random Tangent: Parameters
6.101Spring2018 Lecture4
This is a parameter
You MUST define all of your parameters. The “list” command allows you to choose multiple values (simulation simulates each value separately).
18
![Page 19: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/19.jpg)
What Should My Circuit Do? • The very first step to any simulation is to know how
your circuit should behave. Simulation is a verification tool NOT A CIRCUIT SOLVER.
• So how should this circuit behave?
6.101Spring2018 Lecture4 19
![Page 20: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/20.jpg)
Here’s Where You Write the Solution
6.101Spring2018 Lecture4 20
![Page 21: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/21.jpg)
Here’s Where You Write the Solution
6.101Spring2018 Lecture4
vx vo
i1
i2
i3
A DOUBLE POLE!!
21
![Page 22: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/22.jpg)
Expected Behavior • Double pole is at: • We expect frequencies up to this point to be
large, but frequencies above to quickly drop off due to the -40 dB/decade characteristic of the double pole
6.101Spring2018 Lecture4 22
![Page 23: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/23.jpg)
Transient Simulation
6.101Spring2018 Lecture4
Hover over the desired voltage node to be probed and click when you see this symbol
**This is the current probe
23
![Page 24: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/24.jpg)
Transient Simulation
6.101Spring2018 Lecture4
1 kHz 10 kHz 100 kHz 1 MHz
24
![Page 25: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/25.jpg)
AC Simulation
6.101Spring2018 Lecture4
This is the AC parameter. Just set the amplitude to 1
AC simulation gives Voltage and/or Current vs.frequency.
25
![Page 26: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/26.jpg)
AC Simulation
6.101Spring2018 Lecture4 26
![Page 27: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/27.jpg)
Extra Fun: Math in LTspice
6.101Spring2018 Lecture4
Remember:
27
![Page 28: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/28.jpg)
Transient Simulation
6.101Spring2018 Lecture4
It’s the same as before!
28
![Page 29: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/29.jpg)
Even More Fun
6.101Spring2018 Lecture4 29
*Note: You can try out some math functions in the simulator window, too! (ex: V(Vo)/V(Vi)).
![Page 30: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/30.jpg)
AC Simulation
6.101Spring2018 Lecture4 30
![Page 31: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/31.jpg)
TemperatureasaVariable
• PTATcurrentsource
6.101Spring2018 Lecture4 31
![Page 32: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/32.jpg)
TemperatureasaVariable
6.101Spring2018 Lecture4 32
![Page 33: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/33.jpg)
IncludingExternalModels
6.101Spring2018 Lecture4 33
• PFETmodel• Includes
parameterstodescribeMOSdevicephysics
![Page 34: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/34.jpg)
Making Things Pretty
6.101Spring2018 Lecture4 34
![Page 35: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/35.jpg)
Making Things Pretty
6.101Spring2018 Lecture4 35
![Page 36: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/36.jpg)
Making Things PrettyBob Reay of Linear Technology has provided a nifty tool on his website to give LTspice circuits an even better makeover: http://reaylabs.com/tools/SchematicViewer/SchematicViewer.html
6.101Spring2018 Lecture4 36
Before:
![Page 37: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/37.jpg)
Making Things PrettyBob Reay of Linear Technology has provided a nifty tool on his website to give LTspice circuits an even better makeover: http://reaylabs.com/tools/SchematicViewer/SchematicViewer.html
6.101Spring2018 Lecture4 37
After:
![Page 38: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/38.jpg)
LTspice Secrets Many aspects and functions of LTspice are not documented. You can learn lots of interesting undocumented capabilities of LTspice from: http://ltwiki.org/?title=Undocumented_LTspice Of particular interest should be B-sources. These allow you to make devices such as non-linear resistors whose value is determined from a function of voltage, current, if statements, constants, etc. Though you cannot build these, they may be useful to model a part not available in LTspice, or to model a special function in your circuit you have not designed yet.
6.101Spring2018 Lecture4 38
![Page 39: Introduction to LTspice - web.mit.eduweb.mit.edu/6.101/www/s2018/handouts/LTSpiceIntro.pdf · Introduction to LTspice Acknowledgment: LTspice material based in part by Devon Rosner](https://reader030.fdocuments.in/reader030/viewer/2022021600/5dd0756c06d5421854453e1a/html5/thumbnails/39.jpg)
Questions??
6.101Spring2018 Lecture4 39