GSM Home Security Alarm System with Arduino


This project deals with the design & development of a theft control system for home, which is being used to prevent/control any theft attempt. The developed system makes use of an embedded system (comprises an open hardware microcontroller and a gsm modem) based on Global System for Mobile communication (GSM) technology.

The designed & developed system can be installed in the home. An interfacing intrusion-detector unit is also connected to the microcontroller-based security system.
In case of an intrusion attempt, a warning message is being transmitted by the system (as an sms) to the owner’s mobile phone, or to any pre-configured mobile phone number for further processing.
Block Diagram
Block Diagram

The security system comprises of an Arduino Uno microcontroller and a standard SIM900A based GSM/GPRS modem. The whole system can be powered from any 12VDC/2A power supply unit/battery.
System diagram of the security system is shown here.
arduino gsm security alarm
arduino gsm security alarm

Working of the system is very simple and self-explanatory. When input power is applied to the system, the system goes into standby mode. However, when the terminals of connector J2 is short circuited, the preprogrammed warning message is automatically transmitted to the concerened mobile number. You can connect any intrusion detection unit (such as a light fence or a motion sensor) to the input connector J2. Note that an active-low (L) at pin 1 of connector J2 triggers the security system.
Further, an optional “call – alert” facility is added to the security system, which will initiate a telephone call when push button switch S2 is activated by the user (or by another electronic module). After the “call” key (S2) operation, the call can be aborted by depressing the second push button switch S3 – the “end” key. This option can be used to make a “missed call” alert, incase of an intrusion attempt.
The circuit is highly-flexible so that you can use any SIM900A modem (and ofcourse any Arduino Uno board) of your choice. Carefully read the modem documentation before construction to make the task sweet and simple.
Arduino Sketch:
  1. /*
  2. * Arduino Home Security GSM Alarm
  3. * An Arduino + SIM900A Project
  4. * T.K.Hareendran
  5. * Tested at TechNode PROTOLABZ
  6. * 21 August 2014
  7. * http:// www.electroschematics.com
  8. */
  9. //Connect the Tx pin of the GSM modem to D3
  10. //Connect the Rx pin of the GSM modem to D4
  11. //SMS Trigger Key/Input connected to D7 (Active LOW)
  12. //CALL Trigger Key connected to D8 (Active LOW)
  13. //END Key Connected to D9 (Active LOW)
  14. #include <NewSoftSerial.h>
  15. NewSoftSerial mySerial(3,4); // RX and TX pins to communicate with GSM module
  16. #define msg_key 7
  17. #define call_key 8
  18. #define end_key 9
  19. String number ="0000000000"; // Add the 10-Digit Mobile Number to which message / call is to be made,by replacing the 0's
  20. void setup()
  21. {
  22. Serial.begin(9600);
  23. mySerial.begin(9600);
  24. pinMode(msg_key,INPUT);
  25. pinMode(call_key,INPUT);
  26. pinMode(end_key,INPUT);
  27. digitalWrite(msg_key,HIGH);
  28. digitalWrite(call_key,HIGH);
  29. digitalWrite(end_key,HIGH);
  30. }
  31. void loop()
  32. {
  33. //Sends an sms everytime msg_key is pressed
  34. if (digitalRead(msg_key)==LOW) // Check if the sms key is being pressed
  35. {
  36. mySerial.println("AT+CMGF=1"); // Set the Mode as Text Mode
  37. delay(150);
  38. mySerial.println("AT+CMGS=\"+00"+number+"\""); // Specify the Destination number in international format by replacing the 0's
  39. delay(150);
  40. mySerial.print("Warning! Intruder Alert!"); // Enter the message
  41. delay(150);
  42. mySerial.write((byte)0x1A); // End of message character 0x1A : Equivalent to Ctrl+z
  43. delay(50);
  44. mySerial.println();
  45. }
  46. //Makes a call when call_key is pressed
  47. else if (digitalRead(call_key)==LOW) // Check if the call key is being pressed
  48. {
  49. mySerial.println("ATD+91"+number+";"); //Specify the number to call
  50. while(digitalRead(call_key)==LOW);
  51. delay(50);
  52. }
  53. //Hang the call
  54. else if (digitalRead(end_key)==LOW) // Check if the hang up key is being pressed
  55. {
  56. mySerial.println("ATH");
  57. while(digitalRead(end_key)==LOW);
  58. delay(50);
  59. }
  1. }


If you are a newcomer in Arduino world, it is recommended to refer related tutorials and projects available elsewhere in this website!


THANK YOU FOR VISITING..!!
PLEASE COMMENT

No comments:

Post a Comment