Smart Intruder Detector with PIR and GSM

Introduction

After looking through the GSM modem tutorial, I believe you will wonder what can you do with the GSM modem in our daily life. So , I have come out with the idea of using it with the PIR sensor to detect passive infrared (I mean HUMAN).  In this tutorial I will use the GSM modem with PIR sensor and SK28A with PIC18F2550. I use the SK28A since it is small and easy to be kept or use as mobile device at any place I wanted to.

*Note: You can use other type of microcontroller such as PIC16F876A  or PIC16F886 which are 8-bit, 28-pin, on SK28A. I use PIC18F2550 because that is the PIC I have which is 28-pin 🙂

It will become a Smart Intruder Detector system. When there is someone enter a room out of expectation hour, it will send a SMS to alert me :). Isn’t that fun!? Where can we use this smart system (I always wonder about it)? We can install this system in our house, living room, or garage, or basement where you want it to monitor the room for you. Suddenly I believe it is a good project so I started to design it and believes many who is worries about their room or space would be able to benefit from it. When you go to class or other places just power up the system. If someone break into you room, you will be notified through SMS  within few seconds, is great!

So, let’s get started!

Hardware required:

1. GSM MODEM

device1

2. SK28A with PIC18F2550

28a

3. LC04A

lc04

4.PIR sensor

PIRa

5. ICSP PROGRAMMER UIC00B / or PicKIT 3

Software required:

  • MPLAB IDE v8.63 ( I am using version 8.63, I believe other version is fine, just try it first)
  • MPLAB C18 MCC18 Compiler v3.37.01
  • PICKIT 2

Related References:

 

The Interface, Wiring!

Here are some photos of the connections I made^^ Since there are too many wires, it is a bit messy. I will show a clearer image later on.

DSCF7797

DSCF7799

DSCF7796

OK let’s look at a clearer schematic which I created using Fritzing, this is clearer and easier 🙂

sketch1_bb

If you have inquiry, please do not hestitate to discuss in our technical forum

Example Code

Here is the sample code, it is just for reference, I do not guarantee anything as I have only tested it in few conditions. Feel free to modify it according to your needs and again, if you have problem, do discuss in our technical forum.  Remember, we will need to burn/program the code into the PIC18f2550 on SK28A. I will provide the sample code I use in this tutorial. But if you prefer to use other chip or coding like HI-TECH C. This can be a basic reference.

So, let me explain briefly about the coding.

This is the main body of the code I use:

1test

For the sending sms, I will show you the function initialization

smsz

The code can be modified according to your usage. you are welcome to show us your project inside the forum and what you have done with this GSM modem.

We look forward to see what you do with the GSM modem, be creative!

 

PROBLEM MAY OCCUR

· There are lots of pins pull out from the TC35 development board, accidentally provide wrong voltage will kill the GSM modem, so please be extremely cautious before powering up. Double check the connection.

· UART from GSM modem is using 2.6V logic to communicate, provide 5V will shorten the lifespan of TC35 development board.

· If there is still much problem, please do post in our technical forum for help.


SAMPLE SOURCE CODE:

Buy

, , , , ,

Related Post

Thief Detector !!

AmpMeter using SK28A and 7-Segment Display

Current Measuring using SN-ACS712 and SK28A

Notification System

14 thoughts on “Smart Intruder Detector with PIR and GSM

  1. Hi, can there be multiple PIR sensor connect to one SK28A? is there additional electronic component we need to add?
    My scenario would be multiple sensor be placed at different location.tq

  2. Hi, for this project the gsm modem (SIEMENS TC35 GSM Development Board) can replace with RS232 GSM/GPRS Modem ?

  3. hello..
    i already setup this project and it works well for the led blinking..
    however when i load the coding for smart intruder detector..and change the target phone number..
    build failed…and it say at the PICkit2 screen the some of the code not in hex format..i only change the target number and also the service centre number + additional coding for my sim pin password
    thank you

  4. Hi there,
    thanx guys! i found d the solution..now try to match the speed of sending sms using GSM and normal phone..

  5. can anyone help me with my project using this modem? I need the coding for this modem to send sms when smoke is detected.tq.

  6. sambong, you need to have the functions to make LCD work, 18Fxxx only define registers. Please do continue the discussion in our technical forum.

Leave a Reply

Your email address will not be published. Required fields are marked *