SIM800H_GPRS_Shield_V1.0_Communication_Module_SKU_TEL0089-DFRobot

Introduction

This is a GPRS/GSM Arduino expansion board developed by DFRobot. The capabilities of GPRS, DTMF, TTS speech all in one shield, operating frequency is EGSM 900MHz/DCS 1800MHz and GSM850 MHz/PCS 1900MHz.

It also supports UCS2 encoding data and text data format directly which makes your robot could do TTS voice broadcast at any time. It supports DTMF, once the DTMF feature was enabled, press the keys during a call can be converted into character, and can be used for remote control.

It is controlled by AT commands, you can launch its functions directly through computer serial port or Arduino board. The module was embedded with SIMCom's SIM800H chip with good stability.

More updated feature could be refered to the description of the SIM800H chip. Meanwhile we also show some application of the SIM800H library, it can help you to get familiar with this shield in a easier way.

Specifications

Pin out

TEL0089_pinOut_DSCcri.png

Specification:


1 Compatibility

This shield is compatible with Arduino board like Arduino UNO, Arduino Mega1280 and Arduino Mega2560 (5V standard operating voltage).

2 Status light

PWR: Power indicator; NET: Net connect indicator:

3 Enable module button

Press the button for 2 seconds to boot/shut down module. Note: This button is connected to digital Pin 12, so you can also boot/shut down module by setting the Pin12 value.

4 USB/Arduino Switch

5 mic&speaker channel

These socket and pin are used to play TTS and dialing. Note: You could change the TTS output channel with AT command. Default channel is channel 1.

Tutorials AT Mode

NOTE: Note: It needs external power supply (6-12V) for the higher power consumption as the GSM mode.

How to enter into AT mode ?

1 Preparation


  1. Insert SIM800H module onto Arduino UNO or any other Arduino card;
  2. Connect UNO with computer through USB cable
  3. Connect UNO power jack with an external power supply, 6-12V @ >500mA.
  4. Set the swith to USB.

2 Boot SIM800H in two ways, anyone of them will work.


  1. Press the button boot for 2 seconds
  2. Upload the sketch below.

void setup() {
  //Set pin 12 as output
  pinMode(12, OUTPUT);
  //GSM power on sequence
  digitalWrite(12, HIGH);
  delay(2000);
  digitalWrite(12, LOW);
}

void loop() {
}
  1. Ready to go

  1. Choosing the right board and Serial port at Arduino IDE menu bar.
  2. Open the serial monitor or other Serial Assistant software.
  3. Choose "Both NL & CR".
  4. Wait for the NET led to blink as finding net, then you could send some AT commands.
    • Otherwise please check the external power supply/ SIM card/ switch position, and then RESET the module.

TEL0089_ATmode_moniU.png

Typical AT Command list

- Return: OK Description:AT test command, to check if you could enter AT mode.

- Return: OK Description: answer the phone

- Return: OK Description: Hang Up

- Return: OK Description: Make a call

- Return: OK Description: Set SMS form as text mode, when you want to receive SMS via AT commands, you need to send 'AT+CMGF=1' firstly before sending 'AT+CMGR=1'.

- Return: OK Description: Set SMS form as UCS2 encoding

- Return: > Description:The UCS2-BIG codes inside the quotATion marks is the target phone number to send SMS. when you get ">" characters, enter the message you want to send, content encoding is UCS2 encoding (Set before), then tick the HEX to send, and send "0x1a" expressed as CTRL+Z (0x1A) to send SMS.

- Return: +CMTI:........ Description: Read the message 1, the content "........" :Returned as text messages

- Return: OK Description: Delete SMS of number 1 in memory.

- Return: OK Description: Stop the current broadcast

- Return: OK Description: Enable the DTMF function

NOTE: More AT command could be refered to AT command manual.''' Download AT command manual

Tutorials about Library Using

Download the library:

NOTE: SIM800H Hardware Library Due to the incoming serial data is too large, the original Arduino serial cache buffer needs to be changed to be larger, there are two ways:'''

