Suggestions for the placement of decoupling and filtering components
BTW: you can make a simple alarm with just the right relay and a couple of switches. When armed the relay is pulled in. 

Not really battery friendly though since the coil is draining current all the time.







simulate this circuit &ndash; Schematic created using CircuitLab

Or a fancier version....







simulate this circuit