19.01.2026

Portable GPS tracker: GNSS + OLED + Battery

Qwiic
Inkplate
Arduino
Portable GPS tracker: GNSS + OLED + Battery

Table of contents

Introduction GNSS GPS L86-M33 How it works? Basic code example Portable GPS Tracker project
Table of contents
Introduction GNSS GPS L86-M33 How it works? Basic code example Portable GPS Tracker project

Introduction

If you ever wanted to build your own portable GPS tracker - something that you can carry with you at all times to see your direction, speed and your current location - then this project is for you. Whether you’re into hiking, biking or simply enjoy creating gadgets that can be used in real life situations, a DIY GPS tracker is a fun project and a good way to explore the world of navigational technology.

Using a GNSS module, a small OLED display and a rechargeable battery, you can create a compact device that shows you real-time movement data wherever you go. This system is built using an ESP32 microcontroller, while everything is connected on a breadboard, the goal of this article is to give you an idea and inspiration to create something even more flexible and compact that serves your needs. We’ll walk you through how the systems works and how you can use them all together to build your own portable GPS tracker.

GNSS GPS L86-M33

The GNSS GPS L86-M33 is a compact, high-performance module designed for accurate positioning and navigation applications. Equipped with GNSS (Global Navigation Satellite System) support, this receiver can track multiple satellite systems, ensuring reliable location data even in more challenging environments.

Key features:

  • Positioning accuracy of +/- 2.5 meters
  • Multiple GNSS support (GPS, GLONASS, GALILEO)
  • High sensitivity
  • Low power consumption

Also, the module supports advanced features such as EASY (Embedded Assist System), AlwaysLocate, and an integrated LOCUS data logger. These features allow for faster and better positioning, maintaining a stable signal even in more extreme environments, all while  ensuring energy-efficient operation and good accuracy.

How it works?

The L86-M33 module determines its position by listening to radio signals broadcast by multiple navigation satellites orbiting the Earth. Each satellite continuously sends out precise timing information along with its exact position in space. The GNSS module has a highly sensitive radio receiver that picks up these signals.

Inside the module, a tiny processor measures how long each signal took to arrive. By comparing distance measurements from at least four satellites, the module can then calculate your latitude and longitude, altitude, speed and your heading (direction).

The module communicates with microcontrollers and other devices through UART interface.

Basic code example

The process to get started with using our L86-M33 breakout board is very simple and straightforward. The board comes in two variations:

  • UART version - uses TX (Transmit) and RX (Receive) lines to communicate with other devices
  • I2C version - uses Qwiic/easyC connector for plug-and-play operation

Also, a dedicated Arduino library is provided to ensure easy and quick development of your projects, you can find on this link.

Initialization (UART and Qwiic version):

First, include the proper library, if you are using UART version of the board you need to define the communication pins, then create an instance of the GNSS object and initialize it in setup:

// Include the GNSS L86-M33 library
#include "GNSS-L86-M33-SOLDERED.h"

// Define pins for the GNSS module
#define GNSS_RX 3
#define GNSS_TX 4

// Create an object for the GNSS library
GNSS gps(GNSS_TX, GNSS_RX);

void setup()
{
    Serial.begin(9600); // Initialize serial communication with the PC
    gps.begin();            // Initialize the GNSS module
}

// ...

 

After initialization, loop function constantly checks for new data available and displays it accordingly in displayInfo() function.

void loop()
{
    while (gps.gnssSerial->available() > 0)
    {
        // If something is successfully decoded, display new data.
        if (gps.encode(gps.gnssSerial->read()))
        {
            // Check if 500 milliseconds have passed since the last data display.
            if ((unsigned long)(millis() - lastGnssDisplay) > 500UL)
            {
                // Capture new timestamp.
                lastGnssDisplay = millis();

                // Display new data.
                displayInfo();
            }
        }
    }
    // If 5 seconds passed after startup - error
    if (millis() > 5000 && gps.charsProcessed() < 10)
    {
        Serial.println(F("No GPS detected: check wiring."));
        while (true)
        {
            // Delay is needed for the ESP8266.
            delay(10);
        }
    }
}

// Function that displays decoded data from the GNSS library.
void displayInfo()
{
    // Print out GPS latitude and longitude. If there is no valid data, show an error message.
    Serial.print(F("Location: "));
    if (gps.location.isValid())
    {
        Serial.print(gps.location.lat(), 6);
        Serial.print(F(","));
        Serial.print(gps.location.lng(), 6);
    }
    else
    {
        Serial.print(F("INVALID"));
    }

    // Print out time and date. If there is no valid data, show an error message.
    Serial.print(F("  Date/Time: "));
    if (gps.date.isValid())
    {
        Serial.print(gps.date.month());
        Serial.print(F("/"));
        Serial.print(gps.date.day());
        Serial.print(F("/"));
        Serial.print(gps.date.year());
    }
    else
    {
        Serial.print(F("INVALID"));
    }

    Serial.print(F(" "));
    if (gps.time.isValid())
    {
        if (gps.time.hour() < 10)
            Serial.print(F("0"));
        Serial.print(gps.time.hour());
        Serial.print(F(":"));
        if (gps.time.minute() < 10)
            Serial.print(F("0"));
        Serial.print(gps.time.minute());
        Serial.print(F(":"));
        if (gps.time.second() < 10)
            Serial.print(F("0"));
        Serial.print(gps.time.second());
        Serial.print(F("."));
        if (gps.time.centisecond() < 10)
            Serial.print(F("0"));
        Serial.print(gps.time.centisecond());
    }
    else
    {
        Serial.print(F("INVALID"));
    }

    // Move to a new line, ready to print new data.
    Serial.println();
}

basicreadings-2d31c00629333222ddf13144c9b3d6ca.png (877×479)

Portable GPS Tracker project

A simple project which uses the L86-M33 GNSS GPS module to accurately measure position, speed and direction. The 0.96'' OLED display is used to display data in two ways: one screen prints out the position, date/time information and speed, the other screen renders a compass showing the current direction you're moving in. Screens are alternated every 5 seconds.

Components used:

  • ESP32
  • GNSS GPS L86-M33 module
  • OLED Display 0.96''
  • 3.7V Li-ion battery

void loop()
{
  // If there is any data on the UART of the GNSS, read it and send every char to the library
  while (gps.gnssSerial->available() > 0)
  {
    // Is something is successfully decoded, display new data.
    if (gps.encode(gps.gnssSerial->read()))
    {
      if (millis() - lastScreenFlip >= SCREEN_PERIOD) {
        lastScreenFlip += SCREEN_PERIOD;
        info_screen = !info_screen;
      }
      // Check if the 500 milliseconds passed from the last data display.
      if ((unsigned long)(millis() - lastGnssDisplay) > 500UL)
      {
        // Capture new timestap.
        lastGnssDisplay = millis();
        display.clearDisplay();
        display.setCursor(0, 0);
        if (info_screen) {
          // Update the display with new info
          displayInfo();
        }
        else {
          displayCompass();
        }
        display.display();
      }
    }
  }
  // No data in the first 5 seconds from the startup? Something is wrong... Check wires!
  if (millis() > 5000 && gps.charsProcessed() < 10)
  {
    Serial.println(F("No GPS detected: check wiring."));
    while (true)
    {
      // Delay is needed for the ESP8266.
      delay(10);
    }
  }
}

 

HERE IS VIDEO OF PROJECT WHILE WALKING

Full code available on GitHub.

 

Products mentioned in this article

Related Articles