Difference between revisions of "Maduino GPRS A6"

From MakerFabsWiki
Jump to: navigation, search
(Introduction)
(Introduction)
 
(11 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
Maduino GPRS A6 is a one-stop solution for IOT (Internet of Things) projects, it integrate a micro Controller Atmega 328, GRRS/GSM module A6, on-board power management and storage, to make the Maduino GPRS A6 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.<br>
+
Maduino GPRS A6 is a one-stop solution for IoT (Internet of Things) projects, it integrates a micro Controller Atmega 328, GRRS/GSM module A6, on-board power management and storage, to make the Maduino GPRS A6 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.<br>
The Maduino GPRS A6 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 GPRS A6 board, with which the starters can learn the hardware and programming skill quickly.
+
The Maduino GPRS A6 based on the Arduino, users can program it with Arduino IDE, which is very easy especially suit for the none-programmers. There is also detailed guide for users to learn how to create the first IoT project with Maduino GPRS A6 board, with which the starters can learn the hardware and programming skills quickly.
  
'''Model: [https://www.makerfabs.com/index.php?route=product/product&path=90_117_119&product_id=420 OAC000MA6]'''<br>
+
'''Model: [https://www.makerfabs.com/maduino-gprs-a6.html OAC000MA6]'''<br>
 
[[File:Maduino GPRS A6.jpg|500px]]
 
[[File:Maduino GPRS A6.jpg|500px]]
  
Line 18: Line 18:
  
 
== Interface Function ==
 
== Interface Function ==
[[File:GPRS GSM GPS Shield (SIMCOME- SIM808)_2.JPG|500px]]
+
[[File:Maduino GPRS A6_1.JPG|700px]]<br>
[[File:GPRS GSM GPS Shield (SIMCOME- SIM808)_3.JPG|500px]]
+
①PWR: Power Indicator<br>
 +
②CHG: Charge Status Indicator<br>
 +
③VBAT: Lipo Battery Connector<br>
 +
④CHG: 5V power Input Connector, connect to the solar panel to charge the battery.<br>
 +
⑤Micro USB: 5V Power Input, USB to serial Communication<br>
 +
⑥RESET: Reset Button for ATmega 328<br>
 +
⑦Serial Port Select: <br>
 +
D0&D1: Hardware serial port; <br>
 +
D7&D8: Software serial port;<br>
 +
⑧A6 Serial Port for Firmware Updates<br>
 +
⑨GSM: Antenna IPX Connector<br>
 +
 
 +
[[File:Maduino GPRS A6_2.JPG|700px]]<br>
 +
 
 +
①Micro SIM Card Holder<br>
 +
②Micro SD Card Holder<br>
  
Connectors:
 
*Headset jack-This is a 'standard' TRRS 3.5mm phone headset jack with stereo earphone and mono microphone. Any 'iPhone' or 'Android' compatible (but not iPhone original) should work.
 
*uFL GSM connector-This is the GSM Antenna connector, an antenna is required to use the SIM808 shield!
 
*uFL GPS connector-This is the GPS Antenna connector, an antenna is required if you want to get GPS readings!
 
*uFL BT connector- This is the Bluetooth Antenna connector, in this version, there no have the Bluetooth function.
 
*SIM Connector:A 2G Mini SIM card is required to use the module. You can buy it in any cell phone shop. It must be a 2G GSM card.
 
*VRTC Battery holder:Power supply for RTC.
 
LEDs
 
*PWR –Power light
 
*1PPS –This is the 'pulse per second' output of the GPS
 
*Status – Power on status. Lit when the Cell module is booted and running
 
*NetLight – Network status. You can use this for checking the current state without sending an AT command
 
*64ms on, 800ms off - the module is running but hasn't made connection to the cellular network yet
 
*64ms on, 3 seconds off - the module has made contact with the cellular network and can send/receive voice and SMS
 
*64ms on, 300ms off - the GPRS data connection you requested is active
 
By watching the blinks you can get a visual feedback on whats going on.
 
POWER_KEY
 
*Power on or power off the SIM808.
 
 
Pins usage on Arduino
 
Pins usage on Arduino
*D0 - Used if you select hardware serial port to communicate with SIM808
+
*D0 – RX from A6 (Hardware Serial Communication Selected)
*D1 - Used if you select hardware serial port to communicate with SIM808
+
*D1 – TX to A6 (Hardware Serial Communication Selected)
*D7 - Used if you select software serial port to communicate with SIM808
+
*D2 - Unused
*D8 - Used if you select software serial port to communicate with SIM808
+
*D3 - Unused
*D9 - Used for software control the Power ON or Power OFF of the SIM808
+
*D4 - SD Card CS PIN
===Usage===
+
*D5 - Low-Power Mode Control of A6 (Low active)
On its own, this shield can't do anything. It requires a microcontroller like an Arduino to drive it! You will also need some required accessories to make SIM808 shield work.<br>
+
*D6 - Power OFF Control of A6 (High active)
SIM Card! A 2G Mini SIM card is required to do anything on the cellular network. US AT&T no longer sells 2G SIMs and will shut off their 2G network, so for American customers we recommend any T-Mobile or reseller (TING, SIMPLE mobile, etc) that uses the T-Mobile network.
+
*D7 - RX From A6 (Software Serial Communication Selected)
==Assembly==
+
*D8 - TX to A6 (Software Serial Communication Selected)
Attaching Antennas:
+
*D9 - Power ON Control of A6 (High active)
GSM antenna is required to use the Cellular module. If you want to use GPS as well, a passive GPS antenna is also required.<br>
+
*D10 - Unused
[[File:GPRS GSM GPS Shield (SIMCOME- SIM808) ANT.jpg|1000px]]<br>
+
*D11 - Unused
SIM Card:<br>
+
*D12 - Unused
Insert a mini SIM card(GPS does work without a SIM)<br>
+
*D13 - Unused
[[File:GPRS GSM GPS Shield (SIMCOME- SIM808) SIM.jpg|1000px]]<br>
+
*D14(A0) - Unused
[[File:GPRS GSM GPS Shield (SIMCOME- SIM808) SIM1.jpg|1000px]]<br>
+
*D15(A1) - Unused
Connect the headset to the headset jack.(when you make a call you may need to use it)<br>
+
*D16(A2) - Unused
[[File:GPRS GSM GPS Shield (SIMCOME- SIM808) HEA.jpg|1000px]]<br>
+
*D17(A3) - Unused
Plug to Arduino or Maduino, connect the USB to the PC.<br>
+
*D18(A4) - Unused
[[File:GPRS GSM GPS Shield (SIMCOME- SIM808) USB.jpg|1000px]]<br>
+
*D19(A5) – Unused
Power on the SIM808 shield by the POWER_KEY ( sometime you can control it by the software control ( Arduino D9 PIN))<br>
 
  
==Load Demo==
+
==Usage==
=== Print the GPS(GNSS) data with serial port ===
+
 
Open up File: SIM808 Get GPS.ino and upload to your Arduino wired up to the module.
+
===GSM Connectivity===
<pre>
+
With the Maduino GPRS A6, users can create IOT projects such as remote controlling. The following simple application is using the SMS to control a RGB LED, it would be convenient for remote controlling without any internet, only with the 2G GSM connectivity that you can control hardware remotely.<br>  
#include <SoftwareSerial.h>
+
1.Insert a Micro SIM card<br>
#include<stdio.h>
+
The Maduino GPRS A6 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>
#include<string.h>
+
[[File:Maduino GPRS A6_6.JPG|500px]]<br>
#define DEBUG true
+
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.
  
SoftwareSerial mySerial(7,8);       
+
2.Connect the GSM Antenna and the 3.7V battery<br>
void setup()
+
[[File:Maduino GPRS A6_7.JPG|500px]]<br>
{
+
3.Connect the module that you want to control by Maduino A6.<br>
   Serial.begin(9600);
+
Connect an RGB LED module to the Maduino GPRS A6 as the following connection:<br>
   mySerial.begin(9600);
+
RGB LED Module-----Maduino GPRS A6<br>
}
+
  V-----Vbat
 +
  R------D2
 +
   G-----D3
 +
   B-----D4<br>
 +
[[File:Maduino GPRS A6_9.JPG|500px]]<br>
 +
Actually you can connect plenty of other modules that can be controlled by the simple On/Off Commands. For Example, a Relay can be connected, to control the AC110V or 220V connectivity, and a DC motor can be connected and controlled, to created Automatic agriculture applications.<br>
  
void loop()
+
4.Programming and Download<br>
{
+
The Codes for this application is simple, firstly, define the control pins: (Demo Code Download)<br>
  getgps();
+
<pre>
  while(1)
+
//define the RGB LED connection to the Maduino GRPS A6:
  {
+
int LED_R = 2;
        sendData( "AT+CGNSINF",1000,DEBUG); 
+
int LED_G = 3;
        delay(1000);    
+
int LED_B= 4;
  }
+
</pre>
 +
When some characters are received, turn on/off the related LED color:<br>
 +
<pre>
 +
SerialInByte = (unsigned char)mySerial.read();
 +
if( SerialInByte == 13 )// if some charactors are received from the A6;
 +
{  
 +
ProcessGprsMsg();  
 
}
 
}
void getgps(void)
+
</pre>
 +
Turn On/Off t the LED, depends on the charactor received: ( Note that the RGB LED is Low active)
 +
<pre>
 +
void ProcessSms( String sms )
 
{
 
{
  sendData( "AT+CGNSPWR=1",1000,DEBUG);  
+
  Serial.print( "ProcessSms for [" );
  sendData( "AT+CGNSSEQ=RMC",1000,DEBUG);  
+
  Serial.print( sms );
 +
  Serial.println( "]" );
 +
  if( sms.indexOf("onr") >= 0 ){  //If “onr“ receoved
 +
    digitalWrite(LED_R, LOW); // Turn On the Red Color
 +
    Serial.println( "LED Red ON" );
 +
  }
 +
  if( sms.indexOf("ong") >= 0 ){
 +
    digitalWrite( LED_G, LOW);// Turn Off the Green Color
 +
    Serial.println( "LED Green ON" );
 +
  }
 +
    if( sms.indexOf("onb") >= 0 ){
 +
    digitalWrite(LED_B, LOW);
 +
    Serial.println( "LED Blue ON" );//Turn On the Blue Color
 +
  }
 +
    if( sms.indexOf("offr") >= 0 ){
 +
        digitalWrite( LED_R,HIGH);//Turn Off the Red Color
 +
    Serial.println( "LED Red OFF" );
 +
  }
 +
  if( sms.indexOf("offg") >= 0 ){
 +
    digitalWrite(LED_G, HIGH ); //Turn Off the Green Color
 +
    Serial.println( "LED Green OFF" );
 +
  }
 +
    if( sms.indexOf("offb") >= 0 ){
 +
    digitalWrite(LED_B, HIGH ); //Turn Off the Blue Color
 +
    Serial.println( "LED Blue OFF" );
 +
  }
 
}
 
}
 +
</pre>
 +
Select the right port and Arduino board: Arduino pro mini 3.3V 8MHz to upload the firmware to Maduino GPRS A6 boards<br>
 +
[[File:Maduino GPRS A6_10.JPG|500px]]<br>
 +
5.Test Result<br>
 +
You can send SMS to Maduino GPRS A6 board to control the LED On/Off now. After getting the SMS, the Maduino A6 will check the SMS firstly, and then turn On/Off the related LED Color with the commands:<br>
 +
[[File:Maduino GPRS A6_11.JPG|500px]]<br>
  
String sendData(String command, const int timeout, boolean debug)
+
=== GPRS Connectivity===
{
 
    String response = "";   
 
    mySerial.println(command);
 
    long int time = millis(); 
 
    while( (time+timeout) > millis())
 
    {
 
      while(mySerial.available())
 
      {     
 
        char c = mySerial.read();
 
        response+=c;
 
      } 
 
    }   
 
    if(debug)
 
    {
 
      Serial.print(response);
 
    }   
 
    return response;
 
}
 
  
 +
Of course the Maduino GPRS A6 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):
 +
