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 withPIC18F2550. 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!
1. GSM MODEM
- 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
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.
OK let’s look at a clearer schematic which I created using Fritzing, this is clearer and easier 🙂
If you have inquiry, please do not hestitate to discuss in our technical forum
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:
For the sending sms, I will show you the function initialization
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: