Ks0254 keyestudio Sim800c Shield

From Keyestudio Wiki
Jump to: navigation, search

keyestudio Sim800c Shield


thumb

Introduction

This is a GPRS / GSM Arduino expansion boarddeveloped by Keyes. It is a shield module with frequency of EGSM 900MHz / DCS 1800MHz and GSM850 MHz / PCS 1900MHz, integrated with GPRS, DTMF and other functions. It supports DTMF, when the DTMF function is enabled, you can get the character feedback from the conversion of button pressed down during the call, which can be used for remote control.
It is controlled by the AT command, you can directlystart its function through the computer serial port and Arduino motherboard. The SIM800C GPRS Shield board has abuilt-in SIM800H chip with good stability.

Specification

  • Power Supply<Vin>:6-12V
  • Low power consumption mode: current is 0.7mA in sleep mode
  • Low battery consumption (100mA @ 7V-GSM mode)
  • GSM 850/900/1800/1900MHz
  • GPRS multi-slot class 1 ~ 12
  • GPRS mobile station class B
  • GSM phase 2/2 + standard
  • Class 4 (2 W @ 850/900 MHz)
  • Class 1 (1 W @ 1800 / 1900MHz)
  • Controlled via AT command
  • USB /Arduino control switch
  • Adaption of serial baud rate
  • Support DTMF
  • LED indicator can display power supply status, network status and operating mode.


Sample Code

#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);
}

//the loop routine runs over and over again forever:
void loop()
{
  //Signal strength
  unsigned char csq = 0;
  //To obtain the signal strength, return 1 when obtain success.
 if( sim800demo.callReadCSQ(&csq) )
 {
     //Make Voice Call
     sim800demo.dialTelephoneNumber("15912345678;");//input the dial telephone number     while(1);
 }
 digitalWrite(13,HIGH);//turn the LED on by making the voltage HIGH
 delay(500);
 digitalWrite(13,LOW);//turn the LED off by making the voltage LOW
 delay(500);
}

//application callback function
void fundebug(void)
{
}

Note: As for arduino IDE 1.0 and subsequent versions, WProgram.h has been renamed Arduino.h, so this program requires arduino IDE 1.0 or later version to compile successfully. In the use of library functions, since the received serial data is too large, so it needs to change the original Arduino serial cache buffer more larger. There are two methods as below:
1.unzip the hardware.zip, if your Arduino compiler is below 1.5.5 version, cut the HardwareSerial.cpp file into Arduino\hardware\arduino\cores\arduino, overwrite the original file.If it is higher than 1.5.5 version, cut the HardwareSerial.hfile into Arduino\hardware\arduino\sam\cores\ arduino,overwrite the original file.
2.If your Arduino compiler is below 1.5.5 version, open the HardwareSerial.cpp file inside the Arduino\hardware\arduino\cores\arduino, modify the # define SERIAL_BUFFER_SIZE 64 as # define SERIAL_BUFFER_SIZE 140. If it is higher than 1.5.5 version, then open HardwareSerial.h file, doing the same modification.

Test Result

Burning the code on the keyestudio UNO R3 development board,stack the expansion board on the Keyes UNO R3 development board, then connect the phone card (only 2G network) and headphone to the expansion. Powered-on, it can dial phone number15912345678, and you can make a call through the headset after telephone connected.

Resources

Get the Libraries of Hardware:
https://drive.google.com/open?id=1MGaPFZkLE5BsoK3j4siwsejuLHimrt2x

Get the Libraries of SIM800C:
https://drive.google.com/open?id=1vcvOnCHt-1QpZfF2jhNdL9X3ViuRej8r

PDF File:
https://drive.google.com/open?id=1EO7gAOEejmghyVyyQ8Htax5eyQzkj7to

Get One Now

Official Website

http://www.keyestudio.com/keyestudio-gps-shield.html