Uncategorized
1

I’ve tried reconnecting an old GPS module to the UART pins on my raspberry pi, but it seems it’s not able to get a satellite fix.

I’ve had troubles trying to get gpsd started, but I’m able to test the connection with gpsmon. It seems capable of parsing data from the serial connection, but not a single satellite is ever seen.

Then I tried looking at the raw data using the commands

To set it to 9600 baud: stty -F /dev/serial0 9600

To print out the data: cat /dev/serial0

What I got back doesn’t look quite right to me. Here’s an excerpt:

[0x01][0x1B][0x0F][0x1F][0x0C] ÿÿÿÿ$GPGSA,A,1,,,,,,,,,,,,,,,*1E

M,,M,,*7D

9,,,N*44

[0x01][0x1B][0x0F][0x1F][0x0C] ÿÿÿÿ$GPRMC,054305.099,V,,,,,0.00,0.00,220519,,,N*47

A^X^O^_^L ÿÿÿÿ$GPGGA,054305.099,,,,,0,00,,,M,,M,,*7F

$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32

0519,,,N*47

A^X^O^_^L ÿÿÿÿ$GPGGA,054305.099,,,,,0,00,,,M,,M,,*7F

$GPGGA,054306.099,,,,,0,00,,,M,,M,,*7C

9,,,N*47

A^X^O^_^L ÿÿÿÿ$GPGGA,054305.099,,,,,0,00,,,M,,M,,*7F

$GPGGA,054310.099,,,,,0,00,,,M,,M,,*7B

I’ve replaced control characters with their hex codes in [] brackets.

Is this normal, have I used incorrect settings, or does it mean the GPS module is faulty?

[EDIT]

This is the module in question: https://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi/

Using an external antenna (placed ~1m away from the pi).

[UPDATE]

Nearly 48 hours later, I have checked on things, having been left as they were when the question was first posed. I hadn’t received any fix within 3 hours which prompted me to make the post.

Sometime since, the GPS module appears to have started working as expected. The odd ascii/control characters are no longer present in the serial output. The GPS now has a fix, and is seeing 6 – 9 satellites.

I don’t have an explanation for how it has recovered.

Perhaps it was RF noise as suggested by Dougie , but for that to be true, it would mean that the TV I was using for display output (3m away) would have been causing the interference as nothing else is nearby that has changed (powered/unpowered) over the duration. The PI’s wifi has been enabled throughout. I have tried testing whether power cycling the TV has any effect on the GPS reception by monitoring the serial output and it does not look like there is any effect.

It could have been ESD suggested by Dmitry Grigoryev, although if that were true then I guess leaving the antenna charged would have caused it, which dissipated over time, leaving no lasting damage? Is this possible?

It was stored in a dry place (heated indoors), but I can’t rule out moisture damage as I live in a very humid area. Could keeping it powered up, have warmed it up, leading to to evapouration, removing electrical interference?

My other conclusion is that giving it a restricted view (still a good chunk of sky – around 1/3rd), caused it to miss a lot of updates, making a cold start take much, much longer than expected? This wouldn’t explain the corruption seen in the serial output though, would it?

 New contributor
  • 1
    Does the GPS unit have a clear sky view? – joan May 22 at 8:38
  • The NMEA sentences you’re getting appear valid. There’s just a lot of noise in with your signal. How is your GPS connected to your RPi, how long is the cable? – Dougie May 22 at 9:50
  • The following youtube might give you some tips -Troubleshooting the Adafruit Ultimate GPS When Not Getting a Fix 11,156 views youtube.com/watch?v=LtqVrwwVfGY – tlfong01 May 22 at 13:41   
  • @joan It’s located directly (in contact) with a window. It has a visibility of an estimated 33% of the sky. I’ve used the location before with success when the GPS module was new. – Rob yesterday
  • @Dougie The cable is about 10cm-15cm long, using a raspberry pi breadboard breakout. – Rob yesterday

2 Answers

1

