-3
\$\begingroup\$

I have a skylab skg13bl GPS module. I interfaced it with arduino using the TTL, the status LED is not blinking and the GPS module is returning erroneous data.

Here is my code:

#include<SoftwareSerial.h>

int a[100];
int i=0,j; 
SoftwareSerial mygps(5,6);

void setup() 
{
    mygps.begin(9600);
    Serial.begin(9600); 
    delay(100);
} 

void loop()
{
    while(mygps.available()<0);
    while(mygps.read()!=36);
    do 
    { 
       a[i]=mygps.read(); 
       //Serial.print(a[i]);
       i++; 
    }

    while(mygps.read()!=13); 

    for(j=0;j<i;j++)
    { 
        Serial.print(char(a[j]));
    } 

    Serial.println(); 
    //delay(60000); 
}

It would be nice if someone can guide me through this.

\$\endgroup\$

closed as unclear what you're asking by Leon Heller, PeterJ, Olin Lathrop, Scott Seidman, Ricardo Jun 8 '15 at 12:56

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    \$\begingroup\$ What does the manual say ? \$\endgroup\$ – efox29 Jun 8 '15 at 5:43
  • \$\begingroup\$ Mwah, real engineers don't need to read the manuals ;-) \$\endgroup\$ – Bimpelrekkie Jun 8 '15 at 9:04
1
\$\begingroup\$

First of all, in cases like this you should read the datasheet first. If you cannot find the required information or the whole answer in it or you do not understand the content, in that case you could ask for more help here (and mention that you have read through the datasheet).


1. presence of the supply voltage

The presence of the supply voltage does not mean that the LED will operate.

From datasheet:

FIXLED
The default FIXLED function is valid fix indicator output. With out a valid fix the signal is at low state; during valid fix condition the signal outputs 50ms pulses every seconds.

It means that the LED starts blinking when the module has connected to at least 3 satellites properly. You do not have to enable this pin by software.

2. required programming

I think the module should connect to the satellites automatically without any configuration, since it is a basic functionality. The default GPS module behaviour is:

  1. Apply supply voltage
  2. The Module connects automatically to the available stallites
  3. Automatically sends the received NMEA sentences via UART

As a confirmation I found a source code with the same GPS module. Here, the user could receive NMEA sentence from the module without any initialization, simply reading the UART line.


To get back to your problem: Maybe it could not connect to 3 different satellites for some reason beyond your reach, but I recommend you to check the antenna and the power-supply connections to make sure it is not hardware fault.

Here is another question from EE.SE, where the same modul is working in some cases. May the asker can provide you some useful information.

\$\endgroup\$
  • \$\begingroup\$ The problem was with the gps antenna, I changed it and finally the status led is on but it is not blinking and more over the gps module is returning invalid gps data to the arduino. I am unable to do anything except watching that erroneous data displayed on the serial monitor. It would be nice if someone can guide me through this and Thanks for the reply. \$\endgroup\$ – Sai Abhinay Nimmala Jun 9 '15 at 7:04
  • \$\begingroup\$ #include<SoftwareSerial.h> int a[100]; int i=0,j; SoftwareSerial mygps(5,6); void setup() { mygps.begin(9600); Serial.begin(9600); delay(100); } void loop() { while(mygps.available()<0); while(mygps.read()!=36); do { a[i]=mygps.read(); //Serial.print(a[i]); i++; }while(mygps.read()!=13); for(j=0;j<i;j++) { Serial.print(char(a[j])); } Serial.println(); //delay(60000); } \$\endgroup\$ – Sai Abhinay Nimmala Jun 9 '15 at 7:22
  • \$\begingroup\$ I have used the above code for reading data from gps module \$\endgroup\$ – Sai Abhinay Nimmala Jun 9 '15 at 7:23
  • \$\begingroup\$ You should/can edit your question: insert your schematic, some rows of the invalid GPS data and code there. They put your question on hold because there wasn't enough information to start with. \$\endgroup\$ – Bence Kaulics Jun 9 '15 at 7:26
  • \$\begingroup\$ You can update it later on, including the new experiences like this one: "The problem was with the gps antenna, I changed it and finally the status led is on but it is not blinking and more over the gps module is returning invalid gps data to the arduino." \$\endgroup\$ – Bence Kaulics Jun 9 '15 at 7:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.