Close
0%
0%

Arduino anti-theft alarm shield

Complete anti-theft alarm compatible with any kind of sensors, with RFID recognition, GSM and web server, based on Arduino Mega.

Similar projects worth following
This anti-theft alarm is basically an Arduino Mega Shield with fairly complex software.

The system is composed by a main circuit (the arduino shield) installed in an hidden place and an i2c connected "remote control panel" near the main house door, offering LCD, capacitive buttons and RFID recognition.

The whole system may be managed and configured from the webserver; webpages are published in iphone/android webapp format. When the system is alarmed, it sends mail and SMS to the owner.
It also connects to house domotic system (e.g. close rolling shutters when it's activated), control IP cams, send push notification, detect humidity and temperature...

FATURES

This shield transform an Arduino Mega 2560 in a burglar alarm ... with some cool extras.

- Supports NFC and RFIDs activation with authorization control
- Full web interface for managing and configuring the system, supported by smartphones as native WebApp
- Mail and GSM notifications when the system is alarmed
- Domotic integration (it may open/close windows, turn on/off lights, and so on)
- Fully configurable timings and options, stored in the arduino eprom
- Perimetral and Volumetric sensors may be independently enabled/disabled
- Automatically disable open windows sensors, warning you when activated
- Batteries to keep the system running on power fault
- DHT temperature/humidity sensor and communication to emoncms server or similar (read here for further information: http://emoncms.org)
- Good looking installation :)


HARDWARE

Components are listed in the proper paragraph below. Basically, the system is made up two parts:

-

The main circuit (Arduino Mega shield): this shield is connected with all the sensors (at the moment, 6 magnetic sensors and 2 volumetrics), the external siren, the ethernet and the GSM module. It is powered by a small UPS with a 2,2 Ah battery, enough to make it working for some hours if the power fall off. The siren has an independent 2 Ah battery too. The circuit communicates with the remote control panel with i2c. The whole circuit is completely hidden in a in-wall mounted box.
It basically read sensors as "buttons"; magnetic sensors (and tampers, like the siren one) were supplied directly with 5V, while the volumetric sensor output (12V) was converted to 5V with a voltage divider. To avoid arduino heating problems, I supplied energy to the components with independent voltage regulators (ENC28J60 has great consumption). The circuit also supply power to the siren. All power parts are protected with fuse and decoupling capacitors [not shown in the schematics for simplicity].

-

The remote panel: I tried to build a good looking panel for enabling/disabling/controlling the alarm. So, I use a in-wall mounted box covered with a white plexyglass frame with a small window for LCD. In the box, I put a small circuit, essentially an i2c hub with proper voltage regulators (the whole panel is supplied with 12v) that I use to communicate with all the i2c components: NFC reader, LCD and MPR121 for capacitive buttons/led. I also add a little speaker to give the user sound feedbacks. The panel is connected to the shield with a long 2+4 wire cable. The result is pretty good and it works perfectly. Since the i2c cable that connects to the main circuit is long, more than i2c specification, I planned to add some kind of serial translator. However, it already works perfectly so I didn't need it; the only trick to make it working fine was to add some capacitors to the magnetic sensors pins near the Arduino, since the rolling shutter electric motors randomly introduced some noise that caused i2c errors.


SOFTWARE

Software was obviously written with Arduino IDE and it may be downloaded from the link on the left.

I used several libraries: UIPEthernet for ethernet (or Ethernet if you want to use W5100 standard chipset), time and timezone for time management, LiquidCrystal_I2C for LCD and many others. For safety purpose, I preferred WSWire library over standard Wire, because it offers non-blocking i2c protocol (so, if i2c fails or has been broken, the system keeps running on). You can download the whole Arduino 1.6.4 IDE with the proper libraries from the link on the left.

The system configuration (sensor number / type, authorized NFC IDs, etc.) has to be hard-coded in the arduino code in some proper sections; system options (siren duration and other timings, domotic control, etc.) may be runtime configurated through the webserver, and will be stored in the Arduino eprom. Date and time are automatically and periodically acquired with NTP.

Basically, the system has three user interfaces:

- Remote Panel: using the capacitive buttons, user may select...

Read more »

  • 1 × Arduino Mega 2560
  • 1 × Ethernet ENC28J60 Module cheap arduino compatible ethernet interface
  • 1 × 16x2 LCD with i2c interface cheap lcd module
  • 1 × MPR121 capacitive buttons and leds managament
  • 1 × PN532 NFC/RFIDs reader/writer

View all 16 components

  • Fixes and enhancements

    IngGaro08/05/2015 at 10:23 0 comments

    Hi guys, i release a new version of the code with some fixes and enhancement. New features:

    • Watchdog: the system will reboot if it's stuck for more than 8 seconds (note: you have to be sure you have the last bootloader for arduino mega, older ones have a bug that causes endless reboot. You can easily flash it using another arduino and following these instructions: http://www.gammon.com.au/forum/?id=11635)
    • Restore state: the system will remember its state in case of rebooting or shutting off.
    • Safe mode: the system will enter in a "safe mode" in case of any failure (it will stop rebooting after 5 reboots, to avoid undesidered false alarms)
    • Log php script: included in the source code, it may be put on a webserver to log you accesses
    • Some memory fixes and small stuff

    If you are going to use a W5100 ethernet (I finally got a working one) you have to connect pin 10 to the SS pin. Since in this project the pin 10 is used for GSM modem shield, you have to change it (maybe to pin 53, like in the scheme). You may easily do it with a small modification to the library, follow this link:

    https://github.com/kiwisincebirth/Arduino/tree/master/Ethernet

  • Big update is here... PROJECT COMPLETED

    IngGaro06/04/2015 at 23:33 0 comments

    Ok guys, here we are, I worked a lot and the project is fully finished.

    Many many news in the code.

    Main change: I switched ethernet library. I used UIPEthernet in order to use standard ethernet call, so you can switch between ENC28J60 or standard W5100 just changing the library inclusion in the code.

    Then, a lot of features were added:

    • completely rewritten webinterface, now it includes AJAX values update, basic authentication, favicon, colors, styles (look at the pictures in the description
    • push notifications
    • ipcam activation/deactivation
    • enhanced GSM controls and functions
    • enhanced messages (for example, when it's alarmed, it tells you which sensors were enabled)
    • enhanced domotic control
    • more options
    • more stability
    • lots more, I can't remember them all! :)

    I also posted an update drawing of the circuit and uploaded a fully arduino IDE with libraries I used for easy compiling.

    Enjoy!

    Small request: if someone wants to help me to create a cool PCB shield for the project, write me in private!

  • Big update coming

    IngGaro05/17/2015 at 22:57 2 comments

    I made a massive update recently. Now the sketch support both ENC28J60 and W5100 (standard ethernet library).

    I also added some new cool features (ip cam control, push notification...).

    I will release the code in some days!

  • 4 days to go...please help!

    IngGaro03/26/2015 at 06:41 0 comments

    Please give me some more votes!

    No need for registration, just push "VOTE" on Arduino Anti-theft Alarm Shield. You can vote multiple times.

    This is the website: http://www.icstation.com/competition/vote.php

    Thanks guys!

  • Please help!

    IngGaro02/28/2015 at 17:52 0 comments

    Hi guys, I posted my project in a competition, can you vote for me? It's just one click...

    http://www.icstation.com/competition/vote.php

    If I won I can get some items to improve my project ^_^

    Thanks in advance!

  • Project is not dead :)

    IngGaro01/20/2015 at 20:53 0 comments

    I'm still working on it. I'm working on a new code based on the standard ethernet library, that is also working with ENC29j60 using the ethercard library. I also added some cool functionalities. Unfortunately I got a broken W5100 board so I'm waiting for the new one, so it will still took a while.. stay tuned.

  • Network Improvement

    IngGaro09/21/2014 at 19:45 0 comments

    I played around with Webduino library and I think that I will release the final code after replacing ENC28J60 with a W5100, using standard ethernet library and webduino instead of ethercard lib. It's just to complicate and memory-intensive to handle multiple subsequent ethernet calls with ethercard lib (I had to implement a message queue), so for this reason I decide to try to use the W5100 (9$ on ebay) that will make me able to develop a much more stable and nice interface. I hope to put it online in some weeks (I'm waiting for the W5100 shipping :))

  • Huge code cleanup

    IngGaro09/03/2014 at 09:47 0 comments

    I did a massive code cleanup. The system seems to works very well and it's extremely stable (no errors or hangups); I will upload it soon. I also added a second webpage for options and a couple of feature:

    - intelligent mode: the system automatically preset itself in "perimetral only" or "perimetral and volumetric" mode based on the day time; it can be manually change as usual, of course

    - sensor reactivation: you may choose to automatically re-enable or not windows (perimetral) sensors after activating the alarm with open windows

  • GSM / Ethernet improvement

    IngGaro08/28/2014 at 09:20 0 comments

    Refined both ethernet implementation and GSM. Now the system calls and texts a pool of predefined phone number when the system is alarmed; it also answer with a confirmation SMS when the system is enabled/disabled through GSM.

    I want to replace ENC28J60 with W5100 for many reason: simpler and more powerful library, no need for external script for sending mail, better reliability.

  • Ethernet call implementation

    IngGaro08/21/2014 at 14:26 0 comments

    After implementing access log I found out that sometimes, on multiple sequential "ethernet call", some calls fail. That is due to some issue in ethercard library implementation. However, I'm working on a solution; I decided to re-implement all ethernet calls using a "queue" that emulate a different thread to correct manage connections.

View all 14 project logs

Enjoy this project?

Share

Discussions

Jflyer wrote 09/07/2014 at 17:34 point
Nice! Very cool project!

  Are you sure? yes | no

Diego F. Manzano wrote 09/06/2014 at 22:00 point
Thanks For Sharing !!!!

  Are you sure? yes | no

IngGaro wrote 09/03/2014 at 16:45 point
Thanks guys!
@diazluis: I already saw it, but I preferred to avoid third party notification apps. Email are also causing notification and they're platform independent... I own an iphone at the moment :)

  Are you sure? yes | no

diazluis wrote 09/03/2014 at 13:07 point
Hey, check Notify my android (or similar projects) it can be useful

  Are you sure? yes | no

James C. wrote 09/03/2014 at 11:00 point
All I can say is that this is awesome. Great job.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates