Grove GPS Module

Hi everyone,

I'm struggling to get a reading from my Grove GPS module on an Uno. Nothing else connectioned, not using the 0,1 serial pin.

#include <SoftwareSerial.h>
SoftwareSerial SoftSerial(2, 3);
unsigned char buffer[64];                   // buffer array for data receive over serial port
int count=0;                                // counter for buffer array
void setup()
{
    SoftSerial.begin(9600);                 // the SoftSerial baud rate
    Serial.begin(9600);                     // the Serial port of Arduino baud rate.
}
 
void loop()
{
    if (SoftSerial.available())                     // if date is coming from software serial port ==> data is coming from SoftSerial shield
    {
        while(SoftSerial.available())               // reading data into char array
        {
            buffer[count++]=SoftSerial.read();      // writing data into array
            if(count == 64)break;
        }
        Serial.write(buffer,count);                 // if no data transmission ends, write buffer to hardware serial port
        clearBufferArray();                         // call clearBufferArray function to clear the stored data from the array
        count = 0;                                  // set counter of while loop to zero 
    }
    if (Serial.available())                 // if data is available on hardware serial port ==> data is coming from PC or notebook
    SoftSerial.write(Serial.read());        // write it to the SoftSerial shield
}
 
 
void clearBufferArray()                     // function to clear buffer array
{
    for (int i=0; i<count;i++)
    {
        buffer[i]=NULL;
    }                      // clear all index of array with command NULL
}

My serial output is;
$GPRMC,162906.218,V,,,,,0.07,131.33,270721,,,N*49
$GPGGA,162908.000,,,,,0,2,,,M,,M,,4E
$GPRMC,162908.000,V,,,,,0.10,131.33,270721,,,N
4A
$GPGGA,162909.000,,,,,0,2,,,M,,M,,4F
$GPRMC,162909.000,V,,,,,0.11,131.33,270721,,,N
4A
$GPGGA,162910.000,,,,,0,2,,,M,,M,,47
$GPRMC,162910.000,V,,,,,0.12,131.33,270721,,,N
41
$GPGGA,162911.000,,,,,0,2,,,M,,M,,46
$GPRMC,162911.000,V,,,,,0.12,131.33,270721,,,N
40
$GPGGA,162912.000,,,,,0,2,,,M,,M,,45
$GPRMC,162912.000,V,,,,,0.10,131.33,270721,,,N
41
$GPGGA,162912.218,,,,,0,2,,,M,,M,,4E
$GPRMC,162912.218,V,,,,,0.07,131.33,270721,,,N
4C

My actual co ordinates currently at 50, -3.

I've tried using the tinyGps library, but the system just freezes.

Your GPS is picking up at least some satellites, since the time is displayed, but its most likely the GPS signals are too weak for it to decode a position, which is why no co-ordinates are shown.

The GPS is outdoors with a good view of the sky ?

I've tried using the tinyGps library, but the system just freezes

That wont help, there are no co-ordinates for it to decode.

.

Thanks for a quick reply!

Any advice on how I could define the co-ordinates even though they are 0.00. Then I could start logging onto an SD card and go for a walk, see if it picks up the signal.

Already have some sensors with a file.print function into an SD card.

Just unsure how I'd quantify the data then.

Currently giving me lots of zero's!

$GPGGA,000910.799,,,,,0,0,,,M,,M,,47
$GPGSA,A,1,,,,,,,,,,,,,,,1E
$GPGSV,1,1,00
79
$GPRMC,000910.799,V,,,,,0.00,0.00,050180,,,N
4E
$GPGGA,000911.799,,,,,0,0,,,M,,M,,46
$GPGSA,A,1,,,,,,,,,,,,,,,1E
$GPGSV,1,1,00
79
$GPRMC,000911.799,V,,,,,0.00,0.00,050180,,,N
4F
$GPGGA,000912.799,,,,,0,0,,,M,,M,,45
$GPGSA,A,1,,,,,,,,,,,,,,,1E
$GPGSV,1,1,00
79
$GPRMC,000912.799,V,,,,,0.00,0.00,050180,,,N
4C

Just print the sentences you're getting to the SD card - no point trying to work with tinyGPS until you have a lock.

The walking may be unnecessary, it may be sufficient just to take the gear and a laptop outside.

tried wondering outside, sadly didn't get a lock.

Maybe I'll just throw the laptop in the car, and go around the block

Car isn't ideal either. The more sky you can see, the better.

Makes sense. Especially as the system would be in the bag anyway, I'll setup a walking SD card logger and take the dog to the park.

Thanks for advising mate.

It takes a minimum of 12.5 minutes of satellite access to download a fresh almanac. You need a new almanac if the GPS is new or has been off for over 180 days.

Then you need the ephemeris data for each satellite which takes 30 second as each satellite comes into view.

You can get a fix when you have ephemeris data from three or more satellites that are still in view. As those satellites go out of view you will need other satellites or you will lose the fix.

Put it somewhere with a good view of as much of the sky as possible and let it gather data. It could take 20 minutes. It could take hours. It depends on how many satellites come into view and how long they stay in view.

Its certainly the case that it can take up to 12.5 minutes for the GPS to receive some GPS updates data such as the leap seconds update.

However this does not have an impact on the time to first fix (TTFF) which is stated at 35-45 seconds in most GPS datasheets I have seen and that matches the performance in practical tests I have done with new GPSs.

Thus even a GPS that has been without power for a few years should start producing a location fix in less than a minute, if its working properly.