You are on page 1of 32

EE 2255 Microelectronics

LT-SPICE Session I
TA: 高正宇 (2012hem@gmail.com)
黃國翔 (huang890708@gmail.com)
劉子駿 (chambersliu0227@gmail.com)
邱孟瑋 (willy5822098@gapp.nthu.edu.tw)
黃博彥 ( conch9674@gmail.com)

Lab: EECS (資電管) 513&515


Tel: 0-(3)-5715131 ext. 34104 or 34075

National Tsing Hua University


Department of Electrical Engineering

EE2255 Microelectronics, S. Hsu, EE NTHU 1/32


Introduction
• What is “SPICE”?
− SPICE (Simulation Program with Integrated Circuit Emphasis) is
a general-purpose open source analog electronic circuit
simulator (UC Berkeley,1972)
− there are different versions of SPICE available such as Pspice,
Hspice, IS_spice, LT_spice,...

• Why using “SPICE” in this class?


− verify and compare the results from handcalculation.
− allow us to use more complicated transistor models formore
accurate results.
− much easier to include the nonlinear and non-ideal effectsin
circuits compared with hand calculation.

• Why using “LT-SPICE” in this class?


− the graphical interface is very easy touse.
− easy for transistor model implementation.
− it is free!
EE2255 Microelectronics, S. Hsu, EE NTHU 2/32
Installation (1/3)
• Visit following website and get LT-SPICE
https://www.analog.com/en/design-center/design-tools-and-
calculators/ltspice-simulator.html

EE2255 Microelectronics, S. Hsu, EE NTHU 3/32


Installation (2/3)
• Click LTspiceXVII.exe to install it.
The example here is based on Win 10 (x64)

1. First, click it

2. Choose the version (x86


or x64) you want to install
3. Recommend to adopt
the default setting
4. Then, click this one
EE2255 Microelectronics, S. Hsu, EE NTHU 4/32
Installation (3/3)
• After installation, LT-SPICE window pops
out as follows,

EE2255 Microelectronics, S. Hsu, EE NTHU 5/32


Simulation Flow Chart
Place Components and Sources

Edit Components and Sources

Setup Simulation commands

Run Circuit and Probe Nodes


EE2255 Microelectronics, S. Hsu, EE NTHU 6/32
Start a New Schematic

Method1 Method2
Click File -> New Schematic Click the icon of New Schematic on the Toolbar

Filename extension is .asc

EE2255 Microelectronics, S. Hsu, EE NTHU 7/32


Edit Circuit Elements
Schematic Editor Toolbar

F9: Undo F3: DrawLine


Shift+F9:Redo F4: LabelNet
T:Text G: Place Ground
R: Place Resister F5: Delete
C: PlaceCapacitor F6: Duplicate
L: Place Inductor F7: Move(only move components)
D: Place Diode F8: Drag(move components andline)
F2: Place OtherComponents
Ctrl+R: Rotate
Ctrl+E: Mirror Press ESC to cancel

◼ Left click on the desired editing option


The Short cutkeys ◼ Left click on the circuit element
for action

EE2255 Microelectronics, S. Hsu, EE NTHU 8/32


Add Circuit Elements
F7: Move(only move components)
Press F7 or F8 before
F8: Drag(move components and line)
rotating or mirroring a
component

EE2255 Microelectronics, S. Hsu, EE NTHU 9/32


Additional Circuit Elements

Click here or press F2

• Voltage dependent voltage


• Current dependent current
• Voltage dependent current
• Current dependent voltage
• MOSFET transistor
• Bipolar transistor
• Voltage controlled switch
• Current controlled switch
• Subcircuit
• …more
Click OK or Double click on component’sname

EE2255 Microelectronics, S. Hsu, EE NTHU 10/32


Draw Lines and Label Nodes

Click two nodes for connection Connecting by drawline Give a name to anynode

EE2255 Microelectronics, S. Hsu, EE NTHU 11/32


Set components for given
values

Right click oncomponent

EE2255 Microelectronics, S. Hsu, EE NTHU 12/32


Use Labels to Specify Units in
Circuit Elements Attributes

EE2255 Microelectronics, S. Hsu, EE NTHU 13/32


Edit Voltage Sources and Loads

Right click on component to edit

◼ Voltage Source
• Right click the voltage symbol
• Enter DC voltage value and (optional)
Series Resistance
• Left click on OK

