Steve Zafeiriou (b. 1998, Thessaloniki, GR) is a New Media Artist, Technologist, and Founder of Saphire Labs. His practice investigates how technology can influence, shape, and occasionally distort the ways individuals perceive the external world. By employing generative algorithms, electronic circuits, and interactive installations, he examines human behavior in relation to the illusory qualities of perceived reality, inviting observers to reconsider their assumptions and interpretations.

Audiovisual performance titled Qualia, cover image showing 3 people partying with digital AI effects

Qualia

In search of IKIGAI
dark mode light mode Search SAPPHIRE LABS Menu
Search
NEO-6M GPS sensor module connected to Arduino – Essential guide for ESP32 GPS module integration with Arduino for real-time location tracking.

ESP32 GPS Module Setup: Wiring, TinyGPS++ Code, and Location-Based Projects

An ESP32 GPS module setup takes four wires and one library. Connect the GPS module’s TX pin to ESP32 GPIO16 and its RX pin to GPIO17, power the module from 3.3V, then read NMEA sentences over UART2 at 9600 baud using the TinyGPS++ library.

Short answer: Wire GPS TX → GPIO16, GPS RX → GPIO17, VCC → 3.3V, GND → GND. Install TinyGPS++, open HardwareSerial(2) at 9600 baud, and feed every incoming byte to gps.encode(). Expect 30–60 seconds for the first satellite fix — and expect no fix at all indoors.

The ESP32 is a microcontroller with built-in Wi-Fi and Bluetooth, and that is exactly what makes it a better GPS host than a plain Arduino. The same board that parses coordinates can also serve them to a browser, log them to flash, or push them into a visual system in real time.

I build location-based work — GeoVision is a real-time map installation that archives cultural responses by geography. The hard part of these projects is almost never the code. It is the fix: the module that locks on instantly at your desk by the window, then sits blind and silent once it is inside a gallery.

This guide covers ESP32 GPS module setup end to end — choosing a module, wiring it, parsing NMEA with TinyGPS++, the two mistakes that produce an empty serial monitor, and how to get the coordinates onto a map.

ESP32 GPS module setup with wiring connections – Step-by-step guide to configuring an ESP32 GPS tracker for accurate location tracking
ESP32 GPS Module Setup

Understanding GPS Modules

GPS modules such as the NEO-6M GPS and NEO-M8N utilize satellite signals to determine location, transmitting NMEA sentences that contain latitude, longitude, speed, and time data.

Common GPS Modules

  1. NEO-6M GPS: Cost-effective, widely used, and beginner-friendly.
  2. NEO-M8N GPS: Offers improved accuracy and faster signal acquisition.
  3. SIM808: Combines GPS tracking with GSM communication for cellular applications.

Selecting the right GPS module depends on your specific requirements.

If basic tracking suffices, the ESP32 NEO-6M GPS is an excellent option, while the ESP32 NEO-M8N GPS is preferable for enhanced accuracy.

Choosing the Right GPS Module for Your Project

Key Factors to Consider

  1. GPS update rate: Higher update rates ensure smoother tracking.
  2. GPS power requirements: Essential for battery-powered projects.
  3. GPS external antenna: Enhances signal reception in obstructed environments.
  4. GPS I2C module: Some GPS modules support I2C communication, though UART is more common.

For most projects, a UART-based GPS module like the NEO-6M is the most straightforward option.

GPS Module Comparison

OptionBest forAccuracyWorks indoors?Trade-off
NEO-6MFirst build, static logging~2.5 m (datasheet CEP)No1 Hz default, GPS constellation only
NEO-M8NMoving work, smoother tracks~2 m (datasheet CEP)NoCosts more; multi-GNSS, faster reacquire
SIM808Remote logging with no Wi-FiGPS-classNoNeeds a SIM and a real power budget
Browser geolocationIndoor and gallery installations10–100 m (Wi-Fi trilateration)YesNo hardware, but coarse and needs a client device
Choosing a GPS module for an ESP32 project

Wiring the ESP32 to a GPS Module

Step-by-Step Wiring Guide

GPS ModuleESP32
VCC (5V)5V
GNDGND
TXGPIO16 (RX2)
RXGPIO17 (TX2)
ESP32 GPS Module Setup

This configuration utilizes ESP32 UART communication on UART2. If different pins are used, adjust the code accordingly — and check the ESP32 pinout first, because several GPIOs are strapping pins and will stop the board from booting if a GPS module is holding them at the wrong level on power-up.

One note on power: most NEO-6M breakout boards accept 3.3V–5V on VCC, but the ESP32’s RX pin is 3.3V logic and not 5V tolerant. Powering the module from 3.3V keeps its TX line at a safe level and removes the question entirely. Give it a supply that can handle current spikes, too — a GPS module draws bursts while it is acquiring satellites, and a sagging rail will brown it out, restart the search, and leave you stuck at “no fix” forever.