Extract the hardware.zip If your Arduino IDE is below 1.5.5 version, cut HardwareSerial.cpp to Arduino\hardware\arduino\cores\arduino and cover the original file. If it is version 1.5.5 or later, then cut the HardwareSerial.h to Arduino\hardware\arduino\cores\arduino and cover the original file.

Modify the library If your Arduino IDE is below 1.5.5 version, open the HardwareSerial.cpp file in the Arduino\hardware\arduino\cores\arduino, change # define SERIAL_BUFFER_SIZE 64 to # define SERIAL_BUFFER_SIZE 140; If the version is 1.5.5 or later, open HardwareSerial.h file and do the same modifications. |

NOTE: Not compatible with Arduino IDE1.6.*, Recommand Arduino IDE 1.0.6.

Steps


  1. Insert the SIM800H GPRS Shield onto UNO board;
  2. connect UNO to PC with USB cable;
  3. Use external power supply;
  4. Turn the switch to the "NONE";
  5. Open different sketch, select the right board "UNO" and "Srial port", upload sketch to the UNO;
  6. Don't forget to turn the switch to "Arduino".

- The sketches showing in the chapter are included in the library.

- thumb All sketch are in the library

Make a call

Open the sketch "Examples\sim800program\MakeVoiceCall" in Arduino IDE.

/*
Receive Voice Call

This sketch, for the Arduino SIM800H GPRS Shield,enable SIM800H Modular Caller ID, receives voice calls, get the
Answer.

created Dec 2014
by zcl

This example code is in the public domain.
*/

//libraries
#include <sim800cmd.h>

//initialize the library instance
//fundebug is an application callback function,when someon is calling.
Sim800Cmd sim800demo(fundebug);

//the setup routine runs once when you press reset:
void setup(){
    //initialize the digital pin as an output.
    pinMode(13,OUTPUT);
    //initialize SIM800H,return 1 when initialize success.
    while((sim800demo.sim800init()) == 0);
}

void loop(){
 digitalWrite(13,HIGH);//turn the LED on by making the voltage HIGH
 delay(200);
 digitalWrite(13,LOW);//turn the LED off by making the voltage LOW
 delay(200);
}

//application callback function
//Note that not too much to handle tasks in this function
void fundebug(void){
    //answer the call
    sim800demo.answerTelephone();
}

Function description: SIM800H module is initialized, and then dial the number 15982373181.

1. Sim800Cmd sim800demo(fundebug); This function is to recognize incoming call, if there is an incoming call, it will call the fundebug(void) in the end. You could write something to deal with the incoming call: answer or not. But do remember that do not write too much lines in the sub-function.

2. sim800demo.dialTelephoneNumber("15982373181;"); This function is making a dailing. Do not forget the format ";" behind the dail number.

3. sim800demo.sim800init(); This function is to finish the initial module, it's much more easier than the last version product.

AT command:

ATDXXXXXXXXXXX;\r\n

Send SMS

Open the sketch "Examples\sim800program\SendSMS " in Arduino IDE.

/*
TTS Speaker

This sketch, for the Arduino SIM800H GPRS Shield,send a short message to telephone
After initialization success ,enable prompt SMS.

created Dec 2014
by zcl

This example code is in the public domain.
*/

// libraries
#include <sim800cmd.h>

//initialize the library instance
//fundebug is an application callback function,when someon is calling.
Sim800Cmd sim800demo(fundebug);

//the setup routine runs once when you press reset:
void setup()
{
    //initialize SIM800H,return 1 when initialize success.
    while((sim800demo.sim800init()) == 0);
    delay(1000);
    //enable SMS prompt
    sim800demo.setSMSEnablePrompt(OPEN);
}
void loop()
{
    //send message to telephone,use UCS2 code
    sim800demo.sendSMS("00310035003900380032003300370033003100380031","4F60597DFF0C6B228FCE4F7F752800530049004D0038003000300048");
    //while, do not return
    while(1);
}

