# Can't get any readings from GPS

**URL:** <https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942>\
**Category:** General Guidance\
**Created:** [January 25, 2021, 6:31am UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942 "2021-01-25T06:31:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Count](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/count/32/1126625_2.png) [@Count](https://forum.arduino.cc/u/Count)\
**Post date:** [January 25, 2021, 6:31am UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/1 "2021-01-25T06:31:23Z")

</div>

Greetings!

I'm trying to connect my NEO6M GPS module with Arduino. I made the following connections:

GPS VCC -\> Arduino 5V  
GPS RX -\> Arduino Pin3  
GPS TX -\> Arduino Pin4  
GPS GND -\> Arduino GND.

I'm using module as GY-GPS6MV2

I tried using following codes for it:

```cpp
#include <SoftwareSerial.h>

#include <TinyGPS.h>

/* This sample code demonstrates the normal use of a TinyGPS 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).
*/

TinyGPS gps;
SoftwareSerial ss(4, 3);

void setup()
{
  Serial.begin(115200);
  ss.begin(4800);
  
  Serial.print("Simple TinyGPS library v. "); Serial.println(TinyGPS::library_version());
  Serial.println("by Mikal Hart");
  Serial.println();
}

void loop()
{
  bool newData = false;
  unsigned long chars;
  unsigned short sentences, failed;

  // For one second we parse GPS data and report some key values
  for (unsigned long start = millis(); millis() - start < 1000;)
  {
    while (ss.available())
    {
      char c = ss.read();
      // Serial.write(c); // uncomment this line if you want to see the GPS data flowing
      if (gps.encode(c)) // Did a new valid sentence come in?
        newData = true;
      }
  }

  if (newData)
  {
    float flat, flon;
    unsigned long age;
    gps.f_get_position(&flat, &flon, &age);
    Serial.print("LAT=");
    Serial.print(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6);
    Serial.print(" LON=");
    Serial.print(flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon, 6);
    Serial.print(" SAT=");
    Serial.print(gps.satellites() == TinyGPS::GPS_INVALID_SATELLITES ? 0 : gps.satellites());
    Serial.print(" PREC=");
    Serial.print(gps.hdop() == TinyGPS::GPS_INVALID_HDOP ? 0 : gps.hdop());
  }
  
  gps.stats(&chars, &sentences, &failed);
  Serial.print(" CHARS=");
  Serial.print(chars);
  Serial.print(" SENTENCES=");
  Serial.print(sentences);
  Serial.print(" CSUM ERR=");
  Serial.println(failed);
  if (chars == 0)
    Serial.println(" **No characters received from GPS: check wiring**");
}

```

With this I got following things in my Serial Monitior

```cpp
Simple TinyGPS lHARS=72 SENTENCES=0 CSUM ERR=0
 CHARS=144 SENTENCES=0 CSUM ERR=0
 CHARS=216 SENTENCES=0 CSUM ERR=0
Simple TinyGPS library v. 13
by Mikal Hart

 CHARS=72 SENTENCES=0 CSUM ERR=0
 CHARS=144 SENTENCES=0 CSUM ERR=0
 CHARS=265 SENTENCES=0 CSUM ERR=0
 CHARS=360 SENTENCES=0 CSUM ERR=0
 CHARS=432 SENTENCES=0 CSUM ERR=0
 CHARS=504 SENTENCES=0 CSUM ERR=0

```

Another code I that tried

```cpp
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
/*
  This sample sketch demonstrates the normal use of a TinyGPS++ (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 = 4, TXPin = 3;
static const uint32_t GPSBaud = 4800;

// The TinyGPS++ 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 TinyGPS++ with an attached GPS module"));
  Serial.print(F("Testing TinyGPS++ 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();
}

```

For this all I got on my serial monitor is

```cpp
DeviceExample.ino
A simple demonstration of TinyGPS++ with an attached GPS module
Testing TinyGPS++ library v. 1.0.2
by Mikal Hart

```

So I also tried changing my GPS Module Baudrate to 9600 and I got this response

```cpp
DeviceExample.ino
VALID  Date/Time: 0/0/2000 00:00:00.00
Location: INVALID  Date/Time: 0/0/2000 00:00:00.00
DeviceExample.ino
A simple demonstration of TinyGPS++ with an attached GPS module
Testing TinyGPS++ library v. 1.0.2
by Mikal Hart

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

```

What am I missing here? have I got damaged Module? Thanks in advance

---

<div class="post-metadata">

**Author:** ![markd833](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/markd833/32/1186928_2.png) [@markd833](https://forum.arduino.cc/u/markd833)\
**Post date:** [January 25, 2021, 7:15am UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/2 "2021-01-25T07:15:43Z")

</div>

I've not played with GPS on Arduino but had plenty of experience of it in a military environment.

Your last example seems to be communicating with the module. Assuming that is the case, it takes time for the GPS to get a fix on its position. The module also needs reasonable signals from the SVs (i.e. Satellites) in order to get a fix on its position.

You don't say where your GPS is. Have you taken it outside to see if the module works better?

---

<div class="post-metadata">

**Author:** ![srnet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/srnet/32/238868_2.png) [@srnet](https://forum.arduino.cc/u/srnet)\
**Post date:** [January 25, 2021, 7:28am UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/3 "2021-01-25T07:28:46Z")

</div>

Every NEO6M GPS I have tried is supplied working at 9600 baud, your 'example' code is using 4800 baud.

---

<div class="post-metadata">

**Author:** ![Railroader](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/railroader/32/274550_2.png) [@Railroader](https://forum.arduino.cc/u/Railroader)\
**Post date:** [January 25, 2021, 7:53am UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/4 "2021-01-25T07:53:41Z")

</div>

Why use a kind of time limit? What work us supposed to be done after blowing the time limit?  
Use TinyGPS++ instead.

---

<div class="post-metadata">

**Author:** ![hammy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hammy/32/238813_2.png) [@hammy](https://forum.arduino.cc/u/hammy)\
**Post date:** [January 25, 2021, 8:32am UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/5 "2021-01-25T08:32:49Z")

</div>

And .... you might need to be outside to get a signal

---

<div class="post-metadata">

**Author:** ![HillmanImp](https://avatars.discourse-cdn.com/v4/letter/h/9d8465/32.png) [@HillmanImp](https://forum.arduino.cc/u/HillmanImp)\
**Post date:** [January 25, 2021, 9:24am UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/6 "2021-01-25T09:24:20Z")

</div>

Try reading the NMEA sentences coming from the GPS TX pin without Mikal's sketch or any sketch. This is the sensible starting point for troubleshooting a GPS problem.

I suspect Mikal's diagnostic messages are not terribly helpful for newcomers to GPS.

---

<div class="post-metadata">

**Author:** ![Count](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/count/32/1126625_2.png) [@Count](https://forum.arduino.cc/u/Count)\
**Post date:** [January 25, 2021, 11:08am UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/7 "2021-01-25T11:08:56Z")

</div>

I have kept the GPS on my desk and I didn't took it outside to see if there is any improved performance.

> HillmanImp:  
> Try reading the NMEA sentences coming from the GPS TX pin without Mikal's sketch or any sketch. This is the sensible starting point for troubleshooting a GPS problem.
> 
> I suspect Mikal's diagnostic messages are not terribly helpful for newcomers to GPS.

How do I do that?

> srnet:  
> Every NEO6M GPS I have tried is supplied working at 9600 baud, your 'example' code is using 4800 baud.

I tried that as well, but nothing works

> Railroader:  
> Why use a kind of time limit? What work us supposed to be done after blowing the time limit?  
> Use TinyGPS++ instead.

Tried that too

> markd833:  
> I've not played with GPS on Arduino but had plenty of experience of it in a military environment.
> 
> Your last example seems to be communicating with the module. Assuming that is the case, it takes time for the GPS to get a fix on its position. The module also needs reasonable signals from the SVs (i.e. Satellites) in order to get a fix on its position.
> 
> You don't say where your GPS is. Have you taken it outside to see if the module works better?

How much time approx does it takes to settle down?

---

<div class="post-metadata">

**Author:** ![Railroader](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/railroader/32/274550_2.png) [@Railroader](https://forum.arduino.cc/u/Railroader)\
**Post date:** [January 25, 2021, 11:14am UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/8 "2021-01-25T11:14:17Z")

</div>

Give the unit some 5 - 10 minutes to start up. What kind of antenna do You use?

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [January 25, 2021, 11:17am UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/9 "2021-01-25T11:17:27Z")

</div>

Hi,  
Have you tried the examples in the IDE for TinyGPS++?

Thanks.. Tom... 🙂

---

<div class="post-metadata">

**Author:** ![srnet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/srnet/32/238868_2.png) [@srnet](https://forum.arduino.cc/u/srnet)\
**Post date:** [January 25, 2021, 11:21am UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/10 "2021-01-25T11:21:19Z")

</div>

> Count:  
> How much time approx does it takes to settle down?

A decent GPS with a good working antenna, when started up from cold, should get a fix in circa 40-60 seconds, if its outdoors with a good view of the sky.

A bad GPS or a good GPS with a bad antenna can take 15 minutes or more to get a fix even if its outdoors.

---

<div class="post-metadata">

**Author:** ![HillmanImp](https://avatars.discourse-cdn.com/v4/letter/h/9d8465/32.png) [@HillmanImp](https://forum.arduino.cc/u/HillmanImp)\
**Post date:** [January 25, 2021, 1:40pm UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/11 "2021-01-25T13:40:38Z")

</div>

When you apply power to the GPS it immediately emits serial data on the TX pin. These are in the format of NMEA sentences (plenty of reference material on those can be found).

It doesn't need satellite signals to produce the sentences. They will contain many blank fields until satellite signals are received.

The simplest way to read the sentences is by using a TTL/USB adapter. They cost a few dollars.

The adapter is inserted in the PC's USB port and the sentences can be displayed in the Arduino IDE or a serial terminal program or the u-center program from u-blox.

When you get that going you can experiment with the GPS antenna and positioning it with a good view of the sky. There's no real value in feeding the data to a sketch unless you are receiving satellite data. You will see the data in the sentences.

Another way to read them is via a simple sketch on the Arduino to read the TX pin and send the data to the IDE.

John.

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [January 25, 2021, 3:37pm UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/12 "2021-01-25T15:37:37Z")

</div>

You can also use an UNO as a serial adapter by connecting the Reset pin to ground. Serial appears on pin 0 and 1. You can use that to talk directly to a GPS unit.

---

<div class="post-metadata">

**Author:** ![Count](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/count/32/1126625_2.png) [@Count](https://forum.arduino.cc/u/Count)\
**Post date:** [January 25, 2021, 5:19pm UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/13 "2021-01-25T17:19:11Z")

</div>

> Railroader:  
> Give the unit some 5 - 10 minutes to start up. What kind of antenna do You use?

That's a lot of time! I use the square shaped antenna that came along with GPS (it smells weird!)

> TomGeorge:  
> Hi,  
> Have you tried the examples in the IDE for TinyGPS++?
> 
> Thanks.. Tom... 🙂

Hey Tom! how u r doing Buddy? I'm seeing u after very long time. I remebered u helped in one of my previous project. It was a divine help for me 🙂 To ur question, yes I tried using tinygps++ but no use...

> srnet:  
> A decent GPS with a good working antenna, when started up from cold, should get a fix in circa 40-60 seconds, if its outdoors with a good view of the sky.
> 
> A bad GPS or a good GPS with a bad antenna can take 15 minutes or more to get a fix even if its outdoors.

How do I know if I have a bad antenna or a good one?

> HillmanImp:  
> When you apply power to the GPS it immediately emits serial data on the TX pin. These are in the format of NMEA sentences (plenty of reference material on those can be found).
> 
> It doesn't need satellite signals to produce the sentences. They will contain many blank fields until satellite signals are received.
> 
> The simplest way to read the sentences is by using a TTL/USB adapter. They cost a few dollars.
> 
> The adapter is inserted in the PC's USB port and the sentences can be displayed in the Arduino IDE or a serial terminal program or the u-center program from u-blox.
> 
> When you get that going you can experiment with the GPS antenna and positioning it with a good view of the sky. There's no real value in feeding the data to a sketch unless you are receiving satellite data. You will see the data in the sentences.
> 
> Another way to read them is via a simple sketch on the Arduino to read the TX pin and send the data to the IDE.
> 
> John.

I'll give it a try, thanks

---

<div class="post-metadata">

**Author:** ![srnet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/srnet/32/238868_2.png) [@srnet](https://forum.arduino.cc/u/srnet)\
**Post date:** [January 25, 2021, 5:22pm UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/14 "2021-01-25T17:22:49Z")

</div>

> Count:  
> How do I know if I have a bad antenna or a good one?

You capture the NMEA sentences the GPS puts out, one of them tells you the signal strengths of signals from the satellites the GPS can see. Lots of weak signals indicate a problem.

There is a discussion of the various issues people have with GPSs here;

> **[GitHub - StuartsProjects/GPSTutorial: A simple tutorial for troubleshooting...](https://github.com/StuartsProjects/GPSTutorial)**
>
> A simple tutorial for troubleshooting GPSs on Arduino - GitHub - StuartsProjects/GPSTutorial: A simple tutorial for troubleshooting GPSs on Arduino

---

<div class="post-metadata">

**Author:** ![Railroader](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/railroader/32/274550_2.png) [@Railroader](https://forum.arduino.cc/u/Railroader)\
**Post date:** [January 25, 2021, 5:33pm UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/15 "2021-01-25T17:33:50Z")

</div>

> Count:  
> That's a lot of time!  
> I use the square shaped antenna that came along with GPS (it smells weird!)yes I tried using tinygps++ but no use...How do I know if I have a bad antenna or a good one? I'll give it a try, thanks

Yes. Starting first time in a significant new place it takes extra time. Minuts has been said by several helpers.  
I got an antenna 1" in square and connected by an antenna plug. That's a good one. In my use it works fine indoors, reinforced concrete walls and roof.

I've used 9600 baud from the beginning. The UNO Tx -\> GPS Rx is not connected at all. Only GPS Tx -\> UNO Rx.

---

<div class="post-metadata">

**Author:** ![Railroader](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/railroader/32/274550_2.png) [@Railroader](https://forum.arduino.cc/u/Railroader)\
**Post date:** [January 25, 2021, 5:38pm UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/16 "2021-01-25T17:38:39Z")

</div>

Copied from data shet:  
Parameter Specification  
Receiver type 50 Channels  
GPS L1 frequency, C/A Code  
SBAS: WAAS, EGNOS, MSAS  
Time-To-First-Fix1 NEO-6G/Q/T NEO-6M/V NEO-6P  
Cold Start2  
26 s 27 s 32 s  
Warm Start2  
26 s 27 s 32 s  
Hot Start2  
1 s 1 s 1 s  
Aided Starts3 1 s \<3 s \<3 s

Link: [https://www.u-blox.com/sites/default/files/products/documents/NEO-6\_DataSheet\_(GPS.G6-HW-09005).pdf](https://www.u-blox.com/sites/default/files/products/documents/NEO-6_DataSheet_%28GPS.G6-HW-09005%29.pdf)

---

<div class="post-metadata">

**Author:** ![Count](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/count/32/1126625_2.png) [@Count](https://forum.arduino.cc/u/Count)\
**Post date:** [January 26, 2021, 3:15pm UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/17 "2021-01-26T15:15:21Z")

</div>

> Railroader:  
> Yes. Starting first time in a significant new place it takes extra time. Minuts has been said by several helpers.  
> I got an antenna 1" in square and connected by an antenna plug. That's a good one. In my use it works fine indoors, reinforced concrete walls and roof.
> 
> I've used 9600 baud from the beginning. The UNO Tx -\> GPS Rx is not connected at all. Only GPS Tx -\> UNO Rx.

I need to try this for sure... I'll try it out and get back to state what happens

---

<div class="post-metadata">

**Author:** ![Count](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/count/32/1126625_2.png) [@Count](https://forum.arduino.cc/u/Count)\
**Post date:** [January 26, 2021, 3:23pm UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/18 "2021-01-26T15:23:28Z")

</div>

Just one more thing... Right now I supply GPS with 5V is it okay if I supply it with 3V? Or do I need to supply it with 5V only?

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [January 26, 2021, 3:35pm UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/19 "2021-01-26T15:35:08Z")

</div>

> Count:  
> Just one more thing... Right now I supply GPS with 5V is it okay if I supply it with 3V? Or do I need to supply it with 5V only?

Did you read the specifications? Also keep in mind that some modules have 3.6V maximum logic levels. Can't connect to 5V devices directly.

---

<div class="post-metadata">

**Author:** ![Count](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/count/32/1126625_2.png) [@Count](https://forum.arduino.cc/u/Count)\
**Post date:** [January 26, 2021, 3:45pm UTC](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942/20 "2021-01-26T15:45:56Z")

</div>

> aarg:  
> Did you read the specifications? Also keep in mind that some modules have 3.6V maximum logic levels. Can't connect to 5V devices directly.

_I checked it from the vendor I brought it. His website says it works from 3-5V. But all the YT videos says it should be powered by 5V. What is the right way?_

[Next page](https://forum.arduino.cc/t/cant-get-any-readings-from-gps/692942.md?page=2)
