Neo 7m gps error

When i run any example from the tiny gps library i get this output

Location: INVALID Date/Time: 0/0/2000 00:00:00.00
Location: INVALID Date/Time: 0/0/2000 00:00:00.00
Location: INVALID Date/Time: 0/0/2000 00:00:00.00
Location: INVALID Date/Time: 0/0/2000 00:00:00.00
Location: INVALID Date/Time: 0/0/2000 00:00:00.00
The connections are good, when i just run a new sketch i see some garbage values but i think that is normal i just can get it to be accurate

Welcome to the forum

Has the GPS unit got a satellite fix, usually indicated by the LED on it flashing once per second ?

Are you testing the GPS indoors ? If so, then try putting it on a window ledge where it has more chance of receiving satellite transmissions, or better still, try it outdoors

from the videos i should atleast get an accurate time and then worry about the location.
bow even if i am outside or in the result is the same

Not quite.

For the TinyGPS Plus library to display the Time and Location the GPS needs to be receiving at least some signals from GPS satellites.

There is a description of the process a GPS goes through from switch on to reporting time and then reporting location here;

Note the use in that tutorial of simple programs that copy the characters the GPS is sending over serial to the Serial monitor which will show what your problem is.

The weather is bad now could that be an issue

No, not as long as you are outside

Is the LED on the GPS flashing at 1Hz ?

the led is not flashing its just constantly on

Then you don't have a satellite lock and hence no data

1 Like

Could be a fault in your code, how you have the GPS connected, a faulty GPS or Arduino.

So maybe post your code, tell us which Arduino you have and provide details or a picture of the connections.

#include <TinyGPSPlus.h>
#include <SoftwareSerial.h>
/*
   This sample sketch demonstrates the normal use of a TinyGPSPlus (TinyGPSPlus) object.
   It requires the use of SoftwareSerial, and assumes that you have a
   4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).
*/
static const int RXPin = 3, TXPin = 4;
static const uint32_t GPSBaud = 9600;

// The TinyGPSPlus object
TinyGPSPlus gps;

// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);

void setup()
{
  Serial.begin(115200);
  ss.begin(GPSBaud);

  Serial.println(F("DeviceExample.ino"));
  Serial.println(F("A simple demonstration of TinyGPSPlus with an attached GPS module"));
  Serial.print(F("Testing TinyGPSPlus library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
  Serial.println(F("by Mikal Hart"));
  Serial.println();
}

void loop()
{
  // This sketch displays information every time a new sentence is correctly encoded.
  while (ss.available() > 0)
    if (gps.encode(ss.read()))
      displayInfo();

  if (millis() > 5000 && gps.charsProcessed() < 10)
  {
    Serial.println(F("No GPS detected: check wiring."));
    while(true);
  }
}

void displayInfo()
{
  Serial.print(F("Location: ")); 
  if (gps.location.isValid())
  {
    Serial.print(gps.location.lat(), 6);
    Serial.print(F(","));
    Serial.print(gps.location.lng(), 6);
  }
  else
  {
    Serial.print(F("INVALID"));
  }

  Serial.print(F("  Date/Time: "));
  if (gps.date.isValid())
  {
    Serial.print(gps.date.month());
    Serial.print(F("/"));
    Serial.print(gps.date.day());
    Serial.print(F("/"));
    Serial.print(gps.date.year());
  }
  else
  {
    Serial.print(F("INVALID"));
  }

  Serial.print(F(" "));
  if (gps.time.isValid())
  {
    if (gps.time.hour() < 10) Serial.print(F("0"));
    Serial.print(gps.time.hour());
    Serial.print(F(":"));
    if (gps.time.minute() < 10) Serial.print(F("0"));
    Serial.print(gps.time.minute());
    Serial.print(F(":"));
    if (gps.time.second() < 10) Serial.print(F("0"));
    Serial.print(gps.time.second());
    Serial.print(F("."));
    if (gps.time.centisecond() < 10) Serial.print(F("0"));
    Serial.print(gps.time.centisecond());
  }
  else
  {
    Serial.print(F("INVALID"));
  }

  Serial.println();
}

A question for you

In your 'photo can you see which pins on the GPS are connected to which pins on the Uno ?

Neither can we

Please draw the circuit showing which pins are connected to which using pencil and paper, take a picture of it and post it here

Gps->Arduino

Vcc ->3.3v
Gnd->Gnd
Tx->pin 3
Rx->pin 4
the other cable is used as the antenna

Run this program and post the Serial Monitor output for us to see;

#define RXpin 3              //this is the pin that the Arduino will use to receive data from the GPS
#define TXpin 4              //this is the pin that the Arduino can use to send data (commands) to the GPS - not used

#include <SoftwareSerial.h>

SoftwareSerial GPS(RXpin, TXpin);

void loop()
{
while (GPS.available())
{
Serial.write(GPS.read());
}
}

void setup()
{
GPS.begin(9600);
Serial.begin(115200);
Serial.println("GPS_Echo_SoftwareSerial Starting");
}

A GPS needs a GPS antenna, not a piece of wire; it's not a pocket radio.
And just so you know, the potato and knitting needles trick won't work either. :wink:

2 Likes

check out the video

There is no GPGSV NMEA sentance, which is unfortunate, as its the one that indicates how many GPS satellites are in view.

Apart from that the output looks typical of a GPS with no antenna or a faulty antenna.

If the GPS and its antenna were working, and the GPS is outdoors with a good view of the sky, the GPS output should show the time in maybe 15 seconds and report a fix\location in 45 seconds.

And doesn't it strike you as odd that the author finally connects a real antenna for the tests and demos?

There is a comparison of GPS performance versus the type of antenna used, simple wire, ceramic chip or ceramic patch here;

https://stuartsprojects.github.io/2020/09/10/GPS-antennas-effectiveness-and-weight.html

I have used a simple wire antennas for a GPS in a few tracker projects.