GPS module not locking onto satellite?

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
BirdOfSteel
 
Posts: 5
Joined: Wed Jan 19, 2022 5:50 pm

GPS module not locking onto satellite?

Post by BirdOfSteel »

Hi!

I've been trying to get the Adafruit Ultimate GPS Module to output my coordinates, but I'm having no luck so far it seems. All components are new and I've tried a few different GPS modules, including a Beitian-220 and a uBlox Neo-6M which are both bought from eBay, but the Adafruit module is from a reliable website in case that's a concern.

My current setup is as following:
Arduino Uno connects to my computer with a USB cable, and also connects to GND, VCC, TX and RX of the GPS module. I'm in a flat/apartment, so I've connected the GPS module to an antenna with a 5m extension cable (and a couple of cable adapters) so I can put it by the window.Code is from TinyGPS++:

Code: Select all

// Test code for Adafruit GPS modules using MTK3329/MTK3339 driver
//
// This code just echos whatever is coming from the GPS unit to the
// serial monitor, handy for debugging!
//
// Tested and works great with the Adafruit Ultimate GPS module
// using MTK33x9 chipset
//    ------> http://www.adafruit.com/products/746
// Pick one up today at the Adafruit electronics shop
// and help support open source hardware & software! -ada

#include <Adafruit_GPS.h>
#include <SoftwareSerial.h>

// Connect the GPS Power pin to 5V
// Connect the GPS Ground pin to ground
// Connect the GPS TX (transmit) pin to Digital 8
// Connect the GPS RX (receive) pin to Digital 7

// You can change the pin numbers to match your wiring:
SoftwareSerial mySerial(8, 7);

#define PMTK_SET_NMEA_UPDATE_1HZ  "$PMTK220,1000*1F"
#define PMTK_SET_NMEA_UPDATE_5HZ  "$PMTK220,200*2C"
#define PMTK_SET_NMEA_UPDATE_10HZ "$PMTK220,100*2F"

// turn on only the second sentence (GPRMC)
#define PMTK_SET_NMEA_OUTPUT_RMCONLY "$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29"
// turn on GPRMC and GGA
#define PMTK_SET_NMEA_OUTPUT_RMCGGA "$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28"
// turn on ALL THE DATA
#define PMTK_SET_NMEA_OUTPUT_ALLDATA "$PMTK314,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0*28"
// turn off output
#define PMTK_SET_NMEA_OUTPUT_OFF "$PMTK314,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28"

#define PMTK_Q_RELEASE "$PMTK605*31"

void setup() {
  while (!Serial); // wait for Serial to be ready

  Serial.begin(115200); // The serial port for the Arduino IDE port output
  mySerial.begin(9600);
  delay(2000);

  Serial.println("Software Serial GPS Test Echo Test");
  // you can send various commands to get it started
  //mySerial.println(PMTK_SET_NMEA_OUTPUT_RMCGGA);
  mySerial.println(PMTK_SET_NMEA_OUTPUT_ALLDATA);

  mySerial.println(PMTK_SET_NMEA_UPDATE_1HZ);

  Serial.println("Get version!");
  mySerial.println(PMTK_Q_RELEASE);
 }


void loop() {
  if (Serial.available()) {
   char c = Serial.read();
   Serial.write(c);
   mySerial.write(c);
  }
  if (mySerial.available()) {
    char c = mySerial.read();
    Serial.write(c);
  }
}
I've also tried using the Neo-6M and Ultimate GPS module under a clear sky for over an hour each, yet it still doesn't lock. I know it's wired correctly because I get the NMEA sentences coming through, just without any useful info. $GPGGA sentence seems to indicate that there's no satellites connecting.
As well as that, I've also tried connecting the GPS module directly to the computer with a USB to serial converter.

Here's a chunk of the output I'm getting after leaving the antenna connected to an Adafruit ultimate by the window for 45 minutes.
01:12:01.520
$GPGSV,1,1,00*79
01:12:01.584
$GPRMC,010241.800,V,,,,,0.00,0.00,050180,,,N*4F
01:12:02.456
$GPGGA,010242.800,,,,,0,0,,,M,,M,,*45
01:12:02.488
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
01:12:02.539
$GPRMC,010242.800,V,,,,,0.00,0.00,050180,,,N*4C
01:12:03.455
$GPGGA,010243.800,,,,,0,0,,,M,,M,,*44
01:12:03.486
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
01:12:03.538
$GPRMC,010243.800,V,,,,,0.00,0.00,050180,,,N*4D
01:12:04.456
$GPGGA,010244.800,,,,,0,0,,,M,,M,,*43
01:12:04.491
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
01:12:04.539
$GPRMC,010244.800,V,,,,,0.00,0.00,050180,,,N*4A
01:12:05.456
$GPGGA,010245.800,,,,,0,0,,,M,,M,,*42
01:12:05.493
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
I'm new to this so any and all help is appreciated, and do let me know if I missed out any important information.

Thank you!

User avatar
rpiloverbd
 
