Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Garbled GPS output

Status
Not open for further replies.

upand_at_them

Active Member
I have an old Rand McNally GPS for the Palm PDA. I don't remember if I ever had it working with the Palm, but I decided to make a small tracker with it using this hack: https://www.qsl.net/n2ixd/tracker/hackgps/index.htm

I get regular "data" output, but it's just gibberish. I have tried every possible serial setting on my terminal program, but still nothing discernable comes out.

Any ideas what could be wrong, or what else I could try?

Mike
 
Last edited by a moderator:
Your link appears to be broken and dont work for me.

What baud rate are you using as it sounds like it might be incorrect.

Pete.
 
The link should be:-
https://www.qsl.net/n2ixd/tracker/hackgps/index.htm

Sometimes you need to put an oscilloscope on the GPS output to see what is being sent. There are lots of different things that you have to get right:-

Voltage:-
Levels, 0 - 3 V or -6 to +6V?
Polarity

Communications:-
Baud rate
number of bits
parity bit
number of stop bits

Protocol:-
Once you've got the data coming though, you can see this. It will usually be NMEA from a GPS

I've got some Haicom GPS engines if you are interested.
 
I was finally able to scope this. The voltage levels are -7 to +7V and it doesn't look like there is a start bit. Also the GPS board makes a high pitch, low volume, screech sound when I put my ear down on it.
GPS_capture.JPG
 
Your scope trace shows 12 or so bits;
111011011010
of which appears to be 2 bytes, there seems to be an obvious Start and End bit here;
S11011011E
followed by what looks to be the next start bit and partial next byte;
S0

to me it looks like standard 8n1 serial with one start bit, one end bit and no parity bits.

If your scope is 1mS per division, 10 bits is 5.8mS so each baud looks about 580uS so baudrate is about 1/580uS = 1720 baud which seems a little unusual and might be why you are getting garbled output?
 
I guess I could check the frequency of the crystal? I don't know what else to do other than trash the device. :)

EDIT: Or I could build a PIC interface to software serial the data in at the weird rate and pipe it out at a standard. Hmm.
 
Last edited:
Thanks for the help on this, Roman. I recorded a longer trace and manually decoded it to read: "$GPGGA," Awesome! You're right; it looks like something is wrong with the baud generator. I'll probably just build an interface.

This was a great first use for my new Rigol scope.
 
Last edited:
Excellent work. Do you have a better scope trace?

I would like to see what baud rate it is putting out, out of curiosity. Normally GPS NEMA defaults to 9600 baud but some older units use 4800 (or can be switched to 4800).
 
I measured it at around 588us per bit, which is about 1700 baud. It did vary a little, but it all seemed to stay within 7% of that. You nailed it!

I'm going to write a routine to go with 1700 and edge-align to correct itself. It's strange that it outputs this weird baud rate, though.
 
Cool, thanks for the info. Since that GPS was made specifically for the Palm PDA it may have been designed with a specific baudrate to suit the xtal speed of the Palm. The baudrate is most likely original and meant to be 1700.

If you are using a PCI to decode it, just try with the USART and change the BRG value to find the speed hi and lo where it stops working. Then pick a BRG value right in the middle. You probably don't need to write special code to edge-align.
 
