Introduction: Interfacing SIM900A GSM Modem With Arduino

Picture of Interfacing SIM900A GSM Modem With Arduino

This is a very low cost and simple Arduino GSM and GPRS module. We use the module SIMCom SIM900A . It’s the cheaper module now avalaible in the market.This post will allow you to make arduino controlled calls and also send text messages.

Step 1: Some Important Notes and Powering Up the GSM Module

1. We use SIM900 GSM Module – This means the module supports communication in 900MHz band. We are from India and most of the mobile network providers in this country operate in the 900Mhz band. If you are from another country, you have to check the mobile network band in your area. A majority of United States mobile networks operate in 850Mhz band (the band is either 850Mhz or 1900Mhz). Canada operates primarily on 1900 Mhz band.

2. Check the power requirements of GSM module – GSM modules are manufactured by different companies. They all have different input power supply specs. You need to double check your GSM modules power requirements. In this tutorial, our gsm module requires a 12 volts input. So we feed it using a 12V,1A DC power supply. I have seen gsm modules which require 15 volts and some other which needs only 5 volts. They differ with manufacturers. If you are having a 5V module, you can power it directly from Arduino’s 5V out.

BOOTING UP THE GSM:

1. Insert the SIM card to module and lock it.

2. Connect the adapter to module and turn it ON!

3. Now wait for some time (say 1 minute) and see the blinking rate of ‘status LED’ (GSM module will take some time to establish connection with mobile network)

4. Once the connection is established successfully, the status LED will blink continuously every 3 seconds.

Step 2: Making Connections

Picture of Making Connections

There are two ways of connecting GSM module to arduino. In any case, the communication between Arduino and GSM module is serial. So we are supposed to use serial pins of Arduino (Rx and Tx). So if you are going with this method, you may connect the Tx pin of GSM module to Rx pin of Arduino and Rx pin of GSM module to Tx pin of Arduino.

Now connect the ground pin of arduino to ground pin of gsm module! So that’s all! You made 3 connections and the wiring is over! Now you can load different programs to communicate with gsm module and make it work.

Note:- The problem with this connection is while programming. Arduino uses serial ports to load program from the Arduino IDE. If these pins are used in wiring, the program will not be loaded successfully to Arduino. So you have to disconnect wiring in Rx and Tx each time you burn the program. Once the program is loaded successfully, you can reconnect these pins and have the system working! To avoid this difficulty, I am using an alternate method in which two digital pins of arduino are used for serial communication. We need to select two PWM enabled pins of arduino for this method. So I choose pins 9 and 10 (which are PWM enabled pins). This method is made possible with theSoftwareSerial Library of Ardunio. SoftwareSerial is a library of Arduino which enables serial data communication through other digital pins of Arduino. The library replicates hardware functions and handles the task of serial communication.

Step 3: The Code: Calling and Messaging

Comments

RobodiaR (author)2017-01-02

Hi Brother,

While using Arduino and Sim900a (Mini V3.8 2014.10) I am getting "Error".

I have attached "Error MSG" image.

My connections are
Sim900a --------------> Arduino

VCC --------------------+5v

GND---------------------GND

5VT(TX)-----------------------9(RX)

5VR(RX)-----------------------10(TX)

---------------------------------------------

Is there any other connections i have to do?

Plz Guide me for that. Thanks for your help.

MohanS53 (author)RobodiaR2017-05-01

do not connect +5 v vcc to gsm modem pin..

make only 3 connections

tx of gsm to rx of controller

rx of gsm to tx of controller

gnd of gsm to gnd of controller

and provide separate power supply to gsm modem..

like 12v adapter

soardr (author)MohanS532017-10-13

Can we power the SIM900 A6 GSM Module with batteries. What is the use of the '5.0VCC' pin on the module? Please help.

Zeeshan AhmedV (author)2017-07-28

Hii,
I want to get location also so can u please help

RoshniM4 (author)2017-07-19

hello ,

I am unable to interface Arduino 101 with gsm module . will u please provide the solution for it .

anxiously waiting for the solution.....

vineethe (author)2017-03-13

sir help me ,

can we use gsm library to code the gsm module as shown in the official website of arduino instead of using AT commands.if possible tell me as soon as possible.and the website is https://www.arduino.cc/en/Tutorial/GSMExamplesSendSMS

mikudesu360 (author)2016-01-21

Im using GSM Module Sim900A Mini V3.8.2 2014.10 and it works easily using this method on arduino uno, by putting 5VT on pin 9 and 5VR on pin 10.

mikudesu360 (author)mikudesu3602016-05-01

here's my program i'm editing it from the source (tribute to the builder)

//ERFINDER CODE

#include <SoftwareSerial.h>

String pilih;

SoftwareSerial mySerial(9, 10);

void setup()

{

mySerial.begin(9600); // Setting the baud rate of GSM Module

Serial.begin(9600); // Setting the baud rate of Serial Monitor (Arduino)

RecieveMessage();

delay(100);

}

void loop()

