You are on page 1of 18

Seeedstudio SIM900 based GSM/GPRS

shield
Seedstudio Arduino SIM900 GSM/GPRS Shield
.

GPRS Modem
. SIM900 GPRS Module
.

1|Page

.

1. Power Jack


. 4.8V 5.2V DC / 1A
. 5V DC/ 2A .
2A

2. Power Select

,
Arduino board .

3. Power Key

Push button Shield Hardware .


Power key 2 3 Press . Power ON Indicator
. SIM Card Statue LED
Net light LED Blink .

2|Page
4. Net Light LED

Network Signal Check . Network


LED Signal
3 .

5. Statue LED

LED shield hardware . Power key


LED ON .

6. Serial Port Select

Jumpers Arduino
Board GPRS Communication Software Serial Hardware
Serial . jumpers
.

GPRS communicate with arduino by hardware serial GPRS communicate with arduino by software serial

3|Page
7. GSM Antenna

signal
shield .

Antenna pad properly buckled Assemble the GSM antenna

8. Speaker Line & Microphone Line

jack sockets .

9. SIM Card Slot

Network Provider SIM .


unlock . 1.8V 3V SIM900
voltage type automatically .

4|Page
shield Schematic Diagram
.

https://drive.google.com/file/d/0B1KTjIolDFHOU1U0aVRCTXFHdkU/view

Technical Spesifications .

Quad-Band 850 / 900/ 1800 / 1900 MHz - would work on GSM networks in all countries across the world.

GPRS multi-slot class 10/8

GPRS 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 - Standard Commands: GSM 07.07 & 07.05 | Enhanced Commands: SIMCOM AT
Commands.

Short Message Service - so that you can send and receive small amounts of data over the network (ASCII or raw
hexadecimal).

Embedded TCP/UDP stack - allows you to upload data to a web server.

RTC supported.

Selectable serial port.

2 in 1 headset jack

Low power consumption - 1.5mA(sleep mode)

Industrial Temperature Range - -40C to +85 C

Item Min Typical Max Unit

Voltage 4.8 5.0 5.2 VDC

Current / 50 450 mA

Dimension(with antenna) 110x58x19 mm

Net Weight 472 g

5|Page
SIM900 GPRS Shield .

GPRS Shield Arduino board .


. GPRS
Shield Arduino Uno Board . Pins
Shield Male Pin Headers .

.
Shield Arduino board .

Jumper Wires Shield Arduino board


.

6|Page
Arduino Board . GPRS Shield External power
Power Select button . Power key 3s push
hardware . Statue LED
Net Light LED 3s blink . Serial
Port Select jumpers Software Serial Communicate .
. .

GPRS Shield .

7|Page
Arduino board Upload .

#include <SoftwareSerial.h>
SoftwareSerial GPRS(7, 8); // Rx, Tx

void setup() {
GPRS.begin(9600);
Serial.begin(9600);
}

void loop() {
while(GPRS.available())
Serial.write(GPRS.read());

while(Serial.available())
GPRS.write(Serial.read());
}

Serial monitor Open settings .

communication bit rage 9600 baud


Borth NL & CR .

Command bar AT type Enter Send .

8|Page
shield Arduino board Serial monitor AT
commands .
serial monitor .
.

AT commands SIM900 GPRS shield Support AT


command PDF .

Here is a cheat sheet of the most useful AT Commands:


AT Check to see if the module is active. Should return OK
AT+CREG? Is the module registered to the network? Set the mode first: AT+CREG=2
AT+COPS? What network is the module registered?
AT+CMGF=1 This puts the module into text mode so messages can be sent/received
AT+CMGS=number,129 <cr>< body of message> <1A> Send a text message.
AT+CMGL=ALL Lists all text messages that are on the device (or network)
AT+CMGR=<index> Read SMS message at index number
AT+QBAND? What band am I on?
AT+CIMI Get the IMSI number from the module
AT+CSQ Check the signal strength
AT+GSN Get IMEI number
AT+QSPN Get service provider name
9|Page
AT+QCCID Get CCID number from SIM
AT+CRSM SIM card restricted access (still researching)
AT+CSIM Generic SIM access (still researching)

