Difference between revisions of "Maduino Zero SIM800C"

From MakerFabsWiki
Jump to: navigation, search
(GSM Connectivity)
(GSM Connectivity)
Line 61: Line 61:
 
==Usage==
 
==Usage==
  
===GSM Connectivity===
+
===GPRS/GSM test===
With the Maduino Zero SIM800C, users can create IOT projects such as remote controlling. The following simple application is using the SIM800C to surfing the internet website, only with the 2G GSM connectivity that you can do many intersting IOT things.<br>  
+
SIM800C is a GPRS/GSM Quad-band module, with this board, we can use it as a data acquisition, remote control and a lot of IOT project or smart home project.<br>
 +
 
 
1.Insert a Micro SIM card<br>
 
1.Insert a Micro SIM card<br>
The MaduinoZero SIM800C board uses the micro SIM card that is widely used in Android phone, insert the Micro SIM card to the holder as below picture.<br>
+
The Maduino Zero SIM800C board uses the micro SIM card that is widely used in Android phone, install the Micro SIM card to the holder as below picture.<br>
[[File:Maduino Zero SIM800C 01.JPG|500px]]<br>
+
[[File:Maduino_Zero SIM800C_03.png|700px]]<br>
Note that some fee maybe needed for each SMS depends on your local GSM Operator, make sure that the SIM Card is active and enough money left for this application.  
+
Note that some fee maybe needed for each SMS depends on your local GSM Operator, make sure that the SIM Card is active and enough money left for this application.<br>
 +
2.Connect the GSM Antenna and the 3.7V battery<br>
 +
[[File:Maduino Zero SIM800C_04.PNG|700px]]<br>
 +
3.Programming and Download<br>
 +
[[File:Maduino Zero SIM800C_05.PNG|700px]]<br>
 +
The Codes for this application is very simple, define the SIM800C Power control pins:
 +
<pre>
 +
//define the power control pin of SIM808:
 +
int POWER_KEY=9; //D9: power on/off
 +
</pre>
 +
Connect to GPRS/GSM network
 +
<pre>
 +
sendData("AT+CGATT=1", 1000, DEBUG);
 +
</pre>
 +
Initialize HTTP Service
 +
<pre>
 +
sendData("AT+HTTPINIT", 1000, DEBUG);
 +
</pre>
 +
Set HTTP parameters value
 +
<pre>
 +
sendData("AT+HTTPPARA=\"URL\",\"http://api.thingspeak.com/update?api_key=OTI5YUPI0PALJR3F&field1=25.6&field2=78.5\"", 1000, DEBUG);
 +
</pre>
 +
POST the data that set in command "AT+HTTPPARA"
 +
<pre>
 +
sendData("AT+HTTPACTION=1", 1000, DEBUG);//HTTP POST success if get responce: +HTTPACTION: 1,200,0
 +
</pre>
  
2.Connect the GSM Antenna and the 3.7V battery<br>
+
Select the right port and Arduino board: Arduino Zero(Native USB Port) to upload the firmware to Maduino Zero SIM808 GPS board<br>
[[File:Maduino Zero SIM800C 02.JPG|500px]]<br>
+
[[File:Maduino Zero SIM800C_01D.PNG|500px]]<br>
3.This sample we just show how to get a webpage, so we needn't any module to Maduino Zero SIM800C.<br>
+
4.Test Result<br>
 +
Open the link: https://thingspeak.com/channels/825092  it will show the data as below:<br>
 +
[[File:Maduino_Zero_SIM800C_05.png|700px]]<br>
  
4.Programming and Download<br>
+
Open the Serial Toolwe can see the los:<br>
Select the right Arduino board: Arduino/Genuino Zero(Native USB port) and right port to upload the firmware to Maduino Zero SIM800C boards<br>
+
[[File:Maduino_Zero_SIM800C_07A.png|700px]]<br>
[[File:Maduino Zero SIM800C_01.jpg]]<br>
 
  
5.Test Result<br>
+
Note: AT Command:
You can send SMS to Maduino Zero SIM800C board to control the LED On/Off now. After getting the SMS, the Maduino Zero SIM800C will check the SMS firstly, and then turn On/Off the related LED Color with the commands:<br>
+
<pre>
[[File:Maduino Zero SIM800C 05.JPG|500px]]<br>
+
AT+SAPBR=3,1,"CONTYPE","GPRS"  //
 +
