[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: newbie opamp blues



David --

> My final statement was that I just don't have time to play around with 
> this and that until I finally hit upon the correct steps for that 
> "aha!". 

If you had taken as much time to peruse the docs at:

http://www.brorson.com/gEDA/SPICE/

as you have to write your e-mails, perhaps you'd be done by now!

Perhaps you should check out LTSpice, as somebody else already
suggested.  LTSpice  provides what you want:  A prepackaged SPICE
simulation package with everything already built in.  Get it here:

http://www.linear.com/company/software.jsp

> I really need more clear cut instructions on how to build an 
> opamp circuit, with the associated pins. 

1.  Please find the SPICE-opamp symbol attached below.  The symbol
below has the correct pinseq attributes for simulating most all opamp
models, including the one I attach below.

2.  Save it into your project directory.

3.  Make sure your gafrc file has this line in it:

(component-library ".")

This step will make gschem able to find the symbol using the parts
browser (as long as you are running it in your project directory).

4.  Within gschem, place the opamp symbol on your schematic.

5.  Double click on the symbol to get to the attribute editor.

6.  Change the refdes to U1

7.  Enter a new attribute "file".  Make its value the same as the
SPICE subckt you wish to simulate.  I attach an OP07 .subckt below
which you can cut 'n paste into your project directory.  Make the
"file" attribute point to this file.

8.  In the subckt file, locate the name of the subckt.  The subckt
name occurs after the .subckt declaration at the beginning of the
file.  In the case of the OP07 below, the subckt name is OP07.

9.  Still in the symbol's attribute editor, add a new attribute
"model-name".  Make the model name the name you got from the file, in
this case "OP07".

10.  Close the attribute editor.  

11.  Create the rest of your schematic.

12.  Netlist using gnetlist -g spice-sdb

13.  You are done.

Stuart

---------------  SPICE-opamp-1.sym  ---------------
v 20050313 1
L 200 0 200 800 3 0 0 0 -1 -1
L 200 800 800 400 3 0 0 0 -1 -1
L 800 400 200 0 3 0 0 0 -1 -1
T 825 150 5 8 0 0 0 0 1
device=OP177
P 200 600 0 600 1 0 1
{
T 50 625 5 8 1 1 0 0 1
pinnumber=3
T 50 625 5 8 0 0 0 0 1
pinseq=1
T 200 600 5 10 0 1 0 0 1
pinlabel=IN+
}
P 200 200 0 200 1 0 1
{
T 50 225 5 8 1 1 0 0 1
pinnumber=2
T 50 225 5 8 0 0 0 0 1
pinseq=2
T 200 200 5 10 0 1 0 0 1
pinlabel=IN-
}
P 800 400 1000 400 1 0 1
{
T 875 425 5 8 1 1 0 0 1
pinnumber=6
T 875 425 5 8 0 0 0 0 1
pinseq=5
T 800 400 5 10 0 1 0 0 1
pinlabel=OUT
}
P 500 200 500 0 1 0 1
{
T 525 50 5 8 1 1 0 0 1
pinnumber=4
T 525 50 5 8 0 0 0 0 1
pinseq=4
T 500 200 5 10 0 1 0 0 1
pinlabel=V-
}
P 500 600 500 800 1 0 1
{
T 525 650 5 8 1 1 0 0 1
pinnumber=7
T 525 650 5 8 0 0 0 0 1
pinseq=3
T 500 600 5 10 0 1 0 0 1
pinlabel=V+
}
T 225 350 9 6 1 0 0 0 1
Op amp
T 200 900 8 10 1 1 0 0 1
refdes=U?
T 400 500 9 6 1 0 0 0 1
V+
T 400 200 9 6 1 0 0 0 1
V-
T 247 533 9 12 1 0 0 0 1
+
T 250 127 9 12 1 0 0 0 1
-
---------------  end of SPICE-opamp-1.sym  ---------------


----------------- OP07 spice model  ---------------------
*
* Linear Technology OP07 op amp model
* Written: 08-24-1989 12:35:59 Type: Bipolar npn input, internal comp.
* Typical specs: 
* Vos=3.0E-05, Ib=1.0E-09, Ios=4.0E-10, GBP=6.0E+05Hz, Phase mar.= 70
* deg, 
* SR(+)=2.5E-01V/us, SR(-)=2.4E-01V/us, Av= 114 dB, CMMR= 126 dB, 
* Vsat(+)=2.00V, Vsat(-)=2.00V, Isc=+/-25.0mA, Iq=2500uA
* (input differential mode clamp active)
* 
* Connections: + - V+V-O 
.subckt OP07 3 2 7 4 6
* input
rc1 7  80 8.842E+03
rc2 7  90 8.842E+03
q1  80 102 10 qm1 
q2  90 103 11 qm2 
rb1  2   102 5.000E+02
rb2  3   103 5.000E+02
ddm1 102 104 dm2 
ddm3 104 103 dm2 
ddm2 103 105 dm2 
ddm4 105 102 dm2 
c1  80 90 5.460E-12
re1 10 12 1.948E+03
re2 11 12 1.948E+03
iee 12 4  7.502E-06
re  12 0  2.666E+07
ce  12 0  1.579E-12
* intermediate 
gcm 0  8  12 0  5.668E-11
ga  8  0  80 90 1.131E-04
r2  8  0  1.000E+05
c2  1  8  3.000E-11
gb  1  0  8  0  1.294E+03
* output 
ro1 1  6  2.575E+01
ro2 1  0  3.425E+01
rc  17 0  6.634E-06
gc  0  17 6  0  1.507E+05
d1  1  17 dm1 
d2  17 1  dm1 
d3  6  13 dm2 
d4  14 6  dm2 
vc  7  13 2.803E+00
ve  14 4  2.803E+00
ip  7  4  2.492E-03
dsub 4  7  dm2 
* models 
.model qm1 npn (is=8.000E-16 bf=3.125E+03)
.model qm2 npn (is=8.009E-16 bf=4.688E+03)
.model dm1 d   (is=1.486E-08)
.model dm2 d   (is=8.000E-16)
.ends OP07
* 
* - - - - - * fini OP07 * - - - - - * [oamm vn1 8/89]
**
*         (C) COPYRIGHT LINEAR TECHNOLOGY CORPORATION 1990
*                       All rights reserved.
* 
*   Linear Technology Corporation hereby grants the users of this
* macromodel a non-exclusive, nontransferrable license to use this
*            macromodel under the following conditions:
* 
* The user agrees that this macromodel is licensed from Linear
* Technology and agrees that the macromodel may be used, loaned,
* given away or included in other model libraries as long as this
* notice and the model in its entirety and unchanged is included.
* No right to make derivative works or modifications to the
* macromodel is granted hereby.  All such rights are reserved.
* 
* This model is provided as is.  Linear Technology makes no
* warranty, either expressed or implied about the suitability or
* fitness of this model for any particular purpose.  In no event
* will Linear Technology be liable for special, collateral,
* incidental or consequential damages in connection with or arising
* out of the use of this macromodel.  It should be remembered that
* models are a simplification of the actual circuit.
* 
* Linear Technology reserves the right to change these macromodels
* without prior notice.  Contact Linear Technology at 1630 McCarthy
* Blvd., Milpitas, CA, 95035-7487 or telephone 408/432-1900 for
* datasheets on the actual amplifiers or the latest macromodels.
* 
* -----------------------------------------------------------------------

----------------- End of OP07 spice model  ---------