GSM Shield Home Alarm

16,456

244

41

Posted

Introduction: GSM Shield Home Alarm

FOLLOW MY BLOG > bengoncalves.net

SEE MY OTHER ISTRUCTABLES > Ben Hur's Profile

The other day my father and I were discussing about the problems of living in a third world country. Because of the social inequality, there is little security on the streets. Also one major problem is that no one is secure, even the 1% richer, because there are know cases of robbers getting inside homes even on private neighbourhoods. We ended up thinking about putting a home security system in our house. The problem is those are very expensive and, in general, they just ring an alarm to scare potential thieves, but they don’t actually warn you in real-time that your house is being invaded. A complete system would be even more expensive. So I got the idea to make my own Arduino based home alarm. I just had to buy a GSM shield for the Arduino Uno, because all other parts I already had.

Step 1: The Parts

For this project you will need:

  • Arduino Uno (Ebay);
  • GSM Shield (Ebay);
  • PIR sensor (Ebay);
  • An Arduino based buzzer (Ebay);
  • An alarm siren horn 12V(Ebay);
  • 12V power supply (Ebay);
  • Relay module (Ebay);
  • Keypad for the Arduino (Ebay);
  • A box;

Step 2: Connecting the Components

First you will place the GSM shield above the Arduino Uno, then you will need to solder the wires GND and VCC together from the two sensors, the buzzer and the relay module input. After that, you connect those soldered wires on the corresponding connector from the GSM shield. Next you will make a connector from the input / output signals from those parts, and the last thing will be to connect the keypad above the shield. It will be:

Arduino Uno / GSM shield pins:

  • Pin 0: unconnected;
  • Pin 1: unconnected;
  • Pin 2: unconnected (the GSM will use this pin);
  • Pin 3: unconnected (the GSM will use this pin);
  • Pin 4: last row from keypad (keypad pin 4 – from 8);
  • Pin 5: unconnected;
  • Pin 6: second column from keypad (keypad pin 6 – from 8);
  • Pin 7: third column from keypad (keypad pin 7 – from 8);
  • Pin 8: unconnected (the GSM will use this pin);
  • Pin 9: unconnected (the GSM will use this pin);
  • Pin 10: PIR sensor number 2 data;
  • Pin 11: siren horn signal (goes to the relay module input);
  • Pin 12: PIR sensor number 1 data;
  • Pin 13: buzzer signal input;

As it is possible to see, although the keypad has 8 pins, I just connected three (one rom and two columns, allowing two numbers to be read – 1×2 matrix), because this way I can make passwords using these three wires, and there is no need to use all the pins from the keypad. This is because once the movement sensor detects a person walking inside the room, the person will have just 5 seconds to deactivate the alarm, so there is not enough time for the thief to figure out the alarm code. Once the alarm is not disabled on the given time, the GSM shield will proceed to send SMS to you, or to call your phone. The Arduino was programmed to call and once you answer the phone, it will finnish the call. This way it will spare the credits from the mobile operator.

Of course, it is possible to get false readings from the sensor, or even the code can be buggy, so I put an option to disable the alarm just by sending an SMS text from my phone to the Arduino. Also another option you can make is to order the shield to send you one message a day to ensure you it is working correctly.

Step 3: The Code

Just download the code below and compile. It uses the Keypad.h and GSM.h libraries. As the Keypad.h is not standard with the Arduino, I put it to download here too. I suggest you test your setup by steps.

Step 4: Conclusion

Considering the code will make the Arduino Uno send SMS messages and call your phone in only five seconds after someone break into your house, I guess you will have plenty of time to call the police. Of course the siren horn will scare the thieves and they will run away taking whatever they can, but if you don’t use the siren, you will probably end up having them arrested. I hope this way you can have a more secure home. If you have some good idea please leave a comment, that I will improve my system here. Hope you guys find this article useful.

Share

  • Please help me I hav...-ممحمود2

    ممحمود2 made it!

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • Sew Warm Contest 2018

    Sew Warm Contest 2018
  • Gluten Free Challenge

    Gluten Free Challenge
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

38 Comments

hello i want to know that what to do if i have to add a reed switch to it.Thanks

Could you advise the sketch changes necessary to offer a multiple digit password? Mine isn't working. Thank you.

will u please send a circuit diagram its little bit difficult without it

I would love to make this. Can you please send me the schematic too?

planbmanjb@gmail.com

Sorry guys, I dont have a schematic for this one. Just follow these instructions:


  • Pin 0: unconnected;
  • Pin 1: unconnected;
  • Pin 2: unconnected (the GSM will use this pin);
  • Pin 3: unconnected (the GSM will use this pin);
  • Pin 4: last row from keypad (keypad pin 4 – from 8);
  • Pin 5: unconnected;
  • Pin 6: second column from keypad (keypad pin 6 – from 8);
  • Pin 7: third column from keypad (keypad pin 7 – from 8);
  • Pin 8: unconnected (the GSM will use this pin);
  • Pin 9: unconnected (the GSM will use this pin);
  • Pin 10: PIR sensor number 2 data;
  • Pin 11: siren horn signal (goes to the relay module input);
  • Pin 12: PIR sensor number 1 data;
  • Pin 13: buzzer signal input;

Send me some shematic or detail photos how you connected the parts please

h_emre06@hotmail.com

hey hilmi, have you got the schematic? can you send to me too?

diyanahhamzah@yahoo.com

Hi, can you send us the circuit diagram? I'm doing this project for my practical training and it will be so helpful if you upload the circuit diagram. Thank you

user

could u send us images of the whole connection circuit design,cause we have to show the judges in our school hows the circuit

este e o link

https://youtu.be/pUIGNnbTe0o?list=PLePNrRwjuwL35mTp9eKoDSPCmHSZoIRfy