GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsThe NEO-8M receives GPS and GLONASS and sends standard NMEA sentences over UART at 9600 baud. TinyGPSPlus decodes them on the ESP32, which shows speed and satellites on an OLED and writes one CSV row per second to a microSD card. Import the file into Google My Maps or any GPX converter to see the route.
Mount the logger securely and never look at the screen while riding.
Tick anything you already have and the total updates.
NEO-8M GPS module with antenna
Follow the colours: red is power, dark grey is ground, blue is a signal.
USB power bank in a bag or on the bike.
gps_logger.inoVerify & upload in Electrolark#include <TinyGPSPlus.h>
#include <SD.h>
#include <Wire.h>
#include <Adafruit_SSD1306.h>
TinyGPSPlus gps;
HardwareSerial gpsSerial(2);
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
unsigned long lastLog = 0;
void setup() {
gpsSerial.begin(9600, SERIAL_8N1, 16, 17);
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C);
SD.begin(5);
if (!SD.exists("/track.csv")) { File f = SD.open("/track.csv", FILE_WRITE); f.println("time,latitude,longitude,speed_kmh,sats"); f.close(); }
}
void loop() {
while (gpsSerial.available()) gps.encode(gpsSerial.read());
if (millis() - lastLog < 1000) return;
lastLog = millis();
oled.clearDisplay(); oled.setTextColor(WHITE);
oled.setTextSize(1); oled.setCursor(0, 0); oled.printf("Sats %d", gps.satellites.value());
oled.setTextSize(3); oled.setCursor(0, 20); oled.printf("%.0f", gps.speed.kmph());
oled.setTextSize(1); oled.print(" km/h");
oled.display();
if (gps.location.isValid() && gps.location.age() < 2000) {
File f = SD.open("/track.csv", FILE_APPEND);
if (f) {
f.printf("%02d:%02d:%02d,%.6f,%.6f,%.1f,%d\n", gps.time.hour(), gps.time.minute(), gps.time.second(),
gps.location.lat(), gps.location.lng(), gps.speed.kmph(), gps.satellites.value());
f.close();
}
}
}
GPS needs open sky; it will not get a fix indoors. Keep the ceramic antenna facing up.
Swap TX and RX; the module's TX goes to the ESP32's RX (GPIO 16).
Use a FAT32 card of 32 GB or less and check the CS pin.
GPS gives UTC; add 5 h 30 min for IST.
Usually within 2-5 m in open sky.
One line per second is about 3 MB per day, so a card holds years of trips.
7 parts: ESP32-WROOM-32 38-Pin Development Board, NEO-8M GPS Satellite Positioning Module Development Board, MicroSD Card Module (SPI), microSD Memory Card (Class 10), 0.96" OLED Display 128x64, Solderless Breadboard and Dupont Jumper Wires (40 pcs). On this page you can tick the parts you already have and add only the rest to your cart.
No. This page has the complete, tested code (gps_logger.ino).
About ₹2,237 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Reading NMEA from a GPS module; Writing CSV files to SD over SPI; Using a second hardware UART on the ESP32.
Mount the logger securely and never look at the screen while riding.
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Records where you went every five seconds, ready to open on a map.
Two boards, two radios: press the button at the gate and it rings indoors.
Check temperature, humidity and pressure from any phone on your Wi-Fi.
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Learning project. Check every circuit and the datasheet of each part before you power it up.