Connecting a SIM900A to a UNO

Hello,

I have a SIM900A module but no idea how to connect it to an UNO.

I suspect it is the three pins next to the SIM card holder, but I may be wrong.

thehardwareman: Hello,

I have a SIM900A module but no idea how to connect it to an UNO.

I suspect it is the three pins next to the SIM card holder, but I may be wrong.

I am guessing you have not bothered to Google?

Yes I have. But I'm still a bit confused. Not sure which pin to use on the GSM board.

use 2 pins ( named rx/tx 5V logic level ) next to SMA connector

those next to SIM card holder are RS-232 leveled

makes sure your power supply is good to power the module

That I have understood. The confusing thing is which physical pins on the GSM board I should connect it to. I have have seen different images with connections made to the three pins near the SIM card and some to the 6pin connector near the antenna, and some pictures using jumpers on that 6pin connector.

I use the sketch below to connect to the module, but I’m not able to connect to it. The code say “Not available”.

There are two red LEDs on the module. On is always on (guess it is the power indicator led) while the other is flashing - on for a very short time and then off for about 3 seconds. Based on information on this page it probably indicate that the module has found a network.

The module is bought from Ali Express. I thought I read that some modules may be locked to Asian networks only, but since the flashing led indicate that it has found a network, I assume that is not a problem here.

And if the module was locked to Asian networks can this cause that the modules is not available from the Arduino?

#include <SoftwareSerial.h>

// Configure software serial port. 7: RX, 8: TX
SoftwareSerial SIM900(7, 8);

void setup() 
{
  Serial.begin(9600);
  Serial.println(F("\n\nWaiting..."));
  delay(20000);
  
  // Arduino communicates with SIM900 GSM shield at a baud rate of 19200
  // Make sure that corresponds to the baud rate of your module
  Serial.println(F("Initializing the GSM module"));
  SIM900.begin(19200);

  // Give time to your GSM shield log on to network
  Serial.println(F("Waiting..."));
  delay(2000);

  if (SIM900.available()) {
    Serial.println(F("Available"));
 
    // Send the SMS
    sendSMS();
  } else {
    Serial.println(F("NOT available"));
  }
}

void loop() 
{
  // Do nothing.
}

void sendSMS() 
{
  // AT command to set SIM900 to SMS mode
  Serial.println(F("AT+CMGF=1"));
  SIM900.print("AT+CMGF=1\r");
  delay(100);

  // USE INTERNATIONAL FORMAT CODE FOR MOBILE NUMBERS
  Serial.println(F("AT + CMGS = \"+47xxxxxxxxx\""));
  SIM900.println("AT + CMGS = \"+47xxxxxxxxx\"");
  delay(100);
 
  // REPLACE WITH YOUR OWN SMS MESSAGE CONTENT
  Serial.println(F("Hello from Arduino."));
  SIM900.println("Hello from Arduino.");
  delay(100);

  // End AT command with a ^Z, ASCII code 26
  SIM900.println((char)26);
  delay(300);
  SIM900.println();
  
  // Give module time to send SMS.
  Serial.println(F("SMS sent."));
  delay(5000);
}

Get a manual for the SIM900A. Try sending queries to the SIM900 from a terminal program. See the responses.

You need to send the gsm module an initial “AT” either in setup or in sendSMS then wait for it to return ok, this is the handshake. Baud rate is best set to 9600.

Hope this helps.

itmoto: You need to send the gsm module an initial “AT” either in setup or in sendSMS then wait for it to return ok, this is the handshake. Baud rate is best set to 9600.

Hope this helps.

He's using a library that obfuscates this; hence my suggestion.

Sorry just too add, the physical pins you need to connect to are on the 6 pin header, the OVR (RX) and OVT (TX) as @Kassimsamji said. Also connect the GND wire. Power the module with the JST, red to 5V black to GND.

Thanks for the feedback. So far no luck. I will try to connect the module to a RS232 port on a computer and see if I can get something from it... when I get time do to so.

thehardwareman: Thanks for the feedback. So far no luck. I will try to connect the module to a RS232 port on a computer and see if I can get something from it... when I get time do to so.

I hope you have USB-TTL adapter which are very very handy for this type of work. .