<pre>
 +
    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);
 +
    sendData("AT+CIPSTART=\"TCP\",\"gtech.co\",80",3000,DEBUG);
 +
    sendData("AT+CIPSEND=80",1000,DEBUG);
 +
    sendData("GET http://gtech.co/gtech.php?hello HTTP/1.0\r\n HOST:gtech.co\r\n\r\n",100,DEBUG);
 +
    delay(10000);
 +
    sendData("AT+CIPCLOSE ",1000,DEBUG);
 
</pre>
 
</pre>
[[File:GPRS GSM GPS Shield (SIMCOME- SIM808) CODE.jpg|600px]]<br>
+
If the GPRS service accessible, the Maduino board get data from the site, you can check the serial output debug info as:<br>
 
+
[[File:Maduino GPRS A6_12.JPG|500px]]<br>
Once uploaded to your Arduino, open up the serial console at 9600 baud speed to show the test result:<br>
+
Then you can upload/download related data from the site to create remote data acquisition or remote controlling.
[[File:GPRS GSM GPS Shield (SIMCOME- SIM808) RESULT.jpg|600px]]<br>
 
  
 
== FAQ  ==
 
== FAQ  ==
Line 123: Line 157:
  
 
== Resources ==
 
== Resources ==
*[http://makerfabs.com/wiki/index.php?title=File:GPRS_GSMGPS_Shield_(SIMCOME-_SIM808)_v1.0.pdf Schematic]
+
*[http://makerfabs.com/wiki/index.php?title=File:Maduino_GPRS_A6_Demo_Code.zip Demo code]
*[http://makerfabs.com/wiki/index.php?title=File:SIM800_Series_AT_Command_Manual_V1.09.pdf SIM800 Series_AT Command Manual]
 
*[http://makerfabs.com/wiki/index.php?title=File:SIM800_Series_GNSS_Application_Note_V1.00.pdf SIM800 Series_GNSS_Application Note]
 
*[http://makerfabs.com/wiki/index.php?title=File:sim808_get_GPS.zip Demo code]
 

Latest revision as of 06:03, 17 October 2019

Introduction

Maduino GPRS A6 is a one-stop solution for IoT (Internet of Things) projects, it integrates a micro Controller Atmega 328, GRRS/GSM module A6, on-board power management and storage, to make the Maduino GPRS A6 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 GPRS A6 based on the Arduino, users can program it with Arduino IDE, which is very easy especially suit for the none-programmers. There is also detailed guide for users to learn how to create the first IoT project with Maduino GPRS A6 board, with which the starters can learn the hardware and programming skills quickly.

Model: OAC000MA6
Maduino GPRS A6.jpg

Features

  • Powered by lithium battery 3.4-4.2V or USB
  • ATmega328: 8MHz, 32KB flash, 2KB SRAM
  • Integrated Power Control System
  • Quad-band: 850/900/1800/1900Mz
  • Interface: I2C/SPI/UART/18*GPIO
  • Arduino Compatible
  • Working Temperature: -20 – 85℃
  • Default baud rate: 115200
  • Size: 40*55mm

Interface Function

Maduino GPRS A6 1.JPG
①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 ATmega 328
⑦Serial Port Select:
D0&D1: Hardware serial port;
D7&D8: Software serial port;
⑧A6 Serial Port for Firmware Updates
⑨GSM: Antenna IPX Connector

Maduino GPRS A6 2.JPG

①Micro SIM Card Holder
②Micro SD Card Holder

Pins usage on Arduino

  • D0 – RX from A6 (Hardware Serial Communication Selected)
  • D1 – TX to A6 (Hardware Serial Communication Selected)
  • D2 - Unused
  • D3 - Unused
  • D4 - SD Card CS PIN
  • D5 - Low-Power Mode Control of A6 (Low active)
  • D6 - Power OFF Control of A6 (High active)
  • D7 - RX From A6 (Software Serial Communication Selected)
  • D8 - TX to A6 (Software Serial Communication Selected)
  • D9 - Power ON Control of A6 (High active)
  • 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

GSM Connectivity

With the Maduino GPRS A6, users can create IOT projects such as remote controlling. The following simple application is using the SMS to control a RGB LED, it would be convenient for remote controlling without any internet, only with the 2G GSM connectivity that you can control hardware remotely.
1.Insert a Micro SIM card
The Maduino GPRS A6 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 GPRS A6 6.JPG
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 GPRS A6 7.JPG
3.Connect the module that you want to control by Maduino A6.
Connect an RGB LED module to the Maduino GPRS A6 as the following connection:
RGB LED Module-----Maduino GPRS A6

 V-----Vbat
 R------D2
 G-----D3
 B-----D4

Maduino GPRS A6 9.JPG
Actually you can connect plenty of other modules that can be controlled by the simple On/Off Commands. For Example, a Relay can be connected, to control the AC110V or 220V connectivity, and a DC motor can be connected and controlled, to created Automatic agriculture applications.

4.Programming and Download
The Codes for this application is simple, firstly, define the control pins: (Demo Code Download)

//define the RGB LED connection to the Maduino GRPS A6:
int LED_R = 2;
int LED_G = 3;
int LED_B= 4;

When some characters are received, turn on/off the related LED color:

SerialInByte = (unsigned char)mySerial.read();
if( SerialInByte == 13 )// if some charactors are received from the A6;
{ 
ProcessGprsMsg(); 
}

Turn On/Off t the LED, depends on the charactor received: ( Note that the RGB LED is Low active)

void ProcessSms( String sms )
{
  Serial.print( "ProcessSms for [" );
  Serial.print( sms );
  Serial.println( "]" ); 
  if( sms.indexOf("onr") >= 0 ){  //If “onr“ receoved
    digitalWrite(LED_R, LOW); // Turn On the Red Color
    Serial.println( "LED Red ON" );
  }
  if( sms.indexOf("ong") >= 0 ){
    digitalWrite( LED_G, LOW);// Turn Off the Green Color
    Serial.println( "LED Green ON" );
  }
    if( sms.indexOf("onb") >= 0 ){
    digitalWrite(LED_B, LOW);
    Serial.println( "LED Blue ON" );//Turn On the Blue Color
  }
    if( sms.indexOf("offr") >= 0 ){
        digitalWrite( LED_R,HIGH);//Turn Off the Red Color
    Serial.println( "LED Red OFF" );
  }
  if( sms.indexOf("offg") >= 0 ){
    digitalWrite(LED_G, HIGH ); //Turn Off the Green Color
    Serial.println( "LED Green OFF" );
  }
    if( sms.indexOf("offb") >= 0 ){
    digitalWrite(LED_B, HIGH ); //Turn Off the Blue Color
    Serial.println( "LED Blue OFF" );
  }
}

Select the right port and Arduino board: Arduino pro mini 3.3V 8MHz to upload the firmware to Maduino GPRS A6 boards
Maduino GPRS A6 10.JPG
5.Test Result
You can send SMS to Maduino GPRS A6 board to control the LED On/Off now. After getting the SMS, the Maduino A6 will check the SMS firstly, and then turn On/Off the related LED Color with the commands:
Maduino GPRS A6 11.JPG

GPRS Connectivity

Of course the Maduino GPRS A6 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);
     sendData("AT+CIPSTART=\"TCP\",\"gtech.co\",80",3000,DEBUG);
     sendData("AT+CIPSEND=80",1000,DEBUG);
     sendData("GET http://gtech.co/gtech.php?hello HTTP/1.0\r\n HOST:gtech.co\r\n\r\n",100,DEBUG);
     delay(10000);
     sendData("AT+CIPCLOSE ",1000,DEBUG);

If the GPRS service accessible, the Maduino board get data from the site, you can check the serial output debug info as:
Maduino GPRS A6 12.JPG
Then you can upload/download related data from the site to create remote data acquisition or remote controlling.

FAQ

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

Resources