M8Q-5883 GPS

How to configure ublox GPS settings / increase update rate

The default configuration of your GPS may not offer optimal performance on your quad. See how to increase the update rate. Applies to SAM-M8Q, M8Q-5883, and similar.

I’ve recently installed a Matek M8Q-5883 on a quad. Based on the ublox M8Q, it’s a great GPS/compass, with extremely short acquisition times. While the unit was effectively plug & play to install, I realized that the factory default configuration doesn’t let you take advantage of the unit’s full capabilities. Specifically, it defaults to the NEMA protocol and a 1 Hz update rate. This means that regardless of any settings you set in your flight controller’s firmware (such as Betaflight), position updates will be limited to once per second.

Why does this matter & why would you want to increase the update rate?

Well, with a 1 second update rate, your home arrow will update only once a second, as does everything else derived from GPS coordinates. Similarly, if you are sending GPS coordinates back to your transmitter via telemetry, those readings only update once a second. Having a faster update rate such as 5Hz or 10Hz might mean getting a couple of additional readings before your quad crashes, potentially making it easier to locate.

Changing the settings

The following setting are what I use:

  • Set protocol to UBLOX
  • Set navigation update rate to 5Hz. Going beyond 10Hz would limit you to using only a single GNSS (GPS), which means you likely would give up location accuracy compared to multi-constellation (GPS+Glonass, for example).
  • Set baud rate to 57600. Why? The faster the navigation update rate, the more messages have to be sent from the GPS to the flight controller. In order to keep up, the GPS/FC interface needs to run at a high enough speed.

These settings have to be changed on the GPS itself. In order to change them, you first need an adapter & cable to connect the GPS to your computer. Once you have that, you can use the u-center software from u-blox to configure it.

USB Adapter & Cable

The interface on the GPS is a TTL serial interface (TTL refers to the signal levels that are used). So you need a USB to TTL interface adapter, and a cable with the right connector for the GPS. The Matek unit I have uses a 6 pin JST SH1.0 connector.

Here’s the adapter I’m using (product link is in the Links section below). You can buy other brands, but I can confirm what I have works. I recommend you get one with the FTDI chip.

The SH connector on my GPS is a relatively common connector, and used on some flight controllers for the cable to interface with the DJI Air Unit, so you might want to rummage around your spares bin to see if you already have one. If not, you can buy a cable kit with pre-crimped silicone cables and a bunch of different JST SH1.0 connectors. I’ve linked to a couple of those kits at the end below.

In my case, I found a suitable cable, cut off the connector on the other end, and crimped some pins on the wires. These pins then fit into the jumper cables that came with my USB adapter. You only need to connect 4 wires: Vcc (5V), Ground, RX, TX.

Be sure to connect the correct pins together on the adapter & the GPS: Vcc to Vcc, Ground to Ground, RX to TX, and TX to RX. Before you plug it into your computer, set the Vcc level on your adapter to whatever your GPS uses on the USB TTL adapter. In my case that is 5V. For some reason the jumper on my adapter is labeled “TTL level”, even though all this really does is change the voltage on the Vcc pin.

Now you’re ready to connect your GPS to your computer and fire up the u-center software.

Using the u-center software

The u-center application (see “Links” section) is Windows-based. So if you’re on a Mac or other platform, you’ll need to find someone with a Windows computer, or use a workaround (such as running it in a Virtual Machine).

Here are the steps I used to make the changes:

1) Select the COM port corresponding to the USB adapter from the Receiver -> Connection menu. In my case that’s COM13, but is likely something different in your case. You may also need to adjust the Baudrate under the Receiver -> Baudrate menu. Since my GPS defaults to 9600, that’s what I used for the initial connection.

2) Switch over to the Configuration View via the View –> Configuration View menu:

3) First we’ll change the serial output protocol to ublox & change the baudrate to 57600. To do this, navigate to PRT (Ports). Click the little lock in the bottom left to enable making changes. Press the “Poll” button to read current config from the GPS (this happens automatically if you have auto-polling enabled; that’s the icon to the right of the Poll button). Then change Protocol out to 0 – UBX, and set baudrate to 57600. Finally, press the Send button to send these settings to the GPS.

4) Now we will change the update rate of the GPS. Select “RATE (Rates)” on the left, which brings up the rate settings. To select a 5Hz rate, we change the measurement period to 200ms (the inverse of 5Hz). For 10Hz, you’d enter 100ms. Press the Send button to send the new setting to the GPS.

5) In order for the settings we’ve just changed to survive a GPS module power-cycle, we need to save the configuration to EEPROM. To do this, select CFG (Configuration), then select “I2C-EEPROM”. Select “Save current configuration”. Finally, press the Send button. That’s it!

Update Betaflight settings to match

Now that you’ve changed the config on the GPS side, it’s time to update the settings on the Betaflight side to match:

If all is well, you should now be all set with faster update rates. The first time you power on the GPS after doing this, it may take a bit longer to acquire satellites as it’s doing a cold-start (at least it did in my case). If you have any questions, feel free to leave a comment below.