DIYmall GPRS/GPS SIM908 Module - NMEA Data

DIYmall GPRS/GPS SIM908 Module - NMEA Data

Directions on how to setup your DIYmall GPRS/GPS SIM908 Module so that you can get GPS / NMEA data from it.

  • 6,557 views
  • 7 comments
  • 10 respects

Components and supplies

About this project

Background

The purpose of this project is to provide directions on how to setup the DIYmall GPRS/GPS SIM908 Module so that you can get GPS/NMEA data from it.

The code I setup issues a few commands to the board to get the NMEA data going, and then begins to send the data to the computer. The SIM908 board has two serial connections - one for the GPRS (which is where the commands are mainly issued) and one just for the GPS data.


GPRS/GPS Board Preparation

- Insert SIM card ( from what I can tell the board will NOT respond without a SIM card

- Connect antennas, I would recommend putting the GPS antenna near a window if you can

- Connect power, leave power switch off for now

- My code connects to the GPRS connection of the board at 57600 baud, the default is different so I would recommend issuing the "AT+IPR=0" command to set the board to auto-mode.  I have written another project on Hackster to discuss how to issue AT commands to your board.


Arduino Preparation

Load my sample code on your board.


Wiring

NOTE: On the SIM908 board, there are two 4-pin headers next to the DC power jack labeled J5 and J6.


Sim908 board <> UNO

VCC_MCU (J5) <> 5V

GND (J5) <> GND

GPS TX (J5) <> D4

GPS RX (J6) <> D5

GPRS RX (J5) <> D3

GPRS TX (J6) <> D2


Test the setup

1) Connect UNO to computer USB for power and data

2) Open Arduino IDE serial monitor, set baud to 57600.

3) On the SIM908 board, turn on the power switch (one red LED should light up)

4) On the SIM908 board, press the power button for a few seconds

5) Notice there is a blinking LED near the GSM antenna, this will blink slower (once every 3 seconds I think) once the board is connected

6) Press the reset button on your Arduino.

7) You should start to see data in the serial monitor.


What next?

Find some software that can read/interpret the NMEA data.  I found a few at this link that worked just fine:

http://www.electrodragon.com/w/Category:GPS

Code

Arduino UNOC/C++
Sets the unit to transmit NMEA data, then feeds that data back to the computer.
#include <SoftwareSerial.h>

SoftwareSerial mySerialGPRS (2,3); // RX, TX
SoftwareSerial mySerialGPS(4,5); // RX, TX

void setup()
{
  // Open serial communications and wait for port to open:
  mySerialGPRS.begin(57600);
  mySerialGPRS.println("AT");
  delay(100);
  mySerialGPRS.println("AT+CGPSPWR=1");
  delay(100);
  mySerialGPRS.println("AT+CGPSRST=1");
  delay(100);
  mySerialGPRS.println("AT+CGPSIPR=19200");
  delay(100);
  mySerialGPRS.println("AT+CGPSOUT=255"); // Enable NMEA output 255
  delay(100);
  // Clear out anything in GPRS
  while(mySerialGPRS.available())
  {
    mySerialGPRS.read();
  }
  mySerialGPS.begin(19200);  //NMEA connection
  Serial.begin(57600); // Start serial connection with computer
}

void loop() // Send NMEA data to computer
{
  if (Serial.available())
  {
    mySerialGPS.write(Serial.read());
  } 

 if (mySerialGPS.available())
  {
    Serial.write(mySerialGPS.read());
  }
 }

Comments

Similar projects you might like

Visualising sensor data using Arduino and Processing

Project tutorial by sowmith mandadi

  • 36,046 views
  • 3 comments
  • 33 respects

Solar Tracker with Live Data Feed - Windows IoT

Project tutorial by Jed Hodson

  • 10,088 views
  • 1 comment
  • 18 respects

LED Emergency Lights using WS2812 RGB LED Module

Project tutorial by bigboystoys13

  • 10,004 views
  • 5 comments
  • 20 respects

Air Meter Making #1: Use The Arduino Wi-Fi Module ESP-01

by 4 developers

  • 4,205 views
  • 1 comment
  • 11 respects
Add projectSign up / Login