Ks0142 keyestudio SIM900 GSM/GPRS Module Shield

From Keyestudio Wiki
Jump to: navigation, search
Keyestudio SIM900 GSM/GPRS Module Shield


Introduction

SIM900 GSM/GPRS shield is based on Quad-Band SIM900 GSM/GPRS module. It provides Arduino with GSM/GPRS function.
This shield allows you to make voice calls, send SMS or make connections to the Internet network.
On the shield, there is a serial port toggle switch for you to select either software serial port or hardware serial port to be connected to GPRS Shield.
If you choose software serial port, you need to use the Software UART; otherwise, you need to use the Hardware UART.
The shield includes a high capacitor dedicated to RTC (Real Time Clock).
If you toggle the switch to DBG-Port, you can connect the port to Arduino or connect the port to PC by Arduino to proceed the debugging.


Specification

1. Auto-adaption to 3.3V and 5V main board, supporting 3.3V platforms such as leaf maple and Chip kit;
2. After connecting the SIM900 shield to Arduino, 9V/2A DC power supply is needed. Otherwise, there might be malfunction;
3. Quad-Band GSM/GPRS 850/900/1800/1900MHz (Support 2G card of UNICOM, China Mobile, do not support Telecom card).
We use SIM900 GSM Module – supporting communication in 900MHz band.
You should check the mobile network band in your area.


Shield Details

  • Dimensions: 67mm x 85mm x 21mm
  • Weight: 35.7g


thumb


PINOUT Explanation


thumb


Using Method

1. Insert the SIM Card into the SIM Card slot.
thumb

2. Make sure the antenna pad is buckled properly. If you don’t want to fix it on the board, a patch cord is also supplied with the GPRS Shield to interface the antenna to the board. At the same time, plug your headphone into the shield.
thumb

3. Then, connect UNO R3 to computer using a USB cable, and upload the code to the board.
thumb

4. UNO R3 communicates with GPRS module by serial port, so after uploading (you must plug the shield into UNO R3 after uploading the code, or serial port can’t work.), connect RXD(D0) on UNO R3 to TXD on the shield, TXD(D1)to RXD on the shield.

5. Note that: If you need more serial ports, except for the default serial port D0 and D1, you can add some by programming.
We provide the code to make RXD(D6) and TXD(D7) serial ports below.

thumb

6. Because in the program, you can set set the number you want to dial. After uploading and connecting, press dialing key and you can make a voice call by the headphone with a mobile phone.


Test Code

1) For default serial ports RXD(D0) and TXD(D1)

void setup()
{
  pinMode(13, OUTPUT);   
  pinMode(9, OUTPUT); //D9 is SIM900 turn on pin
  digitalWrite(9,HIGH);
  delay(1000);
  digitalWrite(9,LOW);
  delay(15000);
  Serial.begin(9600);
}
 
void loop()
{
  Serial.print("ATD15812345678;\r");//15812345678 your dialing phone number
  delay(100000);
//  Serial.println("ATH");
  delay(200000);
}


Code to Note:
In the code Serial.print("ATD15812345678;\r"), here you can change the phone number you want to dial.

Test Result
Done uploading the code, connect the earphone and SIM card to the shield, and connect the antenna. Shown below.
Then stack the shield onto UNO R3 board, slide the toggle switch to the UART side, powered on, wait for about 2 minutes, it will dial the number that you have set well in the code. After calling, you can talk through the earphone.

thumb

thumb


2) For adding serial ports RXD(D6) and TXD(D7)

#include <SoftwareSerial.h>
SoftwareSerial SIM900(6, 7); // define serial port PIN
void SIM900_Start()
{
  digitalWrite(9, HIGH);
  delay(2000);
  digitalWrite(9, LOW);
  delay(5000);
}
void Call_Phone()
{
  SIM900.println("ATD15812345678;"); // the numbers behind ATD is your phone number to dial.
  delay(100);
  SIM900.println("ATD15812345678;");
  delay(30000);            // wait for 30 seconds...
  SIM900.println("ATH");   // hang up
}
void setup()
{
  pinMode(9, OUTPUT); 
  SIM900.begin(19200);   //set baud rate    
  SIM900_Start();  
  delay(20000);  // wait for SIM900 to work 
}
void loop()
{
  Call_Phone();
  do
  {   
  }
  while(1);
}


Code to Note:
1. In the code, it will use the library SoftwareSerial.h, you don't need to add it because the software IDE comes with this library.
2. In the code SIM900.println("ATD15812345678;"), you can change the phone number you want to dial.


Shipping List

1. keyestudio SIM900 GSM_GPRS Module Shield *1
2. Extension cable 22CM *1

thumb


Resources

PDF Download:
https://drive.google.com/open?id=1jOILOgDrelbZg6sHrxSgydIBUHy1sb-j

Code_for_default_serial_port:
https://drive.google.com/open?id=1vnyUdZL12Jh5WaFYfS4kfoZyODk2eY7m

Code_for_adding_serial_port:
https://drive.google.com/open?id=1y2WVPyqmO7KDBWEGNg8XuhUEt-0WLtT7

VIDEO:
http://www.keyestudio.com/wp/ks0142/


Get One Now