GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsDual-band receivers use both the L1 and L5 signals from each satellite, which cuts errors from reflections in cities. The Reyax RYS3520 is a small dual-band module that sends NMEA over a 3.3 V serial port. Speed comes straight from the RMC sentence in knots; the ESP32 converts it to km/h, adds up distance over time and remembers the top speed.
Do not look at the screen for long while riding or driving.
Tick anything you already have and the total updates.
Reyax RYS3520 dual-band GNSS module
Follow the colours: red is power, dark grey is ground, blue is a signal.
One 18650 through the 5 V module.
speedometer.inoVerify & upload in Electrolark#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
float kmh = 0, top = 0, km = 0;
unsigned long lastT = 0;
String field(const String &s, int n) {
int a = 0; for (int i = 0; i < n; i++) { a = s.indexOf(',', a) + 1; if (!a) return ""; }
int b = s.indexOf(',', a); return s.substring(a, b < 0 ? s.length() : b);
}
void setup() {
Serial2.begin(115200, SERIAL_8N1, 16, 17);
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C); oled.setTextColor(WHITE);
}
void loop() {
if (!Serial2.available()) return;
String s = Serial2.readStringUntil('\n');
if (s.substring(3, 6) != "RMC" || field(s, 2) != "A") return; // valid fix only
kmh = field(s, 7).toFloat() * 1.852;
if (kmh < 1.5) kmh = 0; // ignore standing still drift
unsigned long now = millis();
if (lastT) km += kmh * (now - lastT) / 3600000.0;
lastT = now; top = max(top, kmh);
oled.clearDisplay();
oled.setTextSize(4); oled.setCursor(0, 0); oled.print((int)kmh);
oled.setTextSize(1); oled.setCursor(90, 20); oled.print("km/h");
oled.setCursor(0, 44); oled.print("Trip "); oled.print(km, 2); oled.print(" km");
oled.setCursor(0, 54); oled.print("Top "); oled.print(top, 0);
oled.display();
}
No valid fix yet (field 2 is 'V'); wait outdoors.
Raise the 1.5 km/h standstill limit.
Try 9600 baud if 115200 does not work on your module.
Yes, usually within 0.5 km/h when moving, often better than a cycle computer.
L5 signals are stronger and less affected by reflections from buildings.
Yes, but mount it where it does not block your view.
8 parts: Reyax RYS3520 GNSS Module w/ 3.3V UART Interface, ESP32-WROOM-32 38-Pin Development Board, 0.96" OLED Display 128x64, 5V 2A Charge-Discharge Integrated Module, 18650 Li-ion Rechargeable Cell, 18650 Battery Holder, 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.
It is a intermediate project and takes about 2 hours. The build on this page has 6 steps.
No. This page has the complete, tested code (speedometer.ino).
About ₹1,689 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Reading speed from NMEA RMC sentences; Integrating speed into distance; Why dual-band GNSS helps in cities.
Do not look at the screen for long while riding or driving.
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.