Posted on

How to connect SIM 900A Module with Arduino UNO?

Dual-Band 900/ 1800 MHz

GPRS multi-slot class 10/8GPRS mobile station class B

Compliant to GSM phase 2/2+Class 4 (2 W @850/ 900 MHz)

Class 1 (1 W @ 1800/1900MHz)

Control via AT commands (GSM 07.07, 07.05 and SIMCOM enhanced AT Commands)

Low power consumption: 1.5mA(sleep mode)’

Operation temperature: -40°C to +85 °C

Status indicator(D5): It will flash continuously whenever the call arrives otherwise it is left ON.

Network LED(D6): This led will blink every second which indicates that the GSM module is not connected to the mobile network. Once the connection is established successfully, the LED will blink continuously every 3 seconds.

How to connect SIM 900A Module with Arduino UNO?

Hardware and Software Required
SIM 900A Module
Arduino UNO
Arduino IDE(1.0.6V)

Hardware connections

The SIM900A module has 6pins in which two pins for Vcc and Gnd and the rest are 3VR&3VT(3volt Rx & Tx) and 5VR,5VT(5volt Rx & Tx) and the connections are made as follows:
Vcc to 5V
Gnd to Gnd
5VR digital pin 7
5VT digital pin 8

Before getting into the program part,we need to look into the AT commands which are discussed in the following used by this module. With the help of these AT commands,the user can send or receive messages, make a call and so on.

AT Commands for using the shield AT Commands for GSM

AT Press ENTER
Checking the Operation and Connection of GSM Shield. This would print OK which signifies of working connection and operation of the GSM shield.

ATD+(country code)mobile number; Press ENTER.
Making a Voice Call

ATH Press ENTER.
Disconnecting the Active Call

ATA Press ENTER
Receiving the Call

AT+CMGF=1 Press ENTER
For sending SMS in Text Mode

AT+CMGS=”mobile number” Press ENTER
Once the AT commands is given’ >’ prompt will be displayed on the screen. Type the message to be sent via SMS.  After this, Press CTRL+Z to send the SMS. If the SMS sending is successful, “OK” will be displayed along with the message number.

AT+CMGF = 1 Press ENTER
For reading SMS in the text mode

AT+CMGR = num
Number (num.) is the message index number stored in the SIM card. For new SMS, URC will be received on the screen as + CMTI: SM ‘num’.After this AT+CMGR=1 Press ENTER.This displays the message on the screen along with sender details, number and timing too.

AT Commands for GPRS

AT+CGATT?
Check if GPRS is attached or not.n=1 if attached

AT+CIPSHUT
Reset the IP session if any

AT+CIPSTATUS
Check if the IP stack is initialized

AT+CIPMUX=0
Single link mode

AT+CIPMUX=1
For multiple connections

AT+CSTT= “APN”, “UNAME”, “PWD”
Sets APN, user name and password
Starts the task, based on the SIM card you are using, you need to know the APN, username and password for your service provider.

AT+CIICR
Brings up a wireless connection

AT+CIFSR
Get local IP address if connected

AT+CIPSTART=“TYPE”, “domain”, “port”
Establishes a connection with a server. Type can be UDP or TCP.For example AT+CIPSTART= “TCP” , “www.eprolabs.com”, “80”.It starts the connection, TCP, domain name, port.

AT+CIPSEND=0, Press Enter
Request initiation of data sending (the request)
<type string>
Now type the sequence #026. This tells the terminal.exe to send the hex code 0x1a (which is Ctrl+Z) to indicate end of data sending. You should get some response back from the server…it would generally be a complain that the request string was not valid…but that is a different subject…you have established the connection.

AT+CIPCLOSE
Closes the connection.

AT+CIPSHUT
Request shutting down of the current connections.
Program for SIM 900A Module
The program given below is to make a call. As soon as the code has been uploaded the user will get a call to the number which is specified in the program. Likewise, the user can edit the AT commands as per their desired function in the program. Check the datasheet here for more details.