4

I have a problem. I bought a SIM900 board, but I can not connect there with the Arduino. To send AT commands on the serial the SIM900 doesn't respond, but the LED indicating that the network is on. I've tried to change the baud rate of 9600 to 19200 in the firmware of the Arduino, but it still fails. I think I'm having a problem with the connections of the SIM900, since this board strikes me as obscure (could not find the schematic on the Internet)

The board I have is identical to this: enter image description here

I'm 90% sure that I am connecting to the wrong pins. But I tried to reverse the jumpers and even some soldered pins on UART.

migrated from electronics.stackexchange.com Mar 21 '15 at 3:00

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • Interesting... I have been looking a lot into the various GPRS/GSM/GPS boards available recently, using the SIM 900 or 908. I saw your board on eBay, and was quite interested, but in the end I decided to wait as I could not find any libraries for that particular board. Sorry, that is not much help to you. I will have another search and see what I can come up with. :-) – Greenonline Mar 21 '15 at 16:41
  • 1
    If you are interested in a GPRS board, I recommend you buy EFCOM. I worked with her and never had problems. But I need to university research, and takes a long time to get to Brazil, not to mention the price, the dollar is costing R$ 3.22 :( ($1 Dollar = R$ 3,22 Real) link ebay. There is a saying for this here in Brazil: "The cheap is expensive" – Avelino Mar 21 '15 at 18:44
  • 2
    I managed to solve the problem. I connected the ground of SIM900 the Arduino ground. It worked for me :) – Avelino Mar 23 '15 at 17:49
  • Excellent news! You should answer your question by posting the solution, with maybe a photo or diagram of the boards pins that needed connecting, and then marking the question as answered... It will probably help someone else. :-) – Greenonline Mar 23 '15 at 19:04
5

I'll tell you what worked for me, because I didn't find the schematics of this board. But your board may work differently, so it is always good to check the datasheet and the schematic (if you have one).

Power

Be sure to use an external 5V source that can supply up to 2A without dipping significantly.

Code

#include <SoftwareSerial.h>

SoftwareSerial GPRS(7, 8);         //7 = TX, 8 = RX
unsigned char buffer[64]; port
int count=0;     
int i = 1;                         //if i = 0, send SMS.
void setup(){
  //delay(10000);
  GPRS.begin(19200);               // the GPRS baud rate   
  Serial.begin(19200);             // the Serial port of Arduino baud rate.
  Serial.print("I'm ready");
  Serial.print("Hello?"); 
}

void loop(){
  if (GPRS.available()){         // if date is comming from softwareserial port ==> data is comming from gprs shield

    while(GPRS.available()){          // reading data into char array 
      buffer[count++]=GPRS.read();     // writing data into array
      if(count == 64)break;
    }
  Serial.write(buffer,count);            // if no data transmission ends, write buffer to hardware serial port
  clearBufferArray();              // call clearBufferArray function to clear the storaged data from the array
  count = 0;                       // set counter of while loop to zero
}

if (Serial.available())            // if data is available on hardwareserial port ==> data is comming from PC or notebook
  GPRS.write(Serial.read());       // write it to the GPRS shield
  if(i == 0){
    GPRS.print("AT+CMGF=1\r"); //sending SMS in text mode
    Serial.println("AT+CMGF=1\r"); 
    delay(1000);
    GPRS.print("AT+CMGS=\"+554988063979\"\r"); // phone number
    Serial.println("AT+CMGS=\"+554988063979\"\r"); 
    delay(1000);
    GPRS.print("Test\r"); // message
    Serial.println("Test\r"); 
    delay(1000);
    GPRS.write(0x1A); //send a Ctrl+Z(end of the message)
    delay(1000);
    Serial.println("SMS sent successfully");
    i++;
  }   
}

void clearBufferArray(){              // function to clear buffer array
  for (int i=0; i<count;i++){
    buffer[i]=NULL;                  // clear all index of array with command NULL
  }
}

Connection

enter image description here

Testing...

Open the serial monitor Arduino, set the baud rate in 19200 in "Both NL & CR". If not work, set to "Carriage Return". Type "AT" and wait for an OK.

enter image description here

Help

If you need help, these links were useful to me:

  1. http://www.seeedstudio.com/wiki/GPRS_Shield_V1.0
  2. http://www.seeedstudio.com/wiki/GPRS_Shield_V2.0
  3. http://www.elecfreaks.com/wiki/index.php?title=EFCom_GPRS/GSM_Shield
  • A 1A external supply is questionably insufficient, unless there's a lot of capacitance on the module itself to handle GSM pulseloads. – Chris Stratton Sep 28 '16 at 2:02
  • Is the USB connection from the laptop sufficient? – marciokoko Oct 2 '16 at 1:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.