Introduction: SMS Home Security System

Are you worried of the valuables that you have at your home when you're out on a trip or at your office? If yes, then this project is just for you! A security system which on detecting the presence of a human at your house will text you wherever you are that there's a problem. That sounds good, isn't it? Well, this is what this project does.

The project uses the 'multi-talented' Linkit ONE as it's brain. When a PIR motion sensor connected to this board detects some kind of motion, through it's GSM feature, the board sends you a text message. The best thing about this project is that it can be completed within 1-2 hours and no soldering or drilling is required to make it. This makes this project a great way to get started with Mediatek LinkIt One.

So why to wait? Let's begin....

Step 1: Parts and Tools

The following parts and tools are required to make this project. The total cost was around $70 or 4200 INR. The best part is that no soldering skills are required to make this project. All the parts can be found over online stores one of them being seeedstudio.

PARTS:

  • 1x LinkIt ONE board
  • 1x Lithium battery to power your board (included in the Linkit one kit)
  • 1x GSM antenna (included as well)
  • 1x PIR motion sensor
  • 1x Sim card (shouldn't be pin locked)
  • 1x 5v adapter (optional)
  • Male to female jumper wires
  • A suitable enclosure for your project

TOOLS:

  • Hot glue gun w/glue sticks
  • Drill (not mandatory)

Step 2: How It Works?

The process is quite simple. When a human approaches in front of the sensor or the security box, the motion sensor gives a high output which is detected by Linkit one. Through it's GSM feature, it will text you that a human was detected at your house at that time so you can take a suitable action at that very moment. The best part is that you will get a message through this box no matter in which corner of the world you are! The only condition is that there should be a mobile network available at that place. Now don't expect that this would also work on mars :P

The sensor that is used to detect motion of a human being is called PIR motion sensor which stands for Passive infra-red. It works with the fact that every human (actually everything) in this world emits a certain amount of infra-red radiations which is detected by this sensor. It gives a high output which remains high for some time under such condition. The range of this sensor is around 6m which is pretty sensitive and can be varies though a preset present on it.

Step 3: Connect the Motion Sensor

Now the first step in the building process is to connect the motion sensor to Linkit one. The sensor has a total of 3 pins. Since it's output voltage is 5v while linkit one's digital pin can only read voltages upto 3.3v through it's digital pin therefore we would be using analog pins instead. Connect them using male to female jumper wires according to the following:

  1. Vcc of sensor ---- 5v of Linkit one
  2. Vout ---- Analog pin 0 (A0)
  3. Gnd ---- gnd

Step 4: Connect the Battery, Antenna and Insert a Sim Card

You won't believe that this is the last step of the building process! Now you have to connect the battery, insert a sim card and connect the GSM antenna. That is easy, isn't it?

First start by connecting the battery to the board. Look for a white colored socket at the bottom left corner of the board. Slide the big black switch to USB side so that the board is switched off.

Then connect the GSM antenna to it's respective socket at the back of the board. Look for a label just beside each of the three antenna socket then connect it to the one labelled 'GSM'.

Lastly insert a sim card which isn't pin locked to the SIM/SD combo socket present at the back of the board. Make sure that your sim has an SMS pack or some balance in it for sending messages.

.

Step 5: Upload the Code

Upload the code given in the ino file below. If you've never uploaded a code to your Linkit one before, then you can visit my Linkit ONE Getting Started Guide instructable for setting up your board.

Make sure that the switches 1,2 and 3 should be in UART, USB and SPI positions respectively before uploading the code. For safety purposes, you can remove the battery and plug it again after uploading.

Note:

(1): In the line- "LSMS.beginSMS("0123456789");" Change "0123456789" to the phone no. you want the message to be sent.

(2): The PIR motion sensor takes about 30 seconds to calibrate before it can work properly. So you have to wait for 30 seconds each time you switch on your device for it to work properly.

#include <LGSM.h>

int pir_pin = A0;

void setup() { Serial.begin(9600); while(!LSMS.ready()) delay(1000); Serial.println("SIM ready for work!"); Serial.println("Preparing sensor"); for(int a = 1; a <= 30; a++) { Serial.println("."); delay(1000); } Serial.println("Everything Ready!!"); }

void loop() { if(digitalRead(pir_pin) == HIGH); { LSMS.beginSMS("0123456789"); // Change the 10 digit no. to the phone no. you want the message to be sent LSMS.print("Motion was detected at your house!!"); if(LSMS.endSMS()) { Serial.println("SMS is sent"); } else Serial.println("SMS is not sent"); delay(10000); } }

Step 6: Mount Everything Inside an Enclosure

It is important to have everything mounted inside an enclosure so that the connections do not become loose or break away. This also keeps things pretty clean.

Now this is completely your choice as to which enclosure to use. Small plastic drug case can be the best option but anything else can also be used. You can also keep it open. I used a small cardboard box as it is easier to work with.

Fix everything in place using some hot glue. Zip up the wires so they do not sag up. You need to make a big hole for the motion sensor. Make sure that the bulging white dome part of the sensor should remain exposed outside the box.

Step 7: Powering With an External Power Supply for Long Term Use (Optional)

A big problem with this project is that it should be on for several hours or even days depending on how much time you're out of your house. This is not possible with the lithium battery alone as it does not have enough juice to make it run for days. For some hours of operation, battery should be ok.

To power the security box with an external power supply, first plug out the battery and keep it away. Use a USB charger or a wall wart and plug it to your linkit one board using a USB cable. Then slide the big black switch to USB position and you should be done. Now your board can be powered without any interruption for as many days as you want.

Step 8: You're Done!

So you're finally done making your own home security system! Just place it anywhere in your house where you think a thief or trespasser would come, probably near a valuable or your safe. Make sure you switch it off when you are there at your home or it will annoy you by sending unnecessary messages. You can hide it somewhere as well so that no one would be able to see it with the motion sensor still exposed towards the target.

With this, this instructable comes to an end. Hope you liked it. Don't forget to follow and vote for more cool projects. Do post the pictures of your project if you've made one. A feedback of the project will be appreciated.

Thanks for watching :)

Epilog Contest VII

Participated in the
Epilog Contest VII