NEO-6M GPS Module with Arduino Nano and no usable Data

Hello Guys,

I wanted to try the NEO-6M GPS Module, but i get no usable data on the serial monitor.

I used an example code from the tinyGPS library:

#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 **");
}

But my serial monitor only shows this:

"
Simple TinyGPS library v. 13
by Mikal Hart

CHARS=192 SENTENCES=0 CSUM ERR=15
CHARS=294 SENTENCES=0 CSUM ERR=23
CHARS=396 SENTENCES=0 CSUM ERR=32
CHARS=498 SENTENCES=0 CSUM ERR=41
...
"
CHARS and ERR just keep increasing but no coordinates appear. The blue led on the module is also not blinking.

Hardware:

Arduino Nano NEO-6M GPS (Antenna connected)
5V -------VCC
GND----GND
D3-------RX
D4-------TX

Run this code, and post the output you see on the serial monitor;

#define RXpin 4              //this is the pin that the Arduino will use to receive data from the GPS
#define TXpin 3              //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");
}

Most GPSs are actually set to 9600 baud ………..

1 Like

Welcome to the forum

Has the GPS got a lock on enough satellites ? This is usually indicated by an LED on the GPS blinking once per second and may not be possible indoors

Have you connected pin 4 on the Arduino to the Tx pin on the GPS and pin 3 on the Arduino to the Rx pin of the GPS ?

How is the GPS powered ?

Try this simple sketch

#include <SoftwareSerial.h>

SoftwareSerial ss(4, 3);  //Rx, Tx

void setup()
{
    Serial.begin(115200);
    ss.begin(4800);
}

void loop()
{
    if (ss.available())
    {
        Serial.write(ss.read());
    }
}
1 Like

Probably not correct. Try 9600, and make sure you are out of doors, with a clear view of the sky.

Keep in mind that there are lots of reports of cheap, counterfeit NEO-6M modules on the market.

You will not see co-ords, the NMEA sentences need to be decoded.

Are you sure the GPS is outputting in NMEA format? I bought a NEO-6M from Amazon a couple of months ago. It arrived set to output in UBX format. I spent quite some time trying to work out what was wrong with it and why it wouldn’t work with the TinyGPS library.

GPS_Echo_SoftwareSerial Starting
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGSV,1,1,00*79
$GPGLL,,,,,,V,N*64
$GPRMC,,V,,,,,,,,,,N*53```

TX GPS is Pin4 and Rx GPS is Pin3.

the GPS is powered directly through the 5V pin of the Arduino

Is the LED o the GP blinking once per second ?

The GPS is clearly reporting that its receiving no satellite signals at all, there is no chance at all of a position fix.

So the GPS either has no antenna, the antenna or its connection is faulty or the GPS is faulty.

Run the same check when the GPS is outdoors with a good view of the sky.

There is an explanation of what output to expect from a GPS and what it means here;

https://stuartsprojects.github.io/2018/10/01/My-GPS-does-not-work.html

1 Like

Please post a link to the product page for the GPS unit, or a picture of it (top and bottom).

that are the ones i bought:

no its not, it doesnt blink at all

Are you outdoors, with a clear view of the sky?

Did you very carefully plug in the antenna to the GPS module?

Did you try the second GPS module, with antenna very carefully plugged in, outdoors, with a clear view of the sky?

1 Like

Then the GPS has not got a satellite lock and is, therefore, not able to receive data

No iam indoors, because its the only way i can power the setup while checking the Serial monitor at the moment. But i as many of you already suggested i will try it outdoors somehow.

I am really grateful for all the help i got to this point. Thank you guys <3

Please answer all the questions we ask.

sorry.

I carefully plugged the antenna to the GPS module i am using.

I did not test the second module outdoors, for said reasons. The second module was build into a project which didnt work so i decided to backward engineer the project to get it running and better understand how it functions. The antenna was carefully plugged into this module as well.

There is a document: NMEA_Reference_Manual-Rev2.1-Dec07.pdf
that tells you how to interpret the NMEA sentences.

Pay particular attention to the line beginning $GPGSV.

The line $GPGSV tells you how many Satellites are in View

$GPGSV,1,1,00*79

Indicates that you have no satellites in view.

For a GPS receiver indoors, by a window I get 13 satellites in view.

GPS_Echo_SoftwareSerial Starting
$GPRMC,091938.00,A,5314.08345,N,00032.44228,W,0.494,,310825,,,A*63
$GPVTG,,T,,M,0.494,N,0.914,K,A*26
$GPGGA,091938.00,5314.08345,N,00032.44228,W,1,07,1.31,15.4,M,46.6,M,,*7B
$GPGSA,A,3,04,02,19,31,03,01,09,,,,,,2.24,1.31,1.82*09
$GPGSV,4,1,13,01,38,131,27,02,10,135,23,03,66,070,24,04,60,160,26*74
$GPGSV,4,2,13,06,36,302,19,09,29,200,31,11,00,304,,12,07,335,11*73
$GPGSV,4,3,13,17,43,235,,19,46,270,23,25,03,003,,28,17,039,16*71
$GPGSV,4,4,13,31,23,070,23*4E
$GPGLL,5314.08345,N,00032.44228,W,091938.00,A,A*7E

(Note, I've edited my latitude and longitude.)

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.