Overview
In this project, we will make GPS Clock using Arduino, Quectel L86 GPS Module & LCD Display. Earlier we made Real Time Clock using DS3231 RTC Module. We also made Internet Clock using NTP Client. This is a completely different project as there is no requirement of any RTC Module or any Internet Network.
The GPS Clock is a satellite system that provides a very precise timing service. The system uses atomic clocks to provide everyone on Earth with low-cost access to international atomic time standards. Each GPS satellite has multiple atomic clocks, synchronized to a ground-based master clock. The GPS clock provides everyone on Earth with access to atomic time standards without needing a local atomic clock.
In order to build a GPS Clock, we need a GPS Receiver. The most popular GPS Receiver is ublox NEO-6M GPS Module. But we will use Quectel L86 GPS Module as it is tiny with a very small antenna. By interfacing L86 GPS Module with Arduino and 16×2 LCD Display, the time and date parameters can be displayed on LCD Screen.
Bill of Materials
To make Arduino GPS Clock, we need following components. You can purchase all the components online from Amazon.
| S.N. | Components | Quantity | Purchase Links |
|---|---|---|---|
| 1 | Arduino Nano Board | 1 | Amazon | AliExpress |
| 2 | L80/L86 GPS Module | 1 | Amazon | AliExpress |
| 3 | 16x2 LCD Display | 1 | Amazon | AliExpress |
| 4 | Potentiometer 10K | 1 | Amazon | AliExpress |
| 5 | Jumper Wires | 20 | Amazon | AliExpress |
| 6 | Breadboard | 1 | Amazon | AliExpress |
What is the GPS Clock ?
The GPS Clock is a satellite system that provides a very precise timing service & gives information on the date and time of a particular location. The GPS Clock system uses atomic clocks to provide international atomic time standards.
The GPS system is a constellation of 24 orbiting satellites. The system is primarily intended to provide a precise positioning and navigation service. However, very accurate time information is continuously transmitted by the satellites.
Each GPS satellite has an integral atomic clock which is synchronized periodically to a ground-based master clock maintained by the U.S. Naval Observatory (USNO). USNO maintains synchronization of the entire GPS system to international standards.
The GPS system maintains a time transfer accuracy of fewer than 40 nanoseconds relative to UTC, 95% of the time. Everyone on Earth now has access to atomic time standards without needing a local atomic clock.
Quectel L86/L80 GPS Module
The L86 Module is an ideal solution for wearable fitness devices due to its ultra-compact design and low power demands. Its Low Power feature enables GPS connectivity at around half the power consumption of normal mode while in static receiving mode. Combined with its precision and high sensitivity, this makes the L86 suitable also for a broad range of IoT applications such as portable devices, automotive, personal tracking, security, and industrial PDAs.
The L86 has a patch antenna on top measuring 16.0mm × 16.0mm × 6.45mm, with 66 acquisition channels and 22 tracking channels. It acquires and tracks satellites in the shortest time even at the indoor signal level. The module operates at 2.8V~4.3V with a typical power consumption of 20mA and in Standby mode power consumption is around 1.0mA. To learn more about the L86 GPS module, you can check the L86 Datasheet.
The Quectel L86/L80 GPS Module has 12 pins as shown in the image below.
The L86 is a tiny SMD-type Module that doesn’t have any male/female header pins for testing. So you can use the male header pin with 2.54 spacing and solder them on the L86 PCB from the bottom.
Once, you solder all the 12 Pins on the L86 Module, the Module becomes breadboard friendly. You can now insert the module on the breadboard easily.
Arduino GPS Clock Circuit Diagram
Now let us see the circuit diagram of GPS Clock. The connection diagram is fairly simple as shown in image below.
The Quectel L86 GPS module has 12 pins but we will only use 5 pins for our project. Connect the VCC & GND pin of L86 to the 3.3V & GND pin of Arduino. Connect the V_BCKP pin of L86 to 3.3V, if this pin remains unconnected the module won’t work. The Rx & Tx pin of L86 goes to Arduino digital pin 2 & 3 respectively.
The 1602 LCD screen is used to display the real-time clock time and date where:
RS —> Arduino digital pin 12
E —> Arduino digital pin 11
D4 —> Arduino digital pin 10
D5 —> Arduino digital pin 9
D6 —> Arduino digital pin 8
D7 —> Arduino digital pin 7
VSS, RW, and K are connected to Arduino GND (ground)
VEE to the 10K potentiometer output
VDD to Arduino 5V and A to Arduino 5V
It’s better to use breadboard and connecting jumper wires to assemble the circuit.
Source Code/Program
The best part about the L80 GPS Module is, it supports Tiny GPS++ Library. Download the library and add it to the Arduino library folder.
Copy the following L80 Arduino Code and upload it to the Arduino Board.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
#include <TinyGPS++.h> // Include TinyGPS++ library #include <SoftwareSerial.h> // Include software serial library #include <LiquidCrystal.h> // Include LCD library TinyGPSPlus gps; #define S_RX 2 // Define software serial RX pin #define S_TX 3 // Define software serial TX pin SoftwareSerial SoftSerial(S_RX, S_TX); // Configure SoftSerial library LiquidCrystal lcd(12, 11, 10, 9, 8, 7); byte last_second; char Time[] = "TIME:00:00:00"; char Date[] = "DATE:00/00/2000"; void setup(void) { SoftSerial.begin(9600); // set up the LCD's number of columns and rows lcd.begin(16, 2); lcd.setCursor(0, 0); lcd.print(Time); // Display time lcd.setCursor(0, 1); lcd.print(Date); // Display calendar } void loop() { while (SoftSerial.available() > 0) { if (gps.encode(SoftSerial.read())) { if (gps.time.isValid()) { Time[5] = gps.time.hour() / 10 + 48; Time[6] = gps.time.hour() % 10 + 48; Time[8] = gps.time.minute() / 10 + 48; Time[9] = gps.time.minute() % 10 + 48; Time[11] = gps.time.second() / 10 + 48; Time[12] = gps.time.second() % 10 + 48; } if (gps.date.isValid()) { Date[5] = gps.date.day() / 10 + 48; Date[6] = gps.date.day() % 10 + 48; Date[8] = gps.date.month() / 10 + 48; Date[9] = gps.date.month() % 10 + 48; Date[13] = (gps.date.year() / 10) % 10 + 48; Date[14] = gps.date.year() % 10 + 48; } if (last_second != gps.time.second()) { last_second = gps.time.second(); lcd.setCursor(0, 0); lcd.print(Time); // Display time lcd.setCursor(0, 1); lcd.print(Date); // Display calendar } } } } |
Testing the Arduino GPS Clock
Upload the above code to the Arduino Nano Board. Initially the LCD Display will show everything as 0 value. The time and date both value will be 0. This is because the L86 GPS receiver is not synchronized with satellite system.
After waiting for a while, the GPS starts receiving the signal from the nearest satellite system. The receiving of signal and synchronization with satellite depends upon the indoor-outdoor conditions. After proper synchronization with the satellite, the LCD screen shows the time and date.
This is how you can build your own GPS Clock using Arduino where no cellular or WiFi network is needed. The applications for GPS clock systems include monitoring and control systems, network timing, and all time-critical processes.

















1 Comment
How do I make this clock with a 12C LCD display. I know that I have to include the LiquidCrystal_12c.h library but I don’t know how to modify the sketch. Please help if you can. Thank you.