AT+SAPBR=3,1,"APN","CMNET"
 +
AT+SAPBR=1,1
 +
AT+HTTPINIT
 +
AT+HTTPPARA="URL","http://api.thingspeak.com/update?api_key=OTI5YUPI0PALJR3F&field1=22.6&field2=73.8"
 +
AT+HTTPACTION=1
 +
AT+HTTPREAD
 +
AT+HTTPTERM //Terminal the HTTP
 +
</pre>
 +
More details you can refer to the document ''SIM800 Series_AT Command Manual.pdf''.
  
 
=== GPRS Connectivity===
 
=== GPRS Connectivity===

Revision as of 02:15, 20 July 2019

Warning:this page in progress, not completed yet

Introduction

Maduino Zero SIM800C is a one-stop solution for IOT (Internet of Things) projects, it integrate a micro Controller SAMD21G18A-AU, GRRS/GSM module SIM800C, on-board power management and storage, to make the Maduino Zero SIM800C ready for real project for IOT projects such as smart-home, outdoor monitoring, shared bicycle, etc. The GRPS/GSM module A6 support quad-band 850/900/1800/1900MHz, that covers any GSM network, after inserting a SIM card, then you will able to use the SMS/GPRS service of Cellular connectivity.
The Maduino Zero SIM800C based on the Arduino, users can program it with Arduino IDE, which is very easy especially suit for the none-programmers. There are also detailed guide for users to learn how to create the first IOT project with Maduino Zero SIM800C board, with which the starters can learn the hardware and programming skill quickly.

Model: OAC800SIM
500px

Features

  • Powered by lithium battery 3.4-4.2V or USB(5V)
  • SAMD21G18A: 32-bit ARM® Cortex®-M0 up to 48MHz, 256KB flash, 32KB SRAM, LQFP48
  • Integrated Power Control System
  • Quad-band: 850/900/1800/1900Mz
  • Interface: I2C/SPI/UART/ADC/DAC/I2S/38*GPIO
  • Arduino Compatible
  • Working Temperature: -20 ~ +85℃
  • Default baud rate: 115200bps
  • Size: 40*55mm

Interface Function

700px
①PWR: Power Indicator
②CHG: Charge Status Indicator
③VBAT: Lipo Battery Connector
④CHG: 5V power Input Connector, connect to the solar panel to charge the battery.
⑤Micro USB: 5V Power Input, USB to serial Communication
⑥RESET: Reset Button for SAMD21G18A-AU
⑦Serial Port Select:
D0&D1: Hardware serial port;
⑧A6 Serial Port for Firmware Updates
⑨GSM: Antenna IPX Connector

700px

①Micro SIM Card Holder
②Micro SD Card Holder

Pins usage on Arduino

  • D0 – RX from SIM800C (Hardware Serial Communication Selected)
  • D1 – TX to SIM800C (Hardware Serial Communication Selected)
  • D2 - Unused
  • D3 - Unused
  • D4 - SD Card CS PIN(active Low)
  • D5 - connect to SIM800C UART1_DTR
  • D6 - Unused
  • D7 - Unused
  • D8 - Unused
  • D9 - Power ON Control of SIM800C (active High)
  • D10 - Unused
  • D11 - Unused
  • D12 - Unused
  • D13 - Unused
  • D14(A0) - Unused
  • D15(A1) - Unused
  • D16(A2) - Unused
  • D17(A3) - Unused
  • D18(A4) - Unused
  • D19(A5) – Unused

Usage

GPRS/GSM test

SIM800C is a GPRS/GSM Quad-band module, with this board, we can use it as a data acquisition, remote control and a lot of IOT project or smart home project.

