ESP32 GPS Data Logger with TFT Display and SD Card: Map Your Route on Google Maps (EP2)

In EP1 we built the core of the logger with an ESP32, a NEO-7M GPS module and a microSD card. In this final episode we add a 2.8-inch ILI9341 TFT dashboard, test the logger on a real 15 km drive, and turn the recorded CSV into a KML route you can view on Google My Maps.

📺 [Watch the video]([YouTube link]) | 💻 Code and converter on GitHub

What you’ll learn

  • How to wire a TFT, a GPS module and an SD card to one ESP32
  • How to show live GPS fix, satellites, speed, altitude and HDOP on the display
  • How to log GPS data to CSV with automatic file rotation
  • How to filter bad GPS points and convert the CSV to KML
  • How to view the route on Google My Maps

Parts Required

  • ESP32 38-pin development board
  • NEO-7M GPS module
  • 2.8-inch ILI9341 TFT display
  • MicroSD card module and microSD card

How It Works (Block Diagram)

                    +-----------------+
                    |   NEO-7M GPS    |
                    | (satellite data)|
                    +--------+--------+
                             |  UART (TX -> GPIO 16, RX <- GPIO 17)
                             v
                    +-----------------+
                    |      ESP32      |
                    |  TinyGPS++ decode|
                    +---+---------+---+
          SPI (GPIO 14, |         | SPI (GPIO 18, 19, 23, 5)
          13, 25, 26,27)|         |
                        v         v
              +-----------+     +--------------+
              | ILI9341   |     | microSD card |
              | TFT       |     | CSV logging  |
              | live view |     +------+-------+
              +-----------+            |
                                       |  (card moved to computer)
                                       v
                              +-----------------+
                              | Python converter|
                              | filter + CSV>KML|
                              +--------+--------+
                                       |
                                       v
                              +-----------------+
                              | Google My Maps  |
                              | route on a map  |
                              +-----------------+

The ESP32 works as a standalone logger. It reads and displays GPS data and writes it to the SD card, and you process the data on a computer afterwards.

GPS → ESP32 → TFT + SD Card → CSV → KML → Google My Maps

Wiring Connections

The GPS and SD-card wiring from EP1 stays the same. The TFT uses separate SPI pins so nothing needs to move.

NEO-7M GPS

GPSESP32
VCC5V
GNDGND
TXGPIO 16
RXGPIO 17

MicroSD module

SD moduleESP32
CSGPIO 5
MOSIGPIO 23
MISOGPIO 19
SCKGPIO 18
GNDGND

ILI9341 TFT

TFTESP32
VCC5V
GNDGND
LED / BL3.3V
SCKGPIO 14
MOSI / SDAGPIO 13
CSGPIO 25
DC / RSGPIO 26
RSTGPIO 27
MISO / SDONot connected

TFT_eSPI Configuration

Set up the ILI9341 driver in the TFT_eSPI library with these pins. MISO isn’t needed because the display is write-only in this project.

#define ILI9341_DRIVER

#define TFT_MOSI 13
#define TFT_MISO -1
#define TFT_SCLK 14
#define TFT_CS   25
#define TFT_DC   26
#define TFT_RST  27

Live GPS Dashboard on the TFT

The ESP32 decodes the NEO-7M data with the TinyGPS++ library and refreshes the display continuously.

FieldWhat it shows
FIXWhether the GPS has a valid position (YES/NO)
SATNumber of satellites in use
LAT / LONCurrent position
SPEEDSpeed in km/h
ALTAltitude in metres
HDOPPositional accuracy indicator (lower is better)
SDSD card recording status

With a valid fix:

GPS LOGGER

FIX: YES       SAT: 4

LAT: 17.468887
LON: 78.312510

SPEED: 0.04 km/h
ALT: 628.1 m

HDOP: 1.65     SD: REC

Before a fix, the display shows a waiting state:

GPS LOGGER

FIX: NO        SAT: 0

LAT: Waiting...
LON: Waiting...

SPEED: 0.00 km/h
ALT: 0.0 m

HDOP: 99.99    SD: REC

You can check GPS status at a glance without connecting the ESP32 to a computer.

Logging GPS Data to the SD Card

While the TFT updates, the ESP32 keeps writing to the microSD card in this CSV format:

Date,Time,Latitude,Longitude,Altitude_m,Speed_kmh,Satellites,HDOP
2026-09-18,11:44:55,17.468887,78.312510,628.1,0.04,4,1.65

Automatic file naming and rotation: Each log file is named from the GPS date and time, for example GPS_20260918_114455.csv. When a file reaches the configured maximum size, the logger starts a new one. This keeps files manageable on long trips.

Bench Test

With everything combined, the ESP32 successfully:

  1. Initialized the SD card
  2. Detected the NEO-7M
  3. Waited for a GPS fix
  4. Displayed live data on the TFT
  5. Created the CSV file and recorded data while updating the display

The test card was detected as an SDHC card with about 7.5 GB of usable capacity.

Real-World Test: A 15 km Drive

A serial monitor check isn’t enough for a logger, so I took it on a roughly 15 km drive. One of the resulting CSV files contained 3,677 GPS records with position, altitude, speed, satellite count and HDOP. That shows it works as a real data logger, not just a bench demo.

After the drive, remove the microSD card and open the CSV in Excel, LibreOffice Calc, Google Sheets or Python.

Filter Bad Data and Convert CSV to KML

Google Maps tools accept KML files, so I wrote a small Python utility that converts the CSV into a KML route. KML coordinates use the order Longitude, Latitude, Altitude.

When the GPS loses its fix, a record can look like Satellites: 0, HDOP: 99.99, which would add stray points to the route. The converter skips these using two quality filters:

  • Minimum satellites: 3
  • Maximum HDOP: 10

The result is a much cleaner route.

View the Route on Google My Maps

  1. Open Google My Maps and create a new map.
  2. Click Import and upload the generated KML file.
  3. Your recorded drive appears as a continuous route.

What We Achieved

The finished logger can:

  • Read GPS data from the NEO-7M and show live status on the TFT
  • Display satellites, HDOP, speed and altitude
  • Record CSV data to a microSD card with timestamped, auto-rotating files
  • Be used on a real drive, with the data converted to KML and filtered for quality
  • Show the route on Google My Maps

Possible Improvements

Next steps could include a battery-powered enclosure, trip statistics, distance calculation, GPX export and extra sensors.

FAQ

Which GPS module does this project use?
The NEO-7M, connected to the ESP32 over serial on GPIO 16 and 17.

Why is my GPS showing FIX: NO?
The module needs a clear view of the sky and can take a while to get a first fix, so try it outdoors or near a window. Until then the display shows “Waiting…” and HDOP 99.99.

Why filter by satellites and HDOP?
Records with fewer than 3 satellites or an HDOP above 10 are unreliable and create stray points on the map.

Can I use the log in other software?
Yes. The CSV opens in any spreadsheet or can be processed with Python.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.