Maker Pro
Maker Pro

Using gschem to simulate active circuits with ngspice



Jan 1, 1970
I have gschem and ngspice running under Ubuntu Hardy and have
successfully simulated passive (RLC) and a few with NPN and/or PNP

I am having difficulty properly setting up simulations using
operational amplifiers (i.e. TL071) or MOSFETS (i.e. 2N7000). I have
been able to successfully download the Spice 3 models (as
'subcircuits') from manufacturer's sites and associate them with the
schematic symbols in gschem (by setting the 'file' attribute).

Possibly my problem is a misunderstanding of pin numbering and how to
line up pin numbers on a schematic symbol with those in a subcircuit.
I seem to have this problem with operational amplifiers especially.

There are also other strange things I am stuck on, for example, why
the gschem MOSFET parts have varying numbers of pins:

nmos-1.sym: 4 pins
nmos-2.sym: 4 pins
nmos-3.sym: 3 pins

Which should be used for simulation with, for example, the 2N7000
model? I imagine it ia nmos-3.sym but what are the other symbols used
for, in that case?

Can anyone recommend good books or other sources of information for
guiding someone like me through the fundamentals of using Spice and
gschem for active circuit simulation? I've seen many of the gEDA/
gschem tutorials and they all seem to skip this aspect to some extent.
I could really get a lot from a single, clear article that explains
how to set up a simple operational amplifier circuit simulation, step-
by-step, in gEDA/gschem/ngspice!