Gt-u7 Gps doesn't seem to work. Using TInyGPS++ example.

board: arduino Nano
Gps : gt-u7

I am trying to get this Gps part to work but it doesn't seem to. Using the TinyGPS++ example sketch "DeviceExample", if i wire it like the sketch says (rx to pin 4, tx to pin 3) i get the output "no GPS detected. check wiring". If i swap them, i get no output at all, other then the initial header print that prints before the actual sketch runs.

I tried the TinyGps sketch example "test with gps device" next and output comes out as this :

Sats HDOP Latitude  Longitude  Fix  Date       Time     Date Alt    Course Speed Card  Distance Course Card  Chars Sentences Checksum
          (deg)     (deg)      Age                      Age  (m)    --- from GPS ----  ---- to London  ----  RX    RX        Fail
-------------------------------------------------------------------------------------------------------------------------------------
**** **** ********* ********** **** ********** ******** **** ****** ****** ***** ***   *******  ****** ***   0     0         0

i didn't change the sketch. its the example. and then i went online and found a person using the same module from the same company and used his sketch which is below :

#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 TXPin = 4, RXPin = 3;
static const uint32_t GPSBaud = 9600;

// 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();
}

This is his output:

Location: 14.9936, 10.25626  Date/Time: 3/6/2019 13:30:13.00

This is just a modified version of my output because the actual thing is too long to type out from a youtube video but you get the idea of what the output should look like.

This is my out put:

Location: INVALID  Date/Time: 8/22/2020 13:30:13.00

what do i do?

If the software serial Baud rate matches the GPS Baud rate, and the GPS unit is correctly connected and powered, the GPS unit doesn't have a satellite fix. It must be outside, with a clear view of the sky.

jremington:
If the software serial Baud rate matches the GPS Baud rate, and the GPS unit is correctly connected and powered, the GPS unit doesn't have a satellite fix. It must be outside, with a clear view of the sky.

I left it running outside for 10 minutes. No difference. It's powered through the Arduino which is connected to my laptop.

vcc => 5v
gnd => gnd
rx => pin4
tx => pin3

the sky is clear. no clouds.

Clear view of the sky isn't referring to clouds, it means that there aren't buildings or trees close by to interfere with signals.

Ten minutes is easily long enough with modern GPS units, but I have seen (much) older ones take longer. No idea about yours in particular.

Try just echoing what you get from the GPS to serial and post the results.

Try this code, show us the output when the GPS has been outdoors for a couple of minutes, adjust RXpin and TXpin to suit your connections.

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

srnet:
Try this code, show us the output when the GPS has been outdoors for a couple of minutes, adjust RXpin and TXpin to suit your connections.

#define RXpin A3              //this is the pin that the Arduino will use to receive data from the GPS

#define TXpin A2              //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 Starting");
}

this is what i get :

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

Thats indicative of a GPS that is indoors as in not receiving any satellite signals............

If the GPS has been outdoors, for a couple of minutes, and has a good view of the sky, either the GPS or its antenna is faulty.

Odd that the GPGSV sentences is missing though, its normally left on, although that in itself would not stop the GPS working.

Post a link to the product page for the GPS module that you actually purchased.

The ones I have looked up have a separate active antenna.

Did you carefully connect the antenna? Those tiny connectors are unreliable and easily damaged.

jremington:
Post a link to the product page for the GPS module that you actually purchased.

The ones I have looked up have a separate active antenna.

Did you carefully connect the antenna? Those tiny connectors are unreliable and easily damaged.

thank you for your help. i left it for longer and it eventually connected. I used GPS location websites and it seems close enough. thank you.

vortix2950:
thank you for your help. i left it for longer and it eventually connected. I used GPS location websites and it seems close enough. thank you.

The printout you provided was not the printout that a GPS that was working would have provided when it had been outdoors for a couple of minutes with a good view of the sky.

It could have been, under admittedly unusual circumstances. I had an ancient GPS that took twenty minutes to get a lock the first time I powered it up. It was never as slow after that.

I assumed that it was very confused about having moved from Taiwan to the UK since it was tested and that it lacked all the data it needed for a getting a fix.

Anything modern though, should do it in a fraction of the time or it was at the bottom of a well :wink:

wildbill:
Anything modern though, should do it in a fraction of the time or it was at the bottom of a well :wink:

Indeed, and since this was a Ublox 7, it would be expected to get a fix in 40 seconds or so.

And the printout shown (from the serial echo) would only be shown for 5 seconds or so when such a GPS is started from cold.

It would be helpful if the @vortix2950 told was was actually done to 'fix it'

putting that module outside won't help, unless you plug an antenna into that u.fl connector. it has no onboard antenna:

I use only NEO 8Ms, for the two mounting holes and the ability to use a civilized SMA connector:

1 Like

since this was a Ublox 7

??

The OP's GPS unit is not a Ublox 7.

srnet:
The printout you provided was not the printout that a GPS that was working would have provided when it had been outdoors for a couple of minutes with a good view of the sky.

im aware of that. But the out put seems to match GPS websites of my location so i don't know why but its working now.

Current output :

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: INVALID INVALID
Location: INVALID  Date/Time: INVALID INVALID
Location: INVALID  Date/Time: INVALID INVALID
Location: INVALID  Date/Time: INVALID INVALID
Location: 49.446140,52.569980  Date/Time: 8/23/2020 05:46:07.00
Location: 49.446140,52.569980  Date/Time: 8/23/2020 05:46:07.00

it continues producing accurate location. i edited the location not show the real location but its pretty similar.

jremington:
??

The OP's GPS unit is not a Ublox 7.

Described as;

"GT-U7 GPS module using the original 7th generation chip, Software is compatible with NEO-6M"

Wheter its a geniune Ublox or a fake, who can know.

This particular Gt-u7 product page gives no evidence of a relationship with any UBlox product.

I have seen other sites that claim otherwise, but give no reason to believe them.

Hi,

It works great for me with that library: FuGPS and a ESP8266

Here is part of my code,

B->

/**
Software Serial
D2 (RX) => GPS (TX) Yellow
D1 (TX) => GPS (RX) White
GND => GND
3V3 => VCC
*/

#include <SPI.h>
#include <SD.h>

#include <SoftwareSerial.h>

#include <FuGPS.h>

#define SoftTX D1
#define SoftRX D2

SoftwareSerial SerialSoft(SoftRX, SoftTX); // RX, TX

FuGPS fuGPS(SerialSoft);

void setup()
{
Serial.begin(115200);
Serial.println("");
Serial.println("Booting");
SerialSoft.begin(9600);
delay(500);
}

void loop()
{

if (fuGPS.read())
{
Serial.print("Quality: ");
Serial.println(fuGPS.Quality);

Serial.print("Satellites: ");
Serial.println(fuGPS.Satellites);

if (fuGPS.hasFix() == true)
{
// Data from GGA message
Serial.print("Accuracy (HDOP): ");
Serial.println(fuGPS.Accuracy);

Serial.print("Altitude (above sea level): ");
Serial.println(fuGPS.Altitude);

Serial.println("Date:"+String(fuGPS.Days)+"-"+String(fuGPS.Months)+"-20"+String(fuGPS.Years)+" "+String(fuGPS.Hours)+":"+String(fuGPS.Minutes)+":"+String(fuGPS.Seconds));

Serial.println("Latitude: " + String(fuGPS.Latitude, 6) + ", Longitude: " + String(fuGPS.Longitude, 6));

}
}
}