Introduction: 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
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
1 Person Made This Project!
- kuldeephotline made it!
41 Comments
Question 1 year ago
I done all connection and coding section also when I run the project the tx led is blinking in arduino
But communication from the gsm to arduino is not well
The rx and tx pins in sim900a is shorted I think can any one suggest me
Question 1 year ago
I have done all the steps but Arduino doesn't respond any of my command
6 years ago
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?
Reply 2 years ago
https://www.instructables.com/id/Using-the-Sim900sim900A-mini-module-with-Arduino-U/
Reply 2 years ago
Waleykum, study its data sheet first
Question 2 years ago
Hi i'm asking about our GSM 900A module. the problem is the light indicator when you are calling the gsm is blinking even though we're not calling it
4 years ago
In our gsm kit only power LED is working and network LED is not working and we are giving prefect power supply 12 volt 2 amp dc power through adapter what can i do for get network LED on
Reply 2 years ago
Change thr board
Question 3 years ago on Introduction
how do you send the message
Answer 2 years ago
Through the digital output pwm pins
Question 3 years ago on Step 1
What power suppyl we are using for booting the GSM module..?
Adapter or battery..?
Answer 2 years ago
Adapter 12v
4 years ago
hello i am joyson .
i am doing one project using sim900a gsm module , it works properly but each time when i power off and on gsm ; arduino board wont receive msg and call properly . i need to upload program newly each time . Why it is happening like this ? is there any solution for it ?
4 years ago
In my gsm kit only my power led is working but network led is not working what I have to do for it.
6 years ago
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.
Reply 6 years ago
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”
}
Reply 4 years ago
Hey your code is not working on my GSM module for recieving message. Can you help me with that? Or can you tell me how can I detect a message or a call had come in the SIM (which is in GSM module). Also can I get the mobile number from which the message or call had come?
Reply 5 years ago
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.
Reply 6 years ago
can i see your code ?
please .
Reply 6 years ago
hi , I just try the same what u sayed but no way , I can't make a call or send a msg
:(