Shop Learn
Propeller Based Handheld GPS with Full Code — Parallax Forums

Propeller Based Handheld GPS with Full Code

WBA ConsultingWBA Consulting Posts: 2,929
edited 2018-01-04 05:30 in Robotics
This thread will contain all the code and details for the handheld GPS that I had on my table at UPEW. I have been meaning to post this for others to have access to the code and just kept forgetting. Let me start by stating that 100% of the code was created and/or compiled by forum user Abel for his handheld GPS. He has since moved on to iPhone programming, but I was able to get him to dig out the code from his archives and email it to me.

[post=711079]Abel's Handheld GPS[/post] consisted of a Propeller Demoboard, Serial GPS module, and the 4DSystems uOLED-128-G1 in a case with four AA batteries.

His code works very well and utilizes 7 of the propeller's 8 cogs. He stopped working on the code before he implemented the serial input from the keypad, so the destination coordinates are hardcoded in the code so that the directional/distance calculations can still work.

Attached is the zip file that Abel sent me that has all of his code for the GPS. There are helpful comments here and there. The program I have loaded into my unit is the "GPS_uOLED II.spin". Also in the zip file and attached here, is a schematic that he threw together for what would have been his second version using a Propstick USB.

The code refreshes the display by doing a full screen erase and full screen write, so there is a noticable screen blanking once every 2 seconds. Obviously this could benefit from some optimization. Also, updating the code with working keyboard input would allow you to input destination coordinates on the fly which would make this ideal for Geocaching.