Those UART GPS modules often have quite poor reception, so you will only get a fix with a clear sky view. Not inside your house, not just out of the window, not on a lawn right next to your house, not under the trees. Additionally, such modules rely on the GPS signal to get the GPS constellation data, which is very slow and can take several minutes. The worst of such modules won’t store the constellation data anywhere, so every time you power down the module, getting a fix will again require several minutes.

Additionally, even if the module talks to your UART correctly, it doesn’t mean it’s not damaged. For example, you could have killed the amplifier with ESD by touching the antenna. If the module doesn’t get a fix under a clear sky in ten minutes or so, I would bin it and get a new one.

-1

Question

  1. Tried reconnecting GPS module to Rpi UART, not able to get a fix, …
  2. Trouble trying to get gpsd started, able to test the connection with gpsmon, …
  3. Raw data normal, GPS module fried?

Short Answer

  1. Well, to get a fix, you don’t need the GPS module connected to Rpi UART. If you test with the Rpi UART disconnected from the GPS module, your chance of getting a fix will be at least 0.1% higher.
  2. Once you have gotten a fix, the little status blue LED should start blinking slowly, around once per second. If blue LED not blinking, that mean no fix yet.
  3. If there is no fix, you can still talk to the GPS module through UART, but a not fixed GPS module will only give you yesterday data, which is still useful any way, but of course not realtime GPS data.
  4. There are 101 reasons that you can not get a fix. Let me list one by one. The list of reasons is very long, so I will put it in the long answer below.

/ to continue, …

Long Answer

/ to continue, …

Research Notes

/ to continue, …

References

AliEXpress GPS + Beidou Dual mode positioning module ATK1218-BD ATK-S1216 -US$24

TaoBao dual GPS (GPS + BaiDu) Positioning Module ATK1218-BD ATK-S1216 – ¥98

Troubleshooting the Adafruit Ultimate GPS When Not Getting a Fix – Paul McWhorter 2015jun23, 11,180 views

gpsd — a GPS service daemon

How to read NMEA 1083 data over USB on Pi? – Rpi StackExchange 2017apr

Getting NMEA string from GPS module to your Raspberry PI B+ [duplicate] – Rpi StackExchange 2017jan

/ to continue, …

Appendices

Appendix A – My GPS module blinking – YouTube

GPS Module Blinking

Appendix B – My GPS module setup

GPS module setup

Appendix C – My GPS Antenna setup

GPS Antenna setup

Fix times 2019may23hkt2100 – first fix = 8 minutes, followed by 14 sec, 24 sec, 25 sec, 1.24 min, 1.13 min, then 17 min no fix, end of fixing test.

Appendix D – GPS Antenna Location – 4 stories down the “well”

GPS location

Appendix D – GPS Fix Time Measurement at Rooftop Garden

I am going to test if GPS fixing is possible with huge motor generated EMI around.

GPS Fixed Time Measurement at Rooftop Garden with huge EMI motor nearby

Appendix E – GPS Fix Time Measurement with Antenna 1 metre out of window

I surprising found that even with the antenna just 1 meter out of the window, the fix time is regularly less than 1 second. My quick and dirty conclusion is that it not necessary at all to try any fix at the rooftop garden, … 🙂

window 1 meter GPS fix test

Appendix F – 200VAC in 12V AC out switching PSU performance

I read that the power supply for GPS module should be very stable. So I used LiPo 11.2V power bank with heavy duty 2.5A 5V voltage regulator for testing. This morning I used a weak 200VAC in 12V 1A PSU and light LM2596 regulator to test again. I found fixing times very good: 1m43s, 35s, 20s, 9s, 14s.

My quick and dirty conclusion is that the PSU quality doen’t mater much. So from now on I will forget using LiPo battery bank and just use 200VAC in 12V out switching PSU.

using switching psu

Appendix F – Downloading gpsd

gpsd download

Appendix G – Fix time measurements by the window L corner, 0 cm from window

Now I am measuring fix time with antenna by the window very near to a L shape corner. I find average fix time around 5 minutes. So far so good. I am using 200VAC in, 12V DC out, regulated by LM2596 regulator and found no problem. So I will not be using any LiPo power bank in the coming tests.

fix time l corner

/ to continue, …

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: