Thank you for visiting → Compete For Nothing.com ← If you find anything useful leave me a comment.
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
  }
}





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

Leave a reply

Turn on pictures to see the captcha *