◼ Current source
• Right click on the load symbol
• Enter DC current value
• Left click on OK

EE2255 Microelectronics, S. Hsu, EE NTHU 14/32


Summary of Schematic Editor
Toolbar

EE2255 Microelectronics, S. Hsu, EE NTHU 15/32


Spice Dot Commands

EE2255 Microelectronics, S. Hsu, EE NTHU 16/32


Spice Model Commands

EE2255 Microelectronics, S. Hsu, EE NTHU 17/32


Device type
Device
name

EE2255 Microelectronics, S. Hsu, EE NTHU 18/32


Spice Simulation Commands
◼ Torun a simulation, specify the type of analysis to beperformed
◼ There are six different types ofanalyses:
• Transient analysis
• AC analysis
• DC sweep
• Noise
• DC transfer function
• DC operating point

◼ Simulation commands are placed on the schematic astext


• Called dot commands

EE2255 Microelectronics, S. Hsu, EE NTHU 19/32


Setup Simulation Commands
Method 2: Right click on blank space
Method 1 to setup simulation commands

◼ Example of setting on “Transient”


analysis:
 As a starting point in a simulation
(1) Left click on Transienttab
(2) Enter a Stop Time
(3) Select OK

EE2255 Microelectronics, S. Hsu, EE NTHU 20/32


Run Circuit and Probe Node
• Run Circuit

• Also, you can right click on the schematic and press “Run” on the menu
• Then, the program will check to make sure you don't have any errors
If you do have errors, correct them

EE2255 Microelectronics, S. Hsu, EE NTHU 21/32


Probe Node
• Probing a Circuit & Waveform Viewer

EE2255 Microelectronics, S. Hsu, EE NTHU 22/32


Plot Planes
◼ Multiple plot panes can be displayed on one window to allow better
separation between traces permitting different traces to be
independently auto scaled.
• Right click in the waveform pane
• Select Add Plot Pane
• Left click and hold to drag a label to a new plotpane

EE2255 Microelectronics, S. Hsu, EE NTHU 23/32


Example 3.12 (Textbook) (1/3)
(2) Right click on character D and
(1) Set DC value of V1 as 0 rename as Diode (3) Right click
on blank
space

(4) Setup DC
sweep value (6) Click on here to setup
and click ok model of Diode

(5) Place
command on
(7) Key-in this description to setup turn-on voltageof
blank space diode

EE2255 Microelectronics, S. Hsu, EE NTHU 24/32


Example 3.12 (Textbook) (2/3)
Nothing is because you do not use the
probe cursor to touch node

Device name
(Defined by user)

Click on Run
Close to the node
and the probe will
generate
automatically
EE2255 Microelectronics, S. Hsu, EE NTHU 25/32
Example 3.12 (Textbook) (3/3)
Simulation results
Vout (Y-axis) Vout (Y-axis)

Vfwd=0.8V Vfwd=0V

Vin (X-axis) Vin (X-axis)

EE2255 Microelectronics, S. Hsu, EE NTHU 26/32


Exercise: DC analysis

EE2255 Microelectronics, S. Hsu, EE NTHU 27/32


Color Palette editor
• Go to “tool” and choose “color preferences” on the menu,
you get the color palette editor window!

PS: After setting the backgroundcolor,


you should also set the color of the
“Trace V(1)” to make it visible in the
printout of your homework.
Push RGB color bars to
the right most to getwhite
background!

EE2255 Microelectronics, S. Hsu, EE NTHU 28/32


Control Panel
• Go to “tool” →“Control Panel”→ “Waveforms”
Set “Data trace width” to “3”

EE2255 Microelectronics, S. Hsu, EE NTHU 29/32


How to put “Trace Marker”
(1) Right click on here

(2) Select 1st

(3)Press left button of


mouse and drag

(4) Read the data


from this window

EE2255 Microelectronics, S. Hsu, EE NTHU 30/32


Other helpful tips for homework
Tip #1. Go to “tool” and choose “Copybitmap
to Clipboard” on the menu, and you get the
screen shot of the window in theclipboard!

Tip #2. Right click in the waveform pane. And


choose “Visible Traces” to have following
“Select Waveforms to Plot” window to plotthe
trace you want.

Tip #3.Put “Grid” on the waveformpane

EE2255 Microelectronics, S. Hsu, EE NTHU 31/32


Thanks for your attention!

EE2255 Microelectronics, S. Hsu, EE NTHU 32/32

You might also like