Difference between revisions of "Maduino Zero SIM808 GPS Tracker v3.5"

From MakerFabsWiki
Jump to: navigation, search
(Project_2: A Simple IOT Project- Environment Remote Monitor)
(Project_2: A Simple IOT Project- Environment Remote Monitor)
Line 252: Line 252:
sendData("AT+HTTPACTION=1", 1000, DEBUG);//HTTP POST success if get responce: +HTTPACTION: 1,200,0
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 code([SIM808_GPS_OLED.ino SIM808_GSM_DHT11.ino]) to Maduino Zero SIM808 GPS board
Select the right port and Arduino board: '''Arduino Zero(Native USB Port)''' to upload the code([https://github.com/Makerfabs/SIM808_Demo SIM808_GSM_DHT11.ino]) to Maduino Zero SIM808 GPS board
4. Result Show
4. Result Show

Revision as of 09:59, 26 November 2019


Maduino Zero SIM808 GPS Tracker is an IoT (Internet of things) Solution based on the 32-bit Atmel’s SAMD21 MCU and GPRS/GSM GPS module SIM808, which is the upgrade version of SIM900. It can be a real project for IoT projects such as smart-home, outdoor monitoring, shared bicycle, etc.

The Maduino Zero 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.

This guide help you the basic usage of Maduino Zero SIM808 GPS Tracker.

Model: Maduino Zero SIM808 GPS Tracker OAC808GPS35
Maduino Zero SIM808 v3.5 SHOW 01.jpg


• ATMEL SAMD21G18A: 32-bit ARM® Cortex®-M0 up to 48MHz, 256KB flash, 32KB SRAM, LQFP48v • Powered by lithium battery(3.4-4.2V) or AC-DC Adapter
• GSM Quad-band: 850/900/1800/1900Mz
• GPS Location
• Bluetooth 3.0 + EDR(Enhanced Data Rate), up to 2.1Mbps
• Interface: I2C/SPI/UART/ADC/DAC/I2S/38*GPIO
• Arduino Compatible: You can play it with Arduino IDE
• More cost-effective and high quality than Arduino Zero
• Working Temperature: -20 ~ +85℃
• Default baud rate: 115200bps
• Size: 40*55mm

Interface Function

Maduino Zero SIM808 v3.5 01.JPG
① Micro USB: USB to serial communication (*Note that the USB is not for power supply)
②DC-05: Supply power for the board
③Switch: Power switch
④VBAT: 3.7V Lipo battery connector
⑤GSM: GSM Antenna IPX Interface
⑥NET: SIM808 Network indicate
⑦STA: SIM808 status indicate
⑧1PPSTime Mark outputs
⑨GPS: GPS Antenna IPX Interface
⑩SWD: Bootloader downloading
⑪RESET: Reset button for ATSAMD21G18

Maduino Zero SIM808 v3.5 02.JPG

①Micro SIM Card Holder
②Micro SD Card Holder
③BT: Bluetooth IPX Interface

Indicator LED Status
PWR Light on when switch on, light off when switch off
CHG Charge indicate
NET Off:SIM808 is not working.
64ms On/800ms Off: SIM808 not registered the network.
64ms On/3000ms Off: SIM808 registered to the network.
64ms On/300ms Off: PPP GPRS communication is established.
STA Light on when GSM module powered on.
Light off when GSM module powered off.
1PPS Time Mark outputs timing pulse related to receiver time


Warning: Don't operate when in power supply on (That is, don’t plug or unplug the Antenna ,SIM Cars, SD Card , in case of short-circuit that may burn the IC down.)

Note After a Arduino IDE installed, there is no package to support Maduino Zero(Arduino Zero ), we need to install the Arduino Zero package in Arduino IDE to continue.

1. Install Software for the Arduino/Genuino Zero

The following screens show how to install software for the Maduino(Arduino/Genuino) Zero boards in the Arduino IDE.

1.1. Open the Boards Manager From the top Arduino IDE menu, select Tools-> Board-> Boards Manager… to open the Boards Manager dialog box. Arduino Board V1.0.png

1.2. Select Arduino SAMD Boards and Install In the Boards Manager dialog box, type Arduino Zero into the search field to easily find the Arduino SAMD package for 32-bits ARM Cortex-M0+ boards as shown in the image below. Install it. Arduino BoardManager V1.0.png

1.3. Find the Arduino Zero Boards on the Arduino IDE Menu After the software package has been installed, the new Arduino boards can be seen on the Arduino IDE Board menu found under Tools →Board as shown in the image below.

Arduino Serial.png

A new section called Arduino SAMD (32-bits ARM Cortex-M0+) Boards can be seen on the Board menu which contains Arduino M0, M0 Pro, Zero, MKR boards and others. This means the right package has been installed and Maduino ready to go.

2. Hardware Connection

• Plug a MicroSIM card.
• Plug a GPS Antenna to designator which shows GPS.
• Plug a GSM Antenna to designator which shows GSM.
• Plug a Bluetooth Antenna to designator which shows BT.
• Plug a Micro USB Cable to Maduino Zero SIM808.
• Plug a 3.7V lithium battery to J6 or AC-DC Adapter to Maduino Zero SIM808

  • Note1: A 3.7V lithium battery normal voltage is 3.7V, but the range voltage often from 3.4V to 4.2V
  • Note2: Micro USB just used for communicate with the board, it doesn’t supply power to the board because the SIM808 Module need a 2A pulse current when power on.
  • Note3: The current of AC-DC Adapter should be 2A or more. Otherwise the SIM808 may not work or work unstable.
  • Note4: Both the battery or the DC jack can be used for power supply. While DC connected, the board will be powered by DC, while DC removed, it will switch to battery by automatic.

3. Program the Maduino Zero

Select the desired Arduino/Genuino Zero(Native USB port) board from the Arduino IDE Board menu and then select the correct Port number from the menu item below Board on the Tools Menu. The Maduino board can now be programmed in the usual manner.
Arduino Zero NativeUSB V1.0.png
Select Arduino/Genuino Zero(Native USB port) Open our first programming code SIM808_AT_Commands_Test.ino
Click Verify button to compile it.
Arduino Verify V1.0.png
If there is no any errors, it will show Done compiling.

Arduino Done Compiling V1.0.png

Click Upload button to upload firmware to the Maduino Zero SIM808 GPS Tracer board.

Arduino Upload V1.0.png

After done uploading, it will show the programming OK, as below:

Arduino Done Uploading V1.0.png

From the top Arduino IDE menu, select Tools → Serial Monitor… to open the Serial Monitor dialog box.

Arduino SerialMonitor V1.0.png

Select “Carriage return”, and baud rate 115200, it will shows the board begin to works:

Arduino SerialMonitorShow V1.0.png

Click Send button after input AT and it will response OK.
Arduino SerialMonitorReply V1.0.png

Now you can input other AT Commands refer to SIM800_Series_AT_Command_Manual_V1.09.pdf,Such as AT+ICCID to show ICCID, AT+CSQ to report GSM/GPRS signal quality and so on.

3.1 How to get GPS Location information?

SIM808 Module 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. This example show you how to get GPS location.
Attention: To get GPS location, please ensure you are outdoor, and plug the GPS Antenna. Indoor may get the incorrect location or no location information.

1. Turn on GPS, using the AT command “AT+CGNSPWR=1” to turn the GPS:


2. Define the last NMEA sentence that parsed by AT command “AT+CGNSSEQ=RMC”


3. GNSS navigation information parsed from NMEA sentences, by AT command” AT+CGNSINF”, then the Maduino GPS will begin to navigate the GPS info:


4. Turn on navigation data URC report, and report every GNSS FIX, by “AT+CGNSURC=1”


Arduino GPS Result V1.0.png
If not get the GPS signal, it returns:

+CGNSINF: 1,0,19800105235944.000,,,,0.00,0.0,0,,,,,,0,0,,,,,

Maduino Zero SIM808 GPS Tracker Projects

Project_1: Shows the GPS location on OLED display We need a 0.96" I2C OLED 128x64 at:
[0.96" I2C OLED 128x64 - Blue]
I2c 0.96 oled.JPG

Check the Pin J3 on Maduino Zero SIM808 (GND/3V3/SCL/SDA), as the pins definition compatible, plug the OLED directly on J3:.
Zero SIM808 v3.5 OLED.jpg

And install the SSD1306 OLED driver library

Arduino mgr library V1.0.png

Arduino SearchSSD1306 V1.0.png

And then download our example (SIM808_GPS_OLED.ino) to Maduino board, the result show:
Zero SIM808 v3.5 GPS OLED V1.0.jpg

There you can check the local time/longitude/ latitude on the OLED(when making this guide, our local time is 20191031094835, and longitude/ latitude: 22.612207/113.835075
We can show our location where we are in https://www.gps-coordinates.net/

Project_2: A Simple IOT Project- Environment Remote Monitor

SIM808 Module 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. In this project, we will detect the humidity/temperature of our soldering lab, and reports it to internet thingspeak(https://thingspeak.com/channels/916902), so we can monitor the lab environment remotely.
We use the humidity /temperature sensor at:
[DHT11 Temperature& Humidity Module]

1. Sensor Connection Connect the simple sensor to Maduino boards as following:

Sensor Maduino Pins
Sensor's GND Maduino's GND
Sensor's DATA Maduino's D6
Sensor's Vcc Maduino's 3V

2. Insert a Micro SIM card and GSM antenna, power the Maduino with battery or DC The Maduino Zero SIM808 board uses the micro SIM card that is widely used in Android phone, install the Micro SIM card to the holder as below picture, and also the GSM antenna

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.

3.1 Sign up an account in https://thingspeak.com/ . If you already have one, sign in directly.
3.2 Click New Channel to create a new ThingSpeak channel.
Maduino Zero SIM800C 08.png

3.3 Input name, Description, Select Field 1, Field 2,Field3, Field4. Then save channel on the bottom.

Maduino Zero SIM800C 08B.png

3.4 Copy the API Key, we will use it in the program


The Codes for this application is very simple, define the SIM808 Power control pins:

Connect to GPRS/GSM network

//define the power control pin of SIM808:
int PWR_KEY=9;    //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

String command = "AT+HTTPPARA=\"URL\",\"http://api.thingspeak.com/update.json?api_key=" + apiKey + "&field1=" + (String)latitude +"&field2=" + (String)longitude + "&field3=" + (String)temp +"&field4=" + (String)humi + "\"";
sendData(command, 3000, DEBUG);//Set HTTP Parameters Value 

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 code(SIM808_GSM_DHT11.ino) to Maduino Zero SIM808 GPS board

4. Result Show Open the link: https://thingspeak.com/channels/916902 it will show the data as below:
(I touched the sensor to show the result, so the temperature and humidity grow high) There we can get the real time humidity& temperature result from other place on internet.


You can list you question here or contact with support@makerfabs.com for technology support. A detailed descriptions of your question will be helped to solve your question.