mirror of
https://github.com/rene-dev/stmbl.git
synced 2026-02-06 02:02:34 +08:00
analog frontend
This commit is contained in:
118
hw/spice/LM358.lib
Executable file
118
hw/spice/LM358.lib
Executable file
@@ -0,0 +1,118 @@
|
||||
*//////////////////////////////////////////////////////////////////////
|
||||
* (C) National Semiconductor, Inc.
|
||||
* Models developed and under copyright by:
|
||||
* National Semiconductor, Inc.
|
||||
|
||||
*/////////////////////////////////////////////////////////////////////
|
||||
* Legal Notice: This material is intended for free software support.
|
||||
* The file may be copied, and distributed; however, reselling the
|
||||
* material is illegal
|
||||
|
||||
*////////////////////////////////////////////////////////////////////
|
||||
* For ordering or technical information on these models, contact:
|
||||
* National Semiconductor's Customer Response Center
|
||||
* 7:00 A.M.--7:00 P.M. U.S. Central Time
|
||||
* (800) 272-9959
|
||||
* For Applications support, contact the Internet address:
|
||||
* amps-apps@galaxy.nsc.com
|
||||
|
||||
*//////////////////////////////////////////////////////////
|
||||
*LM358 DUAL OPERATIONAL AMPLIFIER MACRO-MODEL
|
||||
*//////////////////////////////////////////////////////////
|
||||
*
|
||||
* connections: non-inverting input
|
||||
* | inverting input
|
||||
* | | positive power supply
|
||||
* | | | negative power supply
|
||||
* | | | | output
|
||||
* | | | | |
|
||||
* | | | | |
|
||||
.SUBCKT LM358 1 2 99 50 28
|
||||
*
|
||||
*Features:
|
||||
*Eliminates need for dual supplies
|
||||
*Large DC voltage gain = 100dB
|
||||
*High bandwidth = 1MHz
|
||||
*Low input offset voltage = 2mV
|
||||
*Wide supply range = +-1.5V to +-16V
|
||||
*
|
||||
*NOTE: Model is for single device only and simulated
|
||||
* supply current is 1/2 of total device current.
|
||||
* Output crossover distortion with dual supplies
|
||||
* is not modeled.
|
||||
*
|
||||
****************INPUT STAGE**************
|
||||
*
|
||||
IOS 2 1 5N
|
||||
*^Input offset current
|
||||
R1 1 3 500K
|
||||
R2 3 2 500K
|
||||
I1 99 4 100U
|
||||
R3 5 50 517
|
||||
R4 6 50 517
|
||||
Q1 5 2 4 QX
|
||||
Q2 6 7 4 QX
|
||||
*Fp2=1.2 MHz
|
||||
C4 5 6 128.27P
|
||||
*
|
||||
***********COMMON MODE EFFECT***********
|
||||
*
|
||||
I2 99 50 75U
|
||||
*^Quiescent supply current
|
||||
EOS 7 1 POLY(1) 16 49 2E-3 1
|
||||
*Input offset voltage.^
|
||||
R8 99 49 60K
|
||||
R9 49 50 60K
|
||||
*
|
||||
*********OUTPUT VOLTAGE LIMITING********
|
||||
V2 99 8 1.63
|
||||
D1 9 8 DX
|
||||
D2 10 9 DX
|
||||
V3 10 50 .635
|
||||
*
|
||||
**************SECOND STAGE**************
|
||||
*
|
||||
EH 99 98 99 49 1
|
||||
G1 98 9 POLY(1) 5 6 0 9.8772E-4 0 .3459
|
||||
*Fp1=7.86 Hz
|
||||
R5 98 9 101.2433MEG
|
||||
C3 98 9 200P
|
||||
*
|
||||
***************POLE STAGE***************
|
||||
*
|
||||
*Fp=2 MHz
|
||||
G3 98 15 9 49 1E-6
|
||||
R12 98 15 1MEG
|
||||
C5 98 15 7.9577E-14
|
||||
*
|
||||
*********COMMON-MODE ZERO STAGE*********
|
||||
*
|
||||
*Fpcm=10 KHz
|
||||
G4 98 16 3 49 5.6234E-8
|
||||
L2 98 17 15.9M
|
||||
R13 17 16 1K
|
||||
*
|
||||
**************OUTPUT STAGE**************
|
||||
*
|
||||
F6 50 99 POLY(1) V6 300U 1
|
||||
E1 99 23 99 15 1
|
||||
R16 24 23 17.5
|
||||
D5 26 24 DX
|
||||
V6 26 22 .63V
|
||||
R17 23 25 17.5
|
||||
D6 25 27 DX
|
||||
V7 22 27 .63V
|
||||
V5 22 21 0.27V
|
||||
D4 21 15 DX
|
||||
V4 20 22 0.27V
|
||||
D3 15 20 DX
|
||||
L3 22 28 500P
|
||||
RL3 22 28 100K
|
||||
*
|
||||
***************MODELS USED**************
|
||||
*
|
||||
.MODEL DX D(IS=1E-15)
|
||||
.MODEL QX PNP(BF=1.111E3)
|
||||
*
|
||||
.ENDS
|
||||
*$
|
||||
@@ -72,13 +72,13 @@ WIRE 2608 496 1984 496
|
||||
WIRE 3328 496 3328 192
|
||||
WIRE 3600 496 3328 496
|
||||
WIRE 2608 512 2608 496
|
||||
WIRE 3328 528 3200 528
|
||||
WIRE 3504 528 3200 528
|
||||
WIRE 3600 528 3600 496
|
||||
WIRE 3600 528 3328 528
|
||||
WIRE 3328 560 3328 528
|
||||
WIRE 3600 528 3504 528
|
||||
WIRE 2608 592 2304 592
|
||||
WIRE 2704 592 2608 592
|
||||
WIRE 2768 592 2704 592
|
||||
WIRE 3504 592 3504 528
|
||||
WIRE 2304 640 2304 592
|
||||
WIRE 2608 672 2384 672
|
||||
WIRE 2704 672 2608 672
|
||||
@@ -88,6 +88,7 @@ WIRE 3424 672 3328 672
|
||||
WIRE 3504 672 3424 672
|
||||
WIRE 3616 672 3616 416
|
||||
WIRE 3616 672 3504 672
|
||||
WIRE 3328 688 3328 672
|
||||
WIRE 1536 752 1536 384
|
||||
WIRE 2304 752 2304 720
|
||||
WIRE 2304 752 1536 752
|
||||
@@ -139,13 +140,13 @@ SYMATTR InstName R8
|
||||
SYMATTR Value 2.4k
|
||||
SYMBOL res 3888 144 R0
|
||||
SYMATTR InstName R11
|
||||
SYMATTR Value 390
|
||||
SYMATTR Value 120
|
||||
SYMBOL cap 3776 240 R0
|
||||
SYMATTR InstName C10
|
||||
SYMATTR Value 1n
|
||||
SYMBOL voltage 3328 672 R0
|
||||
SYMATTR InstName V2
|
||||
SYMATTR Value SINE(5 0 700 0)
|
||||
SYMATTR Value SINE(2.5 0 700 0)
|
||||
SYMATTR SpiceLine Rser=1
|
||||
SYMBOL res 3440 64 R0
|
||||
SYMATTR InstName R21
|
||||
@@ -170,8 +171,8 @@ SYMATTR InstName C9
|
||||
SYMATTR Value 18p
|
||||
SYMBOL voltage 3504 576 R0
|
||||
SYMATTR InstName V5
|
||||
SYMATTR Value SINE(0 1 1000 0 0)
|
||||
SYMATTR SpiceLine Rser=24
|
||||
SYMATTR Value SINE(0 0.5 1000 0 0)
|
||||
SYMATTR SpiceLine Rser=1
|
||||
SYMBOL voltage 2960 288 R0
|
||||
SYMATTR InstName V7
|
||||
SYMATTR Value 3.3
|
||||
@@ -184,8 +185,6 @@ SYMBOL voltage 2848 288 R0
|
||||
SYMATTR InstName V9
|
||||
SYMATTR Value 12
|
||||
SYMATTR SpiceLine Rser=1
|
||||
SYMBOL Opamps/LM358 3744 64 R0
|
||||
SYMATTR InstName U1
|
||||
SYMBOL voltage 4336 288 R0
|
||||
SYMATTR InstName V12
|
||||
SYMATTR Value 0
|
||||
@@ -242,5 +241,9 @@ SYMBOL voltage 3200 672 R0
|
||||
SYMATTR InstName V4
|
||||
SYMATTR Value PULSE(0 5 0 0 0 0.1m 0.2m)
|
||||
SYMATTR SpiceLine Rser=1
|
||||
SYMBOL Opamps/opamp2 3744 64 R0
|
||||
SYMATTR InstName U1
|
||||
SYMATTR Value lm358
|
||||
TEXT 1664 -48 Left 2 !.tran 0 2mS
|
||||
TEXT 2480 -48 Left 2 !K1 L1 L2 0.5
|
||||
TEXT 2024 -48 Left 2 !.include lm358.lib
|
||||
|
||||
Reference in New Issue
Block a user