* SPICE netlist
V1 +15V 0 15v
V2 0 -15V 15v
V3 N003 0 {in}
Q1 N004 CV eCV 0 2N3906
Q2 Vcap eCV 0 0 2N3904
R17 +15V eCV 100k
R18 N004 -15V 330
R1 CV 0 2.2k
R2 CV N002 100k
R3 CV N003 100k
R4 +15V N002 {100k*a}
R5 N002 -15V {100k*(1-a)}
C1 Vcap 0 2n2
D1 N001 Vcap 1N4148
A1 Vcap 0 0 0 0 N001 0 0 SCHMITT Vhigh=5 Vlow=0 Vt=2.4 Vh=1
.SUBCKT TL082 1 2 3 4 5
C1 11 12 3.498E-12
C2 6 7 15.00E-12
DC 5 53 DX
DE 54 5 DX
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 4.715E6 -5E6 5E6 5E6 -5E6
GA 6 0 11 12 282.8E-6
GCM 0 6 10 99 8.942E-9
ISS 3 10 DC 195.0E-6
HLIM 90 0 VLIM 1K
J1 11 2 10 JX
J2 12 1 10 JX
R2 6 9 100.0E3
RD1 4 11 3.536E3
RD2 4 12 3.536E3
RO1 8 5 150
RO2 7 99 150
RP 3 4 2.143E3
RSS 10 99 1.026E6
VB 9 0 DC 0
VC 3 53 DC 2.200
VE 54 4 DC 2.200
VLIM 7 8 DC 0
VLP 91 0 DC 25
VLN 0 92 DC 25
.tran 0 1s 0 10m
.SUBCKT LM741 1 2 99 50 28
IOS 2 1 20N
R1 1 3 250K
R2 3 2 250K
I1 4 50 100U
R3 5 99 517
R4 6 99 517
Q1 5 2 4 QX
Q2 6 7 4 QX
C4 5 6 60.3614P
I2 99 50 1.6MA
EOS 7 1 POLY(1) 16 49 1E-3 1
R8 99 49 40K
R9 49 50 40K
V2 99 8 1.63
D1 9 8 DX
D2 10 9 DX
V3 10 50 1.63
EH 99 98 99 49 1
G1 98 9 5 6 2.1E-3
R5 98 9 95.493MEG
C3 98 9 333.33P
G3 98 15 9 49 1E-6
R12 98 15 1MEG
C5 98 15 5.3052E-15
G4 98 16 3 49 3.1623E-8
L2 98 17 530.5M
R13 17 16 1K
F6 50 99 POLY(1) V6 450U 1
E1 99 23 99 15 1
R16 24 23 25
D5 26 24 DX
V6 26 22 0.65V
R17 23 25 25
D6 25 27 DX
V7 22 27 0.65V
V5 22 21 0.18V
D4 21 15 DX
V4 20 22 0.18V
D3 15 20 DX
L3 22 28 100P
RL3 22 28 100K
.param a .5
.param in 2

* LTspice schematic (.asc)
Version 4
SHEET 1 1280 592
WIRE 496 -280 448 -280
WIRE 544 -280 496 -280
WIRE 640 -280 608 -280
WIRE -336 -200 -336 -216
WIRE -576 -168 -576 -248
WIRE 448 -136 448 -280
WIRE 512 -136 448 -136
WIRE 640 -136 640 -280
WIRE 640 -136 576 -136
WIRE -336 -104 -336 -120
WIRE -208 -104 -336 -104
WIRE -64 -104 -128 -104
WIRE -336 -88 -336 -104
WIRE -576 -72 -576 -88
WIRE -576 -72 -640 -72
WIRE -576 -56 -576 -72
WIRE 64 -56 64 -72
WIRE 352 -56 272 -56
WIRE 448 -56 448 -136
WIRE 448 -56 352 -56
WIRE -640 -40 -640 -72
WIRE 272 -8 272 -56
WIRE -336 8 -336 -8
WIRE -64 8 -64 -104
WIRE 448 8 448 -56
WIRE 64 40 64 24
WIRE 160 40 64 40
WIRE 208 40 160 40
WIRE 64 56 64 40
WIRE -576 104 -576 24
WIRE -208 104 -336 104
WIRE -64 104 -64 8
WIRE -64 104 -128 104
WIRE 0 104 -64 104
WIRE -336 136 -336 104
WIRE -64 152 -64 104
WIRE 64 200 64 152
WIRE -336 296 -336 216
WIRE -64 296 -64 232
WIRE 64 296 64 280
WIRE 272 296 272 88
WIRE 448 296 448 72
FLAG -640 -40 0
FLAG -576 -248 +15V
FLAG -576 104 -15V
FLAG -336 296 0
FLAG 272 296 0
FLAG -64 296 0
FLAG 448 296 0
FLAG -64 8 CV
FLAG 160 40 eCV
FLAG -336 8 -15V
FLAG 64 296 -15V
FLAG -336 -216 +15V
FLAG 64 -72 +15V
FLAG 352 -56 Vcap
FLAG 496 -280 OUT
SYMBOL voltage -576 -184 R0
SYMATTR InstName V1
SYMATTR Value 15v
SYMBOL voltage -576 -72 R0
SYMATTR InstName V2
SYMATTR Value 15v
SYMBOL voltage -336 120 M0
SYMATTR Value {in}
SYMATTR InstName V3
SYMBOL pnp 0 152 M180
SYMATTR InstName Q1
SYMATTR Value 2N3906
SYMBOL npn 208 -8 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL res 48 -72 R0
SYMATTR InstName R17
SYMATTR Value 100k
SYMBOL res 48 184 R0
SYMATTR InstName R18
SYMATTR Value 330
SYMBOL res -80 136 R0
SYMATTR InstName R1
SYMATTR Value 2.2k
SYMBOL res -112 -120 R90
SYMATTR InstName R2
SYMATTR Value 100k
SYMBOL res -112 88 R90
SYMATTR InstName R3
SYMATTR Value 100k
SYMBOL res -352 -216 R0
SYMATTR InstName R4
SYMATTR Value {100k*a}
SYMBOL res -352 -104 R0
SYMATTR InstName R5
SYMATTR Value {100k*(1-a)}
SYMBOL cap 432 8 R0
SYMATTR InstName C1
SYMATTR Value 2n2
SYMBOL diode 608 -296 R90
SYMATTR InstName D1
SYMATTR Value 1N4148
SYMBOL Digital\\schmtinv 512 -200 R0
SYMATTR InstName A1
SYMATTR SpiceLine Vhigh=5 Vlow=0 Vt=2.4 Vh=1