I’m looking for the absolute easiest way of making a robot that is GPS-aware.
I’ll probably be using a PIC microcontroller, so it would need to interface with that easily.
I’ve found a number of GPS modules available, e.g.:
I think most of the kits use a serial comms standard called NMEA. One also has an RS232/TTL output. However decoding the data is looking quite complicated. All I want is the latitude and longitude!
I was wondering if anyone could point me to a way of doing this? Perhaps some PIC code that shows a hello-world interface for the module? (E.g. using a PIC’s UART).
Or perhaps there’s an easier way?
What are you planning on doing with your GPS-aware robot? Oh man, I really wish someone would make a complete GPS solution with a TTL interface that just spit out latitude and longitude on request. Oh well.
Michael Simpson wrote a nice series of articles for Servo magazine last year about interfacing GPS receivers, and he was nice enough to put the four parts online here. He uses modules from SparkFun, but also generally breaks down the NMEA 0183 protocol and provides some good reference links, so you can use the information with whatever receiver you want.
Thanks for your quick response!!
It’s going to (hopefully) be a boat that can navigate. Fairly simple once the GPS is cracked.
Fancy going into business and making easy GPS interfaces? I imagine the market would be relatively big for a relatively specialist item.
Thanks for the link, I’ll check it all out!
Been to Parallax recently? Their various stamps and controllers might be rather…expensive, but they have a lot of useful stuff.
The Parallax GPS Module accepts simple serial commands and returns the values you want using a single I/O line:
Parallax GPS Receiver Module
On an unrelated note, the Emic Text-to-Speech is pretty cool too:
Emic Text-To-Speech SIP Module
Wow, I had never seen that one, and given that it’s a complete drop-in solution it’s not even all that expensive. I wish it had separate TX and RX lines, but that’s no biggie, it’s totally awesome!
What would be ideal is if I can find someone who’s written an NMEA procedure for the PIC16F628, shoving the appropriate bytes in RAM, or even better, extract the longitude and latitude into some kind of binary representation rather than string. (The NMEA is strings, isn’t it?!) I went ahead and bought:
For a nice small price, although I think I’ve made my life harder despite my intention to do otherwise, because I chose the RS232 version, and most modules support NMEA instead - which will make finding an existing example out there quite hard - but then again, RS232 is probably more compatible with the PIC.
This is now the second project I want to make that needs to be an asynchronous serial data receiver - does anyone know any good tutorials and/or books?
Before you go to a lot of trouble making your robot GPS-aware, you should carefully consider what you expect from the effort. Most people are under the false impression that when a GPS receiver reports a given figure of accuracy, this means absolute accuracy. It does not! Most commonly available GPS receivers give locations that are accurate in absolute terms to at best 5-10 meters, but this varies with time. If you spend more to get a WAAS-enabled receiver, you might get to 1-3 meters absolute accuracy. To improve on this you have to collect position data for hours or days and average the positions. However, if a few meters accuracy is OK for what you want in a robot, by all means add GPS to your menu.
A GPS receiver actually reports the estimated error in collecting all of the available signals and processing them to arrive at a position. For a variety of reasons this can be in error by more than 15 meters and the receiver is incapable of recognizing this fact. Multipath distortion and other problems contribute randomly so that in the worst case, your estimated position will suddenly jump by many meters. For more information google “gps accuracy”.
Dennis Milbert’s page is pretty good but somewhat dated: home.comcast.net/~dmilbert/handacc/
David Doyles’ is more recent: doylesdartden.com/gis/gpstest.htm
David Wilson’s is for those who like math (I do): users.erols.com/dlwilson/gps.htm
Let us know how you get on!
What I have done is to get two GPS units, one gets connected to an antenna mounted on a tripod. I look up the location on Google Maps and get the actual LAT/LON by clicking “Link to this page” and scrolling through the URL… you will find something like: UTF8&ll=38.564325,-90.372842 embedded in the tag… that is the LAT/LON… in this case:
Now what I do is get the data from the tripod mounted unit and compare the output to the known position… say it returns -90.372600 and my known value is -90.372842, I subtract the two and find an error of 0.000242 on that reading. I make the presumption that since my robot is not that far away, it should subtract the amount from it’s own reading. (Or add if larger)
It does help… I am still working out the details… I use a zigbee RS232 connection to talk between the robot and the PC in the fixed position. (My workshop in this case.)
You may want to experiment with this method as well. The discrepancies come because the earth is not exactly round… so the satellites float up and down a bit in their orbits due to gravity fluctuation. If the two points are fairly close… it works okay. Further apart… well… you may need to experiment.