* SPICE netlist
R1 IN N004 49.9K
R2 N004 0 3.40K
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 33)
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 240m 1 240.001m 0 500m 0 500.001m 1 525m 1 525.001m 0 2000m 0)
S2 OUT 0 N003 0 myS2
V3 N003 0 PWL(0 0 150m 0 150.001m 1 170m 1 170.001m 0 2000m 0)
D2 OUT N005 BZX84C15L
XU1 N004 N006 N009 0 N008 N005 N001 IN MAX5933A ;pnba ON)FB)PWRGD)GND)TIMER)GATE)SENSE)Vcc
.tran 1

* LTspice schematic (.asc)
Version 4
SHEET 1 1520 464
WIRE -312 -232 -760 -232
WIRE -168 -232 -312 -232
WIRE -136 -232 -168 -232
WIRE -24 -232 -56 -232
WIRE -8 -232 -24 -232
WIRE 184 -232 88 -232
WIRE 360 -232 184 -232
WIRE 472 -232 360 -232
WIRE 520 -232 472 -232
WIRE 648 -232 520 -232
WIRE -760 -216 -760 -232
WIRE 520 -216 520 -232
WIRE 648 -216 648 -232
WIRE -312 -200 -312 -232
WIRE 184 -200 184 -232
WIRE 712 -200 696 -200
WIRE 360 -184 360 -232
WIRE 72 -168 72 -184
WIRE 760 -152 696 -152
WIRE 760 -136 760 -152
WIRE -760 -120 -760 -136
WIRE -168 -120 -168 -232
WIRE -24 -120 -24 -232
WIRE 520 -120 520 -152
WIRE 648 -104 648 -136
WIRE 472 -72 472 -232
WIRE -312 -56 -312 -120
WIRE -312 -56 -488 -56
WIRE -216 -56 -312 -56
WIRE 72 -56 72 -88
WIRE 72 -56 40 -56
WIRE 184 -56 184 -136
WIRE 184 -56 72 -56
WIRE 200 -56 184 -56
WIRE -312 -40 -312 -56
WIRE 760 -40 760 -56
WIRE 472 24 472 8
WIRE 472 24 40 24
WIRE -488 40 -488 -56
WIRE 472 40 472 24
WIRE -536 56 -552 56
WIRE -312 56 -312 40
WIRE -536 104 -584 104
WIRE -296 104 -312 104
WIRE -216 104 -232 104
WIRE 360 104 360 -104
WIRE 360 104 40 104
WIRE -584 136 -584 104
WIRE -488 136 -488 120
WIRE 472 136 472 120
WIRE -88 168 -88 152
WIRE -584 232 -584 216
FLAG 264 -56 0
FLAG -312 56 0
FLAG -312 104 0
FLAG -88 168 0
FLAG 472 136 0
FLAG 520 -120 0
FLAG -760 -120 0
FLAG 648 -232 OUT
FLAG -760 -232 IN
FLAG -488 136 0
FLAG -584 232 0
FLAG -552 56 0
FLAG 648 -104 0
FLAG 760 -40 0
FLAG 712 -200 0
SYMBOL res -328 -216 R0
SYMATTR InstName R1
SYMATTR Value 49.9K
SYMBOL res -328 -56 R0
SYMATTR InstName R2
SYMATTR Value 3.40K
SYMBOL cap -232 88 R90
SYMATTR InstName C1
SYMATTR Value 0.68
SYMBOL cap 264 -72 R90
SYMATTR InstName C2
SYMATTR Value 10n
SYMATTR SpiceLine Rser=1K
SYMBOL res 56 -184 R0
SYMATTR InstName R3
SYMATTR Value 10
SYMBOL res -152 -216 R270
SYMATTR InstName R5
SYMATTR Value 20m
SYMBOL nmos -8 -184 R270
SYMATTR InstName Q1
SYMATTR Value IRF530
SYMBOL res 456 -88 R0
SYMATTR InstName R6
SYMATTR Value 59K
SYMBOL res 456 24 R0
SYMATTR InstName R7
SYMATTR Value 3.57K
SYMBOL res 344 -200 R0
SYMATTR InstName R8
SYMATTR Value 24.3K
SYMBOL cap 504 -216 R0
SYMATTR InstName C3
SYMATTR Value 30
SYMBOL voltage -760 -232 R0
SYMATTR InstName V1
SYMATTR Value PWL(0 0 2.7m 0 2.701m 33)
SYMBOL sw -488 24 R0
SYMATTR InstName S1
SYMATTR Value myS1
SYMBOL voltage -584 120 R0
SYMATTR Value PWL(0 0 80m 0 80.001m 1 100m 1 100.001m 0 215m 0 215.001m 1 240m 1 240.001m 0 500m 0 500.001m 1 525m 1 525.001m 0 2000m 0)
SYMATTR InstName V2
SYMBOL sw 648 -232 M0
SYMATTR InstName S2
SYMATTR Value myS2
SYMBOL voltage 760 -152 R0
SYMATTR Value PWL(0 0 150m 0 150.001m 1 170m 1 170.001m 0 2000m 0)
SYMATTR InstName V3
SYMBOL zener 168 -200 R0
SYMATTR InstName D2
SYMATTR Value BZX84C15L
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL MAX5933A -88 8 R0
SYMATTR InstName U1