Fastrax UP501 GPS Module not accepting commands?

Hey everyone, I am working on my first project and I am running into all kinds of hurdles. The very basic is that I can’t seem to configure my UP501 module to give me RMC only at 10HZ. I am having other issues but need to sort this out first.

Basic setup. I have this module running directly off my Uno R3 or through my old GPS Shield from AF. Both setups produce the same output(just one lets me log to an SD card). Since the Module is not 5v i have the power from the UNO 3.3v pin and for the RX on the up501 i have it going through a Resistor Divider to make sure its not getting 5v when setting commands(digital pin 3 on the UNO). When its hooked up to the GPS Shield I power the GPS mod with digital pin 4 running through a 1n4004 to make sure the Vdrop is enough to get in the VDD range of the UP501 and still using pin 2,3 for RX/TX from the UNO to the GPS Mod. So in terms of hook up i think its covered both ways. The fact that I am seeing the same results both ways makes me think I am either doing something wrong or maybe the module is “locked” at 1hz(which isn’t nearly enough for my project).

The command i am using to set 10hz update.

#define PMTK_SET_NMEA_UPDATE_10HZ “$PMTK220,100*2F”

The comman I am using to set RMC Only

#define PMTK_SET_NMEA_OUTPUT_RMCONLY “$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29”

these came from an AF sketch back from when they sold this module.

https://raw.githubusercontent.com/adafruit/Adafruit-MTK3329-GPS-Module-Test-Sketch/master/Adafruit_MTK3329_GPS_Test.pde

I ran their sketch(un commenting the appropriate lines) as well as about a dozen of my various tests with no luck. When i run through the TX coming from the module i get all NMEA strings at 1Hz. Am i missing something? Do i have a bad module(used, from a friends old project), is there a way to sniff out the config on the module to see if its even getting the commands?

Thanks for any and all help!

Read section 2.10.2 in the associated IT500 Series NMEA manual.

The module is supposed to send a reply to the 314 command:

    $PMTK001,314,3*36

Do you have a Logic Analyzer, or even a second Arduino? You could use those to verify that the reply comes back, or add some extra code to watch for the reply. Normally, the GPS library will ignore the reply.

You could also send a query:

    $PMTK414*33

It is supposed to reply with

    $PMTK514 DT NMEA OUTPUT

...whatever that means.

You could implement a derived class for NeoGPS to handle it. I wrote NeoGPS so it can be configured to just parse the RMC, and only the fields you use. It skips everything else very quickly. This makes it faster and smaller than any other library. It can be 2 or 3 times faster, and save 100's of bytes of RAM. The NMEAloc.ino example only handles RMCs, and only uses the location field.

NeoGPS can also be used from the RX char interrupt, making it even faster and less vulnerable to other activities (e.g., SD logging). See NMEAfused_isr.ino in the Examples section. Troubleshooting section also has some good info.

Cheers,
/dev

Thanks for the reply Dev! I found tons of posts with your responses and found it all very helpful. I have some programming experience writing APIs for CAD but this is all very new to me. GPS included. I did download the NeoGPS library but i’ve had issues not being able to compile anything. Seems like calls to other libraries(like NeoSWSerial.h) return a “No such file or directory”. Because I am new to all of this I have been using TinyGPS library along with SoftwareSerial(as well as trying jboytens gSoftSerial). Since the issue is with the GPS module at the moment I haven’t spent too much time on the library side of things. I imagine i need to find the libraries it was referencing but they aren’t located in the NeoGPS-master i got from github. I will say the comments and documentation in the examples though are extremely thorough and i am planning on learning it.

In terms of your reply. I do have another Arduino, a Duemilinove in addition to the UNO R3. I also have a Microview OLED display that could possibly read/display but i am still learning on what seems like a complicated project(to me at least).

I have read through the IT500 NMEA manual but i wasn’t sure it applied to the UP501. The 10hz and RMC commands i pulled were from the AF sample for this exact module and the ones in the IT500 pdf were different. I don’t know enough about GPS/NMEA data to know whats standard and what is module specific. So when you say " i can send a query" I am not exactly sure what you mean. gpsSerial.print("$PMTK414*33"); ? or something else?

To give you a little info on what i am doing, i am making a lap timer that needs at least that 10hz rate(5/8 mile track with sub 40s lap times). I only care about position, speed and time(hence the RMC data). I am writing this to an SD card as a txt file(lat,lon,speed,time) to later use GPSVisualizer and googlemaps to overlay laps/lines. I also want a display that i can display the fastest speed and lap time after each session. This means i need to use a lookup table or geofencing(or both) to trigger lap times. The method depends on how well the Ardunio can handle conversion to cartesian and computations on the fly as needed. Right now its double posting(to serial and/or SD) each 1hz update(same timestamp and lat/lon) but i am able to pull just the info i want with TinyGPS and write to my SD card(sdFat library). Once i sort out the 10hz update i will also need to start work on the rest of it, but its hopeless if i can’t get that 10hz update. Having lat/lon every 8-10ft (avg speed is around 50mph and max close to 90 i believe) just won’t cut it for the resolution i need cause eventually(if the arduino can handle it) i would like to set up “traps” on the track to see where i am faster/slower.

Because I am new to this I assumed that the GPS spitting out ALL data would slow down everything. I have seen several places that state for 10hz update you should run RMC only. I am able to pull out what i need(but sounds like NeoGPS would be even faster) but its still not spitting out at 10hz as far as i can tell.

