Arduino GPS clock with local time using NEO-6M module

This Arduino project shows how to build a GPS clock with local time adjustment (UTC time + offset) using Arduino UNO board and NEO-6M GPS module. Time and date are displayed on 20×4 LCD screen.
In this project the Arduino receives time data (UTC time) from the GPS module (the GPS module receives data from satellites) and prints it on the 20×4 LCD.

Related Projects:
The following project link shows a simple interfacing of Arduino with NEO-6M GPS module in order to get position, time, date and speed:
Interfacing Arduino with NEO-6M GPS module
and the following project shows how to build a GPS clock with UTC time only:
Arduino GPS real time clock with NEO-6M module

Arduino GPS clock with local time circuit

Hardware Required:
To build this project the following components are needed:

  • Arduino (or compatible) board
  • NEO-6M GPS module
  • 20×4 LCD screen
  • 10k ohm variable resistor (or potentiometer)
  • 330 ohm resistor
  • Breadboard
  • Jumper wires

Arduino GPS clock with local time using NEO-6M module circuit:
Project circuit diagram is shown below.
The LCD is 2004 (20×4) not 1602!

Arduino GPS real time clock with NEO-6M and LCD

NEO-6M GPS module has 4 pins where:
NEO-6M GPS board GND pin goes to Arduino GND
TX pin goes to Arduino digital pin 9
RX pin is not connected
VCC pin goes to Arduino 5V pin (can be connected to 3.3V pin)

The 2004 LCD screen is used to display the real time clock time and date where:
RS —> Arduino digital pin 2
E  —> Arduino digital pin 3
D4 —> Arduino digital pin 4
D5 —> Arduino digital pin 5
D6 —> Arduino digital pin 6
D7 —> Arduino digital pin 7
VSS, RW, D0, D1, D2, D3 and K are connected to Arduino GND (ground)
VEE to the variable resistor (or potentiometer) output
VDD to Arduino 5V and A to Arduino 5V through 330 ohm resistor

VEE pin is used to control the contrast of the LCD. A (anode) and K (cathode) are the back light LED pins.

Arduino GPS clock code:
The Arduino code below uses TinyGPS++ library, it can be downloaded from the link below. After downloading the library, unzip the folder and add it to Arduino libraries folder (for example: C:\Program Files\Arduino\libraries). You should rename the folder “TinyGPSPlus”.
TinyGPS++ Library  —->  direct link

Another library is used in this project which is Arduino Time library, with this library we can easily get our local time.
First we extract the UTC time from the TinyGPS++ library (seconds, minutes, hours, day of month, month and year). After that we apply the UTC time to the Arduino time library and add time offset to it as shown below:

Finally our local time is ready to use and we can get it using the following functions:

Download links are below:
Arduino Time Library   —->   direct link

The time offset is defined as:

Full Arduino code:

The result of this project should be as shown in the following video where PIC16F877A is used instead of the Arduino UNO board:


Discover more from Simple Circuit

Subscribe to get the latest posts sent to your email.

15 thoughts on “Arduino GPS clock with local time using NEO-6M module”

    1. Daniel Fernandes

      Hi Susan
      When you say you fixed it, you can say what you did to fix it, if not, to the readers, it’s no use writing here!

  1. Hi Dear, Good project all works perfect. I only have one problem to change Time zone UTC -7 to local Pacific Time. I tried, but only UTC changed, now shows UTC -7, but the time and date not. I need some help to adjust this in the code. Anyone Please.Thank you

  2. Hello sir. could you briefly explain to me and everyone here what is happening in the update time and date array section. I’m trying to wrap my head around this part as it is confusing for me ?

  3. Great Code ! Thanks ! Modified it for use with I2C 20×4 LCD and Maidenhead Locator calculation for Ham Radio use.

  4. Thank you sooo much for this one, did make a small mod to use it for a 16/2 display, and RX/TX pin to 3/2, and it did
    came right up 🙂

      1. Time and date are respectively printed on 3rd and 4th row, only day of week is printed on 2nd row. This means you’ve to make your own modifications in order to work with 16×2 LCD (for example print time on 1st row and date on 2nd row).

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top