Go Down

Topic: Ublox neo 6m GPS - can't get a fix (Read 312 times) previous topic - next topic

majinjoko

Dear all,
I bough a gps module from ebay (ref: https://bit.ly/2JBhcfm) and connected to an Esp32 nodemcu board. The board is fully compatible with arduino IDE.
I think that the hardware & software is ok, since the gps is powered and I can print the GPS NMEA messages.

My problem is that I never get a fix, even waiting for 10-15 minutes.

The messages that I get are:
Code: [Select]

18:09:05.552 $GPGGA,,,,,,0,00,99.99,,,,,,*48
18:09:05.554 $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
18:09:05.618 $GPGSV,1,1,01,08,,,14*75
18:09:05.619 $GPGLL,,,,,,V,N*64
18:09:06.539 $GPRMC,,V,,,,,,,,,,N*53
18:09:06.539 $GPVTG,,,,,,,,,N*30

-- cut --

18:15:14.686 $GPGGA,,,,,,0,00,99.99,,,,,,*48
18:15:14.687 $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
18:15:14.798 $GPGSV,2,1,06,13,,,22,14,,,21,15,,,21,17,,,20*7B
18:15:14.801 $GPGSV,2,2,06,18,,,22,20,,,19*7C
18:15:14.805 $GPGLL,,,,,,V,N*64
18:15:15.693 $GPRMC,,V,,,,,,,,,,N*53
18:15:15.693 $GPVTG,,,,,,,,,N*30

-- cut --

18:27:30.684 $GPGGA,,,,,,0,00,99.99,,,,,,*48
18:27:30.686 $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
18:27:30.795 $GPGSV,2,1,08,02,,,22,08,,,22,09,,,21,15,,,22*76
18:27:30.798 $GPGSV,2,2,08,16,,,22,20,,,21,23,,,21,27,,,22*70
18:27:30.803 $GPGLL,,,,,,V,N*64
18:27:31.661 $GPRMC,,V,,,,,,,,,,N*53
18:27:31.662 $GPVTG,,,,,,,,,N*30


Please ignore the timestamp at the beginning as it is printed by the console terminal.
If I am right, the GPGSV message reports that a set of satellites is in view. The number of satellites varies, sometimes get to 8, sometimes drop to 5, and so on.

The sketch is pretty simple:
Code: [Select]
#include <HardwareSerial.h>
#include "BluetoothSerial.h"

BluetoothSerial SerialBT;
HardwareSerial MySerial(1);

void setup() {
Serial.begin(115600);
    Serial.println(">>>>>>>>>>>>>>>>>> SETUP");
    MySerial.begin(9600, SERIAL_8N1, 16, 17);
    if(!SerialBT.begin("ESP32")){
        Serial.println("An error occurred initializing Bluetooth");
    }else{
        Serial.println("Bluetooth initialized");
    }
}

void loop() {
    while (MySerial.available() > 0) {
        uint8_t byteFromSerial = MySerial.read();
        Serial.write(byteFromSerial);
        // Do something
        char charFromSerial = (char)byteFromSerial;
        SerialBT.print(charFromSerial);
    }
}


The gps module is connected to the 3.3v pin (but using the 5v pin does not change the fix result).
The board is powered by a power bank. Powering the board with my laptop.. again, no luck.

This is the board pinout: https://cdn.instructables.com/FOL/YWLI/JEOILQ5U/FOLYWLIJEOILQ5U.LARGE.jpg
I am using pin 16-17 to get the serial output from the gps module. Nodemcu and gps module are connected to a breadboard and to some jumper wires (10cm or less).


The provided antenna is quite small but the gps module is outside. On the same exact position, my phone get more than 10 satellites and a 3d fix in no time.


I kept the sketch as simple as possible to avoid any other possible problem or side effect.

Can you, please, help me?
Do you think is it possible that this problem is library-related? Should I use a gps library or, at the end of the day, those libraries are just NMEA messages parsers?
Do you have any other suggestion that can help me get a fix?

Are these king of modules able to fix *without* connecting to a arduino board? Mine has a red led that is steady when powered (I don't know what will happen with the led once the fix is got).

Thanks in advance for any idea!

Paul_KD7HB

I guess if I had that problem, I would put a device, smart phone, etc., next to your device and see if it gets a GPS satellite fix.

Paul

srnet

#2
Mar 24, 2019, 07:47 pm Last Edit: Mar 24, 2019, 07:56 pm by srnet
If I am right, the GPGSV message reports that a set of satellites is in view. The number of satellites varies, sometimes get to 8, sometimes drop to 5, and so on.
Yes, and the signals are reported as so weak that it could take a very long time to get a fix.

If the GPS is outdoors with a good view of the sky, then the GPS or its antenna are faulty (or not good enough)
$50SAT is now Silent (but probably still running)
http://www.50dollarsat.info/
http://www.loratracker.uk/

srnet

#3
Mar 24, 2019, 07:55 pm Last Edit: Mar 24, 2019, 07:56 pm by srnet

Quote
On the same exact position, my phone get more than 10 satellites and a 3d fix in no time.
That is irrelavent, GPSs in phones work in a completly different way to standalone GPS and you cannot compare their performance.
$50SAT is now Silent (but probably still running)
http://www.50dollarsat.info/
http://www.loratracker.uk/

KASSIMSAMJI

i lately faced same issues like yours, powering the gps off the Lion battery ( with short soldered jump wires < 4 cm ) and using that 25mmx25mm antenna made the module get fix in 10 secs or less, indoors under the bed with < 3m accuracy

and if you are really serious with that project of yours, get the big antenna
Electrical Engineer

Geek Emeritus

#5
Mar 24, 2019, 08:18 pm Last Edit: Mar 24, 2019, 08:19 pm by Geek Emeritus
Code: [Select]
Serial.begin(115600);

reevaluate that number. close enough to get data, far enough to present false readings
All PMs will be deleted unopened due to arrogant argumentative pot stirring Malfoys.
 If you have not read "How to use this forum - please read", in particular: "7. If you are posting code or error messages, use "code" tags":  expect rude responses

srnet

Code: [Select]
Serial.begin(115600);

reevaluate that number. close enough to get data, far enough to present false readings
I don't understand, could you explain ?
$50SAT is now Silent (but probably still running)
http://www.50dollarsat.info/
http://www.loratracker.uk/

Power_Broker

"The desire that guides me in all I do is the desire to harness the forces of nature to the service of mankind."
   - Nikola Tesla

Geek Emeritus

Serial speeds are not infinitely adjustable. they come in standard speeds, and 115600 is not one of them. try 115200 as noted above

115600 is close enough to 115200 to read nonsense.
All PMs will be deleted unopened due to arrogant argumentative pot stirring Malfoys.
 If you have not read "How to use this forum - please read", in particular: "7. If you are posting code or error messages, use "code" tags":  expect rude responses

srnet

#9
Mar 24, 2019, 09:42 pm Last Edit: Mar 24, 2019, 09:48 pm by srnet
115600 is close enough to 115200 to read nonsense.
AH IC.

Not sure of the implication of a potential 0.35% frequency error in the output to the serial monitor on a ESP32

It appears to be of no consequence as far as the OP is concerned, the copies of output that were posted do not indicate corrupt data to the serial monitor.
$50SAT is now Silent (but probably still running)
http://www.50dollarsat.info/
http://www.loratracker.uk/

srnet

i lately faced same issues like yours, powering the gps off the Lion battery ( with short soldered jump wires < 4 cm ) and using that 25mmx25mm antenna made the module get fix in 10 secs or less, indoors under the bed with < 3m accuracy
A 10 second fix time is possible under 'hot fix' conditions when a GPS has previously downloaded the satellite data for its fix and its then stored the data in GPS backup, and that the data is no more than 2-3 hours old.

Under cold fix conditions, with a fresh power up and no previous GPS fix in the last couple of hours, the fastest a standalone GPS will get a fix is 30-35 seconds. There is a limitation as to how quick this can be due to the amount of bandwidth allocated to the download of the GPS satellite data. 
$50SAT is now Silent (but probably still running)
http://www.50dollarsat.info/
http://www.loratracker.uk/

majinjoko

I would put a device
Paul
Well that's what I tried (as reported in the OP), very strong gps fix.

If the GPS is outdoors with a good view of the sky, then the GPS or its antenna are faulty (or not good enough)
En plein air :) Any way to identify whether the gps or the antenna is faulty, apart from buying a new one?

That is irrelavent, GPSs in phones work in a completly different way to standalone GPS and you cannot compare their performance.
That's fine. It was not a matter of performance, but a simple approach to check whether there was gps signal in that position ("gps position".. you understand what I mean..)

and if you are really serious with that project of yours, get the big antenna
Ok but relax :) As I wrote, I was outside, just testing the module as-is in the best conditions possible. In the final project I will surely look for a better antenna, but I could buy that later. Am I wrong?

