* SPICE netlist
C1 N005 0 10n
R1 N013 0 100K
R2 N014 N015 100K
R3 N015 0 9.76K
R4 N014 0 35.7K
V1 N001 0 PWL(0 0 10u 3.3)
V2 N012 0 PWL(0 0 1 0 +100n 1 +100m 1 +100n 0 4 0 +100n 1 5.5 1 +100n 0)
A1 N002 0 0 0 0 0 N010 0 SCHMITT Vt=3 Vh=3m Trise=10m Tfall=50n Vhigh=3
A2 0 N010 0 N011 0 0 N009 0 XOR Trise=100n Vhigh=3
A3 0 N010 0 StopEarly 0 0 N011 0 AND Trise=5m Tfall=50n Vhigh=3
V3 StopEarly 0 PWL(0 3 2.5 3 +100n 0)
S1 N008 0 N012 0 SPB
R5 N001 N004 10K
R6 N001 N006 10K
R7 N001 N007 10K
XU1 N005 N014 N015 N013 N001 0 N008 N003 N004 N007 N009 N006 LTC2956-2 ;pnba OnMax)Long)Range)Period)Vin)Gnd)_PB)_EN)_PBout)_OffAlert)_Sleep)_OnAlert
MQ1 N002 N003 N001 N001 AO6407
R8 N002 0 1K
.tran 7

* LTspice schematic (.asc)
Version 4
SHEET 1 1952 768
WIRE -608 -384 -976 -384
WIRE -144 -384 -608 -384
WIRE -128 -384 -144 -384
WIRE 848 -384 -32 -384
WIRE 976 -384 848 -384
WIRE -976 -368 -976 -384
WIRE 976 -368 976 -384
WIRE -112 -304 -112 -336
WIRE -112 -304 -384 -304
WIRE -608 -288 -608 -384
WIRE -384 -288 -384 -304
WIRE -976 -272 -976 -288
WIRE 976 -272 976 -288
WIRE -256 -224 -272 -224
WIRE -144 -224 -144 -384
WIRE -144 -224 -176 -224
WIRE -800 -160 -816 -160
WIRE -720 -160 -736 -160
WIRE -256 -144 -272 -144
WIRE -144 -144 -144 -224
WIRE -144 -144 -176 -144
WIRE -256 -64 -272 -64
WIRE -144 -64 -144 -144
WIRE -144 -64 -176 -64
WIRE -720 -16 -816 -16
WIRE -816 0 -816 -16
WIRE -864 16 -880 16
WIRE 240 16 -272 16
WIRE 448 16 304 16
WIRE 720 16 448 16
WIRE 848 16 848 -384
WIRE 848 16 784 16
WIRE 320 48 304 48
WIRE 784 48 784 32
WIRE -864 64 -912 64
WIRE -816 96 -816 80
WIRE 272 96 272 64
WIRE -640 112 -640 96
WIRE -352 112 -352 96
WIRE -560 160 -560 96
WIRE -544 160 -560 160
WIRE -448 160 -448 96
WIRE -448 160 -464 160
WIRE 320 176 320 48
WIRE 368 176 320 176
WIRE 448 176 448 16
WIRE 448 176 432 176
WIRE -560 192 -560 160
WIRE -448 192 -448 160
WIRE -352 208 -352 192
WIRE 576 208 432 208
WIRE 576 224 576 208
WIRE -912 272 -912 64
WIRE 416 272 416 224
WIRE -560 288 -560 272
WIRE -448 288 -448 272
WIRE -912 384 -912 352
FLAG -816 -160 0
FLAG -640 112 0
FLAG -352 208 0
FLAG -560 288 0
FLAG -448 288 0
FLAG -976 -272 0
FLAG -912 384 0
FLAG 784 48 0
FLAG 416 272 0
FLAG 576 304 0
FLAG 576 208 StopEarly
FLAG 272 96 0
FLAG -816 96 0
FLAG -880 16 0
FLAG 976 -272 0
SYMBOL cap -736 -176 R90
SYMATTR InstName C1
SYMATTR Value 10n
SYMBOL res -368 96 R0
SYMATTR InstName R1
SYMATTR Value 100K
SYMBOL res -560 176 R270
SYMATTR InstName R2
SYMATTR Value 100K
SYMBOL res -464 176 R0
SYMATTR InstName R3
SYMATTR Value 9.76K
SYMBOL res -576 176 R0
SYMATTR InstName R4
SYMATTR Value 35.7K
SYMBOL voltage -976 -384 R0
SYMATTR InstName V1
SYMATTR Value PWL(0 0 10u 3.3)
SYMBOL voltage -912 256 R0
SYMATTR InstName V2
SYMATTR Value PWL(0 0 1 0 +100n 1 +100m 1 +100n 0 4 0 +100n 1 5.5 1 +100n 0)
SYMBOL Digital\\schmtbuf 784 -48 M0
SYMATTR Value Vt=3 Vh=3m
SYMATTR Value2 Trise=10m Tfall=50n
SYMATTR SpiceLine2 Vhigh=3
SYMATTR InstName A1
SYMBOL Digital\\xor 256 -32 M0
SYMATTR SpiceLine2 Vhigh=3
SYMATTR Value2 Trise=100n
SYMATTR InstName A2
SYMBOL Digital\\and 400 128 M0
SYMATTR SpiceLine2 Vhigh=3
SYMATTR Value2 Trise=5m Tfall=50n
SYMATTR InstName A3
SYMBOL voltage 576 208 R0
SYMATTR InstName V3
SYMATTR Value PWL(0 3 2.5 3 +100n 0)
SYMBOL sw -816 -16 R0
SYMATTR InstName S1
SYMATTR Value SPB
SYMBOL res -160 -240 R90
SYMATTR InstName R5
SYMATTR Value 10K
SYMBOL res -160 -160 R90
SYMATTR InstName R6
SYMATTR Value 10K
SYMBOL res -160 -80 R90
SYMATTR InstName R7
SYMATTR Value 10K
SYMBOL LTC2956-2 -496 -96 R0
SYMATTR InstName U1
SYMBOL pmos -32 -336 M270
SYMATTR InstName Q1
SYMATTR Value AO6407
SYMBOL res 960 -384 R0
SYMATTR InstName R8
SYMATTR Value 1K