PIC16F88 Delorme Tripmate GPS Logger with Time and Speed

I’ve updated my PIC16F88 Delorme Tripmate GPS Logger, so it now includes time and speed logging. Using the trip information recorded by the GPS logger, you now have even more variables to play with. For example, using time and velocity information, one can plot not only the speed, but also the acceleration of the car (dv/dt) for a trip:

Continue to the post for more information about the updated firmware, usage instructions, and limitations of this firmware.

This PIC16F88 Delorme Tripmate GPS Logger with Time and Speed firmware uses the exact same hardware and software of the PIC16F88 Delorme Tripmate GPS Logger, so please follow the instructions on the PIC16F88 Delorme Tripmate GPS Logger page for information about component selection and circuit construction. This firmware is intended solely as an update to allow for speed and time logging.

The firmware was rewritten to accommodate the variable logging changes, so the structure is quite different. Unfortunately I had to move most of the processing commands to functions outside of main() because of page size limitations. This clutters the code quite a bit, but I needed to do it to fit all of the code onto a PIC16F88. I’m planning on moving this firmware to a PIC18F series microcontroller at some point to take advantage of the larger program space and RAM. However, for the time being this current iteration will stand as my exercise monitor.

What are the functional changes in the firmware?

  1. The microcontroller now records Time, Latitude, Longitude, and Speed when valid data being received (as opposed to just Latitude and Longitude). Unfortunately, due to the program memory restrictions of the PIC16F88, I was unable to include date and/or Course Made Good (heading) recording. Please note that the date and heading are stored in RAM but are not written to the EEPROM.
  2. The read mode no longer outputs nice, Google-friendly Latitude and Longitude coordinates. Again, due to program memory restrictions, I removed all floating point math. Therefore, the Latitude and Longitude are now presented in the original NMEA HHMM.MMMM format. This requires some post processing, but it is very minimal. Please see the Excel file included with the example below.
  3. Any previously recorded data will return nonsense information. This is due to the new storage format.

Other than these functional changes, the firmware should be drop-in compatible.

Source Code
As with the original PIC16F88 Delorme Tripmate GPS Logger, the PIC16F88 must be initially programmed with the ‘tinybld16F88_i8MHz _19200.HEX’ hex file to program the GPS logger firmware onto the PIC. If you have already programmed the bootloader onto the PIC then all you need is to load the newest firmware below.

UPDATE (February 27, 2007)
Terry pointed out the following issue with the source code:

Found one bug. In socal, the longitude is > 99, so the fprintf needs to be changed from:

void sendDataToSerial() {
fprintf(PC,”%06Lu,”, GPRMC.time);
fprintf(PC,”%04Lu.%04Lu,%C,”, GPRMC.latHandM, GPRMC.latFractM, GPRMC.latDir);
fprintf(PC,”%04Lu.%04Lu,%C,”, GPRMC.lonHandM, GPRMC.lonFractM, GPRMC.lonDir);
fprintf(PC,”%03Lu.%03Lurn”, GPRMC.speedH, GPRMC.speedL);
}

To:

void sendDataToSerial() {
fprintf(PC,”%06Lu,”, GPRMC.time);
fprintf(PC,”%04Lu.%04Lu,%C,”, GPRMC.latHandM, GPRMC.latFractM, GPRMC.latDir);
fprintf(PC,”%05Lu.%04Lu,%C,”, GPRMC.lonHandM, GPRMC.lonFractM, GPRMC.lonDir);
fprintf(PC,”%03Lu.%03Lurn”, GPRMC.speedH, GPRMC.speedL);
}

Example Output

  • Raw data output from PIC16F88 Delorme Tripmate GPS Logger: 2007-02-01.txt

12 thoughts to “PIC16F88 Delorme Tripmate GPS Logger with Time and Speed”

  1. Steve – Thanks for the update. Keep up the great work. My parts arrived recently, Hopefully I will find the time soon to build a test circuit and load one of hour precompiled routines on it (learning a new compiler AND building a circuit is too much to debug at the same time :O) ).

  2. I have a few GPS boards laying around that output NMEA-compatible sentences, both of which I got on ebay for less than 15 dollars. I want to make as small a logger as possible, but I thought the code was too daunting to hack out myself, so they have been sitting in a closet for awhile. After seeing this, I should have just gone for it. 😛 Awesome code, and even better write-up… thanks a ton! Now to get some SMT parts and a a pair of lithium batteries and hack up a tiny logger.

  3. Also, what is the best place to get these parts without having to pay 19 dollars in shipping and handling from Microchip? That’s just ridiculous.

  4. Working on this project and I found my regulated 5v battery pack that I had laying around… now does anyone think that powering both the logger and the GPS board from the same 5v supply will be a problem?

  5. I thought the original porject was cool, and when I see this recent update, I am just ecstatic. Well done project and writeup!
    Since I’ve blown up so many “PIC programmers” so far (fragile things when they meet Ms. Wired), I’m moving to “bootloadable” versions as fast as I can whenever I can.
    C.Lathe — Mouser & Digikey both carry PICs (since Mouser is in TX I get overnight delivery to OK for UPS Ground cost), as well as many hobby outfits.

  6. Hi, when compiling with ccs 4.023 you have to change the ORG:
    #ORG 0x0F90,0x0FFF {}
    otherwise you will get errors (does not fit into rom).
    Pito

  7. I have been looking for a GPS logger project for a while and your Tripmate is ideal. I would like to put it together with a bit of future proofing such as capacity for Peter’s add on of your LCD panel. As serendipity (aka Sod’s Law) would have it, Peter’s cvtelectronics.com site has recently been taken down. Google’s cache of the site whet my appetite but cannot give the schematic!

    Would you have a copy of Peter’s schematic using the 18F2550? Or is it obvious enough to build the Tripmate using the 18F2550, just matching equivalent 16F88 pin connections?

    I am fairly handy with a soldering iron, but this is my first PIC project. Any help or comments would be appreciated.

    Norm, London, UK

  8. Good news – discovered at the weekend that cvtelectronics.com is back up and I have got Peter’s schematic.

    Norm, London, UK

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.