* SPICE netlist
V1 +5V 0 +5V
V2 -5V 0 -5V
XU1 0 N001 +5V -5V N003 NC_01 LT1783 ;pnba In+)In-)V+)V-)OUT)SHDN
V3 N011 0 SINE(0 {vpp} 1k) Rser=3k
D1 N003 N001 BAT54
XU2 0 N004 +5V -5V N005 NC_02 LT1783 ;pnba In+)In-)V+)V-)OUT)SHDN
R2 N004 N009 20k
D2 N002 N003 BAT54
R3 N002 N001 10k
R4 N004 N002 10k
R1 N001 N009 10k
R5 N005 N004 20k
V4 N010 0 100mV
R8 N009 N008 24.9k
R9 0 N009 1k
D3 -5V N009 BAT54
D4 N009 +5V BAT54
V5 N008 N011 SINE(0 500m 10k)
R10 N006 N005 1k
XU4 N006 N010 +3V3 0 N007 LT1716 ;pnba In+)In-)V+)V-)OUT
V6 +3V3 0 +3V3
D5 N005 +3V3 BAT54
R6 N007 N006 100k
.tran 0 3m 0 0.1m
.step param vpp 3 101 10

* LTspice schematic (.asc)
Version 4
SHEET 1 2144 544
WIRE 48 -256 -32 -256
WIRE 288 -256 128 -256
WIRE 656 -256 656 -272
WIRE -32 -176 -32 -256
WIRE 48 -176 -32 -176
WIRE 192 -176 112 -176
WIRE 512 -144 416 -144
WIRE 656 -144 656 -192
WIRE 656 -144 592 -144
WIRE 848 -112 816 -112
WIRE 1072 -112 928 -112
WIRE -224 -96 -224 -128
WIRE 48 -48 48 -64
WIRE 512 -16 512 -32
WIRE -448 0 -608 0
WIRE -336 0 -368 0
WIRE -224 0 -224 -32
WIRE -224 0 -336 0
WIRE -160 0 -224 0
WIRE -144 0 -160 0
WIRE -32 0 -32 -176
WIRE -32 0 -64 0
WIRE 16 0 -32 0
WIRE -224 16 -224 0
WIRE 960 16 960 -16
WIRE 192 32 192 -176
WIRE 192 32 160 32
WIRE 208 32 192 32
WIRE 288 32 288 -256
WIRE 288 32 272 32
WIRE 304 32 288 32
WIRE 416 32 416 -144
WIRE 416 32 384 32
WIRE 480 32 416 32
WIRE 928 32 880 32
WIRE -608 48 -608 0
WIRE 1072 48 1072 -112
WIRE 1072 48 992 48
WIRE -336 64 -336 0
WIRE 16 64 -16 64
WIRE 656 64 656 -144
WIRE 656 64 624 64
WIRE 704 64 656 64
WIRE 816 64 816 -112
WIRE 816 64 784 64
WIRE 928 64 816 64
WIRE -16 96 -16 64
WIRE 480 96 448 96
WIRE -1072 112 -1072 96
WIRE -960 112 -960 96
WIRE -848 112 -848 96
WIRE 880 112 880 32
WIRE 960 112 960 80
WIRE 448 128 448 96
WIRE -608 176 -608 128
WIRE 16 176 16 160
WIRE 48 176 48 112
WIRE 48 176 16 176
WIRE -1072 208 -1072 192
WIRE -960 208 -960 192
WIRE -848 208 -848 192
WIRE -336 208 -336 144
WIRE -224 208 -224 80
WIRE 480 208 480 192
WIRE 512 208 512 144
WIRE 512 208 480 208
WIRE -160 224 -160 0
WIRE 304 224 -160 224
WIRE 416 224 416 32
WIRE 416 224 384 224
WIRE 880 224 880 192
WIRE -608 272 -608 256
FLAG -1072 208 0
FLAG -960 208 0
FLAG -1072 96 +5V
FLAG -960 96 -5V
FLAG 16 160 -5V
FLAG 48 -64 +5V
FLAG -608 272 0
FLAG 480 192 -5V
FLAG 512 -32 +5V
FLAG -16 96 0
FLAG 448 128 0
FLAG 880 224 0
FLAG 960 -16 +3V3
FLAG 960 112 0
FLAG -336 208 0
FLAG -224 -128 +5V
FLAG -224 208 -5V
FLAG -848 208 0
FLAG -848 96 +3V3
FLAG 656 -272 +3V3
SYMBOL voltage -1072 96 R0
SYMATTR InstName V1
SYMATTR Value +5V
SYMBOL voltage -960 96 R0
SYMATTR InstName V2
SYMATTR Value -5V
SYMBOL Opamps\\LT1783 48 32 R0
SYMATTR InstName U1
SYMBOL voltage -608 160 R0
SYMATTR SpiceLine Rser=3k
SYMATTR InstName V3
SYMATTR Value SINE(0 {vpp} 1k)
SYMBOL schottky 112 -192 R90
SYMATTR InstName D1
SYMATTR Value BAT54
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL Opamps\\LT1783 512 64 R0
SYMATTR InstName U2
SYMBOL res 400 208 R90
SYMATTR InstName R2
SYMATTR Value 20k
SYMBOL schottky 272 16 R90
SYMATTR InstName D2
SYMATTR Value BAT54
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res 144 -272 R90
SYMATTR InstName R3
SYMATTR Value 10k
SYMBOL res 400 16 R90
SYMATTR InstName R4
SYMATTR Value 10k
SYMBOL res -48 -16 R90
SYMATTR InstName R1
SYMATTR Value 10k
SYMBOL res 608 -160 R90
SYMATTR InstName R5
SYMATTR Value 20k
SYMBOL voltage 880 96 R0
SYMATTR InstName V4
SYMATTR Value 100mV
SYMBOL res -352 -16 R90
SYMATTR InstName R8
SYMATTR Value 24.9k
SYMBOL res -320 160 R180
SYMATTR InstName R9
SYMATTR Value 1k
SYMBOL schottky -208 80 R180
SYMATTR InstName D3
SYMATTR Value BAT54
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL schottky -208 -32 R180
SYMATTR InstName D4
SYMATTR Value BAT54
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL voltage -608 32 R0
SYMATTR InstName V5
SYMATTR Value SINE(0 500m 10k)
SYMBOL res 800 48 R90
SYMATTR InstName R10
SYMATTR Value 1k
SYMBOL Comparators\\LT1716 960 48 R0
SYMATTR InstName U4
SYMBOL voltage -848 96 R0
SYMATTR InstName V6
SYMATTR Value +3V3
SYMBOL schottky 672 -192 R180
SYMATTR InstName D5
SYMATTR Value BAT54
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res 944 -128 R90
SYMATTR InstName R6
SYMATTR Value 100k