Ks0254 keyestudio Sim800c Shield: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
==keyestudio Sim800c Shield==
 
<br>[[File:KS0254.png|500px|frameless|thumb]]<br>
[[image:KS0254.png|thumb|700px|right|keyestudio Sim800c Shield]]
<br>


==Introduction==
==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.<br>
This is a GPRS/GSM expansion board for Arduino. <br>
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.<br>
The shield supports the frequency of EGSM 900MHz /DCS 1800MHz and GSM850 MHz /PCS 1900MHz, integrated with GPRS, DTMF and other functions. <br>
It also supports DTMF. When enable the DTMF function, get the character feedback converted from the pressed button during the call, which can be used for remote control.<br>
It is controlled by the AT command, you can directly start the function through the computer serial port and Arduino motherboard. <br>
The SIM800C GPRS shield has a built-in SIM800H chip from SIMCom, with good stability.


==Specification==
<br>
* Power Supply<Vin>:6-12V
==Specifications==
* Low power consumption mode: current is 0.7mA in sleep mode  
* Power Supply <Vin>: 7-12V
* Low power consumption: 0.7mA current in sleep mode  
* Low battery consumption (100mA @ 7V-GSM mode)
* Low battery consumption (100mA @ 7V-GSM mode)
* GSM 850/900/1800/1900MHz
* GSM 850/900/1800/1900MHz
Line 14: Line 19:
* GPRS mobile station class B
* GPRS mobile station class B
* GSM phase 2/2 + standard
* GSM phase 2/2 + standard
* Class 4 (2 W @ 850/900 MHz)
* Class 4 (2W @ 850/900 MHz)
* Class 1 (1 W @ 1800 / 1900MHz)
* Class 1 (1W @ 1800 / 1900MHz)
* Controlled via AT command
* Controlling via AT command
* USB /Arduino control switch
* USB /Arduino control switch
* Adaption of serial baud rate  
* Serial baud rate self-adaption 
* Support DTMF
* Support DTMF
* LED indicator can display power supply status, network status and operating mode.
* LED indicator for power supply status, network status and operating mode.
 
<br>
==Technical Details==
* Dimensions: 77mm x 52mm x 27mm
* Weight: 26g
* Antenna length: 180mm
<br>[[File:图片1- ks0254.png|700px|frameless|thumb]]<br>
 
<br>
 
==PINOUT==
<br>[[File:KS0254 PINOUT.jpg|800px|frameless|thumb]]<br>


<br>
==Test Code==


==Sample Code==
1)For default serial ports RXD(D0) and TXD(D1): call up
<pre>
<pre>
#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()
void setup()
{
{
    //initialize the digital pin as an output.
  pinMode(13, OUTPUT);  
    pinMode(13,OUTPUT);
  pinMode(9, OUTPUT); //D9 is SIM900 turn on pin
    //initialize SIM800H,return 1 when initialize success.
  digitalWrite(9,HIGH);
    while((sim800demo.sim800init()) == 0);
  delay(1000);
  digitalWrite(9,LOW);
  delay(15000);
  Serial.begin(9600);
}
}
 
//the loop routine runs over and over again forever:
void loop()
void loop()
{
{
   //Signal strength
   Serial.print("ATD15812345678;\r");//15812345678 your dialing phone number
   unsigned char csq = 0;
   delay(100000);
   //To obtain the signal strength, return 1 when obtain success.
//  Serial.println("ATH");
if( sim800demo.callReadCSQ(&csq) )
   delay(200000);
{
}
    //Make Voice Call
</pre>
    sim800demo.dialTelephoneNumber("15912345678;");//input the dial telephone number
 
    while(1);
'''How to Use'''
 
1.Burn the above code onto keyestudio V4.0 board, stack shield on it, and connect SIM card(support 2G internet), Ethernet cable and earphone to shield.<br>
 
2.Connect the jumper caps of shield to D0 and D1. DIP switch is dialed to EXTERN end, V4.0 board and shield are provided with power, alternatively, dial to ARDUINO end to supply power for V4.0 board which also provides power for shield.<br>
 
3.The PWR LED of V4.0 board stays on, long press“To Start” button, then release button when the STA LED is always on and NET LED flashes.<br>
4.Wait for 1 or 2 minutes and dial number 15912345678, after connection, you could call up by earphone or cellphone.<br>
 
<br>[[File:KS0254 SIM800C.jpg|600px|frameless|thumb]]<br>
 
 
2)For default serial ports RXD(D0) and TXD(D1): Send message
<pre>
************************************************
  void sendMeg()
  {
  Serial.println("AT");
  delay(2000);
  Serial.println("AT+CMGF=1");
  delay(2000);
  Serial.println("AT+CMGS=\"15812345678\"");//modify into your own number
  delay(2000);
  Serial.print("ABCDEFGHIJKLMN\r\n");//fill in content
  delay(2000);
  Serial.write(0x1A);
  }
  }
