GPS-RTK Hookup Guide
Connecting the GPS-RTK to a Correction Source
Before you go out into the field it’s good to understand how to get RTCM data and how to pipe it to the GPS-RTK. For this example we will show how to get correction data from the UNAVCO network, pull that data in using RTKLIB, and pipe it down over serial to the GPS-RTK.
- 1x GPS-RTK
- 1x L1/L2 GNSS Antenna
- 1x Metal Plate of 4” or larger
- 1x SMA extension cable (if needed to get a clear view of the sky)
- 2x micro-B USB cable
- 1x Serial Basic
- A few jumper wires
- Credentials with a free RTCM provider such as UNAVCO
- Download and unzip RTKLIB. We will be using 2.4.2.
UNAVCO has fairly good coverage in the USA. Using their interactive map find a station that is near your location. It’s ok if it is more than 10km (6 miles) away, we’re just practicing.
Site P041 is pretty close to SparkFun HQ. We’ll be using it. To access UNAVCO data feeds you will need to send an email to firstname.lastname@example.org to request credentials. Let UNAVCO know if you are affiliated with any business, school, or organization and if you are using the account for personal use. Access to UNAVCO is free; I believe they need this information for reporting on their grant funding.
Once you have your UNAVCO credentials open RTKLIB (in Windows run rtklaunch.exe). This small window allows you to launch the various RTK programs. For this tutorial we’ll be using RTKNAVI, the second button from the right.
RTKNAVI allows you to connect to RTCM feeds from various providers, including UNAVCO. Click on the small “I” button.
From the input stream window click the check box next to ‘Base Station’, select NTRIP Client from the dropdown, and the RTCM 3 format. Next click on the small three dots under Opt - this will open the NTRIP client configuration options.
Enter the UNAVCO domain, port, and credentials that you were issued. Next click on the Ntrip... button. This will launch the Ntrip browser so that we can locate the P041 station.
Ntrip browser allows you to connect to different providers and view what streams are available. I wish it was as simple as being able to search for ALL the RTCM streams near a given location but no option currently exists. Instead, we must connect to each provider and see what locations they provide, and what type of correction streams are produced by a given location. Remember, the NEO-M8P only works with RTCM 3.x.
This list is quite large and we’re looking for P041. Click on the Mountpoint column header to sort the list alphabetically.
Once we have P041 located, we want the RTCM feed. Copy and paste that mountpoint back into RTKNAVI into the 'Mountpoint' box. Once you've entered all your credentials and mountpoint, click OK to close the NTRIP Client Options window. You can also close the Ntrip browser.
The input stream should be configured so click OK in the Input Stream window to complete configuration. Click 'Start' from the RTKNAVI window to test the connection to the UNAVCO server.
Success! We are receiving a stream. Now we need to output this data. Click the L button for ‘Logging’.
We want to log the Base Station stream to the serial port so now is a good time to connect your Serial Basic or FTDI board. Once the board enumerates, you should have a new serial port. If you run into problems or need drivers checkout the Serial Basic Hookup Guide.
Click the ‘...’ button to configure your serial port. Note that you’ll need to select the same baud rate as your GPS-RTK module is configured for. By default, the NEO-M8P communicates at 9600bps 8-N-1, so use this setting. Once you have things configured properly the TX LED on the Serial basic should blink once per second indicating the UNAVCO server is pushing data all the way down to the TX pin on the Serial Basic.
The RTCM pipe is complete. Now we need to connect the "last inch" to the NEO-M8P.
Time to power up up the GPS-RTK board. Attach a micro-B cable to the GPS-RTK board. The power LED should illuminate. Open the U-Center software from U-blox. Be sure to read Getting Started with U-Center if you haven’t already. Thankfully, the NEO-M8P's default configuration allows it to receive RTCM correction data without any further changes. All you need to do is feed the NEO-M8P with serial data and it will begin calculating the high precision location solution.
Select the correct COM port and begin viewing the NMEA data. You should have a position lock very quickly. Once the PPS LED begins to blin0,k you are ready to start piping RTCM data to the GPS-RTK board.
The Serial Basic board should still be blinking once a second with RTCM data from the UNAVCO server. Using two jumper wires connect GND on the Serial Basic to GND on the GPS-RTK. Next, connect TXO to the MOSI pin on the GPS-RTK. The MOSI pin is the RX UART pin by default (when DSEL jumper is open). Jumper wires without solder are obviously a precarious setup but we’re just testing things out. Arrange things so the connection is semi-permanent. Within a few seconds you should see the RTK LED begin to blink.
Congratulations! Your GPS module has entered RTK float mode. When the RTK LED turns off completely then the module has solved the carrier ambiguities and entered RTK fixed mode and is outputting centimeter level positions!
Once you have the GPS-RTK receiving RTCM correction data successfully, you can begin planning how to obtain and deliver the RTCM data to the GPS-RTK. The options are vast and varied:
- It is possible to pull get Ntrip data on an Android app and pipe it over a Bluetooth serial device like the Bluetooth Mate Silver. It’s trivial to connect a Bluetooth serial device to the GPS-RTK serial pins.
- If you need maximum portability a radio link can be the lowest power, smallest footprint. SparkFun offers a variety of LoRa radios and antennas. With the help of a microcontroller these radios can pipe data from the LoRa backhaul over an Qwiic I2C port, serial, even SPI.
- If your end application already requires an internet connection such as GSM or LTE-CAT, then a microcontroller could feasibly connect to an Ntrip server over the internet and pipe the RTCM data over a serial or an I2C connection on the GPS-RTK.