My version of the Handheld GPS is in the next post


  • WBA ConsultingWBA Consulting Posts: 2,929
    edited 2011-08-14 21:48
    I began work on my version using a Polycase VM-36 case, Gadget Gangster Rev 1 Propeller Platform USB (the proto version of the GG-PPUSB), the discontinued Parallax PMB-248 GPS module, and the same uOLED-128-G1 display.

    Pictures of the outside case (Front, close up of display, side with power switch, and side with USB port):


    The top end showing how things are stacked "neatly" inside and it partially opened:

    The GPS laid out and a zoom in of the GPS and uOLED connections:

    Showing how nicely the Propeller Platform form factor fits perfectly into the Polycase VM-36 case:
    1024 x 271 - 157K
    953 x 768 - 486K
    1024 x 647 - 310K
    1024 x 635 - 305K
    614 x 1024 - 229K
    1024 x 561 - 279K
    1024 x 396 - 189K
    1024 x 683 - 323K
    1024 x 683 - 281K
    1024 x 281 - 146K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 22,999
    edited 2011-08-14 22:12
    Oh, that's very cool! Garmin, watch out: there's a new threat on the block!

  • WBA ConsultingWBA Consulting Posts: 2,929
    edited 2011-08-14 23:07
    Nick from Gadget Gangster took some pics and video snippets while we were talking about my GPS and the propeller platform board in the Polycase enclosure at UPEW 2011. Here are links to those in his Picasaweb Album:

    Quick video of the inside

    Quick video of the front while it is on

    Album link of the rest of the pics.
  • blittledblittled Posts: 681
    edited 2012-08-19 18:48
    I just found this project. I am also working on a Propeller Geocaching device but I am using Ray's PSM which also has built in SD card reader. I also am using the m100 keyboard. Are you using the m100 Keyboard for input?
  • WBA ConsultingWBA Consulting Posts: 2,929
    edited 2012-08-20 13:14
    I haven't taken this project any further yet, I reduced my active projects to 3 and this was number 5 on my list so it is on hold. I have used it extensively to fine tune my great circle math code for my Shackable GPS Scavenger Hunt project that I am working on, but haven't setup the M100 keypad yet. I was using this thread and the code on it about the M100 so if you haven't seen it, check it out. It appears to be somewhat simple to use and can be utilized like a PS2 keybord.
  • I realize this is an old thread, but I found it in a roundabout way from the new Customer Projects forum. You have my vote for posting a link to this there! :cool:

    I've got a project in mind similar to this that I was hoping to get some feedback on: Bought my Grandpa's last old Jeep, a 1946 Willy's CJ2A, and the speedometer doesn't work. After engine & transmission swaps, plus lift and larger tires, even if I got it working again or replaced it, no chance it would be accurate without a speedo gear change as well.

    I've toyed with the idea of a drop-in replacement GPS speedo that they sell for refurbing old cars, etc, but ultimately I'd like more info than just MPH if I'm going to have a GPS in there. Here was my thought:

    A small screen like you have here, displaying a compass with N,S,E,W on the edge of the circle and a pointer for current direction of the Jeep compared to N on the circle.
    MPH - speed over ground from GPS
    Trip Meter A - push button to reset at beginning of trail for overall distance
    Trip Meter B - push button to reset between way points
    Possibly altitude for plotting on topography map later? - I think most GPS output altitude fairly accurately

    Would this be pretty doable with the Prop and Parallax's Waveshare NEO-7M-C GPS?
    Also, does anyone know how accurate the "compass" feature of the GPS is, or would I need a separate electronic compass module? I would think it should be fairly accurate, but?

    Eventually, it would be pretty sweet to have some kind of a data-logging function to save the GPS coordinates to an SD card every 30 seconds or whatever speed was appropriate, to plot on a map at some point. Then people could see the entire trail in context, and the length of time it took to traverse if desired. (This helps in fuel logistics because MPG doesn't really apply, it's more like gallons per hour burn out there).
  • WBA ConsultingWBA Consulting Posts: 2,929
    edited 2017-11-30 23:00
    I am jealous that you have that Jeep, it's definitely a keeper. For a GPS based speedometer/odometer, it is easily possible, but there are some catches.

    First, there will be a delay with the GPS reporting accurate speed when first taking off or making sudden speed changes (like braking for a stop). Not usually a major issue, but something to note.

    Second, GPS accuracy will be a factor in determining clean speeds if you use software to determine speed. Speed can be calculated in software, but most NMEA sentences support reporting speed, so that of course would be best/easiest. Keep in mind that speed is reported in knots. Kalman filtering will help greatly with software based speed calcs, but I am not aware of any clean implementations with the Propeller and GPS (but I am sure it's been done already)

    Third, GPS update frequency and overall accuracy. The Parallax module is defaulted to 1 Hz which would be fine in most cases, but at least take a look at some modules that report 10x per second like Adafruit's Ultimate GPS breakout so you can determine what fits your needs. HOWEVER, the one Parallax sells, Waveshare NEO-7M-C, does support a 10Hz update frequency according to the User Manual from the wiki, even though the Waveshare Wiki page for the module shows 5Hz. I was unable to locate anything documenting how to change the rate, but a quick Google search came up with this page, that details the configuration is done by Waveshare's U-Center software.

    Compass: The GPS heading is only accurate when you are moving, so for a bulletproof directional display, I would add a compass chip. You could only update direction after true movement of the GPS unless you want/need accurate heading when the Willys is sitting still. Based upon the concept of "if you come to a stop heading north, you should remain north until you start moving again".

    Trip Meter: With proper filtering of location data, appropriate distance measurements could be made to increment an odometer. However, you need to use data points that are greater than the GPS's positional tolerance. In other words, the NEO-7M-C GPS has an accuracy rating of "2.5mCEP (SBAS:2.0mCEP)" so you should use caution when logging distance for GPS readings less than 2.5m from each other. Using multiple readings, filtering, etc., you could increment the odometer for each distance reading that is over 2.5m so that you are not logging "movement" that is simply the variations in the accuracy of the GPS module itself (typically called "GPS static drift").

    As for datalogging, KML logging for use with Google Earth is very easy as seen here. Google Earth can still import KML files even though newer standard formats are preferred (.gpx and .loc). The GPX format is a pretty simple XML structure, so it would not be a major challenge to have the Propeller log to a GPX file instead of a KML file.
  • Dr.Prop,
    1946 CJ2A! Talk about bring back memories, My first car was a 1948 CJ2A that somone had cobbled on an uninsulated aluminum cab. The heater had been removed from under the dash and mounted between the seats. That ment no defroster. Many hours of fun summer and winter!
  • Thanks guys, that was a great rundown. With the fires here, I haven't had time to post or be on much this week, but I do appreciate the info and maybe someday I'll get the point where I could do a project with coding this in-depth.
    Yeah, the CJ2A is something else - major "bare bones", but have done some pretty serious upgrades for wheeling it, so we'll see how it goes! :lol:
Sign In or Register to comment.