LilyGO T-Display S3 microcontroller setup with wiring and screen interface, ideal for IoT and display-based projects, from Steve Zafeiriou’s resources.
ESP32 GPS Module Setup

Installing Required Libraries for GPS Communication

To process GPS data, install the TinyGPS++ library in Arduino IDE:

  1. Open Arduino IDE.
  2. Go to Sketch > Include Library > Manage Libraries.
  3. Search for TinyGPS++ and install it.
  4. Also, install HardwareSerial if not already included.

If you’re using MicroPython, you can use the micropyGPS library instead.

Writing and Uploading the ESP32 GPS Module Code

Below is a basic GPS module code to read latitude and longitude:

#include <TinyGPS++.h>
#include <HardwareSerial.h>

static const int RXPin = 16, TXPin = 17;
static const uint32_t GPSBaud = 9600;

TinyGPSPlus gps;
HardwareSerial mySerial(2);

void setup() {
    Serial.begin(115200);
    mySerial.begin(GPSBaud, SERIAL_8N1, RXPin, TXPin);
}

void loop() {
    while (mySerial.available() > 0) {
        gps.encode(mySerial.read());
        if (gps.location.isUpdated()) {
            Serial.print("Latitude: "); Serial.println(gps.location.lat(), 6);
            Serial.print("Longitude: "); Serial.println(gps.location.lng(), 6);
        }
    }
}

Try BlackBox AI for your creative coding!

Upload the ESP32 GPS Arduino IDE code, open the Serial Monitor, and set the ESP32 GPS baud rate to 115200.

If correctly configured, latitude and longitude values should be displayed.

ESP32 GPS MODULE: No signal detected on GPS satellite module – Troubleshooting ESP32 GPS issues related to weak signals and satellite reception.
ESP32 GPS Module Setup

Troubleshooting Common GPS Issues

GPS Module Not Detecting Satellites

  1. Move to an open area: GPS signals are weak indoors.
  2. Utilize an ESP32 GPS external antenna if available.
  3. Allow 30 seconds or more for the initial fix.

Incorrect Baud Rate

  1. Verify the ESP32 GPS baud rate (default: 9600).
  2. If unclear data appears, test alternative baud rates.

No Data in Serial Monitor

  1. Confirm proper ESP32 GPS hardware setup (TX/RX connections).
  2. Ensure sufficient ESP32 GPS power requirements.
  3. Switch to an alternative ESP32 GPS UART communication port if necessary.
GeoVision V2 map visualization demonstrating dynamic and detailed geographic mapping capabilities for comprehensive spatial analysis.
ESP32 GPS Module Setup

Visualizing GPS Data on a Map

Once the GPS data processing is functional, visualize it on a map:

  1. Transmit GPS coordinates to a web server using WebSockets.
  2. Display data on Google Maps.
  3. Implement GPS real-time tracking using Python or JavaScript.

For tracking applications, log GPS coordinates and upload them to GPS cloud storage.

GeoVision v1.0 - Interactive Installation by Steve Zafeiriou, 2024.
ESP32 GPS Module Setup

Try the LilyGo T-Display S3 or the Waveshare ESP32 1.69 inch with your setup!

How I Use GPS in Location-Based Installations (and When I Don’t)

The most useful thing I can tell you about GPS modules is when to leave them in the drawer.

GeoVision is a location-based piece: participants leave responses that are archived and visualised on a live map. It would seem like the obvious home for a NEO-6M. It does not have one. The physical data sculpture runs an ESP32-S3 with a Waveshare 1.69″ display, an MPU6050 for orientation, and a vibration motor for feedback — no GPS at all. The location comes from the browser’s geolocation API, through a ReactJS and Leaflet front end.

The reason is simple. The work lives indoors, in galleries, under concrete and steel. A NEO-6M inside a gallery has no sky, and no sky means no fix — no amount of code fixes that. Browser geolocation falls back to Wi-Fi trilateration, which is accurate to something like 10–100 metres. That sounds terrible until you ask what the piece actually needs: it maps which city and which neighbourhood a response came from, not which bench the visitor was standing on. Metre-level truth would have bought nothing and cost a satellite fix I was never going to get.

So the rule I work by: a hardware GPS module earns its place when the piece moves, outdoors, and genuinely needs metre-level position. A tracker on a bike, a sensor buoy, a walking piece that scores a route. If the work is indoors or fixed, browser geolocation or a hard-coded coordinate is cheaper, faster, and — crucially — works at all.

Read the raw NMEA before you blame the module

When the serial monitor stays empty, almost nobody has a dead GPS module. They have swapped TX and RX, or the wrong baud rate. Before touching TinyGPS++, skip the parsing and print the bytes straight from Serial2. NMEA is human-readable, which is the whole point of it.

