📜 ⬆️ ⬇️

GSM alarm system for the apartment

image
Good day, Habr!
Protection of the apartment, cottage, garage, car - these issues have always been particularly acute, and this is not only in our state, but in general. As they say “there is demand, there are also offers”, i.e. there will always be theft, as there are those who are buying stolen goods. Thus, I want to present you a small project that will help you to secure a little house, and if you do not catch the criminals (which is not required in this case), then at least scare them and inform you that there was an attempt to penetrate your holy .

Another lyrical digression. Many times I met on the Internet as radio amateurs make GSM signaling based on a cell phone (Siemens models were especially popular). I liked the approach of the authors of those articles - it is the ease of assembling the alarm system, already having a case, a screen and a battery (in case of a power outage), but since I still want to do something new, I decided to develop my own version of the alarm system without using a cell phone.
As an introductory (that I wanted to get):
1. The presence of the screen.
2. The presence of buttons.
3. Light / sound indication.
4. Two dependent blocks.
5. Preferably battery.
6. Desirable camera / video peephole.
Now briefly explain everything. The screen and keyboard are needed to enter a password and indicate the status of the alarm.
I refused to use RFID (contactless access cards) and iButton (“tablet” keys) immediately and explain later why. A speaker and several LEDs are needed purely for indication. Now the most important thing is why we need two blocks. Both units are attached to the second door (if you look from the landing, yes, I was lucky and I have two doors). Thus, in order to get into the apartment, you must first open the first door (I have it wooden), a magnetic wired sensor is installed on the box (a reed switch, what is there), on the second door we see a unit with a keyboard, a screen, a speaker and LEDs . The second block is located on the other side of the iron door, it consists of two boards, the first is the controller itself atmega88 (when I started to make the alarm this chip seemed to me the most popular (in DIP), now, of course, STM32 would be relevant).
The second board is the modem itself, built on the basis of Telit GL-865. The connection of the boards is primitive for UART, I didn’t do anything extra, neither the sleep mode, nor the signal level indication (for which I paid, but more on that later).
image
Everything is powered by a 12V power supply. Next to the power supply there is a small unit with a battery and a charger on the LTC4054 (do not even ask what else I’ve got there))).
image
The main task of using several blocks is “anti-vandalism”. After the reed switch is triggered on the first door, the alarm is triggered and allows the host approximately 40s to enter the password. Every 10s the display changes to a more alarming one, and after the time has elapsed, an SMS is sent to the specified number (a). So, if in the process of entering a password, to break (break) a block with a keyboard and a screen, sending SMS will still happen, as there is a simple interchange in the scheme that will not allow the second block to fail even if the wires are closed. All this, of course, is done primitively, but it works. By the way, there is a switch for setting the alarm on the body of the second unit. Turn it on and there is 45c in order to close both doors.
image
image
The software part is also quite simple. The 4-digit pin is stored in flash and read into a time constant after the reed switch is triggered. Starts the button handler. If the pin is entered correctly, a greeting will appear on the screen, if not, an angry message (:. Everything is done in one thread (I'm not a programmer), but it works without glitches. You can set a pin from the keyboard block and send a test message. The number is unfortunately stitched, I never got around to do his hand input from the panel (and not for anything). So, the card and iButton were refused for security reasons, the password is stored in the head and can only be extorted. The card and key can be easily stolen, which cannot be done with password.
During the whole development, I probably encountered only two problems. 1. I bought a Tele2 SIM card, checked it - everything worked, but as soon as I put an alarm in the corridor, the messages cease to be sent. Since the signal level on the screen is not displayed, he suffered for a long time with the selection of the antenna, but this turned out to be in vain. I just entered, bought a Megafon SIM card (do not consider it an advertisement, but not a single failure within a year) and the problems stopped.
2. Periodically, a problem popped up with the fact that the entered password did not fit and had to change it to a new one. Password entry to the constant from flash was made after the installation of the alarm. I decided to alter this mechanism somewhat and began to record after the door was opened - the problem was gone.
The screen is visible on the photo - it is a video peephole monitor. On the alarm itself, he is not tied up (power only). Press the button - we see the image behind the door. All millet and convenient.
Be creative! All in your hands!

')

Source: https://habr.com/ru/post/212227/


All Articles