How to Build a DIY GNSS RTK Base Station for Onocoy

by LivingOnCrypto in Circuits > Microcontrollers

72 Views, 0 Favorites, 0 Comments

How to Build a DIY GNSS RTK Base Station for Onocoy

IMG_8563.JPG

In this guide, you will learn how to build your own affordable GNSS RTK base station for onocoy. This station uses an ESP32 microcontroller and a Unicore UM980 GNSS receiver. The total cost is approximately $230, but this can change based on shipping fees and where you buy the parts.

Supplies

UM980_module.png
ESP32_U_wifi_antenna.png

Before You Start (Prerequisites)

Make sure you have the following ready before you begin building your base station:

Required Items:

  1. Computer with a Windows operating system: You will use this computer to set up and program your base station.
  2. USB-C data cable: This cable is used to connect your ESP32 board and UM980 to your computer for programming and communication. Make sure it is a data cable, not just a charging cable.
  3. Basic Hand Tools:

Phillips screwdriver

Wrench: For tightening nuts and bolts.

  1. Drill and Drill Bits:

Drill bit sizes: 3 mm (or preferably 2.75 mm), 8 mm, 12 mm, and 16 mm.

  1. Soldering Iron and Solder to solder the connector pins on the UM980 (or, get someone to solder for you).
  2. Hacksaw to cut the prototype board if necessary.


Good-To-Have Tools:


These tools are not strictly necessary, but will make the building process easier and safer:

  1. Soldering mat, 45x30cm $1


Start the Build

prototype_board_esp_um.jpg
IMG_8561_2.png

The prototype board doesn’t fit as it comes, so you have to cut it to fit. When it fits inside the enclosure, place the ESP32 and UM980 as desired, and mark the locations where you need to drill the mounting holes. Make sure the pigtails for the WiFi antenna and GNSS antenna will reach the side panel.

Screw the standoffs to the prototype board (if using a 3 mm drill, you may have to glue the standoffs to the prototype board) and mount the ESP32 expansion board with ESP32. Before mounting the UM980, you need to solder the pins to the outer row of holes of the device. Then mount the UM980.

Drill holes in one of the two side panels of the enclosure to mount the USB-C power cable, the external WiFi antenna, the GNSS antenna pigtail, and the ventilation plugs if you opted for them. Mount these onto the side panel.

Wiring the Unicore UM980 to the ESP32

ESP32_development_board.png
UM980_wiring_com1.png

The UM980’s UART (Universal Asynchronous Receiver/Transmitter — a simple 2-wire connection for sending and receiving data) is configured by default to use COM1.

The ESP32 also uses the pins labeled TX and RX by default for UART communication.

On the ESP32 expansion board, there are three rows of GPIO pins — use the row marked “S” (for Signal).

The UM980’s COM1 UART uses Pin 9 (RXD) to receive data and Pin 10 (TXD) to send data.

Move the yellow jumper on the ESP32 expansion board to 5V (left position) to match the power requirements of the UM980.


This setup matches the communication lines between the two devices.


Connect the pins as follows:

UM980 Pin ESP32 Pin Function
-----------------------------------------------
Pin 8 (VCC) 5V Powers the UM980
Pin 9 (RXD COM1) TX UM980 receives data
Pin 10 (TXD COM1) RX UM980 transmits data
Pin 11 (GND) GND Common ground

Configuring the Unicore UM980

Device_Manager.png

To configure the Unicore UM980, we need to use the UPrecise Software for Windows. You can download it here. The password to unzip the file is 1234. Install and open UPrecise. Change to English language in the menu in the upper right corner.

Connect Unicore UM980 to UPrecise

  1. Connect the antenna to the UM980.
  2. Connect a USB-C cable to the UM980 and then to the PC.
  3. In UPrecise at the bottom, select the COM port* the UM980 is connected to, select baud rate 115200, and click Connect.

* If you don’t know which COM port the UM980 is connected to, type Device Manager in Windows search box. You will find it under Ports (COM & LPT).

Note: The name of the device can differ, so check Device Manager both before and after you connect your device to be sure which it is.


💡 Tip: If your UM980 isn’t showing up in Device Manager, double-check that you’re using a USB data cable (not just a charging cable).

Configuring UM980 With Commands

UM980_version.png

Before starting to configure your UM980, it’s a good idea to check its firmware version. Paste VERSION in the Command Entry Box and press Enter.

VERSION //Check firmware version

At the time of writing this guide, the latest firmware is UM980_R4.10Build11833.pkg. You can check the latest version at Sparkfun’s GitHub: https://github.com/sparkfun/SparkFun_RTK_Torch

