Build a High-Tech Alarm System with Raspberry Pi
Have you seen the movie "Mission Impossible” with Tom Cruise? Would you like to know how to catch him with a $40 sensor? Try building a high-tech alarm system with Raspberry Pi.
My book, Building a High-Tech Alarm System with Raspberry Pi (Elektor 2023), will guide you through the building and test of a ten zone alarm system. In addition to building the hardware, we will also cover the code which runs on the Raspberry Pi. The code currently ‘speaks’ and writes English, but by following the directions in the code chapter you can easily make it speak French, German or Dutch.
All alarm systems have two basic functions. First, they monitor their environment, looking for a change such as a door or window opening or someone moving about in the room. The second function of the system is to alert the humans to this change. Our alarm system uses a scanning type software to detect intruders.
We will use the ‘standard’ guard dog as an analogy. In a scanned type of system, the guard dog paces back and forth at the fence, looking out for either an intruder or someone that it recognizes. With our design, if you have an alarm key, you can disarm the system and enter. In an interrupt-driven system, the dog is asleep until it hears an intruder (or you). It then wakes up and deals with the situation. I have chosen the scanning method because, in my opinion, the software is easier to write and explain. It can scan all ten zones in about one second.
You don’t have to be an electrical engineer to install an alarm system, just a good carpenter, painter, and plasterer! I’m not, by the way, so I’ll leave hiding wires up to you.
Also, because our alarm system runs on 12 volts, you don’t have to be a licensed electrician to install it. If you can plug in a wall adapter, you can build and test this alarm system.
Moreover, we will discuss how to plan an alarm system for your home and business. You should bear in mind that this is for educational purposes only and should not be considered installation instructions for the alarm system described in this book. One of the reasons would be that no two houses or businesses are the same. What I am describing here is a typical installation.
Our system is not monitored by an alarm system company, so there is no one for the panel to call. Also, SMS messaging system protocols and frequencies vary from country to country. For that reason, an SMS option was not included in the design. I should point out that while this is a fun and educational project, there is no substitute for a live monitored professional alarm system. If you are protecting elderly or infirm persons or a store that sells high-end merchandise, then I would suggest that a live monitored wired system is the way to go. It is true that phone lines can be cut, and cellular links can be jammed, but a 110 dBm siren will at the very least alert the neighbors and hopefully scare off a would-be thief. It might be advisable to tell your neighbors about your new alarm system and apologize in advance for any false alarms.
One other, somewhat controversial topic is stickers on your window that say “Protected by Acme Alarm Company”. In my opinion, the sticker will deter the casual or amateur burglar and tell the pro what frequency to jam. Planning is by far the most important part of the installation. Poor planning has caused more headaches than any other part of an alarm system installation project.
Here is a simple checklist for you:
The fourth chapter describes the software in detail. The alarm system comes with two different software packages. Later in the book, we see the assembly of the main printed circuit board of the alarm system, and construct and test the harnesses which connect the human interfaces to the alarm system. It is described in details how the Passive Infra-Red (PIR) motion sensors, door/window contacts are connected to the system. Afterward, the alarm system board is tested using push button switches. Some future enhancements to the system for more advanced users are mentioned as a side-note. Up to now, the system has largely been used for educational purposes. In the final chapter, we see how to make the system into a stand-alone alarm system.
It is my hope that you will enjoy reading this book as much as I enjoyed writing it.
William (Bill) Pretty began his career in electronics in the early 80s with a small telecom startup company that would eventually become a large multinational. He left there to pursue a career in commercial aviation in Canada’s north. From there, he joined the Ontario Center for Microelectronics, a provincially funded research and development center. Bill left there for a career in the military as a civilian contractor at what was then called Defense Research Establishment Ottawa. That began a career which was to span over 30 years. Over the years, Bill has acquired extensive knowledge in the field of technical security and started his own company in 2010. That company was called William Pretty Security Inc. and provided support, in the form of research and development, to various law enforcement and private security agencies. In 2014, he retired to pursue a career in writing. He has several books for sale on Amazon, for the electronics hobbyist.
We will use the ‘standard’ guard dog as an analogy. In a scanned type of system, the guard dog paces back and forth at the fence, looking out for either an intruder or someone that it recognizes. With our design, if you have an alarm key, you can disarm the system and enter. In an interrupt-driven system, the dog is asleep until it hears an intruder (or you). It then wakes up and deals with the situation. I have chosen the scanning method because, in my opinion, the software is easier to write and explain. It can scan all ten zones in about one second.
You don’t have to be an electrical engineer to install an alarm system, just a good carpenter, painter, and plasterer! I’m not, by the way, so I’ll leave hiding wires up to you.
Also, because our alarm system runs on 12 volts, you don’t have to be a licensed electrician to install it. If you can plug in a wall adapter, you can build and test this alarm system.
Subscribe
Tag alert: Subscribe to the tag Books and you will receive an e-mail as soon as a new item about it is published on our website! Moreover, we will discuss how to plan an alarm system for your home and business. You should bear in mind that this is for educational purposes only and should not be considered installation instructions for the alarm system described in this book. One of the reasons would be that no two houses or businesses are the same. What I am describing here is a typical installation.
Types of Alarm Systems: Wired and Wireless
- The wireless system is quick and easy to install. It is however easy for a professional burglar to jam the wireless signal that controls the alarm. There are numerous YouTube videos on the subject, and the equipment required to carry out the attack costs less than $50USD on Amazon. For about twice that amount, you can purchase a device capable of also jamming the cellular signal, so that the panel cannot contact the alarm company to tell them that it has been jammed.
- The cost of a wired alarm system is considerably more up front. This is due to the labor involved in fishing wires through walls and drilling holes to mount the sensors. The upside to a wired system is that there is no wireless alarm signal to jam. It is of course still possible to jam the cellular system or cut the phone line. That is why loud sirens were invented.
Our system is not monitored by an alarm system company, so there is no one for the panel to call. Also, SMS messaging system protocols and frequencies vary from country to country. For that reason, an SMS option was not included in the design. I should point out that while this is a fun and educational project, there is no substitute for a live monitored professional alarm system. If you are protecting elderly or infirm persons or a store that sells high-end merchandise, then I would suggest that a live monitored wired system is the way to go. It is true that phone lines can be cut, and cellular links can be jammed, but a 110 dBm siren will at the very least alert the neighbors and hopefully scare off a would-be thief. It might be advisable to tell your neighbors about your new alarm system and apologize in advance for any false alarms.
One other, somewhat controversial topic is stickers on your window that say “Protected by Acme Alarm Company”. In my opinion, the sticker will deter the casual or amateur burglar and tell the pro what frequency to jam. Planning is by far the most important part of the installation. Poor planning has caused more headaches than any other part of an alarm system installation project.
The Alarm Walk-About
As the name suggests, take a walk around the property you will be protecting, both inside and out. Try to think like a bad guy. Ask yourself, “If I wanted to break into this house / office / warehouse, how would I do it?” Take pictures if you think it will help. Make sketches of the inside and outside the building so that you can plan where you are going to put your sensors. There are several free CAD programs that will help you with this.Here is a simple checklist for you:
- How many doors are there?
- What type of doors are they? Garage doors? Human entry doors? Pet doors? (Seriously, burglars have used children)
- How many windows are there? And how many open? Which are on the ground floor and which are on the second floor? (Burglars use portable ladders)
- Is there a hedge or a privacy fence? (Burglars love cedar hedges and privacy fences.)
- Once the burglar is inside, where can they go from there? (Main hallway, kitchen door, patio door)
- How many rooms are there that you will have to protect?
- Is everything on the same floor, or is there more than one floor?
- What about special alarms? Panic alarm in the bedroom? Smoke alarm in the kitchen? Flood alarm in the basement? Heat detector in the garage?
Structure of the book
In the first chapters, we discuss the basic components of most alarm systems, we learn how the hardware that is connected to the sensors works, talk about how the system interacts with the outside world. An alarm key or optional RFID card reader can be used to arm or disarm the system.The fourth chapter describes the software in detail. The alarm system comes with two different software packages. Later in the book, we see the assembly of the main printed circuit board of the alarm system, and construct and test the harnesses which connect the human interfaces to the alarm system. It is described in details how the Passive Infra-Red (PIR) motion sensors, door/window contacts are connected to the system. Afterward, the alarm system board is tested using push button switches. Some future enhancements to the system for more advanced users are mentioned as a side-note. Up to now, the system has largely been used for educational purposes. In the final chapter, we see how to make the system into a stand-alone alarm system.
It is my hope that you will enjoy reading this book as much as I enjoyed writing it.