AT+QENG? report the cell description of the main cell and six neighboring cells.

PDF:

https://drive.google.com/file/d/0B1KTjIolDFHOYVNHLTJIYVEwQmc/view?usp=drive_web

Arduino board upload SMS send, Receive, Make a Call &


Control Arduino Outputs by Using SMS
. Codes Develop
.

SerialMonitor9600,19200,....,etcbaudrate
.

Send SMS
Code 01:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(7, 8);

void setup()

mySerial.begin(19200); //Default serial port setting for the GPRS modem is 19200bps 8-N-1

void loop()

delay(10000); //Give enough time for GSM to register on Network

SendSMS(); //Send one SMS

do {} while(1); //Wait forever

void SendSMS()

10 | P a g e
{

mySerial.print("\r");

delay(1000); //Wait for a second while the modem sends an "OK"

mySerial.print("AT+CMGF=1\r"); //Because we want to send the SMS in text mode

delay(1000);

//mySerial.print("AT+CSCA=\"+94########\"\r"); //Setting for the SMS Message center number,

//delay(1000); //uncomment only if required and replace with

//the message center number obtained from

//your GSM service provider.

//Note that when specifying a tring of characters

// " is entered as \"

//Use your phone number for #########

mySerial.print("AT+CMGS=\"+94#########\"\r"); //Start accepting the text for the message

//to be sent to the number specified.

//Replace this number with the target mobile number.

delay(1000);

mySerial.print("Hello world, This Message from Arduino.\r"); //The text for the message

delay(1000);

mySerial.write(0x1A); //Equivalent to sending Ctrl+Z

Code 02:

#include <SoftwareSerial.h>

SoftwareSerial SIM900(7, 8); // Rx, Tx

String outMessage = "Hello world!"; // Text which u want to send

11 | P a g e
String destinationNumber = "+94#########"; // Phone number which u want to send the Msg

void setup()

SIM900.begin(19200);

delay(20000); // give time to log on to network.

SIM900.print("AT+CMGF=1\r");

delay(1000);

SIM900.println("AT + CMGS = \"" + destinationNumber +"\"");

delay(1000);

SIM900.print(outMessage);

delay(1000);

SIM900.write((char)26); //ctrl+z

delay(1000);

void loop()

// Nothing to do

Receive SMS

#include <SoftwareSerial.h>
SoftwareSerial SIM900(7, 8);
char incoming_char=0;

void setup()
{
Serial.begin(9600); // for serial monitor
12 | P a g e
SIM900.begin(9600); // for GSM shield
SIM900power(); // turn on shield
delay(20000); // give time to log on to network.

SIM900.print("AT+CMGF=1\r"); // set SMS mode to text


delay(100);
SIM900.print("AT+CNMI=2,2,0,0,0\r");
// blurt out contents of new SMS upon receipt to the GSM shield's serial out
delay(100);
}

void SIM900power()
// software equivalent of pressing the GSM shield "power" button
{
digitalWrite(9, HIGH);
delay(1000);
digitalWrite(9, LOW);
delay(7000);
}

void loop()
{
// Now we simply display any text that the GSM shield sends out on the serial monitor
if(SIM900.available() >0)
{
incoming_char=SIM900.read(); //Get the character from the cellular serial port.
Serial.print(incoming_char); //Print the incoming character to the terminal.
}
}

Send & Receive SMS


#include <SoftwareSerial.h>
SoftwareSerial mySerial(7, 8);

13 | P a g e
void setup()
{
mySerial.begin(9600); // Setting the baud rate of GSM Module
Serial.begin(9600); // Setting the baud rate of Serial Monitor (Arduino)
delay(100);
}

void loop()
{
if (Serial.available()>0)
switch(Serial.read())
{
case 's':
SendMessage(); // Type s on serial monitor & send to Send the SMS
break;
case 'r':
RecieveMessage(); // Type r on serial monitor & send to Receive SMS
break;
}
if (mySerial.available()>0)
Serial.write(mySerial.read());
}

void SendMessage()
{
mySerial.println("AT+CMGF=1"); //Sets the GSM Module in Text Mode
delay(1000); // Delay of 1000 milli seconds or 1 second
mySerial.println("AT+CMGS=\"+94#########\"\r"); // Replace # with mobile number
delay(1000);
mySerial.println("I am SMS from Arduino GSM Module");// The SMS text you want to send
delay(100);
mySerial.println((char)26);// ASCII code of CTRL+Z
delay(1000);
}
14 | P a g e
void RecieveMessage()
{
mySerial.println("AT+CNMI=2,2,0,0,0"); // AT Command to receive a live SMS
delay(1000);
}

Make a Call
/*
GPRS Call Up

This sketch is used to test seeeduino GPRS_Shield's callUp function.


to make it work, you should insert SIM card to Seeeduino GPRS
and replace the phoneNumber,enjoy it!
*/
#include <GPRS_Shield_Arduino.h>
#include <SoftwareSerial.h>
#include <Wire.h>

#define PIN_TX 7
#define PIN_RX 8
#define BAUDRATE 9600
#define PHONE_NUMBER "+94#########" // Number you want to call

GPRS gprsTest(PIN_TX,PIN_RX,BAUDRATE);//RX,TX,PWR,BaudRate

void setup() {
Serial.begin(9600);
while(!gprsTest.init()) { //gprs init
delay(1000);
Serial.print("init error\r\n");
}
Serial.println("gprs init success");

15 | P a g e
Serial.println("start to call ...");
gprsTest.callUp(PHONE_NUMBER);
}

void loop() {
//nothing to do
}

Controlling Arduino Output by SMS


#include <SoftwareSerial.h>

char inchar; // Will hold the incoming character from the GSM shield

SoftwareSerial SIM900(7, 8);

int led = 13;

void setup()

Serial.begin(9600);

// set up the digital pins to control

pinMode(led, OUTPUT);

digitalWrite(led, LOW);

// wake up the GSM shield

SIM900.begin(9600);

delay(20000); // give time to log on to network.

SIM900.print("AT+CMGF=1\r"); // set SMS mode to text

delay(100);

SIM900.print("AT+CNMI=2,2,0,0,0\r");

// blurt out contents of new SMS upon receipt to the GSM shield's serial out

delay(100);

Serial.println("Ready...");

void loop()

16 | P a g e
{

//If a character comes in from the cellular module...

if(SIM900.available() >0)

inchar=SIM900.read();

if (inchar=='#')

delay(10);

inchar=SIM900.read();

if (inchar=='o')

delay(10);

inchar=SIM900.read();

if (inchar=='n')

digitalWrite(led, HIGH);// Send the text msg as "#on" to ON the LED

if (inchar=='f')

delay(10);

inchar=SIM900.read();

if (inchar=='f')

digitalWrite(led, LOW);// Send the text msg as "#off" to OFF the LED

delay(10);

// SIM900.println("AT+CMGD=1,4"); // delete all SMS

17 | P a g e
LED ON OFF . 13 pin
LED #on Output On #off
Output OFF

:
Code GPRS _SIM900_master Library File Download
Library Add .

https://drive.google.com/file/d/0B1KTjIolDFHOSDVnTlhzN0h6eDQ/view

Testing ....

https://drive.google.com/file/d/0B1KTjIolDFHORVQzNmZfYVZIU0U/view

PDF : C. i|rejka

TP. No: 0777145140


0719207040

18 | P a g e

You might also like