Update the firmware if needed.


In UPrecise, copy & paste the following commands (excluding the explanatory text after the commands) in the Command Entry Box, one by one. When entering a command, i.e., FRESET, there will be an output similar to this saying it was OK: $command,FRESET,response: OK*4D

FRESET // Factory reset
CONFIG SIGNALGROUP 2 // Sets the UM980 to use signal group 2
MODE BASE TIME 120 // Sets base station mode with 120 seconds self-optimize location
GNGGA 1 // Activates NMEA for GGA (GPS Fix Data)
GNGSV 1 // Activates NMEA for GSA (GNSS DOP and Active Satellites)
GNGSA 1 // Activates NMEA for (GNSS Satellites in View)
GNGST 1 // Activates NMEA for GST (GNSS Pseudo range Error Statistics)
GNRMC 1 // Activates NMEA for RMC (Recommended Min. Navigation Info)
RTCM1005 COM1 30 // Sets the UM980 output RTCM 1005 on COM1 every 30 seconds
RTCM1033 COM1 30 // Sets the UM980 output RTCM 1033 on COM1 every 30 seconds
RTCM1230 COM1 30 // Sets the UM980 output RTCM 1230 on COM1 every 30 seconds
RTCM1077 COM1 1 // Sets the UM980 output RTCM 1077 on COM1 every 1 second
RTCM1087 COM1 1 // Sets the UM980 output RTCM 1087 on COM1 every 1 second
RTCM1097 COM1 1 // Sets the UM980 output RTCM 1097 on COM1 every 1 second
RTCM1117 COM1 1 // Sets the UM980 output RTCM 1117 on COM1 every 1 second
RTCM1127 COM1 1 // Sets the UM980 output RTCM 1127 on COM1 every 1 second
RTCM1137 COM1 1 // Sets the UM980 output RTCM 1137 on COM1 every 1 second
SAVECONFIG // Saves the configuration to the UM980’s memory

Data will start to appear in UPrecice’s Command Entry Box after you enter a few commands, which may make it a bit difficult to see the output saying OK at times.

It is not strictly necessary to include COM1 in the command since it is default on the devices, but it doesn’t hurt to be sure it is configured correctly.

UPrecise_output.png

The UM980 is now configured, and it should look something like this in UPrecise.

Configuring the ESP32

ESP_connect.png

Download ESP32 NTRIP Duo here. To flash the ESP32, we will use ESPHome’s web interface.

Connect the USB-C cable directly into the ESP32, and not the extension board. Click Connect and select the COM port of your device. If unsure which COM port, use Device Manager as with the UM980.

💡 Tip: If your ESP32 isn’t showing up in the browser or Device Manager, double-check that you’re using a USB data cable (not just a charging cable).

ESPHome_connect.png

Select your device and click Connect.

ESPHome_install.png

Click Install.

ESPHome_install_2.png

Choose the downloaded file and click Install.

ESPHome_installed.png

When the installation is finished, click Close.

Reboot the device by unplugging and plugging the USB-C cable, or pressing the BOOT button on the ESP32.

Connect to ESP32's WiFi

ESP_wifi.png

You should now be able to connect to the ESP32’s WiFi.

Add WiFi

ESP_dashboard.png

When connected, go to 192.168.4.1. Activate the WiFi options, click Scan, select the WiFi you want to connect to, and enter the password for the WiFi. Then click Submit.

The device will now reboot. You can still connect to the ESP32’s WiFi for further configuration in the future as long as you leave the ESP32’s WiFi Hotspot activated.

Static IP

ESP_DHCP.png

To more easily connect to the ESP32’s configuration interface in the future, you can set a static IP. Choose an IP address outside your DHCP range, and set your gateway’s IP address.

As an optional security you can protect the device with a username and password. If you don’t want to use the device’s WiFi Hotspot, you can turn it off for even more security.

Click Submit, and the device will reboot.

Configure NTRIP Server A

NTRIP_A_config.png

Now it’s time to configure the NTRIP server A with your onocoy credentials. Activate it, fill out your Mountpoint name, and Password exactly as it is in your onocoy dashboard.

Host: servers.onocoy.com

Port: 2101

Click Submit, and the device will reboot.


If everything is working correctly, your station should now show up as Unvalidated or Validating in your onocoy dashboard. Validation takes 24-36 hours.


If you want to share your data with another company, activate NTRIP server B and fill out your information.

* Some links are affiliate links. It helps to support my work at no extra cost for you. Thank you!