{

if (Serial.available()>0)

switch(Serial.read())

{

case 's':

SendMessage();

break;

case 'r':

RecieveMessage();

break;

}

if (mySerial.available()>0)

{ Serial.write(mySerial.read());

pilih = mySerial.read();}

}

void SendMessage()

{

mySerial.println("AT+CMGF=1"); //Sets the GSM Module in Text Mode

delay(1000); // Delay of 1000 milli seconds or 1 second

mySerial.println("AT+CMGS=\"+62xxxxxxxxx\"\r"); // Replace x with mobile number

delay(1000);

mySerial.println("Message Send :)");// The SMS text you want to send

mySerial.println(pilih);

delay(100);

mySerial.println((char)26);// ASCII code of CTRL+Z

delay(1000);

}

void RecieveMessage()

{

mySerial.println("AT+CNMI=2,2,0,0,0"); // AT Command to recieve a live SMS

delay(1000);

//There are different AT commands for different tasks. If you want to read

//all SMS’s stored in your SIM card, send the following AT Command

//to gsm module – “AT+CMGL=\”ALL\”\r”

}

RobodiaR (author)mikudesu3602017-01-02

Hi Brother,
While using Arduino and Sim900a (Mini V3.8 2014.10) I am getting "Error".

I have attached Error MSG in the image.

My connections are
Sim900a --------------> Arduino

VCC --------------------+5v

GND---------------------GND

5VT(TX)-----------------------9(RX)

5VR(RX)-----------------------10(TX)

---------------------------------------------

Is there any other connections i have to do?

Plz Guide me for that. Thanks for your help.

jhonh3 (author)mikudesu3602016-02-15

can i see your code ?
please .

meniaouia (author)mikudesu3602016-02-04

hi , I just try the same what u sayed but no way , I can't make a call or send a msg

:(

akosijn (author)2016-11-24

Sir can u help me, what if i want to add an if in the receive message, lets say

void RecieveMessage()

{

mySerial.println("AT+CNMI=2,2,0,0,0"); // AT Command to recieve a live SMS

if(mymssage== "Open the door");

digitalWrite(13,HIGH)

delay(1000);

}

problem is i dunno what kind of code/syntax should i use. TIA!

kuldeephotline made it! (author)2016-10-22

thank you thank you and thank you so much my dear friend, i made this project.

i have been working this project for one week and checked many website but i was faile, but when i open instructable and looked your project page and follow your project then my project was working, i was very happy that time becouse this is my first project of wireless

thank you again dear friend

its very helpful for me

please upload your more project of wireless

SiddarthJ1 (author)2016-07-06

I'm using sim800 and I dont have an antenna. Where can I buy it? Is the antenna really necessary

VaibhavB40 (author)SiddarthJ12016-10-17

No

arunkumar2931 (author)2016-06-24

thanks Erfinden ! helped me to learn a lot!

ukothimbire (author)2016-05-29

thanks a lot for sharing this. :)

TabbyM (author)2016-04-13

assalam-o-alikum...
i have a question to ask... can gsm library be used with sim900a mini modules? because apparently it doesn't seem to be working. is there any method to make it work for them?

hidep (author)2016-03-23

I tried this code but it’s not working. Might be i have to RS232 with TTL.Please check my GSM module either it has TTL or not? Link for GSM image.

http://www.evselectro.com/gadgets-and-gifts-sim-900d-1905?keyword=gsm&category_id=0
Please reply me.

Ahmet MelikA (author)2016-03-08

Why did not we connect the Rx to Rx and Tx to Tx?

k4fecn6 (author)Ahmet MelikA2016-03-22

Because RX means receiver where tx represents transfer of data, tx to rx transfer to the receiver arduino to sim 900a device and visa versa

Ahmet MelikA (author)k4fecn62016-03-23

Thank you :)

AECE (author)2016-02-09

i am using sim900A, i am unable to send sms and call, i have the same configuration

what i need to do ?

AdityaG38 (author)2016-02-03

Hi. I have a similar setup. I am able to make calls or send sms. However i am not able to connect to gprs. Have you tried that?

amielv (author)2015-11-13

sir, i try this by following ur instructions , but still it doesn't able to send a message to my phone.

please help,,

hoping for your respond

AimanR3 (author)2015-11-06

Hi, I still cant sending those text nor receiving text. i have tried to change the baud rate, and checking the connection between Rx and Tx pin as you mention. but still nothing happen. can you help me ?

SankarB (author)2015-08-21

I have a dough, that if we call/msg from phone will it cost money .?? As we are using mobile tower to communicate with the GSM module.

Erfinden (author)SankarB2015-08-21

ya obviously as you are using ur sim network so default call and sms rates are applicable/

About This Instructable

134,449views

54favorites

License:

Bio: We are 4 Electronics Engineer working towards the betterment of new technology and bring to you the basic as well as advanced instructables one can ... More »
More by Erfinden:Interfacing SIM900A GSM Modem with ArduinoHandy Polarity CheckerMagic Wand  POV Message Display using Bluetooth Module
Add instructable to: