About SPICE | SPICE Basics | Running SPICE | CIRCUIT COLLECTION | SPICE Commands | SPICE Demos and Downloads
About Us | Contact Us | Home | Search

User's Guide - Level 1

Here's a quick tour of Op Amp Builder - Level 1, a web page where you create custom SPICE subcircuits that models Gain, Bandwidth and Input/Output Resistance.

Create a custom SPICE subcircuit that models Gain, Bandwidth and Input/Output Resistance. Use early in the design cycle with a high bandwidth to develop the overall topology. This macromodel simulates quickly and doesn't have convergence problems, unlike some manufacturer's models. Later in the design, replace it with a more complex model to address which secondary behaviors might impact your design.

SPICE CIRCUIT

spice model

NETLIST

* Device Pins      In+ In- Vout
.SUBCKT OPAMP1     1   2   82
*
RIN   1     2     1e9
*
*  AMPLIFIER STAGE: GAIN, POLE
*   Aol=1e6, fu=10e6 Hz, fp1=10.000 Hz
G1    0     10    VALUE = { 1.0000 * V(1,2)  }
R1    10    0     1e6
C1    10    0     1.5915e-8
*
* OUTPUT STAGE
EOUT  80 0  10 0  1
ROUT  80    82    100
.ENDS

QUICK OVERVIEW

Function / Parameter Description
  Input Resistance RIN - Resistance between input terminals.
  Differential Amplifier G1 and R1 create a differntial amplifier with input nodes 1 and 2 and output node 10.  Learn More.
  Open Loop Gain Open Loop gain defined by KG1*R1. Learn More.
  1st Pole Low-Pass Filter R1 and C1 create a low-pass filter and the bandwidth of the op amp mdeol. Learn More.
  Output Buffer and Resistance EOUT provides output current drive and ROUT mimics the output resistance of the op amp. Learn More.

EX 1 - OP AMP MODEL IN A NETLIST

Inserting a model into your netlist is a piece of cake. Just give the opamp a name starting with an "X" giving SPICE a heads up for a subcircuit else where in the file.

R1	1	2	5K
R2	2	3	10K
XOP1	0 2	3	OPAMP1

Then copy your op amp macro-model (SPICE subcircuit shown above) into your file. Be sure to include the whole enchilada from .SUBCKT to .ENDS. Note, that circuit nodes 0 2 3 will be connected to subcircuit nodes 1 2 82. For a quick review of subcircuits, check out Why Use Subcircuits?

As an option, copy the subcirecuit into a separate file named "opamp1.lib" for example, and add the statement

.INC opamp1.lib

to tell SPICE where to go fish for the op amp model.

EX 2 - OP AMP MODEL IN AN LTSPICE SCHEMATIC

Inserting a model into your netlist is a piece of cake. Just give the opamp a name starting with an "X" giving SPICE a heads up for a subcircuit else where in the file.

Then copy your op amp macro-model (SPICE subcircuit shown above) into your file. Be sure to include the whole enchilada from .SUBCKT to .ENDS. Note, that circuit nodes 0 2 3 will be connected to subcircuit nodes 1 2 82.

As an option, copy the subcirecuit into a separate file named "opamp1.lib" for example, and add the statement

to tell SPICE where to go fish for the op amp model.

 

Top

© 2014 eCircuit Center