I'm using the hardware USART already, so I have to do software serial. The initial results, using a software serial library, show that the baud rate must not be as stable as I thought. There is some coherent data, but not much. It looks like it starts to stabilize at the end, but that's just this captured sample.
Code:
$GPGÇA,,,,,l0,0p,,,,,,,*66
$ÇP￾M1â‰É#&CáD‡￾eÕÊH	‚ŠÂ‘5‰Ó&âBR’Æ‘r’"bò	r&"ÂÑ)æ	âæ	™fžpvyw,10.5,WZ56
$PÒ]%É5!±ŠªbÆ)Jâ	Â)ªâ	bŠ2bb
ªÂÂQZÂÂ)ªÂbŠªb‚bŠªb‚bŠ²bÂbŠªb‚bŠªb‚R¢"5
¤GPGGA,,,,,,pl00,,,,,,,*66
$GPGSA,,,,,,*42
$GБ•Ò(‚ŠÊb²…Ó&r‚¢ªÊbr±ºÊ’²r‚²’¢bºÅ	ò‚‚br‚b’Ê‚ÒʺbŠ‚rªbº¥©Ó“H%u•J5!±Šªb‚bŠªb‚bŠªb‚bŠ²bbŠªb‚bªb‚bŠªb‚bŠªb‚bŠªb‚²Ê²b‚bŠªb‚bŠªb‚R¢"5$GPGGA,,,,,,0,00,,,l,,,*6v
$G￾Íq≉‰I‰“&Cá$GPRMC,000020lÖq"bÂr‚¢Jšâ™
zŠ&bæb$Bâé	r‚‚Â	ò	b2Ê‚²Šzâ)‚rªbº¥©TH%u•Š«(Š)ªb‚bʪb‚bŠªb‚bŠ²b‚bŠªb‚bŠÚb‚⊪bÂbŠªb‚bŠªb‚bŠ²b‚bŠªb‚¢ªb‚R¢"5
dGPGGA,,,,,,0,00,,,,,,,ª66
$G°GSA,,¬,,,*42
$GБÕê(	‚‚‚’Šb²Å‰Ó&r‚¢ªÊbr±‚ºÊ’²r‚²’¢bºÅ	r‚‚‚b‚r‚b’Ê‚²ÊºbŠ‚rªbº¥©5
$PR¯‰º£ˆœ™•,0¬15,0,15,0,16,°¬‘5,0,15Œ0œ‘•¬0,±5,0,15,0,1–,0,15,0,‘•,0ª4D
$GPGGA,,,Œ¬,0,00,,,,œ,,*66
$GPGSA,,,,,,*42
Š$GP’MC,000022,–,4348.0459,N,0792–®0624,W,0.000,0.0,290697,10.5¬W*5F￾
$PRWIZCH,q5,0,15,0,15,0,16,0,15,0,15,0,15,0,15,0,1u,0,16,0,15,0,15,0*4„5

This makes sense, as I was never able to get this unit to work with the Palm PDA...which I seem to remember had only standard baud rate options.

I'll have a go at edge-aligning.
 
Edge-align routine gives me better data, but still not perfect. This project might be toast.

Code:
$GPGGA,,,,,,0,00,,,,,,,*66
$GPGSA,,,,,,*42
$GPRMC,235949,V,4348.0459,N,07926.0624,W,0.000,0.0,280697,10.5,W*5E
$PRWIZCH,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0*4D
$GPGGA,X±bbb‚b‚‚bbbbbbbR²²j¤8IªÔªP–,,,,,*hÉj¤8I(T©MC,23595`±²‰Ó&Mœ.`ѪÊbrÅ	ÓS'&	““&M–W,0.00`°rb’‚²ÊºbŠ‚rªbº¥T²jPF%u•¥5
Š)	)	‰)‰‰	‰)‰	‰)	‰)‰‰	‰)‰‰	‰)‹‰	‰)‰‰	)‰‰	‰)	)	&%MPC$GPGGA,,,,,,0,00,,,,,,,*66
$GPGSA,,,,,,*42
$GPRMC,235951,V,4348.0459,N,07926.0624,W,0.000,0.0,280697,10.5,W*57
$*I]%i
!±Š¢b‚bŠ¢bb¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚b¢b‚bŠ¢b‚bŠ¢b‚R¢"jR$GPGGA,,,,,,0,00,,,,,,,*66
$GPGSA,,,,,,*42
$GPRMC,235952,V,4348.0459,N,07926.0624,W,0.000,0.0,280697,10.5,¯©ª¢j¤*ªU)«P¤,14,0,14,0,14,0,14,0,14,0,14,`±Š¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚R¢"ÕH$GPGGA,,,,,,`±‚‚bbbbbbbR²²jRFt
êÔªP––,,,,*42
$GPRMC,235953,V,4348.0459,N,07926.0624,W,0.000,0.0,280697,10.5,W*55
$PRWIZCH,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0*4D
$GPGGA,,,,,,0,0`±bbbbbbR²²jPŒÒªÔªP–,,,,,*42
$GPRMC,235954,V,4348.0459,N,07926.0624,W,0.000,0.0,280697,10.5,W*52
$PRWIZCH,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0*4D
$GPGGA,,,,,,0,00,,,,,,,*66
$GPGSA,,,,,,*42
$GPRMC,235955,V,4348.0459,N,07926.0624,W,0.000,0.0,28`ÙʺbŠ‚rªbº¥©Ó¦!a*RWIZCH,14,0,14,0,14,`±Š¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚b¢b‚bŠ¢b‚bŠ¢b‚R¢"jRþ$GPGGA,,,,,,0,00,,,,,,,*66
$GPGSA,,,,,,*42
$GPRMC,235956,V,4348.0459,N,07926.0624,W,0.000,0.0,280697,10.5,W*50
$PRWIZCH,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0*4D
$GPGGA,,,,,,0,00,,,,,,,*66
$GPGSA,,,,,,*42
$GPRMC,235957,V,4348.0459,N,07926.0624,W,0.000,0.0,2xÁ²ÊºbŠ‚rªbº¥TŠj¤*ªU)«(R–14,0,14,0,14,0,14,0,14,0,14,0,14,0XÅ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚R¢"ÕH$GPGGA,,,,,,0,00,,,,,,,*66
$GPGSA,,,,,,*42
$GPRMC,235958,V,4348.0459,N,07926.0624,W,0.000,0.0,280697,10.5,W*5E
$PRWIZCH,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0,14,0*4D
$GPGGA,,,,,,0,00,,,,,,,*66
$GPGSA,,,,,,*42
$GPRMC,235959,V,4348.0459,N,07926.`Ù’¢bºb‚r‚‚‚b‚r‚b’‚²ÊºbŠ‚rªbºRª2Õ*Œ*ªU)«(RKLš,0,14,0,14,`±Š¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚bŠ¢b‚R¢"jR
 
Your GPS output looks a bit funky. Does it actually work at all? The lat and longitude shows it's in the middle of the lake near Toronto. Well i guess that's withina few hundred miles of PA. ;)

Seriously now it looks like it's got no signal as the GSA and GGA strings are down, and the GPRMC has the Valid tag on but the coords look rubbish.

I think before you mess too much with the comms you should give it half an hour outside with a clear sky to see if it can finally get a lock, and if it can't get a lock then maybe the serial comms are not worth worrying about?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top