Introduction: SIM900A Interfacing With Arduino UNO and Running Simple AT Commands
Hello guys,
I have my new SIM900A module of SIMCom. I was facing problems while interfacing it with Arduino Mega.
Then I tried to interface it with arduino UNO. So in this instructable I am going to show you how I overcame problems and started playing with GSM AT commands.
Step 1: SIM900A Interfacing With Arduino Uno
Do the connections as follows:
RX of GSM ------------> RX of arduino
TX of GSM--------------> TX of arduino
Gnd of GSM ----------> Gnd of arduino
Connect SIM900A module to 12V power adapter
I have SIM900A module with RS232 port and my module requires voltage of 12 Volt 1-2 Ampere current rating for reliable operation.
It is not possible to give power from arduino UNO by connecting power pins of GSM module with arduino.
Another problem which I faced was connecting GSM with arduino Mega. I found that my SIM900A module was not getting proper ground from mega.
Now my UNO is giving proper ground to module. It may have happened because Mega have more peripherals on it while UNO has only few peripherals on board.
Step 2: Upload Blank Code to SIM900A
Now connect the arduino uno with PC/laptop using USB.
Open the arduino IDE. Simply upload the blank code in arduino UNO
void loop()
{
}
void setup()
{
}
Step 3: Sending AT Commands
Now open the Serial Monitor
Set the baud rate at 4800 and start seding commands as follows.
1. AT
When you enter this command you should get response as OK
2. AT+CGMI
This command gives the manufacturer identification
In my case it gives output SIMCOM_Ltd
OK
3. AT+ CGMM
This command is used to get the supported frequency bands. With multi-band products
the response may be a combination of different bands.
In my case it gives output SIMCOM_SIM900A
OK
For more commands you can refer the attached PDF
6 Comments
Question 3 years ago
can you please explain this whole thing step wise in more detail please with respect to Uno. Like how to set up board and especially the connection because tx to tx and rx to rx is confusing
4 years ago
I order GSM SIM900A module from
http://sunrobotics.co.in/index.php?main_page=produ...
I am trying to apply at command but it not working .please give me solution
Reply 4 years ago
We have used same module of SIM900A Board from http://sunrobotics.co.in/
It's working fine. You need to refer command list from SIMCOM.
Sunrobotics have very best price for all the electronic parts.
5 years ago
This is the sketch I used for BT:
#include <SoftwareSerial.h>
SoftwareSerial BTserial(2, 3); // RX | TX
// Connect the HC-05 TX to Arduino pin 2 RX.
// Connect the HC-05 RX to Arduino pin 3 TX through a voltage divider.
//
char c = ' ';
void setup()
{
Serial.begin(9600);
Serial.println("Arduino is ready");
Serial.println("Remember to select Both NL & CR in the serial monitor");
// HC-05 default serial speed for AT mode is 38400
BTserial.begin(9600);
}
void loop()
{
// Keep reading from HC-05 and send to Arduino Serial Monitor
if (BTserial.available())
{
c = BTserial.read();
Serial.write(c);
}
// Keep reading from Arduino Serial Monitor and send to HC-05
if (Serial.available())
{
c = Serial.read();
BTserial.write(c);
}
}
5 years ago
How can you use the serial monitor if pin Tx and Rx are connected to the SIM900?
6 years ago
Thanks for sharing. I have been meaning to look up how to use the serial data pins.