LoRa Base Station and Rover

This setup uses LoRa radios to transmit correction data between TinkerNav boards and enable an RTK solution on the rover. LoRa radios enable sending correction data over much longer distances than WiFi, up to 6 km with a clear line of sight. See our How to Send Correction Data page for additional information on options for sending correction data between base station and rover.

Required Components

This is the most basic setup for running your own base station and rover and requires:

  • 2 TinkerNav base boards
  • 2 TinkerSend – LoRa radios
  • 2 Antennas for LoRa radios (provided with TinkerSend – LoRa boards)
  • 2 GNSS antennas
  • Optional – 2 2.4 gHz WiFi antennas (provided with the TinkerNav boards)
  • Optional – WiFi network(s) for both boards to report data to webpages
  • Optional – TinkerCharge board(s) for operation with a battery
Keep in mind that, unlike GNSS on your phone, computing an RTK solution requires an open view of the sky for both the base station and the rover. For initial testing we recommend that you find as open a spot as possible, once you have things working you can experiment with how close to trees and buildings you can get before performance degrades.  In our experience RTK solutions are possible most places on a typical suburban lot, but will degrade close to buildings or under large trees. Solutions are also dependent on where satellites are located at a particular time, so will change with time as well as location. We also recommend a ground plane under your antenna, this can be as simple as aluminum foil, but provides significant protection against multi-path interference.

Setup

For this setup you will use the TinkerSend – LoRa radios to transmit data between TinkerNav boards. 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.

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. Connect the TinkerSend – LoRa board into the two parallel 10 pin headers on the TinkerNav board.  Note the direction of the arrows printed on the TinkerNav and TinkerSend boards and align the arrows for the proper connection. Connect the LoRa antenna (900 MHz or 400 MHz depending on your radio) into the U.FL connector on the TinkerSend – LoRa board. Optionally you can connect the 2.4 gHz patch antenna to the ESP32 MHF3 (smaller) connector. The ESP32 is used to publish webpages with system status on them. 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.

 

Firmware

Next you will need to upload (flash) firmware to the ESP32 and RP2040 on each of the TinkerNav boards. In this setup the RP2040 interfaces with the TinkerSend – LoRa boards to send and receive correction data long distances. The ESP32s play a secondary role controlling the status indicator on the TinkerNav board and publishing a web page with status information.  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. If you run into trouble see the troubleshoot section at the bottom to resolve common problems.

RP2040 Firmware

You can find the RP2040 firmware at our GitHub repository for TinkerRTK using LoRa. There are two separate programs, one for the base station and one for the rover. We use software serial to communicate between the RP2040 and ESP32 on the TInkerNav board since all the hardware serial ports are used for time critical communication with the GNSS receiver. The Raspberry Pi developed board set does not support software serial, therefore we use the Arduino-Pico board set by Earle Philhower for the RP2040.

The RP2040 firmware depends on four libraries that must install, RadioLib, SerialTransfer, Max17055_TR, and programSkyTraq. The first two of these are installed using the Arduino IDE’s Manage Libraries function, which you access from the Arduino IDE’s Tools menu. The images below show the correct libraries, which you can find by searching for their names in the library manager.

The third library, programSkyTraq is available from our GitHub programSkyTraq repository. Download, unpack, and copy the programSkyTraq directory to your arduino/libraries folder.

The fourth 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. 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 below.

A successful flash looks like the picture below. Note that if you run into trouble flashing the RP2040 see the trouble shooting section below. 

Flash both the rover and the base station RP2040 with their respective firmwares.  The firmware for the base station RP2040 is found on our GitHubThe firmware for the rover is also found on our GitHub.

The base station and rover RP2040 firmware includes configuring the SkyTraq receiver to the base station and rover respectively.

ESP32

Next we will flash the ESP32s on the base and rover boards. The ESP32 is also 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 both ESP32s.

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.

First we will flash the base station TinkerNav’s ESP32.  The ESP32 plays a secondary role in this LoRa setup and can be left out entirely if desired. The ESP32 does control the NeoPixel status indicator, which provides a visual indication of whether the unit is done surveying its position and it displays more detailed status to a webpage accessible from the IP address that is printed to USB serial on start up.

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.

Repeat the steps above for flashing the Rover’s ESP32 firmware, which is also found on our GitHub

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.

Base Station

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.

Rover

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.

Trouble Shooting

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:

  1. Connect one end of a USB-C cord to TinkerNav (either RP2040 or ESP32-C3).
  2. 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.
  3. Plug the USB-C cable into your computer while holding down “Boot”
  4. Release the “Boot” button.
  5. 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.