//application callback function
//Note that not too much to handle tasks in this function
void fundebug(void)
{
}

Function description:Enables SMS notification, send a text message.

1. sim800demo.setSMSEnablePrompt(OPEN); This enables SMS notification;

2. sim800demo.sendSMS("00310035003900380032003300370033003100380031","4F60597DFF0C6B228FCE4F7F752800530049004D0038003000300048"); This is to send a text message, the first parameter is a phone number, the second parameter is the content to be sent, both of these parameters is UCS2 encoding.

AT command:

AT+CMGS="00310038003600310036003300360036003500340037"\r\n

Note:

  1. the text message cannot be longer than 20 characters, or saying 80 UCS2 encoding.
  2. here need to convert string to UCS2 encoding, you can download the softeware "CharCoder"to transform the string to UCS2 encoding, ps: UCS2-BIG.

TEL0089_pinOut_ucs_code.png

Integrated Application

Open the sketch "Examples\sim800program\sim800test " in Arduino IDE.

//libraries
#include <sim800cmd.h>

//initialize the library instance
//fundebug is an application callback function,when someon is calling.
Sim800Cmd sim800demo(fundebug);

//return DTMF value
char rqt = 0;

//the setup routine runs once when you press reset:
void setup()
{
   pinMode(13,OUTPUT);
    //turn the LED off by making the voltage LOW
    digitalWrite(13,LOW);
    while((sim800demo.sim800init()) == 0);
    delay(1000);
    sim800demo.setSMSEnablePrompt(OPEN);
    //enable DTMF
    sim800demo.setDTMFenable(OPEN);
    //registration fundebug2 function
    sim800demo.setDTMFHandlefunction(fundebug2);
}

//the loop routine runs over and over again forever:
void loop()
{
  //calling
  if(rqt == 1)
  {
     rqt = 0;
     sim800demo.sendTTSUCS2Compulsory("003253D1900177ED4FE1FF0C00315F00706FFF0C00305173706F",UCS2);
  }
  else if(rqt == '3')
  {
    rqt = 0;
    sim800demo.sendTTSUCS2Compulsory("6B63572853D1900177ED4FE1",UCS2);
    delay(2000);
    sim800demo.cancelCall();
    delay(2000);
    sim800demo.sendSMS("00310035003900380032003300370033003100380031","4F60597DFF0C6B228FCE4F7F752800530049004D0038003000300048");
  }
  else if(rqt == '1')
  {
    rqt = 0;
    digitalWrite(13,HIGH);//turn the LED off by making the voltage LOW
    sim800demo.sendTTSUCS2Compulsory("706F5DF25F00",UCS2);
  }
  else if(rqt == '0')
  {
    rqt = 0;
    digitalWrite(13,LOW);//turn the LED off by making the voltage LOW
    sim800demo.sendTTSUCS2Compulsory("706F5DF25173",UCS2);
  }
}

//application callback function
void fundebug(void)
{
   rqt = 1;
   sim800demo.answerTelephone();
}

//application callback function
void fundebug2(void)
{
  //get DTMF data
  sim800demo.getDTMFresult(&rqt);
}

Function description:

Initialize the SIM800H module, enable SMS notification, enable DTMF feature. If there is an incoming call, answer it and reset rqt to 1, voice broadcast, if there is any DTMF input, then assign it to rqt and then judge rqt for appropriate action.

AT command:

AT+CMGS="00310038003600310036003300360036003500340037"\r\n'

Library Specification

Initialization part

TTS Language part

Dial part

DTMF part

SMS part

Download Source

hardware library

sim800 library

SIM800_Series_AT_Command_Manual_V1.07

SIM800H All documents

Download schematic

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documentation