Alarm system diagram
So that we don't get lost in this process, the first thing I recommend is to come up with a complete system diagram that we can follow. I do this for any system I design and put together so that it can be built in a structured way, and easily documented and modified.
For the home security system in this chapter, I have come up with the following system diagram that we will look to as a framework. The whole concept is designed to be modular, so you can come up with your own system to suit your requirements and implement it accordingly, using the scripts presented in this chapter.

The final home security system diagram
Overview of the system elements
The preceding system diagram comprises the elements and modules that we have discussed in previous chapters. Here's a quick recap of these:
A +12V power supply
This is the primary power supply to our system, which we will obtain from an external mains adapter that could be battery-backed. This supply needs to be smooth and regulated...