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:

Leave a Reply

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