Difference between revisions of "Maduino SIM808 GPS Tracker"

From MakerFabsWiki
Jump to: navigation, search
(Interface Function)
(Introduction)
 
(11 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
SIM808 GPS Tracker is an IOT (Internet of things) Solution based on the ATmega328 and GPRS/GSM GPS module SIM808. it intergrate a micro Controller Atmega 328, GRRS/GSM module SIM808, which is the upgrade version of SIM900, power management and storage, to make the SIM808 GPS Tracker ready for real project for IOT projects such as smart-home, outdoor monitoring, shared bicycle, etc.<br>
+
SIM808 GPS Tracker is an IoT (Internet of things) Solution based on the ATmega328 and GPRS/GSM GPS module SIM808. it integrates a micro Controller Atmega 328, GRRS/GSM module SIM808, which is the upgrade version of SIM900, power management and storage, to make the SIM808 GPS Tracker ready for a real project for IoT projects such as smart-home, outdoor monitoring, shared bicycle, etc.<br>
The SIM808 GPS Tracker based on the Arduino, users can program it with Arduino IDE, which is very easy especially suit for the none-programmers. There are also guide for users to learn how to create the first IOT project with this board, with which the starters can learn the hardware and programming skill quickly.<br>
+
The SIM808 GPS Tracker based on the Arduino, users can program it with Arduino IDE, which is very easy especially suit for the none-programmers. There are also guide for users to learn how to create the first IoT project with this board, with which the starters can learn the hardware and programming skill quickly.<br>
  
'''Model: [https://www.makerfabs.com/index.php?route=product/product&path=90_117_119&product_id=421 OAC808SIM]'''<br>
+
'''Model: [https://www.makerfabs.com/maduino-sim808-gps-tracker.html OAC808SIM]'''<br>
[[File:Maduino GPRS GPS A7.jpg|500px]]
+
[[File:SIM808 GPS Tracker.jpg|500px]]
  
 
== Features ==
 
== Features ==
Line 37: Line 37:
 
⑧GPS: GPS Antenna IPX Interface<br>
 
⑧GPS: GPS Antenna IPX Interface<br>
  
[[File:Maduino GPRS A7_2.JPG|700px]]<br>
+
[[File:SIM808 GPS Tracker_2.JPG|700px]]<br>
  
 
①Micro SIM Card Holder<br>
 
①Micro SIM Card Holder<br>
Line 43: Line 43:
  
 
Pins usage on Arduino
 
Pins usage on Arduino
*D0 RX from A7 (Hardware Serial Communication Selected)
+
*D0 - RX from SIM808 (Hardware Serial Communication Selected)
*D1 TX to A7 (Hardware Serial Communication Selected)
+
*D1 - TX to SIM808 (Hardware Serial Communication Selected)
 
*D2 - Unused
 
*D2 - Unused
 
*D3 - Unused
 
*D3 - Unused
 
*D4 - SD Card CS PIN
 
*D4 - SD Card CS PIN
*D5 - Low-Power Mode Control of A6 (Low active)
+
*D5 - Unused
*D6 - Power OFF Control of A7 (High active)
+
*D6 - Unused
*D7 - RX From A7 (Software Serial Communication Selected)
+
*D7 - RX from SIM808 (Software Serial Communication Selected)
*D8 - TX to A7 (Software Serial Communication Selected)
+
*D8 - TX to SIM808 (Software Serial Communication Selected)
*D9 - Power ON Control of A7 (High active)
+
*D9 - Power ON/OFF Control of SIM808 (High active)
 
*D10 - Unused
 
*D10 - Unused
 
*D11 - Unused
 
*D11 - Unused
Line 62: Line 62:
 
*D17(A3) - Unused
 
*D17(A3) - Unused
 
*D18(A4) - Unused
 
*D18(A4) - Unused
*D19(A5)– Unused
+
*D19(A5) – Unused
  
 
==Usage==
 
==Usage==
===Get GPS INFO===
+
===[Case one]: GPRS Connectivity===
A7 is a GPRS/GSM+ GPS Quad-band module, with this board, we can use it as a GPS tracker, data acquisition, remote control and a lot of IOT project or smart home project.<br>
+
SIM808 is a GPRS/GSM+ GPS Quad-band module, with this board, user can create IOT project such as data acquisition, remote controlling, GPS tracker and so on. The following simple application is use it as GPS tracker, to get your current location information. You can post your location information to the Google Maps then draw your trip.<br>
A7 add the GPS function compare with A6, so about the GSM/GPRS demo example can refer the Maduino GPRS A7.<br>
 
 
1.Insert a Micro SIM card<br>
 
1.Insert a Micro SIM card<br>
The Maduino GPRS A7 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>
+
The SIM808 GPS Tracker 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 GPRS GPS A7_3.JPG|700px]]<br>
+
[[File:SIM808 GPS Tracker_3.JPG|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.<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. <br>
2.Connect the GSM,GPS Antenna and the 3.7V battery<br>
+
2.Connect the GSM Antenna and the 3.7V battery<br>
[[File:Maduino GPRS GPS A7_4.JPG|700px]]<br>
+
[[File:SIM808 GPS Tracker_4.JPG|700px]]<br>
3.Programming and Download
+
3.Programming and download<br>
The Codes for this application is very simple, firstly, define the Softwareserial communication port and A7 Power control pins: (Demo Code Download)
+
The SIM808 GPS Tracker 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 a website):
 
<pre>
 
<pre>
//define the software serial port
+
    sendData("AT+CCID",3000,DEBUG);  
SoftwareSerial mySerial(7,8);  //D7: Software serial RX  D8: Software serial TX
 
//define the power control pin of A7:
 
int pon=9;  //power on
 
int poff=6;  //power off
 
int lowp=5;  //lower power control
 
</pre>
 
GPS power control
 
<pre>
 
sendData("AT+GPS=1 ",1000,DEBUG);
 
</pre>
 
Get current Location information
 
<pre>
 
sendData("AT+GPSRD=1",1000,DEBUG);
 
delay(1000);
 
sendData("AT+GPSRD=0",1000,DEBUG);
 
</pre>
 
Select the right port and Arduino board: Arduino pro mini 3.3V 8MHz to upload the firmware to Maduino GPRS GPS boards
 
[[File:Maduino GPRS GPS A7_5.JPG|500px]]<br>
 
4.Test Result<br>
 
Open the monitor, it will auto print the GPS Location information, show as below:<br>
 
[[File:Maduino GPRS GPS A7_6.JPG|700px]]<br>
 
Note: AT Command:
 
AT+GPS=1  //open GPS  (NEMA information output from GPS_TXD PIN, but in this board not breakout this pin, please set GPS info output from AT Command serial port)
 
AT+GPS=0  //close GPS
 
AT+GPSRD=N  //NEMA information output N second form serial port
 
AT+GPSRD=0  // Close the GPS information output form serial port
 
 
 
===GPRS Connectivity===
 
The Maduino GPRS GPS A7 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+CREG?",3000,DEBUG);     
 
     sendData("AT+CGATT=1",1000,DEBUG);
 
     sendData("AT+CGATT=1",1000,DEBUG);
    sendData("AT+CGDCONT=1,\"IP\",\"CMNET\"",1000,DEBUG);
 
 
     sendData("AT+CGACT=1,1",1000,DEBUG);
 
     sendData("AT+CGACT=1,1",1000,DEBUG);
     sendData("AT+CIPSTART=\"TCP\",\"gtech.co\",80",3000,DEBUG);
+
     sendData("AT+CSTT=CMNET",3000,DEBUG);
     sendData("AT+CIPSEND=80",1000,DEBUG);
+
    sendData("AT+CIICR",1000,DEBUG);
     sendData("GET http://gtech.co/gtech.php?hello HTTP/1.0\r\n HOST:gtech.co\r\n\r\n",100,DEBUG);
+
    sendData("AT+CIFSR",1000,DEBUG);
 +
    sendData("AT+CDNSGIP=\"www.sim.com\"",1000,DEBUG);
 +
     sendData("AT+CDNSGIP=\"a b c d e f\"",1000,DEBUG);
 +
     sendData("AT+CIPSTART=\"TCP\",\"WWW.SIM.COM\",80",5000,DEBUG);
 
     delay(10000);
 
     delay(10000);
     sendData("AT+CIPCLOSE ",1000,DEBUG);
+
    sendData("AT+CIPSEND=6",1000,DEBUG);
 +
    sendData("123456",1000,DEBUG);
 +
    delay(2000);
 +
     sendData("AT+CIPCLOSE",1000,DEBUG);  
 
</pre>
 
</pre>
[[File:Maduino GPRS GPS A7_7.JPG|700px]]<br>
+
Select the right port and Arduino board: Arduino pro mini 3.3V 8MHz to upload the firmware to SIM808 GPS Tracker boards<br>
 +
[[File:SIM808 GPS Tracker_5.JPG|700px]]<br>
 +
4.Test Result<br>
 
If the GPRS service accessible, the Maduino board get data from the site, you can check the serial output debug info as:<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 GPS A7_8.JPG|700px]]<br>
+
[[File:SIM808 GPS Tracker_6.JPG|700px]]<br>
 +