Thanks again for taking the time to reply! If you can i would love to know more about sending a query or sniffing out codes the GPS is sending back if you have the time. Also if you can(maybe over messages or email) point me in the direction to sort out NeoGPS as I am sure i just did something wrong.

Thanks!!

Matt

/dev:
Read section 2.10.2 in the associated IT500 Series NMEA manual.

The module is supposed to send a reply to the 314 command:

    $PMTK001,314,3*36

Do you have a Logic Analyzer, or even a second Arduino? You could use those to verify that the reply comes back, or add some extra code to watch for the reply. Normally, the GPS library will ignore the reply.

You could also send a query:

    $PMTK414*33

It is supposed to reply with

    $PMTK514 DT NMEA OUTPUT

…whatever that means.

You could implement a derived class for NeoGPS to handle it. I wrote NeoGPS so it can be configured to just parse the RMC, and only the fields you use. It skips everything else very quickly. This makes it faster and smaller than any other library. It can be 2 or 3 times faster, and save 100’s of bytes of RAM. The NMEAloc.ino example only handles RMCs, and only uses the location field.

NeoGPS can also be used from the RX char interrupt, making it even faster and less vulnerable to other activities (e.g., SD logging). See NMEAfused_isr.ino in the Examples section. Troubleshooting section also has some good info.

Cheers,
/dev

i've had issues not being able to compile anything. Seems like calls to other libraries(like NeoSWSerial.h) return a "No such file or directory".

There is a conflict between IDE version 1.6.8 and everything before, so it could be due to that. If you'd like to figure it out, just post your sketch and the error msgs, and we can go from there.

I imagine i need to find the libraries it was referencing but they aren't located in the NeoGPS-master

Yes, NeoSWSerial et al have their own repositories on github. They are separate libraries, so you have to download and install each one. NeoGPS doesn't care which one you use. In fact, the benchmark example doesn't even use a serial port.

I do have another Arduino

You can attach the other Arduino's RX pin to the UNO's RX pin. Then just load the Due with an echo program that displays whatever comes in on it's own Serial Monitor window. This takes two USB ports and two Serial Monitor windows, one for the UNO and one for the Due. The Due window will show that reply from the GPS, essentially by "eavesdropping."

the IT500 NMEA manual but i wasn't sure it applied to the UP501.

The UP501 manual refers to the IT500 manual, so I think it probably applies.

I am not exactly sure what you mean. gpsSerial.print("$PMTK414*33"); ?

Yes.

Having lat/lon every 8-10ft (avg speed is around 50mph and max close to 90 i believe) just won't cut it

Well, 90mph is 132 feet/second, or 13fps @ 10Hz. GPS easily wanders by 13' in one second, so I'm not sure GPS is useful for that resolution. With a track layout, you can have a good guess of where you are... but for sub-second timings, or to know which part of the lane you're in, I'm skeptical. That is really the purpose of the track beacon, or some other "tripwire".

With a base station at a "known" position on the track, you could log the GPS difference (at the base) while you're running the lap (in the mobile). Later, subtract the base's "wander" from the "known" position to get an offset that could be applied to the mobile GPS position. Maybe someone else knows how much that can help.

Adding an IMU to that might be able to decrease the error to what you want.

its still not spitting out at 10hz

The key part in that section is "setting the baud rate". The RMC and GGA sentences are about 80 characters each. At 9600 baud, those two sentences will take ~167ms to send. But 10Hz is only 100ms, so it can't send the information fast enough. It won't do what you requested. You must increase the baud rate.

if you can(maybe over messages or email) point me in the direction to sort out NeoGPS as I am sure i just did something wrong.

If you have a problem, it's likely that others have had the same problem. Just post them here, where someone else might find them (and the answers) after a search.

Cheers,
/dev

Thanks again Dev! Im running 1.6.5 IDE so im in there :slight_smile: I didn't have any custom sketches, just tried to compile the examples in your library. I will come up with a more complete post about it if i can't sort it out by downloading the other libraries and setting things up in the respective .h files you mention changing in your comments.

Thanks for the info on Echoing the output to another Arduino. I'll start by using the NMEA commands in IT500 because they are different than what i got from AF. Hopefully that will sort everything out!

On the update rate, yes i know its going to be tough. The entire scope of the project is a 9DOF imu so i can get acceleration/brake data, lean data and make a complete datalogger. i have a lot to learn though:) For right now i can move the start/finish to a turn/slower part of the track to get a more accurate trigger. Because i want the whole project to have the GPS data that i can(hopefully) overlay on a map showing areas where i am speeding up/slowing down, what lines i took in turns(most turns will be 25-40mph) and the IMU stuff(possibly machine vision) is part of the driving force i have to figure this out. DGPS is not an option here. WAAS should be if it helps.

The baud rate of the module default was 9600. I did try some other rates but wasn't successful. Now that i know the IT500 PDF should apply that will give me more pieces to the puzzle!

Again i will do my best to document any issues i come across with the NeoGPS library if i can't sort them out. now that i know i need to at least grab some other libraries hopefully that will sort it out.

FYI here is the track.

and here was some laps from my practice last month(after about 2 years off the track). My track time these days is very limited so i want to make the most of it.

Thanks again!!!

So....the last time I assembled the breadboard my rx jumper was one row off! Yup I figured it out last night and was able to configure RMC at 10hz when hooked up to my Uno. It still wont take wgen on the gps shield so im looking into that.

Makes me feel better about my code but worse avout my eyes....

Thanks for the responses Dev. Once I sort out the rx issue on the gps shield ill work on my code with NEO GPS!