This setup uses the built in ESP32 radios on the TinkerNav boards to transmit correction data between base station and rover and enable an RTK solution on the rover. See our How to Send Correction Data page for additional information on options for sending correction data between base station and rover.
This is the most basic setup for running your own base station and rover and requires:
- 2 TinkerNav base boards
- 2 2.4 gHz WiFi antennas (provided with the TinkerNav boards)
- 2 GNSS antennas
- WiFi network that both boards can connect to
- Optional – TinkerCharge board(s) for operation with a battery
For this setup you will have a rover and a base station setup on the same WiFi network. The hardware is the same for the rover and base station with different firmware and configurations of the PX1125R or PX1122R. To start let’s set up the hardware.
For the rover, connect the GNSS antenna to the U.FL connector on the TinkerNav board. See the TinkerNav pinout for location of the GNSS antenna. Also connect the 2.4 gHz patch antenna to the ESP32 MHF3 (smaller) connector. Repeat this setup for the base station setup. Your setup should look something like this picture above. Power both the base station and the rover through one of the USB C ports on each.
Reminder to position your GNSS antennas outside and ideally away from buildings and trees. Placing a piece of metal a few inches bigger than the antenna under the antennas helps reduce multi-path and improve antenna performance. The metal can be as simple as a sheet of aluminum foil.
The GNSS receiver is configured during the setup portion of the example programs by sending binary messages to the receiver from the RP2040. Specifically, the programs find the current baud rate of the receiver and resets it to factory defaults. The rover works on the factory defaults and does not require additional changes, the base station is configured with another binary message to operate as a survey in base station. Optionally, you can also configure TinkerNav using SkyTraq’s GNSS viewer, using our instructions.
Next you will need to upload (flash) firmware to the ESP32 and RP2040 on each of the TinkerNav boards. The RP2040 in this setup interfaces with the optional TinkerCharge board and sends that information to the ESP32 which publishes it to a webpage. The ESP32 does most of the work, connecting to WiFi, as well as receiving and sending correction data to and from PX1125R/PX1122R GNSS receivers.
The Arduino IDE is used to flash the firmware since it is a readily available environment with a large user base and many useful libraries. The Arduino 1.8.X and 2.X IDEs can both be used for development and flashing.
There is firmware for both the rover and base RP2040. The firmware is responsible for programming the GNSS receiver, reading data from a TinkerCharge board, if present, and communicating that information the ESP32, which does most of the work in this configuration.
The RP2040 firmware is found in the RP2040 folders at our GitHub example for TinkerRTK using a WiFi network.
The RP2040 firmware depends on three libraries that must install, SerialTransfer, Max17055_TR, and programSkyTraq. The first of these is installed using the Arduino IDE’s Manage Libraries function, which you access from the Arduino IDE’s Tools menu. The image below show the correct library, which you can find by searching for their names in the library manager.
The second library, programSkyTaq is available from our GitHub programSkyTraq repository. Download, unpack, and copy the programSkyTraq directory to your arduino/libraries folder.
The third library, MAX17055_TR, is available at from our GitHub MAX17055_TR repository. Download, unpack, and copy the MAX17055_TR directory to your arduino/libraries folder. This library implements more functionality of the MAX17055 than the other available MAX17055 libraries.
For this firmware you will need to install the Earle Philhower RP2040 board set. Installation instructions are found in the documentation for the board set. Note that the Arduino MBED board set supports most needed functionality for TinkerNav, however Arduino MBED does not implement software serial as of the writing of these instructions. Software serial is needed because the RP2040 offers two hardware ports and the TInkerNav board uses the two hardware serial ports for communicating with the GNSS receiver and the optional LoRa radio since small corruptions of data that occur with software serial, especially at higher speeds, can cause dropouts in time critical data for these two devices. Software serial is used for the less critical task of communicating small amounts of data between the RP2040 and the ESP32 radio. Data drops will occur on this communication path, but are tolerable.
With the libraries installed, you can now compile the RP2040 firmware in the Arduino IDE and flash it to the RP2040 by connecting a USB-C cable from the computer running the Arduino IDE to the RP2040 side of the TinkerNav board. You will need to select the “Raspberry Pi Pico” board from the available RP2040 boards as shown heres
A successful flash looks like the picture below. Note that if you run into trouble flashing the RP2040 see the trouble shooting section below.
Remember that you must repeat the above steps for both the base and rover boards with the appropriate firmware. The base board includes “BaseStation” in the name and the rover includes “Rover” in the name.
Serial output from the RP2040 to the Arduino IDE, or other, serial monitor should look like this:
Next we will flash the ESP32s on the base and rover boards. The ESP32 is again flashed with different firmware for the base and rover configurations. The firmware here includes the credentials for your WiFi network, so you will need to modify the “Inputs.h” file before flashing.
To flash programs to the ESP32s you need to install the ESP32 board set in the Arduino IDE. A good tutorial on installing the ESP32 board set is found here.
ESP32 Base Station
First we will flash the base TinkerNav’s ESP32. The base board is responsible for serving RTCM correction data to a client that connects over the same WiFi network. To do this the ESP32 reads the RTCM correction output of the GNSS receiver and sends it to a TCP server. This method enables one base and one rover on the same network. To enable more than one rover or rovers on different networks see the <caster> example. The base station’s ESP32 also serves a webpage that displays basic information about the base station’s status.
The firmware for the base station is found in the ESP32 base station folder at our GitHub. Modify the Inputs.h file to include your WiFi network’s name and password. To flash the firmware select the “ESP32C3 Dev Module” board from the “ESP 32 Arduino” board set.
A successful flash will look like this:
Running the program will provide the following output to the Arduino IDE serial monitor. Note that to access the webpage provided by the base station ESP32 type the IP address output over serial into a browser on any device connected to the same network.
Finally we flash the ESP32 for the rover TinkerNav board. The ESP32 on the rover, in this configuration, is responsible for receiving the RTCM correction data from the TCP server on the base station ESP32 and sending that data to the GNSS receiver on the rover. The GNSS receiver uses that correction data to calculate an RTK solution, which is displayed on a webpage served by the ESP32 and output as NMEA data from the RP2040 for use in your application.
Firmware for the ESP32 on your rover is available in the ESP32 rover folder at our GitHub TinkerRKT WiFi network example. You will need to modify the Inputs.h file again, this time adding both your WiFi credentials and the IP address of the base station ESP32 (find this by running the base station ESP32 connected to a serial monitor). Follow the same steps as above for the base board to flash this firmware to your rover ESP32. Output from the rover ESP32 will look like this:
Working Base Station and Rover Pair
The first indication that that the boards are working as planned is the indicator light on the base station and rover. On the rover, the light will start off red, turn to yellow when a GPS solution is found, green for an RTK float solution, and blue for an RTK fix solution. On the base station the light will start off red, once there is a GPS solution it will turn to green, and once the solution is stable and the unit is surveyed in, it will turn to blue. Note that it is normal for surveying to take a few minutes and the light may toggle from green to blue a few times before locking in on blue. On both the rover and the base station there is also a small green led near the GNSS receiver that will flash once per second once a GNSS solution is found.
Both the base station and the rover also publish web pages to the IP addresses they print to the Arduino IDE serial monitor when they start up. Put those IP addresses into a browser on any device attached to the same WiFi network as your base station and rover. Some of the web pages produced are shown below.
The home page for the base station provides the options below. Note that you can click on the TinkerCharge, RTK, GNSS, and Map View cards for more information.
Clicking on the RTK data card shows the time the base station TinkerNav board has been up and the number of RTCM correction data made to the TCP server.
The TinkerCharge card will show the following data if a TinkerCharge board is connected to the base station TinkerNav.
The GNSS card will show the current latitude and longitude.
The Map View will show a map of the base station’s location using Open Street Maps.
The rover webpage provides additional options from the following homepage.
TinkerCharge provides the same data as the base station TinkerCharge option. RTK provides the information below. This information includes the date and time from the GNSS receiver and the time that the rover station has been up. Information about the RTK fix is provided including the current fix type, which can be GPS, RTK Float, and RTK Fix. The age of the RTK data is displayed as well as a RTK ratio that describes the quality of the RTK fix. The RTK ratio has values from 0 to 10, with 10 being the best. Any cycle slips are displayed for the GPS, Galileo, and BeiDou constellations respectively. These cycle slips occur when the receiver loses lock with the satellite and loses count of the carrier phase cycles. Finally the east, north, and up baseline is displayed. This is the distance in each direction between the base station and the rover (the example below is for antennas next to each other).
The Satellites card shows the list of satellites currently being tracked by the receiver along with their location in the sky (azimuth and elevation) and their signal to noise ratio. Signal to noise ratio is affected by the elevation of the satellite with higher elevation satellites having a shorter path through the atmosphere. Any obstructions in the sky, such as trees or buildings, also affect SNR. Multi-path, or multiple receptions paths from the satellite to the receiver will also degrade the SNR value. Values above 40 are best for RTK solutions.
Latitude and longitude are shown in the GNSS menu.
Finally the Map card shows the current location displayed on an Open Street Maps map. The Open Street Maps interface allows you to zoom and pan the map with additional options available by editing the code. Open Street Maps is similar to Google Maps, but provides a free interface.
Difficulty Detecting or Flashing RP2040 or ESP32
If your ESP32-C3 or RP2040 processor gets in a bad state and does not respond to the Arduino IDE you can reestablish communications with the Arduino IDE by following these steps:
- Connect one end of a USB-C cord to TinkerNav (either RP2040 or ESP32-C3).
- While the other end of the USB-C cord is unplugged, press the “Boot” button on the TinkerNav board corresponding to the processor you are trying to communicate with.
- Plug the USB-C cable into your computer while holding down “Boot”
- Release the “Boot” button.
- If you are still unable to see serial communications after a program is flashed, this seems to happen with the ESP32-C3, unplug and re-plug the USB cable one more time without holding down the “Boot” button.
No Serial Output from ESP32, or only crash reports
For the ESP32, if you can flash normally and the program seems to be working but you are not seeing serial output to the Arduino display you may need to enable “USB CDC on Boot”. To do this select the “Tools” menu in the Arduino IDE and select “Enabled” next to the “USB CDC On Boot:” menu item. This setting usually sticks after it is changed once, but may be lost occasionally and need to be reset to “enabled”.
Serial data is output on a crash/reset of the ESP-32 regardless of the “USB CDC on Boot” option, so there may situations where you only see these crash reports and none of the serial output you expect. Check the “USB CDC on Boot” option and make sure it is enabled.