* SPICE netlist
XU1 N014 N016 N009 N008 N016 level1 Avol=1Meg GBW=10Meg Vos=0 En=0 Enk=0 In=0 Ink=0 Rin=500Meg ;pnba In+)In-)V+)V-)OUT
R1 N016 N015 20K
R2 N011 N010 10K
R3 N012 N011 4.7K
R4 N015 N013 2K
R5 N010 0 5K
R6 0 N014 1000K
XU2 N010 N015 N009 N008 N013 level1 Avol=1Meg GBW=10Meg Vos=0 En=0 Enk=0 In=0 Ink=0 Rin=500Meg ;pnba In+)In-)V+)V-)OUT
D1 N014 N019 D
D2 0 N019 D
D3 0 N011 D
C1 N014 0 100p
V2 0 N008 +12
V3 N009 0 +12
V4 N012 0 +5
C2 N003 N014 100p
XU4 N006 N002 N004 N007 N003 level1 Avol=1Meg GBW=10Meg Vos=0 En=0 Enk=0 In=0 Ink=0 Rin=500Meg ;pnba In+)In-)V+)V-)OUT
R11 N006 N005 120k
V9 N005 0 PULSE(0 5 0 0.05m 0.05m 0 0 500)
R12 N006 0 100k
R13 N001 N002 3.5k
R14 N003 N002 27k
V1 N001 0 1.225
V10 N004 0 +12
V11 0 N007 +12
XU3 N013 N017 N009 N008 OUT level1 Avol=1Meg GBW=10Meg Vos=0 En=0 Enk=0 In=0 Ink=0 Rin=500Meg ;pnba In+)In-)V+)V-)OUT
R7 N017 OUT 2.2k
R9 N021 N020 1k
R10 N020 0 1k
R8 N020 N017 0.5k
V5 0 N021 -2.5
.tran 0 10m 0

