Professional Documents
Culture Documents
Seeedstudio SIM900 Based GSM Shield
Seeedstudio SIM900 Based GSM Shield
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
2|Page
4. Net Light LED
5. Statue LED
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 .
jack sockets .
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.
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).
RTC supported.
2 in 1 headset jack
Current / 50 450 mA
5|Page
SIM900 GPRS Shield .
.
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());
}
8|Page
shield Arduino board Serial monitor AT
commands .
serial monitor .
.
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
SerialMonitor9600,19200,....,etcbaudrate
.
Send SMS
Code 01:
#include <SoftwareSerial.h>
void setup()
mySerial.begin(19200); //Default serial port setting for the GPRS modem is 19200bps 8-N-1
void loop()
void SendSMS()
10 | P a g e
{
mySerial.print("\r");
delay(1000);
delay(1000);
mySerial.print("Hello world, This Message from Arduino.\r"); //The text for the message
delay(1000);
Code 02:
#include <SoftwareSerial.h>
11 | P a g e
String destinationNumber = "+94#########"; // Phone number which u want to send the Msg
void setup()
SIM900.begin(19200);
SIM900.print("AT+CMGF=1\r");
delay(1000);
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.
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.
}
}
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
#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
}
char inchar; // Will hold the incoming character from the GSM shield
void setup()
Serial.begin(9600);
pinMode(led, OUTPUT);
digitalWrite(led, LOW);
SIM900.begin(9600);
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(SIM900.available() >0)
inchar=SIM900.read();
if (inchar=='#')
delay(10);
inchar=SIM900.read();
if (inchar=='o')
delay(10);
inchar=SIM900.read();
if (inchar=='n')
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);
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
18 | P a g e