Tech blog based on research and development done by the Elementz team.

Menu

Interfacing SIM900A GSM Modem with Arduino

This post is intended to help beginners interfacing SIM900A to Arduino.

Power supply requirement:

For RS232 type modem mentioned in this link, requires adapter/battery of 12 Volt 1-2 Ampere current rating for reliable operation. DC Jack can be used to feed the input power.

For TTL Modem mentioned in this link, use 5 Volt, 1-2 Ampere adapter or Power bank.

Note : Watch-out for the network led pattern.

Status SIM900 behavior
Off SIM900 is not running
64ms On/ 800ms Off SIM900 not registered the network
64ms On/ 3000ms Off SIM900 registered to the network
64ms On/ 300ms Off GPRS communication is established

The code is tested with SIM900A and Arduino UNO. Connect the Tx and Rx pins of arduino pins to Rx and Tx pins of GSM Modem.

Note: The uart pins should be cross connected, ie. GSM Tx –> Arduino Rx and GSM Rx –> Arduino Tx. Make the ground common between Arduino and GSM modem.

TTL pins can be seen just behind the 9 pin DB9 connector. If you are using DB9 connector for interfacing you need MAX232 circuitary for converting RS232 output of DB9 to TTL levels.

Copy and paste the following code to your Arduino IDE as a starting point for GSM-Arduino interfacing test.

Note : Before powering SIM900A module user should insert the SIM into the module.

Change the phone number in the below code before running the code.

/*
Author: Dhanish
Created on: 19-08-2014
Company: Elementz Engineers Guild Pvt Ltd
Run this code only after SIM900A Module has powered and connected to a Network.
Please make a call to the module knowing whether the connection is established.
If connected a ring will be heard at the caller end
*/
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
delay(10000);
// print the serial data to GSM
Serial.print("ATD9020XXXXXX;" ); // change here to call a number using SIM900A
// wait 10 seconds before the next loop
delay(10000);
Serial.print("ATH" ); // hold the call
}
void loop() {
}

Sir g I’m making a project in which I’m using GSM Module, when but it is not connecting to Network I have inserted Telenor, Ufone and Warid sim in it but it still searching, it was just send two messages when I used it first time but after that it was just searching… Please help me Sir

Dear Elementzonline team, I am able to send the message to modem and i am able to send the message from gsm modem to the defined numbers. But i want the GSM modem to reply to the recieved number. so please send me an example for this.

I bought “SIM900A GSM MODEM MODULE V1.2 with SMA ANTENNA”, and trying to connect it to Arduino UNO through UART ports, but unfortunately, Arduino fails to detect the modem. Whenever I run Testmodem sketch on Arduino, it returns

Starting modem….. ERROR,no modem answer
Modem’s IMEI : 0

I am powering Arduino through serial port of desktop and Shield through a 12 V 1A power supply. Since I am trying to first connect the shield to Arduino, I haven’t used any SIM yet.