* LTspice schematic (.asc)
Version 4
SHEET 1 1840 1792
WIRE -472 -896 -568 -896
WIRE -40 -896 -392 -896
WIRE -568 -880 -568 -896
WIRE -40 -848 -40 -896
WIRE 8 -704 -24 -704
WIRE 232 -704 88 -704
WIRE 184 -672 104 -672
WIRE 104 -640 104 -672
WIRE -40 -624 -40 -768
WIRE -24 -624 -24 -704
WIRE -24 -624 -40 -624
WIRE 72 -624 -24 -624
WIRE 232 -608 232 -704
WIRE 232 -608 136 -608
WIRE 888 -608 232 -608
WIRE -568 -592 -632 -592
WIRE -376 -592 -488 -592
WIRE -168 -592 -296 -592
WIRE 72 -592 -168 -592
WIRE -632 -576 -632 -592
WIRE 104 -528 104 -576
WIRE 104 -528 -8 -528
WIRE -168 -480 -168 -592
WIRE 184 -464 184 -672
WIRE 184 -464 104 -464
WIRE -168 -352 -168 -400
WIRE 104 -336 104 -384
WIRE 168 -336 104 -336
WIRE 168 -320 168 -336
WIRE 104 -256 104 -336
WIRE -8 -176 -8 -528
WIRE 104 -176 -8 -176
WIRE -56 -112 -616 -112
WIRE 392 -112 -56 -112
WIRE 488 -112 392 -112
WIRE 392 -96 392 -112
WIRE 888 -64 888 -608
WIRE 392 0 392 -16
WIRE 472 0 392 0
WIRE 392 32 392 0
WIRE 8 64 8 32
WIRE 232 64 232 -32
WIRE 280 176 -136 176
WIRE 392 176 392 112
WIRE 392 176 280 176
WIRE 488 208 488 -112
WIRE 488 208 392 208
WIRE 72 256 24 256
WIRE 232 256 232 128
WIRE 232 256 152 256
WIRE 328 256 232 256
WIRE 472 256 408 256
WIRE 616 256 552 256
WIRE -56 320 -56 -112
WIRE -616 336 -616 -112
WIRE 8 336 8 144
WIRE 8 336 -24 336
WIRE 24 336 24 256
WIRE 24 336 8 336
WIRE 392 336 392 208
WIRE -296 352 -584 352
WIRE -88 352 -296 352
WIRE 616 352 424 352
WIRE 760 352 616 352
WIRE 888 352 888 0
WIRE 888 352 760 352
WIRE 904 352 888 352
WIRE -824 368 -920 368
WIRE -648 368 -824 368
WIRE 24 368 -24 368
WIRE 184 368 24 368
WIRE 312 368 264 368
WIRE 360 368 312 368
WIRE 904 368 904 352
WIRE -552 384 -584 384
WIRE 472 384 424 384
WIRE -376 400 -376 384
WIRE 280 400 280 176
WIRE 392 400 280 400
WIRE -296 448 -296 352
WIRE 24 448 24 368
WIRE 24 448 -216 448
WIRE 760 448 760 352
WIRE 616 464 616 416
WIRE 312 480 312 368
WIRE 472 480 472 384
WIRE 472 480 312 480
WIRE -616 496 -616 400
WIRE -136 496 -136 176
WIRE -136 496 -616 496
WIRE -56 496 -56 384
WIRE -56 496 -136 496
WIRE 904 512 904 448
WIRE -248 544 -264 544
WIRE -88 544 -168 544
WIRE -824 576 -824 368
WIRE -760 576 -824 576
WIRE -552 576 -552 384
WIRE -552 576 -680 576
WIRE -456 576 -552 576
WIRE -264 576 -264 544
WIRE -264 576 -376 576
WIRE 760 576 760 512
WIRE -88 608 -88 544
WIRE 616 624 616 528
WIRE -264 656 -264 576
WIRE -264 784 -264 736
WIRE -264 896 -264 864
FLAG 8 32 0
FLAG 616 624 0
FLAG 904 512 0
FLAG 760 576 0
FLAG 232 -32 0
FLAG 616 256 0
FLAG 472 0 0
FLAG -168 -352 0
FLAG -568 -880 0
FLAG 168 -320 0
FLAG -632 -576 0
FLAG -920 368 OUT
FLAG -88 608 0
FLAG -264 896 0
SYMBOL OpAmps\\UniversalOpAmp1 392 368 R180
SYMATTR InstName U1
SYMBOL res 280 352 R90
SYMATTR InstName R1
SYMATTR Value 20K
SYMBOL res 168 240 R90
SYMATTR InstName R2
SYMATTR Value 10K
SYMBOL res 424 240 R90
SYMATTR InstName R3
SYMATTR Value 4.7K
SYMBOL res -200 432 R90
SYMATTR InstName R4
SYMATTR Value 2K
SYMBOL res 24 160 R180
SYMATTR InstName R5
SYMATTR Value 5K
SYMBOL res 920 464 R180
SYMATTR InstName R6
SYMATTR Value 1000K
SYMBOL OpAmps\\UniversalOpAmp1 -56 352 R180
SYMATTR InstName U2
SYMBOL diode 600 352 R0
SYMATTR InstName D1
SYMBOL diode 632 528 R180
SYMATTR InstName D2
SYMBOL diode 216 64 R0
SYMATTR InstName D3
SYMBOL cap 744 448 R0
SYMATTR InstName C1
SYMATTR Value 100p
SYMBOL voltage 392 0 R180
SYMATTR InstName V2
SYMATTR Value +12
SYMBOL voltage 392 128 R180
SYMATTR InstName V3
SYMATTR Value +12
SYMBOL voltage 456 256 R270
SYMATTR InstName V4
SYMATTR Value +5
SYMBOL cap 872 -64 R0
SYMATTR InstName C2
SYMATTR Value 100p
SYMBOL OpAmps\\UniversalOpAmp1 104 -608 R0
SYMATTR InstName U4
SYMBOL res -280 -608 R90
SYMATTR InstName R11
SYMATTR Value 120k
SYMBOL voltage -472 -592 R90
SYMATTR InstName V9
SYMATTR Value PULSE(0 5 0 0.05m 0.05m 0 0 500)
SYMBOL res -184 -496 R0
SYMATTR InstName R12
SYMATTR Value 100k
SYMBOL res -56 -864 R0
SYMATTR InstName R13
SYMATTR Value 3.5k
SYMBOL res 104 -720 R90
SYMATTR InstName R14
SYMATTR Value 27k
SYMBOL voltage -376 -896 R90
SYMATTR InstName V1
SYMATTR Value 1.225
SYMBOL voltage 104 -480 R0
SYMATTR InstName V10
SYMATTR Value +12
SYMBOL voltage 104 -272 R0
SYMATTR InstName V11
SYMATTR Value +12
SYMBOL OpAmps\\UniversalOpAmp -616 368 R180
SYMATTR InstName U3
SYMBOL res -664 560 R90
SYMATTR InstName R7
SYMATTR Value 2.2k
SYMBOL res -248 752 R180
SYMATTR InstName R9
SYMATTR Value 1k
SYMBOL res -264 560 R270
SYMATTR InstName R10
SYMATTR Value 1k
SYMBOL res -360 560 R90
SYMATTR InstName R8
SYMATTR Value 0.5k
SYMBOL voltage -264 880 R180
SYMATTR InstName V5
SYMATTR Value -2.5