Thank you for visiting → Compete For Nothing.com ← If you find anything useful leave me a comment and share. Interested in Arduino, C#, Unity3D, Game Creation, VB.NET, learning and most important of all Sharing!.
Close Notification
Open Notification

Using SKYLAB SKM53 GPS Module Arduino Sketch

Using SKYLAB SKM53 GPS Module Arduino Sketch

Using the SKYLAB SKM53 Module is quite easy, but you need to pay special attention
to the RX and TX. RX on Arduino goes to TX on GPS module. Default baud on this GPS
is 9600. I found I could not get the GPS to connect without external power which is
3.3v but I have been running it from 5v and it seems ok.

Code from renkema.cc with some modification.

Arduino code…


/*
This Sketch will run with the SkyNav SKM53 GPS 
 RXD Arduino Pin 3
 TXD Arduino Pin 2
 RST Leave Open 
 NC Leave Open
 GND Ground
 VCC +5
 Make sure you download and save to your Arduino/Libraries folder TinyGPS.h
 and NewSoftSerial.h files.
*/

#include <TinyGPS.h>
#include <SoftwareSerial.h>

unsigned long fix_age;

SoftwareSerial GPS(2,3);
TinyGPS gps;
void gpsdump(TinyGPS &gps);
bool feedgps();
void getGPS();
long lat, lon;
float LAT, LON;

void setup(){
  GPS.begin(9600);
  Serial.begin(96
  00);
}

void loop(){
  long lat, lon;
  unsigned long fix_age, time, date, speed, course;
  unsigned long chars;
  unsigned short sentences, failed_checksum;

  // retrieves +/- lat/long in 100000ths of a degree
  gps.get_position(&lat, &lon, &fix_age);

  getGPS();
  Serial.print("Latitude : ");
  Serial.print(LAT/100000,7);
  Serial.print(" :: Longitude : ");
  Serial.println(LON/100000,7);
}

void getGPS(){
  bool newdata = false;
  unsigned long start = millis();
  // Every 1 seconds we print an update
  while (millis() - start < 1000)
  {
    if (feedgps ()){
      newdata = true;
    }
  }
  if (newdata)
  {
    gpsdump(gps);
  }
}

bool feedgps(){
  while (GPS.available())
  {
    if (gps.encode(GPS.read()))
      return true;
  }
  return 0;
}

void gpsdump(TinyGPS &gps)
{
  //byte month, day, hour, minute, second, hundredths;
  gps.get_position(&lat, &lon);
  LAT = lat;
  LON = lon;
  {
    feedgps(); // If we don't feed the gps during this long routine, we may drop characters and get checksum errors
  }
}





Dogecoin
Donate Dogecoins: DGkJRWQCyBUeXbenYz18LRN9X67aora9nz Whats This?

20 Comments

  1. mcleja · April 3, 2013 Reply

    Where did you get this gps from?

    Thanks

  2. mcleja · April 4, 2013 Reply

    Hi Warren,

    Could you please what logic levels you used to communicate with this module as I read in the data sheet that it uses 2.85V LVTTL logic levels. Did you have to do any logic level shifting? Also could you clarify how you powered the gps? Did you use the Arduino’s 5V source?

    Cheers.

  3. mcleja · April 5, 2013 Reply

    Hey Warren,

    What kind of Arduino are you using?

    Cheers mate.

    • warren · April 7, 2013 Reply

      I have used it on the Arduino Nano, Uno and Mega. I haven’t used it on the leonardo yet as it is a pain getting it going in windows 8.

  4. Ady · June 12, 2013 Reply

    hey warren..

    i used your code to test my Skylab GPS module but my result shown like this..

    Latitude : 0.0000000 :: Longitude : 0.0000000
    Latitude : 0.0000000 :: Longitude : 0.0000000
    Latitude : 0.0000000 :: Longitude : 0.0000000

    do you know what is the problem? i tried with another code but it still not working..i need your help here..

    thanks

  5. Ady · July 1, 2013 Reply

    Warren, i try powering the GPS module from http://competefornothing.com/?p=167 but still no luck. i still got the same result. so, what is the problem actually? i read on website that we should stay outside to get the satellite fix.. i tried that way but still no luck..help me please..

    thanks

  6. Torbjorn · September 11, 2013 Reply

    I have the same problem, anyone who succeeded toget proper data?

  7. Joris · February 15, 2014 Reply

    Perfect works like a charm :),

    just a minor bug:

    Serial.print(“Latitude : “);
    Serial.print(LAT/100000,7);
    Serial.print(” :: Longitude : “);
    Serial.println(LON/100000,7);

    you should add another 0 to both as your want to divide by 1 million

    • Mahmoud · February 15, 2014 Reply

      Please tell us

      Which Arduino board you have used ?
      How much time required to get values ?
      You tested the module outdoor or indoor ?

      i tried a lot of codes but my result shown like this..

      Latitude : 0.0000000 :: Longitude : 0.0000000
      Latitude : 0.0000000 :: Longitude : 0.0000000
      Latitude : 0.0000000 :: Longitude : 0.0000000

      do you know what is the problem?

      • warren · February 16, 2014 Reply

        The board I used is Arduino Nano, make sure that the power supply going to the GPS is separate than the power for the Arduino. It only takes a few seconds to get a GPS fix and display the current location (must be outside).

  8. Sim · February 16, 2014 Reply

    Hi Warren,

    Thanks for the test sketch for the SKM53.

    One point to note, is that pins 2 & 3 can’t be used for softwareserial on 32u4 based Arduinos (Leonardo, Pro Micro, Fio Etc.) because of the way interrupts are handled. Changing to pins 9 & 10 works though, you could also use hardware serial on these boards too (Serial1), as they are not used by the USB on the 32u4.

  9. Pritam · May 9, 2014 Reply

    Hi Warren,
    I am using Skylab 13C gps module, Can you tell me working of this module.

  10. David · July 9, 2014 Reply

    Hi Warren, tnx for the codes. Is there a good website you can refer me to that can help me understand the details of what all the output pins (rxd, txd, nc, rst) are and how they work? If you could also explain them briefly,it would really help me a lot. Tnx

Leave a reply