Nothing at all on the serial monitor means the wiring or the baud rate is wrong. Garbled characters mean the module is talking but the baud rate is mismatched — try 9600, then 38400. And if you get clean sentences that look like $GPRMC,123519,V,..., the module is alive and healthy: that V is the status field, and it means void — no fix yet. When it flips to A for active, your coordinates are valid. That single character has saved me more debugging time than any library. It tells you to stop rewriting code and go stand outside.

And be patient with a cold start. Thirty to sixty seconds is normal for a first fix on a module that has never seen the sky, or has been moved a long way since it last did. I have watched people re-flash three times inside a minute, then declare the board broken, when the module was quietly doing exactly what it was supposed to do.

Getting the coordinates is the easy part — knowing what the location means is the work. The Story-Motivated Installations™ Framework is the process I use to turn sensor data into an experience worth standing in. Get the framework →

Conclusion

Configuring an ESP32 GPS module requires proper wiring, the correct baud rate, and patient troubleshooting.

With a working ESP32 GPS tracker, you can expand functionality by integrating GPS logging, GPS Bluetooth transmission, or GPS visualisations. If you are pairing location with other inputs, the right sensor choice matters more than the board — and it is worth thinking about how people actually behave once they know a system knows where they are.

Whether you are developing a GPS DIY project, a geofencing system, or a location-aware art installation, this guide provides the foundation to bring your vision to life.

Frequently Asked Questions (FAQ)

Why is my GPS module not receiving a signal?

One of the most common issues is an obstructed location, as GPS signals require a clear view of the sky.

Moving to an open outdoor space can significantly improve signal acquisition.

Additionally, using an external GPS antenna can enhance reception, especially in environments with interference.

Power supply issues can also affect performance, so it is essential to ensure that the GPS module receives the correct voltage based on its specifications.

Another factor to consider is the baud rate configuration, as many GPS modules default to 9600 baud, and an incorrect setting can prevent proper communication.

Finally, the first satellite fix can take between 30 to 60 seconds after startup, so allowing sufficient time for initialization is crucial.

How do I correctly wire an ESP32 to a GPS module?

The GPS module requires a stable power supply, typically 3.3V or 5V, depending on its specifications.

A secure ground connection between the ESP32 and the GPS module is also necessary to establish proper electrical communication.

The TX pin of the GPS module should be connected to the RX pin of the ESP32, while the RX pin of the GPS module should be connected to the TX pin of the ESP32.

It is important to check the correct GPIO pins assigned for UART communication, as different ESP32 models may use different pin configurations.

Incorrect wiring or swapped TX and RX connections can result in no data being received from the GPS module.

How can I parse GPS data from an ESP32 GPS module?

Parsing GPS data from an ESP32 GPS module requires the use of a library that can interpret NMEA sentences, which contain location, speed, and time information.

The TinyGPS++ library is a widely used option when working with Arduino IDE, as it allows for structured extraction of GPS data.

Once installed, the library can read incoming NMEA sentences and convert them into usable latitude and longitude values.

These values can then be displayed on the serial monitor for real-time tracking. For those using MicroPython instead of Arduino IDE, the micropyGPS library provides similar functionality.

Correctly processing GPS data ensures that location-based applications can effectively utilize the retrieved coordinates.

Can I send GPS data from ESP32 to the cloud or a web server?

ESP32 GPS data can be transmitted to a cloud service or web server through various communication protocols.

One common method is using Websockets, which allows real-time data transmission to an IoT platform.

Another approach involves using WiFi to upload GPS coordinates to a remote database or API for further processing.

Google Maps integration can also be implemented to visualize GPS data online, making it easier to track movement.

For more advanced applications, cloud storage services such as Firebase or AWS can be used to log and retrieve historical GPS data.

How can I improve the accuracy of my ESP32 GPS module?

Using an external antenna is one of the most effective ways to improve GPS reception, as it enhances signal strength and reduces interference.

Choosing a high-performance GPS module, such as the NEO-M8N, can also lead to better accuracy compared to older models like the NEO-6M.

Increasing the GPS update rate allows for smoother real-time tracking, particularly in fast-moving applications.

Additionally, implementing filtering algorithms can help eliminate signal noise and improve data reliability.

Ensuring that the module has a clear view of the sky is also critical, as buildings, trees, and other obstacles can obstruct satellite signals, reducing overall accuracy.

Total
0
Shares
Nostalgie world generative universe illustration of the main character falling from the sky

Bonded Studio grew from years of artistic research into attention, intimacy, behavior, and the "connected but disconnected" generation paradox.

Now, that research is becoming a real two-person connection app designed to help people move beyond small talk, share more meaningful moments, and feel more present with one another.

Join the waitlist to get early access, product updates, and the opportunity to help shape Bonded before its public launch.

Technology should help us become more present, not more performative.