Mail Archives: geda-help/2012/11/15/16:29:38
X-Authentication-Warning: | delorie.com: mail set sender to geda-help-bounces using -f
|
X-Recipient: | geda-help AT delorie DOT com
|
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=strucktower.com; h=
|
| message-id:date:subject:from:to:mime-version:content-type:
|
| content-transfer-encoding; s=strucktower.com; bh=y0VADtsZMTbbysZ
|
| Nrrm6p8UFr8E=; b=Ka8t7PkD4/uV7P8exhAZmzI0Njt3pxvcMHODpo4DacnqO9I
|
| q9iX/RLX3p+ot4R0bI3UDFZKXNIisMlsb7MBA8xQRi1cJh+NOn3X4gYiVTpFD6Jn
|
| ndvp7KlRjp1Xz98CEcJimd2Ho1xFYTlVSO78UUU4ByAIhWQXnQpukv3E6gNc=
|
Message-ID: | <6a702c285f54d92e940b0351d8eb9453.squirrel@webmail.strucktower.com>
|
Date: | Thu, 15 Nov 2012 13:29:07 -0800
|
Subject: | [geda-help] New user help with gEDA- gschem, ngspice, and opamps
|
From: | keitho AT strucktower DOT com
|
To: | geda-help AT delorie DOT com
|
User-Agent: | SquirrelMail/1.4.21
|
MIME-Version: | 1.0
|
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id qAFLTDgG017555
|
Reply-To: | geda-help AT delorie DOT com
|
Hi All-
Just to understand how to do it, I put together a trivial circuit in
gschem. But ngspice gives me errors I don't understand.
Here's the errors:
*****
Circuit: * gnetlist -g spice-sdb --nomunge -i -o test1.net test1.sch
Error on line 14 : u8 1 2 vcc vee 2 tlv27x
Unable to find definition of model vee - default assumed
unknown parameter (tlv27x)
*****
tlv27x is the name of my opamp model, which is loaded via a Spice Include
statement on the schematic in gschem. It is one section of a quad opamp,
TLV274, subckt taken from the datasheet.
I can't imagine why it doesn'recognize vee, it has no problem with vcc.
I see that gnetlist has designated my opamp with a "U" instead of an "X",
not sure what that suggests.
Here is a link to a png of the circuit:
http://www.strucktower.com/test1.png
Here's how I generated test1.net:
*****
keith AT t520:~/gaf$ gnetlist -g spice-sdb --nomunge -I -o test1.net test1.sch
Command line passed = gnetlist -g spice-sdb --nomunge -I -o test1.net
test1.sch
Loading schematic [/home/keith/gaf/test1.sch]
Using SPICE backend by SDB -- Version of 4.28.2007
schematic-type = normal schematic
keith AT t520:~/gaf$
*****
Here is the generated test1.net file:
*****
keith AT t520:~/gaf$ cat test1.net
* gnetlist -g spice-sdb --nomunge -I -o test1.net test1.sch
*********************************************************
* Spice file generated by gnetlist *
* spice-sdb version 4.28.2007 by SDB -- *
* provides advanced spice netlisting capability. *
* Documentation at http://www.brorson.com/gEDA/SPICE/ *
*********************************************************
.INCLUDE tlv27x.inc
*============== Begin SPICE netlist of main design ============
.INCLUDE tlv27x.inc
Vin 3 0 ac 1 pulse( -1 1 1u 100n 100n 50u 100u)
R26 2 0 2K
R24 3 1 50
U8 1 2 Vcc Vee 2 tlv27x
Vee 0 Vee DC 1.5V
Vcc Vcc 0 DC 1.5V
.end
*****
And here is the tlv27x.inc file:
keith AT t520:~/gaf$ cat tlv27x.inc
*******************************
* Begin .SUBCKT model *
* This is for one section of the quad TLV274, taken from the datasheet
********************************
.SUBCKT tlv27x 1 2 3 4 5
*DEVICE=amp_tlv27x_highVdd,OP MP,NJF,INT
* amp_tlv_27x_highVdd operational amplifier macromodel”
* subcircuit updated using Model Editor release 9.1 on 05/15/00
* at 14:40 Model Editor is an OrCAD product. *
* connections: non-inverting input
* | inverting input
* | | positive power supply
* | | | negative power supply
* | | | | output
* | | | | |
*subckt amp_tlv27x_highVdd 1 2 3 4 5
* *** original name above!! ***************************
c1 11 12 457.48E−15
c2 6 7 5.0000E−12
css 10 99 1.1431E−12
dc 5 53 dy
de 54 5 dy
dlp 90 91 dx
dln 92 90 dx
dp 4 3 dx
egnd 99 0 poly(2) (3,0) (4,0) 0 .5 .5
fb 7 99 poly(5) vb vc ve vlp vln 0 176.02E6
−1E3 1E3 180E6 −180E6
ga 6 0 11 12 16.272E−6
gcm 0 6 10 99 6.8698E−9
iss 10 4 dc 1.3371E−6
hlim 90 0 vlim 1K
j1 11 2 10 jx1
J2 12 1 10 jx2
r2 6 9 100.00E3
rd1 3 11 61.456E3
rd2 3 12 61.456E3
ro1 8 5 10
ro2 7 99 10
rp 3 4 150.51E3
rss 10 99 149.58E6
vb 9 0 dc 0
vc 3 53 dc .78905
ve 54 4 dc .78905
vlim 7 8 dc 0
vlp 91 0 dc 14.200
vln 0 92 dc 14.200
.model dx D(Is=800.00E−18)
.model dy D(Is=800.00E−18 Rs=1m Cjo=10p)
.model jx1 NJF(Is=500.00E−15
Beta=198.03E−6 Vto=−1)
.model jx2 NJF(Is=500.00E−15
Beta=198.03E−6 Vto=−1)
.ends
keith AT t520:~/gaf$
********************************************************************
In case it is useful, here is a link to the tlv27x.inc file:
http://www.strucktower.com/tlv27x.inc
I have been using John Doty's excellent and helpful page on Simple,
Generic Opamp Models
(http://www.gedasymbols.org/user/john_doty/models/opamp/index.html) as an
example of how to go about this, but somehow I guess I am missing
something important. I've tried it different ways with the same results.
Ideas? I running the gEDA software under Linux Debian.
Thanks for any help you can offer,
Keith Ostertag
- Raw text -