Project Overview
The GPS Distance, Altitude, and Speed Logger is a versatile embedded system designed for precise motion tracking. Initially developed to monitor the performance of R/C truck models, this project can be adapted for hiking, cycling, or automotive telemetry. By integrating an Arduino Nano with a GPS receiver and an SD card module, the system captures real-time spatial data and archives it for post-trip analysis.
I made this project to check distance travel and max speed for my truck model. GPS gets coordinates and checks position writing on SD card data log.csv. You can setup a speed limit with a led alarm or a buzzer. SD card log.csv can be read with open office. Anyway you can easily modify it in log.txt. I have add a reset button and a red BEC plug for external battery. Normally I power it from USB socket. Altitude needs 3D fix for better result. You can config NEO6M GPS (or better GPS) from "u-blox center" for this operation is much better use a GPS module with usb socket as to connect it direct to com port.





Hardware Architecture
The system is built around the Arduino Nano, chosen for its small footprint and sufficient I/O capabilities.
- GPS Module (NEO-6M): Interfaces with the Nano via UART (Universal Asynchronous Receiver-Transmitter). It receives signals from multiple satellites to determine latitude, longitude, altitude, and ground speed.
- OLED Display (128x64): Provides a high-contrast visual interface using the I2C protocol. It displays current speed, peak speed reached during the session, total distance traveled, and current altitude.
- SD Card Module: Operates over the SPI (Serial Peripheral Interface) bus. It logs timestamped data points into a
log.csvfile, allowing users to export data to spreadsheet software like Excel or OpenOffice. - Power System: The device can be powered via the Nano's USB port or through an external BEC (Battery Eliminator Circuit) plug for integration into R/C vehicles.
Technical Working Principle
- NMEA Parsing: The Arduino reads the raw NMEA (National Marine Electronics Association) sentences from the GPS module. Libraries such as
TinyGPS++are typically used to extract meaningful floating-point values from strings like$GPRMCand$GPGGA. - Distance Calculation: Total distance is calculated incrementally using the Haversine formula, which computes the great-circle distance between two points on a sphere given their longitudes and latitudes.
- Maximum Speed Tracking: The software compares each new speed reading with a stored
maxSpeedvariable, updating it whenever a higher value is detected. - Data Persistence: At regular intervals (e.g., every 1 second), the current sensor data is appended to the SD card. This ensures that even if power is lost, previously recorded flight/drive data remains safe.
- Alert Mechanism: The system supports a software-defined speed limit. If the current speed exceeds this threshold, the Arduino triggers a digital output to activate a LED or a Piezo buzzer as a warning.
Configuration and Calibration
For optimal performance, a 3D fix is required, especially for accurate altitude readings. The NEO-6M module's internal parameters (like update rate and navigation mode) can be fine-tuned using the u-blox u-center software. Using a GPS module with an integrated USB port simplifies this configuration process by allowing a direct serial connection to a PC.