Posts: 198
Joined: Mon Nov 29, 2021 8:13 am

Re: GPS module not locking onto satellite?

Post by rpiloverbd »

Hello, did you try your experiment indoors or under the open air? I have seen some GPS modules that do not work indoors at all. But they connect to the satellite if kept outside the window.

User avatar
BirdOfSteel
 
Posts: 5
Joined: Wed Jan 19, 2022 5:50 pm

Re: GPS module not locking onto satellite?

Post by BirdOfSteel »

Most of the time it's just by the window, but I've tried both the uBlox and Adafruit Ultimate + an antenna which was under a clear sky for over an hour each. No luck, though.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: GPS module not locking onto satellite?

Post by adafruit_support_mike »

What kind of antenna are you using?

User avatar
BirdOfSteel
 
Posts: 5
Joined: Wed Jan 19, 2022 5:50 pm

Re: GPS module not locking onto satellite?

Post by BirdOfSteel »

adafruit_support_mike wrote:What kind of antenna are you using?
This is the antenna I bought:
https://www.amazon.co.uk/gp/product/B01 ... eature_div

Soon I'll try a better location so I can test it without the SMA adapters and extension cable in case one is faulty or something.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: GPS module not locking onto satellite?

Post by adafruit_support_mike »

Do one change at a time. It's easier to identify effects that way.

User avatar
BirdOfSteel
 
Posts: 5
Joined: Wed Jan 19, 2022 5:50 pm

Re: GPS module not locking onto satellite?

Post by BirdOfSteel »

adafruit_support_mike wrote:Do one change at a time. It's easier to identify effects that way.
No luck so far, unfortunately. This is some of the output I'm getting after 30 minutes by the window without the extension cable or adapters:

Code: Select all

$GPRMC,142944.094,V,,,,,0.00,105.30,090222,,,N*42
$GPVTG,105.30,T,,M,0.00,N,0.00,K,N*35
$GPGGA,142945.094,,,,,0,0,,,M,,M,,*4A
$GPGLL,,,,,142945.094,V,N*78
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,01,12,,,29*70
$GPRMC,142945.094,V,,,,,0.00,105.30,090222,,,N*43
$GPVTG,105.30,T,,M,0.00,N,0.00,K,N*35
$GPGGA,142946.094,,,,,0,0,,,M,,M,,*49
$GPGLL,,,,,142946.094,V,N*7B
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,01,12,,,29*70
$GPRMC,142946.094,V,,,,,0.00,105.30,090222,,,N*40
$GPVTG,105.30,T,,M,0.00,N,0.00,K,N*35
$GPGGA,142947.094,,,,,0,0,,,M,,M,,*48
$GPGLL,,,,,142947.094,V,N*7A
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,01,12,,,28*71
$GPRMC,142947.094,V,,,,,0.00,105.30,090222,,,N*41
$GPVTG,105.30,T,,M,0.00,N,0.00,K,N*35
$GPGGA,142948.094,,,,,0,0,,,M,,M,,*47
$GPGLL,,,,,142948.094,V,N*75
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,01,12,,,27*7E
$GPRMC,142948.094,V,,,,,0.00,105.30,090222,,,N*4E
$GPVTG,105.30,T,,M,0.00,N,0.00,K,N*35
$GPGGA,142949.094,,,,,0,0,,,M,,M,,*46
$GPGLL,,,,,142949.094,V,N*74
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,01,12,,,27*7E
$GPRMC,142949.094,V,,,,,0.00,105.30,090222,,,N*4F
$GPVTG,105.30,T,,M,0.00,N,0.00,K,N*35
$GPGGA,142950.094,,,,,0,0,,,M,,M,,*4E
$GPGLL,,,,,142950.094,V,N*7C
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,01,12,,,27*7E
$GPRMC,142950.094,V,,,,,0.00,105.30,090222,,,N*47
$GPVTG,105.30,T,,M,0.00,N,0.00,K,N*35
$GPGGA,142951.094,,,,,0,0,,,M,,M,,*4F
$GPGLL,,,,,142951.094,V,N*7D
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,01,12,,,28*71
$GPRMC,142951.094,V,,,,,0.00,105.30,090222,,,N*46
Is it important for the antenna to be under a very clear sky or is it okay if it's by some buildings and a tree?

Thanks!

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: GPS module not locking onto satellite?

Post by adafruit_support_mike »

Buldings are a problem because they contain steel, electrical wiring, and other things that block radio signals. Trees are fine.. you can have as many of those as you want. ;-)

User avatar
BirdOfSteel
 
Posts: 5
Joined: Wed Jan 19, 2022 5:50 pm

Re: GPS module not locking onto satellite?

Post by BirdOfSteel »

It's been over a month since your reply but I just wanted to say that it works well now! Just needed to take it further outside! I also used the wrong adapter at one point but it's all sorted. Thanks very much for your help!

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: GPS module not locking onto satellite?

Post by adafruit_support_mike »

Glad to hear it's working for you. Happy hacking!

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”