Abishai Singh

Smile! You’re at the best WordPress.com site ever

GSM Modem – Sim 300 (Sending Text SMS)

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.
void setup(){
Serial.begin(9600); // the GPRS baud rate
delay(2500);

Serial.println(“AT”); //To check if GSM module is working
delay(2000);
Serial.println(“AT+CMGF=1″); // set the SMS mode to text
delay(1500);
}
void loop(){

delay(1500);
Serial.print(“AT+CMGS=”);
Serial.print(34,BYTE); //ASCII of “
Serial.print(“+919406686543″);
Serial.println(34,BYTE);

delay(1500);
Serial.println(“This is a sms from Abishai ………. just saying hello….”); //this is the message to be sent
delay(1500);
Serial.println(26,BYTE); //Ascii code of ctrl+z to send the message
while(1);
}

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.

About these ads

193 comments on “GSM Modem – Sim 300 (Sending Text SMS)

  1. Reema
    January 20, 2014

    does anyone have the program code for this project using 89c52 instead of using arduino??
    please reply soon,whosoever has it or can help me out..i’l be really very thankful.

  2. karthik
    February 3, 2014

    sir can u tell me how to connect txd rxd and gnd pins of sim300 to MAX232 to 6 and 7 pins of pins?plzz help me

  3. gauravtalele
    February 4, 2014

    hi Abishai
    i am working on the same project that can send the sms but ur code doesnt working with my kit. i am having the sim 300 and arduino dumilinove so whatcan i do plese suggest

    • Abishai
      February 5, 2014

      Which version of arduino software are you using???

  4. jana
    February 8, 2014

    can u give me the code for send text message using sim900a in AT89C51 microcontroller.???

  5. akash patil
    February 10, 2014

    How to interface it using 8051…????????

  6. dipen
    February 27, 2014

    sir when working with arduino uno and gsm sim 300, is it possible to read the message that is recieved on modem without using gsm initialization part in the arduino code?
    i tried this but was not able to receive message…however i am able to send message without initialization of gsm.
    can u pls post the code for receiving message?

  7. Ankita
    April 7, 2014

    please can i get the circuit diagram and datasheet of this GSM MODULE SIM300. i want to use it for my project. it would be a real help.

  8. Pritam
    April 12, 2014

    hey abiashai,
    My project is Obstacle detection for blind person, in which i am using gps module to find where she/he is? & send a message to a particular mobile , So that his family also knows where is he/she?
    my project is nearly similar to your project, only difference is that i need to use push button to track location instead of pressure sensor.
    so, can you provide your code ?
    Component that i am using is :- Arduino kit, GPS module(SKG 13C) with GPS antenna

    • Abishai
      April 13, 2014

      Very innovative idea Pritam. In your project, you will have to use a GSM modem to send SMS. The code is all in front of you.

      • Pritam
        April 14, 2014

        DO you have any idea of working of GPS module(SKG 13C).

  9. ankit
    April 14, 2014

    sir, basically i am using sim300 and arduino uno . i want to send serial data available as a response msg if i send some sms like “on” to gsm modem

  10. ankit
    April 14, 2014

    plz suggest some code

  11. Pulkit
    April 27, 2014

    Hey, I’m working on the exact same project as you are! The codes provided by Abishai make sense but I’m not able to run them on the new Arduino compiler.

    Have you found any fix for that?
    Pls contact me on pulkitganjoo@gmail.com! We can discuss our progress & help each other.

  12. uday
    July 22, 2014

    is it necessary to recharge the GSM SIM for receiving SMS to user?

    • Abishai
      July 22, 2014

      No Uday, it is only necessary if you want to send SMS through the modem. Receiving SMS is free, so no need to recharge.

  13. sakshi
    August 22, 2014

    sir can you please send out the circuit diagram for GSM Modem. It’s very much required and please send it fast. It will really be thankful.

  14. ashu
    September 5, 2014

    i want an assembly language code for calling and giving missed call to a number using sim300 connected via rs232 through 8051. I have tried ATDXXXX; command and ATH command but i’m not getting the desired result.Please provide me the code or the logic.

Leave a Reply...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Information

This entry was posted on June 3, 2012 by in Uncategorized.
tronixstuff

fun and learning with electronics

Abishai Singh

Smile! You’re at the best WordPress.com site ever

Follow

Get every new post delivered to your Inbox.

Join 309 other followers

%d bloggers like this: