Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsSome links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
You can make an Arduino clock that sets its date and time from a GPS/GNSS receiver, then shows them on an LCD. The receiver sends time data over a serial connection; the Arduino parses it with TinyGPSPlus. The time is normally UTC, not your local time, and it may not become valid until the receiver gets a satellite fix. This guide uses a current TinyGPSPlus workflow rather than copying the older code from the original 2015 project.
How an Arduino GPS clock works
A GPS clock does not get its time from the Arduino’s own clock. The GNSS receiver listens for satellite signals and sends data to the Arduino as NMEA sentences over UART serial. The Arduino passes those characters to the TinyGPSPlus library, which parses fields such as UTC time, date, location and satellite information. The sketch checks that the date and time are valid, then displays them.
Receiving serial characters is not the same as having a valid time. A receiver may output NMEA data before it has a usable fix. It also normally reports UTC, so the display needs a separate time-zone conversion if you want local time.
Free tools Windows power users keep installed
One-click scans. No signup required.
The original All About Circuits project, published in 2015, used an Arduino Mega, an EM-411 receiver and the older TinyGPS library. Its circuit is useful historical context, but check the pinout, voltage requirements and software for your particular parts instead of copying it unchanged.
#1 Best Overall
- Accurate Positioning: Based on NEO-6MV2, supports GPS and GLONASS, supports simultaneous tracking of 22 satellites, tracking sensitivity -162dBm, cold-start sensitivity -148 dBm, positioning accuracy up to ±2.5m in open environments, stable positioning even in complex environments such as urban canyons or dense jungles
- Low Power Consumption: Supporting 3.3V-5V power supply, the continuous operating current is 67mA, 11mA in standby mode, and 1mA during sleep, which ensures the positioning accuracy while controlling the energy consumption to the maximum, especially suitable for the scenarios that are sensitive to the endurance, and significantly reduces the cost of post maintenance
- Hardware Interface: Standard UART-TTL level, support 3.3V/5V dual voltage compatibility, can be directly connected to Arduino, Raspberry Pi, ESP32 and other development boards; 4Pin interface ( VCC, GND, TX, RX), reserved hardware reset pin; baud rate support 4800bps~115200bps (default 9600bps), real-time switching through AT instructions or UBX commands, to adapt to different master performance
- Plug and Play: Onboard EEPROM chip operates independently of the main control chip, saves configuration parameters after power failure, and automatically reads the parameters (baud rate, positioning mode, NMEA statement screening) from the EEPROM when the power is on, eliminating the need to repeat the initialisation, and realising Plug and Play
- Widely Application: Widely used in vehicle monitoring, UAV navigation, handheld terminals and other scenarios that require high-precision positioning. You can also combine with Arduino, STM32, LoRa module, etc. to quickly build GPS tracker, weather station and other IoT applications
Parts for a basic LCD clock
- An Arduino Uno, Nano, Mega or compatible board.
- A UART GPS/GNSS breakout with an antenna. A NEO-6M-style module is a common low-cost option, but u-blox lists the NEO-6M as end-of-life. For a new build, consider a currently supported, documented receiver.
- A 16×2 or 20×4 character LCD with an I²C backpack.
- Breadboard, jumper wires and a USB cable.
- Optional: a DS3231 RTC module for timekeeping during GPS outages; a compatible external antenna if the receiver needs better placement; or a PPS connection for precision timing experiments.
Do not assume every board sold as “NEO-6M” has the same electrical design. The bare receiver and breakout board can have different supply and logic requirements, and clone boards may differ in voltage regulation, labels, antenna quality and firmware. Check the documentation for the exact board before connecting it. In particular, do not connect a 5 V Arduino output to a receiver input unless that input is documented as 5 V tolerant.
For a beginner, a well-documented breakout is easier to troubleshoot than an anonymous clone. Adafruit’s Ultimate GPS breakout is one example; its USB GPS/GNSS product is another. A GPS receiver is unnecessary if all you need is a dependable indoor clock: a DS3231 RTC-only build is simpler, starts immediately and does not need an antenna or satellite fix.
Wire the receiver and LCD
GPS to an Uno or Nano
This example uses software serial: GPS TX goes to Arduino D4 (the Arduino receive pin), and GPS RX goes to D3 (the Arduino transmit pin). TX and RX cross. Connect the grounds together. Connect VCC only to the supply specified for your breakout.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallRank #2
- Car positioning in navigation
- Mobile phones, tablet PCs, handheld devices
- Embedded positioning device
- Wearable device
| GPS/GNSS breakout | Uno/Nano example |
|---|---|
| TX | D4 (Arduino RX) |
| RX | D3 (Arduino TX; level-shift if required) |
| GND | GND |
| VCC | Verified supply for that breakout |
| PPS | Optional interrupt-capable input, only if using PPS |
For an I²C LCD on Uno/Nano, connect SDA to A4 and SCL to A5. Connect VCC and GND according to the backpack’s specifications. Common I²C addresses are 0x27 and 0x3F, but scan the bus or check the module documentation rather than assuming one.
GPS to a Mega
A Mega has additional hardware UARTs, so use Serial1 instead of software serial. Connect GPS TX to Mega RX1 (pin 19), GPS RX to TX1 (pin 18), and share ground. Use the board’s documented voltage requirements. Hardware serial is generally preferable when GPS data and USB debugging are both needed.
Display choices
An I²C character LCD is straightforward for showing UTC, date and status text. A four-digit seven-segment display is cleaner for a clock face; a MAX7219 matrix or OLED offers more layout options but requires its own library. The Adafruit Arduino clock guide illustrates GPS- and RTC-based display approaches.
Rank #3
- GT-U7 main module GPS module using the original UBLOX 7th generation chip, Software is compatible with NEO-6M. GT-U7 module, with high sensitivity, low power consumption, miniaturization, its extremely high tracking sensitivity greatly expanded its positioning of the coverage;
- With a USB interface, you can directly use the phone data cable on the computer point of view positioning effect; With IPEX antenna interface, the default distribution of active antenna, can be quickly positioned;
- USB directly connected to the computer, That is, with the host computer-owned serial port function, no need for external serial module, send IPX interface active antenna;
- If you have any issue when using our product,or you need product use documentation, please contact us directly for assistance.we will reply your problem in 24 hours.We try our best to provide the most professional service for each customer.
- USB directly connected to the computer, That is, with the host computer-owned serial port function, no need for external serial module, send IPX interface active antenna
Install the libraries
- Open Arduino IDE and select Sketch > Include Library > Manage Libraries… (in some IDE versions this is shown as Library Manager).
- Search for
TinyGPSPlusand install the library by Mikal Hart. Arduino’s library listing identifies version 1.0.3. - Install a library for your display. The sketch below assumes a
LiquidCrystal_I2Clibrary compatible withlcd.init(). - Select your board and port, then compile and upload. If the display library’s initialization API differs, use the example supplied with that library.
TinyGPSPlus parses common NMEA data, including RMC and GGA sentences. Its repository includes API details and examples. A particular sketch may still need changes for a board with different serial or pin behavior.
Test the GPS before adding the display
Testing the serial link first helps separate receiver problems from LCD problems. Temporarily connect GPS TX to the Arduino’s chosen receive pin and run a simple serial passthrough or TinyGPSPlus example. Confirm the receiver’s baud rate from its documentation; 9,600 baud is common, but not guaranteed. With TinyGPSPlus, inspect gps.time.isValid(), gps.date.isValid(), location validity and satellite data. Characters arriving only prove that data is arriving, not that the receiver has a valid time.
For a first satellite fix, put the antenna outdoors or where it has a broad view of the sky. A window may help, but concrete walls, roofs and some coated glazing can block or weaken reception. Initial acquisition can take time; immediate time on power-up is not guaranteed.
Rank #4
- Module Feature: With ceramic antenna, excellent signal.
- Data Storage: Saves configuration parameter data in EEPROM Down.
- Battery: Comes with data backup battery and LED signal indicator.
- Interface: Default baud rate is 9600, interface is RS232 TTL.
- Compatibility: Compatible with various flight control modules.NOTE: Ideal for Arduino, ESP32, and DIY IoT projects. NOT recommended for high-speed FPV racing drones due to the 1Hz default refresh rate.Provide dedicated configuration guidelines and sample codes. If you need these digital resources, please contact us via Amazon messaging to obtain immediate technical support.
Upload a basic UTC clock sketch
This starter assumes an Uno/Nano-compatible board, GPS TX on D4, GPS RX on D3, GPS output at 9,600 baud, and a 16×2 I²C LCD at address 0x27. Change the pins, baud rate, address and LCD initialization to match your actual hardware. It deliberately displays UTC and does not pretend an invalid receiver value is synchronized time.
#include <TinyGPSPlus.h>
#include <SoftwareSerial.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
TinyGPSPlus gps;
SoftwareSerial gpsSerial(4, 3); // Arduino RX, TX
LiquidCrystal_I2C lcd(0x27, 16, 2);
unsigned long lastDisplay = 0;
void setup() {
Serial.begin(115200); // USB diagnostics
gpsSerial.begin(9600); // Match the receiver's configured baud rate
lcd.init();
lcd.backlight();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Waiting for GPS");
}
void loop() {
while (gpsSerial.available()) {
gps.encode(gpsSerial.read());
}
// Refresh once per second rather than clearing the LCD on every loop.
if (millis() - lastDisplay >= 1000) {
lastDisplay = millis();
lcd.setCursor(0, 0);
lcd.print("UTC ");
lcd.setCursor(0, 1);
if (gps.time.isValid() && gps.date.isValid()) {
char line[17];
snprintf(line, sizeof(line), "%02d:%02d:%02d %02d/%02d",
gps.time.hour(), gps.time.minute(), gps.time.second(),
gps.date.day(), gps.date.month());
lcd.print(line);
} else {
lcd.print("Waiting for fix ");
}
}
if (millis() > 5000 && gps.charsProcessed() < 10) {
Serial.println("No GPS data received; check power, wiring, pins and baud rate.");
}
}
The example omits the year to fit the time and day/month on one line. Use a 20×4 display or a second layout if you want to show the full date and location. The diagnostic message is about data reception, not fix validity. On a Mega, replace gpsSerial with Serial1 and initialize it with Serial1.begin(9600); do not connect the GPS to the USB programming port and expect it to be available simultaneously for debugging.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →SoftwareSerial is convenient on Uno/Nano, but it can lose characters when the program is busy or other serial work is happening. Prefer a hardware UART on boards that provide one. Avoid long blocking delays, and keep feeding incoming characters to gps.encode().
Best Value
- GPS modules NEO-6M, 3V-5V power supply Universal
- The esp32 gps module with ceramic edge antenna, super signal.
- Default baud rate: 9600, Interface: RS232 TTL
- The gps module With data backup battery;With LED signal indicator
- The neo-6m gps module Compatibles with various flight control modules that provide GPS computer test software
Show local time correctly
The sketch displays UTC. To show local time, convert a complete date-time value, not just the hour. A simple fixed offset is acceptable for a short demonstration in a location whose offset does not change, but it fails in regions that observe daylight saving time and can produce the wrong date near midnight. For a permanent clock, use a timezone-aware conversion strategy appropriate to the location, including daylight-saving rules, or deliberately label the display UTC.
Do not add an offset repeatedly to the receiver’s hour inside the main loop. Keep the parsed UTC value unchanged and apply conversion only when formatting the displayed value. Validate date rollovers, month lengths and leap years in the conversion code.
Keep time when GPS reception disappears
A GPS-only clock can lose its usable time when it cannot receive satellites. For a more dependable indoor or permanent installation, add a DS3231 or similar RTC:
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →- Wait until both GPS date and time are valid.
- Set or correct the RTC from that valid UTC value (or consistently chosen local-time representation).
- Display RTC time between fixes and during outages.
- Update the RTC only when there is a valid, meaningful correction—not on every loop.
This gives the clock a fast startup and short-term holdover without a satellite signal, while GPS periodically corrects RTC drift. An RTC is not GPS-accurate by itself and still needs initial setting. The Adafruit clock guide discusses GPS and battery-backed RTC as different time-source choices.
When PPS matters
For an ordinary wall-clock display, parsed NMEA time is usually sufficient. NMEA sentences take time to arrive over serial, so the moment the code reads a sentence is not a precision timing edge. If you need close synchronization, use the receiver’s PPS (pulse-per-second) output with an appropriate interrupt-capable input and follow that receiver’s documentation. A PPS-capable output does not by itself make the whole clock precise: wiring, interrupt handling and association of the pulse with the correct time value matter. The u-blox NEO-6 product summary documents timepulse support for that series.
Troubleshoot common problems
| Symptom | Likely causes and checks |
|---|---|
| No GPS data received | Check power, common ground, crossed TX/RX, selected pins, baud rate and whether another device is using the serial port. Confirm the module’s voltage requirements. |
| Unreadable or garbled serial text | The serial monitor or sketch baud rate may not match the receiver’s output rate. |
| Data arrives, but time/date are invalid | The receiver may not yet have a satellite fix. Improve antenna sky view and check validity fields; raw characters do not mean valid time. |
| Time is several hours wrong | The receiver is reporting UTC while the display expects local time, or the conversion is incorrect. |
| Date is wrong around midnight | Convert the complete date-time across day, month and year boundaries rather than adjusting only the hour. |
| LCD is blank or shows blocks | Check I²C address, SDA/SCL, power, ground, backlight and contrast. Confirm whether your library expects lcd.init() or another initialization call. |
| Clock works outdoors but not indoors | Reception is being blocked or weakened. This is expected in many buildings; reposition the antenna near a window or use a compatible external antenna. |
| Display is unstable or time updates stop | Software serial may be missing characters, or the sketch may block too long. Use hardware serial where available and avoid long delays. |
Choose the right kind of clock
- GPS-only: Self-setting without internet and can provide location, but needs antenna reception, may take time to acquire a fix, and needs UTC conversion.
- GPS plus RTC: Best general-purpose build when you want automatic correction and continued timekeeping during signal loss.
- RTC-only: The simpler choice for an indoor clock that should start immediately. It needs initial setting and can drift.
- Internet time (NTP): A sensible alternative when the device has reliable network access; it avoids satellite visibility but depends on network connectivity and suitable hardware/software.
- Radio-controlled time: An option where a compatible time-signal receiver and regional broadcast coverage are available.
Use a documented current GNSS receiver for a new design rather than treating the NEO-6M as current manufacturer-supported hardware; u-blox identifies that series as end-of-life and points buyers toward newer products. If you only want an indoor clock and do not need GPS-derived location or automatic satellite setting, choose an RTC instead. For most makers who want a self-setting clock that remains useful indoors, the practical choice is GPS plus an RTC fallback.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