1.Insert a Micro SIM card
The Maduino Zero SIM800C board uses the micro SIM card that is widely used in Android phone, install the Micro SIM card to the holder as below picture.
Maduino Zero SIM800C 03.png
Note that some fee maybe needed for each SMS depends on your local GSM Operator, make sure that the SIM Card is active and enough money left for this application.
2.Connect the GSM Antenna and the 3.7V battery
Maduino Zero SIM800C 04.PNG
3.Programming and Download
700px
The Codes for this application is very simple, define the SIM800C Power control pins:

//define the power control pin of SIM808:
int POWER_KEY=9; //D9: power on/off

Connect to GPRS/GSM network

sendData("AT+CGATT=1", 1000, DEBUG);

Initialize HTTP Service

sendData("AT+HTTPINIT", 1000, DEBUG);

Set HTTP parameters value

sendData("AT+HTTPPARA=\"URL\",\"http://api.thingspeak.com/update?api_key=OTI5YUPI0PALJR3F&field1=25.6&field2=78.5\"", 1000, DEBUG);

POST the data that set in command "AT+HTTPPARA"

sendData("AT+HTTPACTION=1", 1000, DEBUG);//HTTP POST success if get responce: +HTTPACTION: 1,200,0

Select the right port and Arduino board: Arduino Zero(Native USB Port) to upload the firmware to Maduino Zero SIM808 GPS board
Maduino Zero SIM800C 01D.PNG
4.Test Result
Open the link: https://thingspeak.com/channels/825092 it will show the data as below:
Maduino Zero SIM800C 05.png

Open the Serial Toolwe can see the los:
Maduino Zero SIM800C 07A.png

Note: AT Command:

AT+SAPBR=3,1,"CONTYPE","GPRS"  //
AT+SAPBR=3,1,"APN","CMNET"
AT+SAPBR=1,1
AT+HTTPINIT
AT+HTTPPARA="URL","http://api.thingspeak.com/update?api_key=OTI5YUPI0PALJR3F&field1=22.6&field2=73.8"
AT+HTTPACTION=1
AT+HTTPREAD
AT+HTTPTERM //Terminal the HTTP

More details you can refer to the document SIM800 Series_AT Command Manual.pdf.

GPRS Connectivity

Of course the Maduino Zero SIM800C can be capable of the GPRS connectivity for Internet, to upload/download data with internet. The following simple example shows the starters how to access a website on the internet (Users need check the AT commands for how to access an website):

  sendData("AT+CCID",3000,DEBUG); 
  sendData("AT+CREG?",3000,DEBUG);     
  sendData("AT+CGATT=1",1000,DEBUG);
  sendData("AT+CGDCONT=1,\"IP\",\"CMNET\"",1000,DEBUG);
  sendData("AT+CGACT=1,1",1000,DEBUG);
  //**************Open internet connection*************************  
  sendData("AT+CGATT=1",1000,DEBUG);
  delay(2000); 
  sendData("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"", 1000, DEBUG);
  sendData("AT+SAPBR=3,1,\"APN\",\"CMNET\"", 1000, DEBUG);
  sendData("AT+SAPBR=1,1", 1000, DEBUG);
  
  //***************************************************************
   sendData("AT+HTTPINIT", 1000, DEBUG);//initalize HTTP Service

  sendData("AT+HTTPPARA=\"URL\",\"http://api.thingspeak.com/update?api_key=OTI5YUPI0PALJR3F&field1=25.2&field2=67.5\"", 1000, DEBUG);

  sendData("AT+HTTPACTION=1", 1000, DEBUG);//0 get, 1 post, 2 head

If the GPRS service accessible, the Maduino board post data to the site, you can view https://thingspeak.com/channels/825092 as below:
Maduino Zero SIM800C 05.png

Note: AT Command:

AT
AT+CCID   //Show CCID, you can check weather the SIM card is ok
AT+CIMI  //
AT+CGATT=1  //Attach to GPRS service
AT+GSV  //
AT+CREG?
AT+CGREG?
AT+CSQ
AT+COPS=?


More details you can refer to the document SIM800 Series_AT Command Manual_V1.09.pdf.

FAQ

You can list you question here or contact with support@makerfabs.com for technology support.

Resources