[Guide] Hooking up and Programming the PMB-248 GPS Reciever
GeorgeL
Posts: 131
Bill of Materials:
Insulate the tips of the Blue, White, and Yellow cables. You will not be using them for this guide.
Take the Green, Red and Black cables, and insert them into the breadboard.
Using jumper cables/ breadboard cables, connect the GPS's:
Green wire to P15
Black wire to Vss
Red wire to Vdd
This is how I set mine up.
Now connect the board to the computer as you normally would and open the Stamp Editor.
Open a new program.
Enter this code in:
Now run the program.
You should get something like this:
If you dont then check that:
You are in an open area. Give the GPS a minute or two to connect.
Everything is connected correctly (make sure the green wire is at Pin 15).
The status light (red) should be blinking or solid. If it is not, you are not putting power into it.
Otherwise lets look at our data.
Example Output:
4734.7540 N 12213.3448 W
In order to use this data, we need to convert it. In this example I will be using Google Earth.
In degrees, minutes, seconds; assuming we dont use the symbols (Google Earth allows this)
we will convert these coordinates·to 47 34.7540 N 122 13.3448 W
Typing this into the Fly to Menu
(Note: this image has typo)
and hit enter. This will take you to (in my example) my room.
·Feel free to use anypart of this code, as long as you include my name
Post Edited (GeorgeL) : 5/12/2009 5:48:59 AM GMT
- Board Of Education, Stamp Board, Boe-Bot, etc.
- PMB-248 GPS Reciever
- Serial Cable/Usb Cable·and Basic Stamp Editor
Insulate the tips of the Blue, White, and Yellow cables. You will not be using them for this guide.
Take the Green, Red and Black cables, and insert them into the breadboard.
Using jumper cables/ breadboard cables, connect the GPS's:
Green wire to P15
Black wire to Vss
Red wire to Vdd
This is how I set mine up.
Now connect the board to the computer as you normally would and open the Stamp Editor.
Open a new program.
Enter this code in:
' {$STAMP BS2} ' {$PBASIC 2.5} 'By George Lejnine and parts by Randy Price 'Program to read in GPS coordinates from the NMEA 0183 GPRMC statement 'Many parts have been removed such as time and course direction, for simplicity. They can easily be added. gpstime VAR Word N VAR Word N2 VAR Word A VAR Word B VAR Word WA VAR Word W VAR Word NN VAR Word WW VAR Word speed1 VAR Word speed2 VAR Nib course1 VAR Word course2 VAR Nib 'Baud rates: '16572 = 4800 baud n4800 CON 16572 main: 'The number after SERIN is the Pin to which the Green wire is connected, in our case 15 SERIN 15,n4800,noGPS1,[noparse][[/noparse]WAIT("RMC,"),DEC gpstime, SKIP 3, DEC N, DEC NN, SKIP 3, DEC W, DEC WW, SKIP 3, DEC speed1, DEC speed2, DEC course1,DEC course2] GOSUB output1 GOTO main '******************************************* OUTPUT ROUTINE ******************************************* output1: DEBUG DEC N,".",DEC4 NN," N " DEBUG DEC W,".",DEC4 WW," W ", CR 'Line Break here 'This statement is optional, it is for the BlueTooth Modules. 'SEROUT 1,84 ,[noparse][[/noparse]"TX", 10, DEC NN,10] RETURN '************************************** GPS Not Detected Routine *************************************** nogps1: DEBUG "no gps",CR GOTO MAIN
Now run the program.
You should get something like this:
If you dont then check that:
You are in an open area. Give the GPS a minute or two to connect.
Everything is connected correctly (make sure the green wire is at Pin 15).
The status light (red) should be blinking or solid. If it is not, you are not putting power into it.
Otherwise lets look at our data.
Example Output:
4734.7540 N 12213.3448 W
In order to use this data, we need to convert it. In this example I will be using Google Earth.
In degrees, minutes, seconds; assuming we dont use the symbols (Google Earth allows this)
we will convert these coordinates·to 47 34.7540 N 122 13.3448 W
Typing this into the Fly to Menu
(Note: this image has typo)
and hit enter. This will take you to (in my example) my room.
·Feel free to use anypart of this code, as long as you include my name
Post Edited (GeorgeL) : 5/12/2009 5:48:59 AM GMT
Comments
Go to where there are two DEBUG statements.
Replace them with:
Now, you dont have to convert the numbers. You can copy paste the results into Google Earth and it will find you!
Nice work! I'm glad I was wrong about the BS2 capturing RAW data. I guess we both learned something.
Now you just made me purchase the PMB-248 GPS Reciever! I am already doing Goggle Earth logging with a propeller, but now I will try it with a Stamp.
Jim
enter coordinates here
Dont forget to run the .bs2 file attached (in the zip)
I would like to use the Polstar PMB-248 to capture latitude and longitude in decimal angular format using the $GPGLL string.
Will the following BS2 code capture the values that I want:
SERIN 10, 16572, [noparse][[/noparse]WAIT ("PGLL,"), SKIP 5, DEC LAT] 'Get LAT data from the GPS (4800 Baud)
SERIN 10, 16572, [noparse][[/noparse]WAIT (",N,"), SKIP 6, DEC LONG] 'Get LONG data from the GPS(4800 Baud)
Regards,
TCIII
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!
47 34.7378 N 122 13.3336 W The time is: 5:3903
3336 <---- DEC Long
The other one doesnt work though.
But in reality do you need it like that, its the same as what I have right now. Just multiply it by 1000 and have that be a new variable?
Post Edited (GeorgeL) : 5/18/2009 12:45:43 AM GMT
I did not write the two code snippets. They are from a BS2 program used to drive a robotic rover from one way point to another until all the way points have been visited.
I had looked at a $GPGLL sentence example: $GPGLL,3751.65,S,14507.36,E*77 and this example: $GPGLL,4916.45,N,12311.12,W,225444,A
It is interesting that the LONG code worked as skipping 6 positions from "N" should not be the longitude decimal angular value according to the second example.
However, skipping 0 positions, not 5 positions, from PGLL (or $GPGLL?) results in a capture of the latitude, 4916.45, which requires starting at $GPGLL in the second example.
The author of the original BS2 code did not indicate if he was using the original Parallax GPS or some other GPS. The code was written before the Polstar PMB-248 became available.
Comments?
Regards,
TCIII
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!
Add to the list of variables:
Comment out the:
Edit the SERIN ·statement to:
Where·you·have the first SERIN add:
Go down to the last of the DEBUG and add
Now in the terminal you should be getting something like this:
Good luck, and a more functional GPS app is to come!
Post Edited (GeorgeL) : 5/18/2009 5:47:49 AM GMT
Duffer
103 3.0057 N 49 22.0000 W
103 3.0055 N 49 24.0000 W
103 3.0053 N 49 26.0000 W
...
The W value keeps increasing by 2 and there is no 103 deg N!
Any sugestions would be greatly apreciated!
I have double checked that my code is correct.
Could this be a problem with my region? Are there different calculations for which area of the world you are in?
I am about 20 mins from Greenwich, UK, so I should be getting very close to 0deg W.
Post Edited (henry151) : 8/27/2009 4:04:38 PM GMT
86 65.0005 N 333 55.0000 W
The W time value is still incrementing.
I have yet to see the GPS attain a lock (solid light).
Are the different revisions of this module anything to consider, this is a REv:2.3
www.parallax.com/Portals/0/Downloads/docs/prod/sens/PMB-248_Specification.pdf
pg 4, it lists Vcc at 3.3V with a max at 5.5V. Would running the chip at 5V for an extended period stress it?
Is there a documented, proper way to reduce the 5V power and logic to 3.3V? Or am I totally missing the point?
Bear in mind I am a newbie, just getting into embedded programming, with gumstix, beagleboard, etc. (And the stamp, too!!! )
All I really need is the NMEA data, not the request/response functionality, so if I can use the $39 unit, i'd like to. (I'm a cheap b***ard)
I dont think there would be a voltage issue, since I've been running the GPS constantly for almost 2-3 months.
I just need to confirm that running from a board this way is the supported, correct, and proper way to do things. Or, if there is a simple way to step the voltage and logic signals down to 3.3V. If nothing else, I'll just use the $79 module.
Does anyone know the MTBF on these things?
I don't want to make 1000 devices and get 250 returns because we burned up a chip by running voltages at the edge of the envelope. Knowwhaddamean
Im having trouble getting right info from my PMB 248 GPS antenna. It only ticks each second and change each second.
This is the program I'm using:
It belongs to George Lejnine.
When I debug the info I get from N, NN, W and WW. I only get garbage data. It ticks like the clock and counts to 60 then it starts over.
Like this:
I live in norway btw, 50min west of Oslo.