Week 4: Learning SPICE
March 27, 2024
Hi everyone,
This past week, I’ve been continuing to practice SPICE in a similar fashion as last week. In this blog, I would like to go over one of the circuits I’ve worked on. This circuit utilizes the statement .DC in order to perform a DC sweep. A DC sweep allows the simulation of an electronic circuit in which the value of the voltage or current of a generator is gradually varied.
This is the input netlist:
*file: bjtschmt.sp bipolar schmitt trigger
.options post=2
vcc 6 0 dc 12
vin 1 0 dc 0 pw1(0,0 2.5u,12 5u,0)
cb1 2 4 .1pf
rc1 6 5 1k
rb1 2 4 5.6k
rb2 4 0 4.7k
re 3 0 .47k
diode 0 1 dmod
q1 2 1 3 bmod 1 ic=0,8
q2 5 4 3 bmod 1 ic=.5,0.2
.dc vin 0,12,.1
.model dmod d is=1e-15 rs=10
.model bmod npn is=1e-15 bf=80 tf=1n
- cjc =2pf cje=1pf rc=50 rb=100 vaf=200
.plot v(1) v(5)
.graph dc model=schmittplot input=v(1) output=v(5) 4.0 5.0
.model schmittplot plot xscal=1 yscal=1 xmin=.5u xmax=1.2u
.end
The .model lines define parameters inside the mentioned diode model (d) and bipolar model (npn); the initial parameters are changed by the parameters listed in the .model lines. SPICE users alter the models to their actual device parameters which are extracted from silicon or real devices. “dmod” and “bmod” in this example are modified compact models which can be called in any device declarations. q1 and q2 call these models and add further parameters like the ic parameter.
Ultimately the purpose of SPICE is using a few transistor equations with parameters in order to model the behaviors or real transistors and circuits. I look forward to simulating more examples in order to gain further experience and knowledge on the SPICE simulator.
Leave a Reply
You must be logged in to post a comment.