digitalWrite(13,HIGH);//turn the LED on by making the voltage HIGH
void setup() {
delay(500);
  // put your setup code here, to run once:
digitalWrite(13,LOW);//turn the LED off by making the voltage LOW
  Serial.begin(9600);
delay(500);
}
}
void loop() {
  // put your main code here, to run repeatedly:
  delay(15*1000);
  sendMeg();
}
************************************************
</pre>
Code to Note:
1.Serial.println("AT+CMGS=\"15812345678\"");//modify into your own number
2.Serial.print("ABCDEFGHIJKLMN\r\n");//fill in content
'''How to Use'''
1. Burn the above code onto keyestudio V4.0 board, stack shield on it, and connect SIM card(support 2G internet), Ethernet cable to shield.<br>
2. Connect the jumper caps of shield to D0 and D1. DIP switch is dialed to EXTERN end, V4.0 board and shield are provided with power, alternatively, dial to ARDUINO end to supply power for V4.0 board which also provides power for shield.<br>
3. The PWR LED of V4.0 board stays on. Long press “To Start” button, then release button if the STA LED is always on and NET LED flashes.<br>
4.Wait for a while, the cellphone will receiver the message from SIM900<br>
<br>[[File:09然485345.png|300px|frameless|thumb]]<br>


//application callback function
3)For adding serial ports RXD(D6) and TXD(D7): call up
void fundebug(void)
<pre>
************************************************
#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);
}
************************************************
</pre>
</pre>


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. <br>
'''<span style="color: red;">There are two methods as below</span> '''<br>
'''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.<br>
'''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.<br>


==Test Result==
'''How to Use'''
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.
 
1.Burn the above code onto keyestudio V4.0 board, stack shield on it, and connect SIM card(support 2G internet), Ethernet cable and earphone to shield.<br>
 
2.Connect the jumper caps of shield to D6 and D7. DIP switch is dialed to EXTERN end, V4.0 board and shield are provided with power, alternatively, dial to ARDUINO end to supply power for V4.0 board which also provides power for shield.<br>
 
3.The PWR LED of V4.0 board stays on. Long press “To Start” button, then release button if the STA LED is always on and NET LED flashes.<br>
4.Wait for 1 or 2 minutes and dial number 15912345678, after connection, you could call up by earphone or cellphone. <br>


<br>
==Package Includes==
* Keyestudio SIM800C Shield *1pcs
* Antenna line *1pcs
<br>[[File:图片2- ks0254.png|700px|frameless|thumb]]<br>
<br>
==Resources ==
==Resources ==


'''Get the Libraries of Hardware:''' <br>
'''Download the code and libraries:'''<br>
https://drive.google.com/open?id=1MGaPFZkLE5BsoK3j4siwsejuLHimrt2x<br>


'''Get the Libraries of SIM800C:''' <br>
https://fs.keyestudio.com/KS0254
https://drive.google.com/open?id=1vcvOnCHt-1QpZfF2jhNdL9X3ViuRej8r<br>


'''PDF File:''' <br>
<br>
https://drive.google.com/open?id=1EO7gAOEejmghyVyyQ8Htax5eyQzkj7to