As shown on the above picture, the SIM808 GPS tracker has connect to the www.sim.com and now you can upload/download the data.
  
==[Case two]: GPRS Connectivity==
+
===[Case two]: Get GPS Location===
  
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):
+
The SIM808 GPS Tracker gets the GPS signal with UART interface, customers can stock the GPS info into the SD card, of send to the internet with the GPRS connectivity:<br>
 +
[[File:SIM808 GPS Tracker_7.JPG|700px]]<br>
 +
GNSS power control<br>
 +
<pre>
 +
void setgps(void)
 +
{
 +
  sendData( "AT+CGNSPWR=1",1000,DEBUG);    //power GNSS
 +
  sendData( "AT+CGNSSEQ=RMC",1000,DEBUG); // define the last NMEA sentence that parsed
 +
}
 +
</pre>
 +
Get current Location information<br>
 
<pre>
 
<pre>
    sendData("AT+CCID",3000,DEBUG);
+
sendData( "AT+CGNSINF",1000,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>
If the GPRS service accessible, the Maduino board get data from the site, you can check the serial output debug info as:<br>
+
Then the SIM808 will report the related GPS into to Atmega328, with the UART interface, you can check the reported GPS info via the Atmega hardware interface:<br>
[[File:Maduino GPRS A6_12.JPG|500px]]<br>
+
[[File:SIM808 GPS Tracker_8.JPG|700px]]<br><br>
Then you can upload/download related data from the site to create remote data acquisition or remote controlling.
 
  
 
== FAQ  ==
 
== FAQ  ==
Line 146: Line 122:
  
 
== Resources ==
 
== Resources ==
*[http://makerfabs.com/wiki/index.php?title=File:Maduino_GPRS_A7_Demo_Code.zip Demo code]
+
*[http://makerfabs.com/wiki/index.php?title=File:SIM808_GPS_Tracker_Demo_code.zip Demo code]
 +
*[http://makerfabs.com/wiki/index.php?title=File:SIM800_Series_AT_Command_Manual_V1.09.pdf AT Cammand]
 +
*[http://makerfabs.com/wiki/index.php?title=File:SIM808_Hardware_Design_V1.02.pdf Hardware Design]

Latest revision as of 06:06, 17 October 2019

Introduction

SIM808 GPS Tracker is an IoT (Internet of things) Solution based on the ATmega328 and GPRS/GSM GPS module SIM808. it integrates a micro Controller Atmega 328, GRRS/GSM module SIM808, which is the upgrade version of SIM900, power management and storage, to make the SIM808 GPS Tracker ready for a real project for IoT projects such as smart-home, outdoor monitoring, shared bicycle, etc.
The SIM808 GPS Tracker based on the Arduino, users can program it with Arduino IDE, which is very easy especially suit for the none-programmers. There are also guide for users to learn how to create the first IoT project with this board, with which the starters can learn the hardware and programming skill quickly.

Model: OAC808SIM
SIM808 GPS Tracker.jpg

Features

  • BAT Input Voltage: 3.4-4.2V
  • ATmega328: 8MHz, 32KB flash, 2KB SRAM
  • Micro SIM connector
  • Integrated Power Control System
  • AT command interface with "auto baud" detection Quad-band: 850/900/1800/1900Mz
  • Send and receive GPRS data (TCP/IP, HTTP, etc.)
  • GPS L1 C/A code
  • 22 tracking /66 acquisition channels
  • Tracking: -165 dBm
  • Cold starts: -148 dBm
  • Time-To-First-Fix:Cold starts-32s (typ.), Hot starts-1s (typ.),Warm starts-5s (typ.)
  • Accuracy: approx. 2.5 meters
  • Interface: I2C/SPI/UART/18*GPIO
  • Arduino compatible
  • Working Temperature: -40 – 85℃
  • Default baud rate: 115200
  • Size: 40*55mm

Interface Function

SIM808 GPS Tracker 1.JPG
①PWR: Power indicate
②CHG: Charge indicate
③VBAT: 3.7V Lipo battery connector
④ CHG: 5V power input, can connect the solar panel to charge the lipo battery.
⑤ Micro USB: 5V power input, USB to serial communication
⑥RESET: Reset button for ATmega328
⑦ Serial port select:

D0&D1 hardware serial port
D7&D8 Software serial port

⑧GPS: GPS Antenna IPX Interface

SIM808 GPS Tracker 2.JPG

①Micro SIM Card Holder
②Micro SD Card Holder

Pins usage on Arduino

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

[Case one]: GPRS Connectivity

SIM808 is a GPRS/GSM+ GPS Quad-band module, with this board, user can create IOT project such as data acquisition, remote controlling, GPS tracker and so on. The following simple application is use it as GPS tracker, to get your current location information. You can post your location information to the Google Maps then draw your trip.
1.Insert a Micro SIM card
The SIM808 GPS Tracker board uses the micro SIM card that is widely used in Android phone, install the Micro SIM card to the holder as below picture.
SIM808 GPS Tracker 3.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
SIM808 GPS Tracker 4.JPG
3.Programming and download
The SIM808 GPS Tracker 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 a website):

    sendData("AT+CCID",3000,DEBUG); 
     sendData("AT+CREG?",3000,DEBUG);     
     sendData("AT+CGATT=1",1000,DEBUG);
     sendData("AT+CGACT=1,1",1000,DEBUG);
     sendData("AT+CSTT=CMNET",3000,DEBUG);
     sendData("AT+CIICR",1000,DEBUG);
     sendData("AT+CIFSR",1000,DEBUG);
     sendData("AT+CDNSGIP=\"www.sim.com\"",1000,DEBUG);
     sendData("AT+CDNSGIP=\"a b c d e f\"",1000,DEBUG);
     sendData("AT+CIPSTART=\"TCP\",\"WWW.SIM.COM\",80",5000,DEBUG);
     delay(10000);
     sendData("AT+CIPSEND=6",1000,DEBUG);
     sendData("123456",1000,DEBUG);
     delay(2000);
     sendData("AT+CIPCLOSE",1000,DEBUG); 

Select the right port and Arduino board: Arduino pro mini 3.3V 8MHz to upload the firmware to SIM808 GPS Tracker boards
SIM808 GPS Tracker 5.JPG
4.Test Result
If the GPRS service accessible, the Maduino board get data from the site, you can check the serial output debug info as:
SIM808 GPS Tracker 6.JPG
As shown on the above picture, the SIM808 GPS tracker has connect to the www.sim.com and now you can upload/download the data.

[Case two]: Get GPS Location

The SIM808 GPS Tracker gets the GPS signal with UART interface, customers can stock the GPS info into the SD card, of send to the internet with the GPRS connectivity:
SIM808 GPS Tracker 7.JPG
GNSS power control

void setgps(void)
{
   sendData( "AT+CGNSPWR=1",1000,DEBUG);    //power GNSS
   sendData( "AT+CGNSSEQ=RMC",1000,DEBUG); // define the last NMEA sentence that parsed
}

Get current Location information

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

Then the SIM808 will report the related GPS into to Atmega328, with the UART interface, you can check the reported GPS info via the Atmega hardware interface:
SIM808 GPS Tracker 8.JPG

FAQ

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

Resources