GPS module change update rate to 10Hz

Hey everyone,

So, I've bought a GPS module that is capable of updating at 10Hz. Thing is that it comes configured as standard with 1Hz update rate.

Datasheet: ATGM336H GPS Module

The module operates at 3.3V and I'm using an ESP32.

In the datasheet there isn't a lot of useful information about changing settings so I looked at other modules that have the same chip (AT6558). Turns out an M5Stack one also uses it. There I downloaded "Gnss Toolkit". Here I can generate "configuration commands" for the module.

|500x406

But I can't get the command in the picture to work. The NMEA sentences still only come in every second (1Hz). Some commands do actually work. I've for example succesfully changed which NMEA sentences come through.

As the ESP32 has multiple hardware serial ports, I'm using Serial2 instead of softwareserial. My code:

#define RXD2 16
#define TXD2 17

void setup() {

  Serial.begin(115200); 
  Serial2.begin(115200, SERIAL_8N1, RXD2, TXD2); //GPS baud rate
  
  Serial2.print("$PCAS02,100*1E\r\n"); 
}

void loop() { 
  while (Serial2.available()) {
    Serial.print(char(Serial2.read()));
    
  }
}

Thanks in advance!

You must be planning to move very fast if you need an update rate faster than 1Hz

...R

Robin2: You must be planning to move very fast if you need an update rate faster than 1Hz

...R

I don't think it's necessarily about how fast I want to move. My plans are to use it for a performance meter for a car (0 - 100 km/h times, ...).

For that use I want it to update 10 times a second (10 Hz). Otherwise measurements wouldn't be accurate if I only get an update once a second.

Given the error in location measurements, most of the responses you get in 1 second will show the same position.

Paul

Never seen a $PCAS02 command before, and I would normally buy a GPS where there was a known manual for it.

Maybe try a Google search on '$PCAS02' ?

ArnoM2001: I don't think it's necessarily about how fast I want to move. My plans are to use it for a performance meter for a car (0 - 100 km/h times, ...).

I wonder if GPS is the correct tool for that?

...R

I wonder if GPS is the correct tool for that?

Especially one as poorly documented as this one seems to be.

Paul_KD7HB: Given the error in location measurements, most of the responses you get in 1 second will show the same position.

Paul

That is indeed possible. I'll let you know how that works out and if I notice differences between 1 Hz and 10 Hz modes.

srnet: Never seen a $PCAS02 command before, and I would normally buy a GPS where there was a known manual for it.

Maybe try a Google search on '$PCAS02' ?

Thanks, I hadn't actually searched for the command literally. Found some more info about these type of commands here.

Robin2: I wonder if GPS is the correct tool for that?

...R

Professional grade car gps performance boxes also use GPS (such as this 10 Hz Dragy one). Tricky thing is when the car is stationary the timer for 0-100 km/h can't start yet. But GPS data is a bit "wobbly". So I might use an accelerometer to capture the moment when the car starts moving.

I you have any other suggestions, I would love to hear them!

jremington: Especially one as poorly documented as this one seems to be.

I didn't really look into it that much when I bought. It was the only 10 Hz capably one on the site where I was ordering a lot of other stuff as well.

Update

After trying a bit more today, I got it working with almost the same code as in my original post. Only difference is that the baud rate for the gps is now set at it's original 9600 (default for this GPS chip). I accidentally set it at 115200 when I was trying some commands before but it got reset as I hadn't saved it into flash on the GPS module (other command).

Code:

#define RXD2 16
#define TXD2 17

void setup() {

  Serial.begin(115200); 
  Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2); //GPS baud rate now at original 9600
  
  Serial2.print("$PCAS02,100*1E\r\n"); 
}

void loop() { 
  while (Serial2.available()) {
    Serial.print(char(Serial2.read()));
  }
}

Don't know why it didn't work before but now I'm getting all the info at 10Hz rate! The GNSS toolkit I talked about before works really well for creating the configuration commands (and it also calculates the checksum). Here is the link again where you can download it.

Cheers!