==Get One Now ==
==Get One Now ==
'''Official Website'''
*[https://www.keyestudio.com/keyestudio-sim800c-shield-for-arduino-uno-r3-and-mega-2560-gprs-gsm-p0306.html    '''Official Website'''
 
*[https://www.aliexpress.com/store/product/Keyestudio-SIM800C-Shield-for-Arduino-UNO-R3-and-Mega-2560-GPRS-GSM/1452162_32830468111.html?spm=2114.12010612.8148356.28.3e4b276fmFnCXj  '''Shop on Aliexpress''']
 
*[https://www.ebay.com/itm/Keyestudio-GPRS-SIM800C-GSM-Module-DTMF-Development-Board-for-Arduino/132763216691?hash=item1ee94deb33:g:iPYAAOSw8lhbWy~x  '''Shop on eBay''']
 
*[https://www.amazon.com/dp/B07B2G3YFB    '''Shop on amazon''']


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


[[Category: shield]]
[[Category: Shield]]

Latest revision as of 14:14, 6 January 2021

keyestudio Sim800c Shield


Introduction

This is a GPRS/GSM expansion board for Arduino.
The shield supports the frequency of EGSM 900MHz /DCS 1800MHz and GSM850 MHz /PCS 1900MHz, integrated with GPRS, DTMF and other functions.
It also supports DTMF. When enable the DTMF function, get the character feedback converted from the pressed button during the call, which can be used for remote control.
It is controlled by the AT command, you can directly start the function through the computer serial port and Arduino motherboard.
The SIM800C GPRS shield has a built-in SIM800H chip from SIMCom, with good stability.


Specifications

  • Power Supply <Vin>: 7-12V
  • Low power consumption: 0.7mA current 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 (2W @ 850/900 MHz)
  • Class 1 (1W @ 1800 / 1900MHz)
  • Controlling via AT command
  • USB /Arduino control switch
  • Serial baud rate self-adaption
  • Support DTMF
  • LED indicator for power supply status, network status and operating mode.


Technical Details

  • Dimensions: 77mm x 52mm x 27mm
  • Weight: 26g
  • Antenna length: 180mm


thumb


PINOUT


thumb


Test Code

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

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

How to Use

1.Burn the above code onto keyestudio V4.0 board, stack shield on it, and connect SIM card(support 2G internet), Ethernet cable and earphone to shield.

2.Connect the jumper caps of shield to D0 and D1. DIP switch is dialed to EXTERN end, V4.0 board and shield are provided with power, alternatively, dial to ARDUINO end to supply power for V4.0 board which also provides power for shield.

3.The PWR LED of V4.0 board stays on, long press“To Start” button, then release button when the STA LED is always on and NET LED flashes.
4.Wait for 1 or 2 minutes and dial number 15912345678, after connection, you could call up by earphone or cellphone.


thumb


2)For default serial ports RXD(D0) and TXD(D1): Send message

************************************************
  void sendMeg()
  {
  Serial.println("AT");
  delay(2000);
  Serial.println("AT+CMGF=1");
  delay(2000);
  Serial.println("AT+CMGS=\"15812345678\"");//modify into your own number
  delay(2000);
  Serial.print("ABCDEFGHIJKLMN\r\n");//fill in content
  delay(2000);
  Serial.write(0x1A);  
 }
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}
void loop() {
  // put your main code here, to run repeatedly:
  delay(15*1000);
  sendMeg();
}

************************************************

Code to Note: 1.Serial.println("AT+CMGS=\"15812345678\"");//modify into your own number 2.Serial.print("ABCDEFGHIJKLMN\r\n");//fill in content

How to Use

1. Burn the above code onto keyestudio V4.0 board, stack shield on it, and connect SIM card(support 2G internet), Ethernet cable to shield.

2. Connect the jumper caps of shield to D0 and D1. DIP switch is dialed to EXTERN end, V4.0 board and shield are provided with power, alternatively, dial to ARDUINO end to supply power for V4.0 board which also provides power for shield.

3. The PWR LED of V4.0 board stays on. Long press “To Start” button, then release button if the STA LED is always on and NET LED flashes.

4.Wait for a while, the cellphone will receiver the message from SIM900


thumb


3)For adding serial ports RXD(D6) and TXD(D7): call up

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


How to Use

1.Burn the above code onto keyestudio V4.0 board, stack shield on it, and connect SIM card(support 2G internet), Ethernet cable and earphone to shield.

2.Connect the jumper caps of shield to D6 and D7. DIP switch is dialed to EXTERN end, V4.0 board and shield are provided with power, alternatively, dial to ARDUINO end to supply power for V4.0 board which also provides power for shield.

3.The PWR LED of V4.0 board stays on. Long press “To Start” button, then release button if the STA LED is always on and NET LED flashes.
4.Wait for 1 or 2 minutes and dial number 15912345678, after connection, you could call up by earphone or cellphone.



Package Includes

  • Keyestudio SIM800C Shield *1pcs
  • Antenna line *1pcs


thumb


Resources

Download the code and libraries:

https://fs.keyestudio.com/KS0254


Get One Now