กลับไปหน้ารวมไฟล์
gps-distance-altitude-and-speed-logger-1d0737-en.md

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.csv file, 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

  1. 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 $GPRMC and $GPGGA.
  2. 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.
  3. Maximum Speed Tracking: The software compares each new speed reading with a stored maxSpeed variable, updating it whenever a higher value is detected.
  4. 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.
  5. 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.

ข้อมูล Frontmatter ดั้งเดิม

title: "GPS Distance altitude and Speed Logger"
description: "A simple project to make a GPS log station with data speed, max speed, distance trip and altitude. all data are write on SD card"
author: "wrighi"
category: "Sensors & Environment"
tags:
  - "logger"
  - "gps"
  - "compass"
  - "altitude"
  - "hiking"
  - "distance"
views: 17420
likes: 8
price: 2450
difficulty: "Intermediate"
components:
  - "1x Graphic OLED, 128 x 64"
  - "1x GPS Module (Generic)"
  - "1x Memory Socket, SD Card"
  - "1x Graphic OLED, 128 x 64"
  - "1x Soldering iron (generic)"
  - "1x Arduino Nano R3"
  - "1x Solder Wire, Lead Free"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "9537fb89547035f5df5d9403070425ee334a3235b6cddafeb041302a7092ba55"
encryptedPayload: "U2FsdGVkX19arrp7ZOmLM+6LIXdObN1oevaOdcqUM7q+VIzKF48eM68m9n/42MYgZLshrikBWplomk8fj9l++XYLzYQ740Aus7Ww4Jd1rrQ="
seoDescription: "Build a GPS logger to track speed, distance, and altitude. Store data on an SD card with this simple Arduino project."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/gps-distance-altitude-and-speed-logger-1d0737_cover.jpg"
lang: "en"