View Full Version : trying to get a gps to work
03-22-2009, 06:59 AM
i recently received this gps http://www.sparkfun.com/commerce/product_info.php?products_id=465, i have yet to get it to work, has anybody ever used this, or know how to get it started
Timothy D. Swieter
03-22-2009, 07:45 AM
I don't have that exact unit, but I have something similar. I have only tested my units briefly, but I did get it working with a GPS object I found in the Object Exchange. It was two or three weeks ago when I did downloaded it. It was easy to setup. I attached my unit to my Propeller demo board. I then added four wires for power, ground, tx, and rx. Then I downloaded the GPS object to the Propeller with the proper pin configuration (be sure to double check which is Tx/Rx and what direction they really are).
I kept my USB cable plugged into the Propeller Demo Board and after a little bit (it had to aquire the GPS signal) I was starting to see data streamed to my laptop. The data was showing up in a terminal window (I was using Parallax Serial Terminal). The data shown in the terminal window is s formatted screen with various items - this screen/data was formated by the Propeller Object, it was just the raw data from the device.
Oh - also be sure to set the correct BAUD rate for the Propeller GPS object for your device. I think there was some digging in the GPS code to find and set that - perhaps it was in a sub-object.
Timothy D. Swieter, E.I.
www.brilldea.com (http://www.brilldea.com) - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
03-22-2009, 07:47 AM
Easy, isn't it?! The GPS simply has a serial interface. Only thing you have to take care about is that the GPS module works with 5V. So you need a level shifter for the connection. For level shifting there are plenty of tips here in the forum.
When you connected the propeller with the GPS module (with level shifter), you simply can use FullDuplexSerial.spin to read what it says. Maybe you can start the Serial object on 2 COGs and simply copy the output of the GPS to the PC for the beginning. With the NMEA Reference you can decode those messages. Once you understood what it sends, you can write some spin code which decodes the messages and shows them in a user-friendly format.
03-22-2009, 09:21 AM
I've·had great luck with several of these GPS units.
Just apply 5 volts.· The red LED will come on.· When the LED blinks, you have GPS lock.· I normally get GPS and WAAS lock inside·the house.
To read the output with a computer, use the Prop Plug.· Wire Rx, Tx, and VSS to the GPS unit and use HyperTerminal to view the output.· There is another program called SIRFDemo, version 3.83 is the latest that I have found.· I don't remember where I got it, just do a search.· At one point, Sparkfun had SIRFDemo available, but I didn't see it there now.
Using SIRFDemo, the GPS can be set to output only the·GGA and·RMC NEMA strings at 57,600 bps.· The GPS will remember these settings for a few days if left unpowered.
I'm just using a 10K resistor between the GPS output and the Propeller pin.· I'm not sending the GPS anything from the Propeller.· I'm using Tim's four port serial version of the FDS object.· At 57,600 bps there isn't enough time to save one NEMA string before the next one starts, so I'm only grabbing the few pieces of data that I need from the first NEMA string (GGA string, fix and··# of sat info) and saving the·whole NEMA RMA string.
··· Rick Brooks
03-22-2009, 10:23 AM
I used the fullduplexserial object and just sent the data to a hyperterminal program. Afterward I had to manipulate the strings of data to filter out what I wanted. Its not to difficult.
Visit my site -> www.rawcircuits.com (Http://www.rawcircuits.com)
03-22-2009, 10:43 AM
ok, i got it hooked up, but when i try to display the info on my display(which is a serial display from 4d systems) i get a 0 displayed on the screen, the red light is flashing so i know i have a signal, i am using an object from obex (attached), i have tried switching the tx/rx pins around and also tried 4800 and 9600 bps, any ideas?
03-23-2009, 01:32 AM
OK, i have tested your code grasshoper, and i it outputs what i type like its supposed to, i also hooked the gps up to the propplug, and i get random characters speratically spread all over, so its outputting something, i just dont know what, do i have a bad gps or what
edit: i just tried getting the gps data without the use of another object, i opened up another fullduplexserial object to read the pins of the gps and get the same random characters as i would with just a straight shot with the propplug
Post Edited (science_geek) : 3/22/2009 10:59:15 PM GMT
03-31-2009, 11:50 PM
Your duplicate thread in the·Sensors forum has been removed.