GPRS GSM GPS Shield (AI- A7)

From MakerFabsWiki
Jump to: navigation, search

Introduction

This GPRS/GSM/GPS Shield based on Ai-think A7 module, which is a newest GSM GRPS+GPS Quad-Band module. This Shield integrated these necessary functions for you to build an outdoor or mobile application, such as mobile tracker, cargo monitoring. The Shield is controlled via AT commands, and fully compatible with Arduino/Maduino.

Model: OAS0000A7
GPRS GSM GPS Shield (AI- A7).jpg

Features

  • Support the GSM / GPRS four bands, including 850,900,1800,1900MHZ
  • Support GPS and AGPS
  • Support digital audio and analog audio support for HR, FR, EFR, AMR speech coding
  • Support GPRS data traffic, the maximum data rate, download 85.6Kbps, upload 42.8Kbps
  • Support SMS text messaging
  • Support voice calls

Interface Function

GPRS GSM GPS Shield (AI- A7) 2.JPG GPRS GSM GPS Shield (AI- A7) 3.JPG

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!
  • 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.

LEDs

  • PWR –Power light
  • Status – Power on status. Lit when the Cell module is booted and running

POWER_KEY

  • PON Power on the A7.
  • POFF Power off the A7.

Pins usage on Arduino

  • D0 - Used if you select hardware serial port to communicate with A7
  • D1 - Used if you select hardware serial port to communicate with A7
  • D7 - Used if you select software serial port to communicate with A7
  • D8 - Used if you select software serial port to communicate with A7
  • D2 - Used for software control the LOW POWER model of the A7
  • D3 - Used for software control the Power ON of the A7
  • D9 - Used for software control the Power OFF of the A7

Usage

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.
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.

Assembly

1.Attaching Antennas: GSM antenna is required to use the Cellular module. If you want to use GPS as well, a passive GPS antenna is also required.
2.SIM Card:
Insert a mini SIM card(GPS does work without a SIM)
3.Connect the headset to the headset jack.(when you make a call you may need to use it)
4.Plug to Arduino or Maduino, connect the USB to the PC.
GPRS GSM GPS Shield (AI- A7) USB.jpg
Power on the A7 shield by the PON( sometime you can control it by the software control ( Arduino D9 PIN))

Load Demo

Print the GPS data with serial port

Open up File: A7_Get_GPS_Info.ino and upload to your Arduino wired up to the module.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(7, 8);
#include<stdio.h>
#include<string.h>
#define DEBUG true
 
void setup()
{
  Serial.begin(9600);
  mySerial.begin(9600);
  delay(1000);
  int pon=3;
  int poff=9;
  int lowp=2;
  pinMode(pon, OUTPUT);
  pinMode(poff, OUTPUT);
  pinMode(lowp, OUTPUT);
  digitalWrite(poff, LOW);
  digitalWrite(lowp, HIGH);   
  digitalWrite(pon, HIGH);
  delay(3000); 
  digitalWrite(pon, LOW);
  delay(1000); 
  baudrate();
  Serial.println("After 3s, test begin!!");
  delay(3000);
  sendData("AT+GPS=1 ",1000,DEBUG);
}

void loop()
{
   sendData("AT+GPSRD=1",1000,DEBUG);
   delay(1000);
   sendData("AT+GPSRD=0",1000,DEBUG);
}
void baudrate()
{
      int i=0;
      for(i=0;i<10;i++)
      {
           String msg = String("");
           msg=sendData("AT",1000,DEBUG);
           if( msg.indexOf("ok") >= 0 ){
              return;
           }
      }
}

String sendData(String command, const int timeout, boolean debug)
{
    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;
}

GPRS GSM GPS Shield (AI- A7) CODE.jpg

Once uploaded to your Arduino, open up the serial console at 9600 baud speed to show the test result:
GPRS GSM GPS Shield (AI- A7)) RESULT.jpg

FAQ

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

Resources