Code: [Select]
Serial.begin(115600);
reevaluate that number. close enough to get data, far enough to present false readings
Typo. Thanks!

It appears to be of no consequence as far as the OP is concerned, the copies of output that were posted do not indicate corrupt data to the serial monitor.
The data is not corrupted in the serial monitor, but this is an error I will fix asap.

srnet

#12
Mar 24, 2019, 11:39 pm Last Edit: Mar 24, 2019, 11:51 pm by srnet
Quote
Well that's what I tried (as reported in the OP), very strong gps fix.
You really are miss-understanding completly the differance between how a mobile phone uses a GPS and how a standalone GPS works.  It is entirely possible that you might believe a mobile phone has a 'very strong gps fix' but that a fully functioning standalone GPS will not get a fix in the same location, or it could take a very long time to do so.

I presume that when you say 'very strong gps fix' the phone is reporting the signals strengths for each of the GPS satellites, so how do they compare with the signal strengths you are getting from the Ublox GPS ?

Quote
Any way to identify whether the gps or the antenna is faulty, apart from buying a new one?
Sure, with a lot of very expensive lab equipment, you can identify and test for most things.

Quote
It was not a matter of performance, but a simple approach to check whether there was gps signal in that position
Sigh .......

There will be a 'GPS signal' in most place on the planet, even deep underground. The key issue is whether the signals are strong enough for the GPS to understand them.  

$50SAT is now Silent (but probably still running)
http://www.50dollarsat.info/
http://www.loratracker.uk/

srnet

For a standalone GPS to get a fix from cold it must first download the catalog of data on the GPS satellites. Under very weak signal conditions, even if the GPS can see the satellites, this download can take a very long time due to the weak signals causing persistent data errors.

A mobile phone or tablet can bypass the download of data from the GPS network by using various forms of GPS assist. The phone\tablet knows where it is on the globe so can download the required catalog of data from the mobile phones network or Internet connections. It can do this very quickly.

Hence a phone\tablet can give the illusion of 'very strong' signals, by getting a fast fix even when the GPS signals are weak.
$50SAT is now Silent (but probably still running)
http://www.50dollarsat.info/
http://www.loratracker.uk/

majinjoko

Dear srnet,
thank you for your explanation.

At this point, since the phone is not a valid comparison, is there any possible reasonable approach to check whether the gps/antenna is faulty or not? (except the "with a lot of very expensive lab equipment" approach since I don't have any of this).

Go Up