* SPICE netlist
V1 In 0 PWL file=pwl-out.txt
R1 N004 N003 1.5k tol=5
C1 N004 0 11n V=25 Irms=728m Rser=0.14361 Lser=0
R4 N003 0 1k
R5 N003 In 5.75k
V2 VCC 0 5
R2 N005 0 4.7k
R3 VCC N005 6k
R6 VCC N002 4.7k
R7 N002 0 5.4k
XU1 FLTRD N002 VCC 0 High LM358 ;pnba In+)In-)V+)V-)OUT
XU2 N005 FLTRD VCC 0 Low LM358 ;pnba In+)In-)V+)V-)OUT
Q1 N001 N004 0 0 BC547C
R9 FLTRD N001 10k
R10 N001 N004 10k
.tran 10m
.SUBCKT LM358 1 2 99 50 28
IOS 2 1 5N
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
C4 5 6 128.27P
I2 99 50 75U
EOS 7 1 POLY(1) 16 49 2E-3 1
R8 99 49 60K
R9 49 50 60K
V2 99 8 1.63
D1 9 8 DX
D2 10 9 DX
V3 10 50 .635
EH 99 98 99 49 1
G1 98 9 POLY(1) 5 6 0 9.8772E-4 0 .3459
R5 98 9 101.2433MEG
C3 98 9 200P
G3 98 15 9 49 1E-6
R12 98 15 1MEG
C5 98 15 7.9577E-14
G4 98 16 3 49 5.6234E-8
L2 98 17 15.9M
R13 17 16 1K
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

* LTspice schematic (.asc)
Version 4
SHEET 1 1456 528
WIRE 456 -168 456 -200
WIRE -280 -152 -280 -248
WIRE -216 -152 -280 -152
WIRE 232 -152 232 -168
WIRE 424 -152 232 -152
WIRE 568 -136 488 -136
WIRE 424 -120 408 -120
WIRE -696 -104 -728 -104
WIRE -680 -104 -696 -104
WIRE -584 -104 -600 -104
WIRE -472 -104 -504 -104
WIRE -360 -104 -360 -248
WIRE -360 -104 -472 -104
WIRE -344 -104 -360 -104
WIRE -472 -72 -472 -104
WIRE 456 -72 456 -104
WIRE -696 -40 -696 -104
WIRE -584 -40 -584 -104
WIRE 232 -40 232 -72
WIRE 728 -24 728 -72
WIRE 232 56 232 40
WIRE -696 88 -696 40
WIRE -584 88 -584 40
WIRE -472 88 -472 -8
WIRE -280 88 -280 -56
WIRE 456 88 456 72
WIRE 728 88 728 56
WIRE 424 104 392 104
WIRE 568 120 488 120
WIRE 424 136 232 136
WIRE 232 152 232 136
WIRE 456 184 456 152
WIRE 232 264 232 232
FLAG -696 88 0
FLAG -728 -104 In
IOPIN -464 -592 In
FLAG 568 120 Low
IOPIN 832 -368 Out
FLAG 568 -136 High
IOPIN 832 -624 Out
FLAG -584 88 0
FLAG -472 88 0
FLAG 456 -72 0
FLAG 456 184 0
FLAG 232 -40 0
FLAG 232 264 0
FLAG 728 88 0
FLAG 728 -72 VCC
FLAG 456 -200 VCC
FLAG 456 72 VCC
FLAG 232 -248 VCC
FLAG 408 -120 FLTRD
IOPIN 672 -608 BiDir
FLAG 232 40 VCC
FLAG 392 104 FLTRD
IOPIN 656 -384 BiDir
FLAG -280 88 0
FLAG -136 -152 FLTRD
IOPIN 128 -640 BiDir
SYMBOL voltage -696 -56 R0
SYMATTR Value PWL file=pwl-out.txt
SYMATTR InstName V1
SYMBOL res -488 -120 R90
SYMATTR InstName R1
SYMATTR Value 1.5k
SYMATTR SpiceLine tol=5
SYMBOL cap -488 -72 R0
SYMATTR InstName C1
SYMATTR Value 11n
SYMATTR SpiceLine V=25 Irms=728m Rser=0.14361 Lser=0
SYMBOL res -600 -56 R0
SYMATTR InstName R4
SYMATTR Value 1k
SYMBOL res -584 -120 R90
SYMATTR InstName R5
SYMATTR Value 5.75k
SYMBOL voltage 728 -40 R0
SYMATTR InstName V2
SYMATTR Value 5
SYMBOL res 216 136 R0
SYMATTR InstName R2
SYMATTR Value 4.7k
SYMBOL res 216 40 R0
SYMATTR InstName R3
SYMATTR Value 6k
SYMBOL res 216 -264 R0
SYMATTR InstName R6
SYMATTR Value 4.7k
SYMBOL res 216 -168 R0
SYMATTR InstName R7
SYMATTR Value 5.4k
SYMBOL Opamps\\opamp2 456 -200 R0
SYMATTR InstName U1
SYMATTR Value LM358
SYMBOL Opamps\\opamp2 456 56 R0
SYMATTR InstName U2
SYMATTR Value LM358
SYMBOL npn -344 -152 R0
SYMATTR InstName Q1
SYMATTR Value BC547C
SYMBOL res -120 -168 R90
SYMATTR InstName R9
SYMATTR Value 10k
SYMBOL res -264 -264 R90
SYMATTR InstName R10
SYMATTR Value 10k