* SPICE netlist
R1 IN N004 49.9K
R2 N004 0 3.4K
C1 N008 0 0.68
C2 0 N005 10n Rser=1K
R3 N002 N005 10
R5 IN N001 20m
MQ1 N001 N002 OUT OUT IRF530
R6 OUT N006 59K
R7 N006 0 3.57K
R8 OUT N009 24.3K
C3 OUT 0 30
V1 IN 0 PWL(0 0 2.7m 0 2.701m 24)
S1 N004 0 N007 0 myS1
V2 N007 0 PWL(0 0 80m 0 80.001m 1 100m 1 100.001m 0 215m 0 215.001m 1 225m 1 225.001m 0 500m 0 500.001m 1 510m 1 510.001m 0 2000m 0)
S2 OUT 0 N003 0 myS2
V3 N003 0 PWL(0 0 140m 0 140.001m 1 160m 1 160.001m 0 2000m 0)
D2 OUT N005 BZX84C15L
XU1 N004 N006 N009 0 N008 N005 N001 IN MAX5947B ;pnba ON)FB)PWRGD)GND)TIMER)GATE)SENSE)Vcc
.tran 1

* LTspice schematic (.asc)
Version 4
SHEET 1 1456 448
WIRE -296 -224 -728 -224
WIRE -152 -224 -296 -224
WIRE -120 -224 -152 -224
WIRE -8 -224 -40 -224
WIRE 8 -224 -8 -224
WIRE 200 -224 104 -224
WIRE 376 -224 200 -224
WIRE 472 -224 376 -224
WIRE 520 -224 472 -224
WIRE 616 -224 520 -224
WIRE -728 -208 -728 -224
WIRE 520 -208 520 -224
WIRE 616 -208 616 -224
WIRE -296 -192 -296 -224
WIRE 200 -192 200 -224
WIRE 680 -192 664 -192
WIRE 376 -176 376 -224
WIRE 88 -160 88 -176
WIRE 728 -144 664 -144
WIRE 520 -128 520 -144
WIRE 728 -128 728 -144
WIRE -728 -112 -728 -128
WIRE -152 -112 -152 -224
WIRE -8 -112 -8 -224
WIRE 616 -112 616 -128
WIRE 472 -64 472 -224
WIRE -296 -48 -296 -112
WIRE -296 -48 -472 -48
WIRE -200 -48 -296 -48
WIRE 88 -48 88 -80
WIRE 88 -48 56 -48
WIRE 200 -48 200 -128
WIRE 200 -48 88 -48
WIRE 216 -48 200 -48
WIRE -296 -32 -296 -48
WIRE 728 -32 728 -48
WIRE -472 32 -472 -48
WIRE 472 32 472 16
WIRE 472 32 56 32
WIRE -520 48 -536 48
WIRE 472 48 472 32
WIRE -296 64 -296 48
WIRE -520 96 -552 96
WIRE -280 112 -296 112
WIRE -200 112 -216 112
WIRE 376 112 376 -96
WIRE 376 112 56 112
WIRE -552 128 -552 96
WIRE -472 128 -472 112
WIRE 472 144 472 128
WIRE -72 176 -72 160
WIRE -552 224 -552 208
FLAG 280 -48 0
FLAG -296 64 0
FLAG -296 112 0
FLAG -72 176 0
FLAG 472 144 0
FLAG 520 -128 0
FLAG -728 -112 0
FLAG 616 -224 OUT
FLAG -728 -224 IN
FLAG -472 128 0
FLAG -552 224 0
FLAG -536 48 0
FLAG 616 -112 0
FLAG 728 -32 0
FLAG 680 -192 0
SYMBOL res -312 -208 R0
SYMATTR InstName R1
SYMATTR Value 49.9K
SYMBOL res -312 -48 R0
SYMATTR InstName R2
SYMATTR Value 3.4K
SYMBOL cap -216 96 R90
SYMATTR InstName C1
SYMATTR Value 0.68
SYMBOL cap 280 -64 R90
SYMATTR InstName C2
SYMATTR Value 10n
SYMATTR SpiceLine Rser=1K
SYMBOL res 72 -176 R0
SYMATTR InstName R3
SYMATTR Value 10
SYMBOL res -136 -208 R270
SYMATTR InstName R5
SYMATTR Value 20m
SYMBOL nmos 8 -176 R270
SYMATTR InstName Q1
SYMATTR Value IRF530
SYMBOL res 456 -80 R0
SYMATTR InstName R6
SYMATTR Value 59K
SYMBOL res 456 32 R0
SYMATTR InstName R7
SYMATTR Value 3.57K
SYMBOL res 360 -192 R0
SYMATTR InstName R8
SYMATTR Value 24.3K
SYMBOL cap 504 -208 R0
SYMATTR InstName C3
SYMATTR Value 30
SYMBOL voltage -728 -224 R0
SYMATTR InstName V1
SYMATTR Value PWL(0 0 2.7m 0 2.701m 24)
SYMBOL sw -472 16 R0
SYMATTR InstName S1
SYMATTR Value myS1
SYMBOL voltage -552 112 R0
SYMATTR Value PWL(0 0 80m 0 80.001m 1 100m 1 100.001m 0 215m 0 215.001m 1 225m 1 225.001m 0 500m 0 500.001m 1 510m 1 510.001m 0 2000m 0)
SYMATTR InstName V2
SYMBOL sw 616 -224 M0
SYMATTR InstName S2
SYMATTR Value myS2
SYMBOL voltage 728 -144 R0
SYMATTR Value PWL(0 0 140m 0 140.001m 1 160m 1 160.001m 0 2000m 0)
SYMATTR InstName V3
SYMBOL zener 184 -192 R0
SYMATTR InstName D2
SYMATTR Value BZX84C15L
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL MAX5947B -72 16 R0
SYMATTR InstName U1