CS2100 Microelectronics
PSPICE Quick Start Chih-Tsun Huang 黃稚存 Spring 2007 Department of Computer Science National Tsing Hua University
1
PSPICE – and Install z
PSpice 9.1 student version: http://electronics http://electronicslab.com/s/schematic/013/ z
Select Schematic Editors z
Capture
2
1
Tutorials z
z
z
z
PSpice tutorials http://dave.uta.edu/dillon/pspice/inde x php x.php SPICE - A brief overview http://www.seas.upenn.edu/~jan/spice/s pice.overview.html PSpice with OrCAD Capture (PSpice quick guide) http://www.seas.upenn.edu/%7Eese216/ha ndouts/PSpiceQuickGuide pdf ndouts/PSpiceQuickGuide.pdf PSpice - A brief primer http://www.seas.upenn.edu/%7Ejan/spice /PSpicePrimer.pdf 3
More Tutorials z
Two Chinese overviews: http://cc ee ntu edu tw/~rockychen// http://cc.ee.ntu.edu.tw/ rockychen// PSPICE-Handouts.pdf
4
2
Circuit Schematic z
Diode I/V curve
5
Spice Netlist z
diode_iv.cir *Diode: a simple diode i-v curve .probe probe .model MYDIODE1 D (IS=0.01PA, RS=16 CJO=2PF TT=12N BV=100 IBV=0.1PA) Vd 1 0 1 R1 1 2 0.1 D1 2 0 MYDIODE1 .dc vd -1 3 0.1 .plot dc I(D1) .print dc I(D1), V(D1) .end 6
3
Launch and Open z z
PSpice Student -> PSpice AD Student File -> Open File Type: Circuit Files z File Name: diode_iv.cir (檔案路徑不能有 中文) z
7
Simulation z
Simulation -> Run
8
4
View Log z
View -> Output File
9
View Log z z z
diode_iv.out .print print command .plot command
10
5
View Waveform z z
View -> Simulation Results diode iv dat diode_iv.dat
11
View Waveform
12
6
View Waveform z
Trace -> Add Trace z
I(D1) -> OK
13
View Waveform
14
7
Add Plot Window z
Plot -> Add Plot to Window z
Mouse click to select plot
15
Add Plot Window z
Trace -> Add Trace -> V1(D1) -> OK
16
8
Properties z
Right mouse click z
On the trace to z z
Get the information Change the trace properties
z
z
Color Pattern Width Symbol
D l t th Delete the ttrace
On the plot to z z
Change the x/y axis/grid settings Change the properties (color/pattern/width) 17
Another Example – Compare Two Signals
18
9
Spice Netlist z
diode_two.cir *A Circuit of Two Diodes .probe .model MYDIODE1 D (IS=0.01PA, RS=16 CJO=2PF TT=12N BV=100 IBV=0.1PA) .model MYDIODE2 D (IS=1PA, RS=16 CJO=2PF TT=12N BV=100 IBV=0.1PA) Vd 1 0 1 R1 1 2 0.1 D1 2 0 MYDIODE1 R2 1 3 0.1 D2 3 0 MYDIODE2 .dc vd -1 3 0.1 .plot dc I(D1), I(D2) .print dc V(D1), V(D2) .end 19
Add Multiple Traces z
Trace -> Add Trace z
Select Multiple Traces
20
10
Add Multiple Traces
21
Homework z
VPS=5V, R=2KΩ, Diode: IS=10-14A z
z
(a) Find the dc value of the diode voltage and diode current (in the output log) (b) The input voltage VPS was varied (dc sweep) from 0 to 5V z
Show the diode voltage and diode current versus the input voltage
22
11
Scale Factors z
z
One can also use the following scale factors: T(= 1E12 or 10+12); G( T( G(= E9); MEG( MEG(= E6); K(= E3); M(= E-3); U(= E-6); N(= E-9); P(= E-12), and F(= E-15) Examples: R1 1 0 3500 R1 1 0 3.5E3 R1 1 0 3.5K 23
Input Sources (1/2) z
z
DC Vin 2 0 DC C 10 0 Vin 2 0 10 Id 3 4 DC 1.5m Sinusoidal: SIN (VO VA FREQ TD THETA PHASE) V 2 1 SIN (0 5 1K 0 0 0) Vs Vs 2 1 SIN (0 5 1K) 24
12
Input Sources (2/2) z
Piecewise Linear Source (PWL): PWL (T1 V1 T2 V2 T3 V3 …)) Vg 1 2 PWL (0 0 10U 5 100U 5 110U 0)
z
Pulse: u se PULSE U S ((V1 V2 TD TR TF PW Period) e od)
25
Types of Analysis z
DC Sweep: Increment (sweep) an independent source over a certain range z .DC SRC START STOP STEP .DC VS 0 5 0.1 z
z
Transient: z
Time interval over which the transient analysis takes place
z
.TRAN TSTEP TSTOP
>
.TRAN 0.01m 2m 26
13
Half-Wave Rectifier Block Diagram
27
Half-Wave Rectifier Spice Netlist *A Half-Wave Rectifier Circuit .probe .model model MYDIODE1 D (IS=0 (IS=0.1PA, 1PA RS=16 CJO=2PF TT=12N BV=100 IBV=0.1PA) VS 1 0 sin(0 5 1K 0 0 0) R1 2 0 2K D1 1 2 MYDIODE1 .dc VS 0 5 0.01 * Voltage transfer characteristics:V(R1) vs VS .tran 0.01m 0 01 2 2m .PLOT TRAN V(2,0) V(VS) .end
28
14
Analysis Type Selection
29
More on Adding Traces
30
15
Half-Wave Rectifier Voltage Transfer Characteristics
31
Half-Wave Rectifier Signals vs Time
32
16
Different Analyses z
Voltage Transfer Characteristics z
z
VO vs VI DC (sweep) analysis
Output waveforms z z
Voltages/currents vs time Transient analysis
33
Full-Wave Bridge Rectifier Block Diagram
34
17
Full-Wave Bridge Rectifier Spice Netlist *A Full-Wave Rectifier Circuit .probe .model MYDIODE1 D (IS (IS=0.1PA, 0.1PA, RS=16 RS 16 CJO CJO=2PF 2PF TT=12N TT 12N BV=100 IBV=0.1PA) VS 2 1 sin(0 5 1K 0 0 0) D1 2 3 MYDIODE1 D2 0 1 MYDIODE1 D3 0 2 MYDIODE1 D4 1 3 MYDIODE1 R1 3 0 2K .dc VS -5 5 0.1 .tran 0.01m 2m .PLOT TRAN V(3,0) V(VS) .end 35
Full-Wave Bridge Rectifier Waveform
36
18
Half-Wave Rectifier with an RC Filter: V(1) V(2)
37
Full-Wave Rectifier with an RC Filter
38
19