Smart Technology Solutions
Hi guys, I just arrived from my elder brother’s ring ceremony(thank God for making it successful) & I was thinking on which topic I should write, suddenly my eyes caught the GSM modem kept on the corner of my desk. So I decided to write about it.
I had the opportunity to work on GSM modem at the time of my major project in my engineering. My project was “Vehicle Crash Monitoring System”. The motive was to create a device which will automatically detect the accident and call for help at the emergency no.. It is a new idea & I had to work hard on it. I had to use GSM modem for sending text sms on emergency number. Thus it call for help when it detects the accident of the vehicle.
For my project, I used SIM 300. This is tri-band, slim and compact so that it could be used in compact devices. I brought it for Rs.1600 (or 28.8$ approx) from a local shop.
Now about the hardware, it consists of a DB9 port for communicating with the computer or with the micro-controller, a jack for power, a integrated module, a connector and a micro strip antenna , an interface circuit of Max 232. I am also posting the picture of my modem which is shown below.
So, to work with the modem you have to make an interfacing circuit on Max 232, which will convert the ttl logic level from the micro-controller to RS 232 level, which is 9 or 12 volts. But making that circuit was a tedious task for me, so I used another trick. I found out the tx and rx pins of ttl level in Max 232 in the modem & soldered 2 wires from it. Also a 3rd wire from the ground of the circuit. Then I connected those wires with the respective pins of my micro-controller & here I was ready to use my modem.
First thing to know before working on any GSM modem is to get familiarized with the “at commands”. Embedded cellular modules(GSM Modems) are mainly controlled by the use of AT commands. AT or Attention Commands are derived from the Hayes Command set (or AT command set) from 1977 to control the 300-baud Hayes Smartmodem. They are a set of command-language or instructions that are sent to a cellular module to perform different actions. Without AT commands one could not work with the modems.
Here I will show you how to program your micro-controller for sending text message. The essential commands which will be used are:
AT+CMGF=1 // this command will instruct SIM300 module to enter text mode. After giving command you should press enter key or send it ascii 0x0D character.
AT+CMGS=”xxxxxxxxxx” // xxxxxxxxxx is the phone number. after this command press enter or send its ascii 0x0D character through micro-controller.
Now I will show you the code which I used with my arduino for sending SMS. The code is given below:
// The code is developed by Abishai for sending text message by using Sim300.
Serial.begin(9600); // the GPRS baud rate
Serial.println(“AT”); //To check if GSM module is working
Serial.println(“AT+CMGF=1”); // set the SMS mode to text
Serial.print(34,BYTE); //ASCII of ”
Serial.println(“This is a sms from Abishai ………. just saying hello….”); //this is the message to be sent
Serial.println(26,BYTE); //Ascii code of ctrl+z to send the message
You can see the demonstration of one of my project using Sim 300 at the link shown below(actually this video is at the time when I was working on my major project):
Just watch this video:-
Hope you will like my work. Please comment.
Physical Computing Mini-Projects
fun and learning with electronics
Smart Technology Solutions