Arduino GPS Clock With Local Time Using NEO-6M Module

by RonFrtek in Circuits > Arduino

5098 Views, 10 Favorites, 0 Comments

Arduino GPS Clock With Local Time Using NEO-6M Module

Arduino GPS Clock With Local Time Using NEO-6M Module

In this tutorial we will learn how to get a current time from the satellites using arduino.

Watch the video!

What You Will Need

a460cd0e-00a8-40bd-8497-365cfa944a6a.87dd596e68a931acffa4cd8bc042c33b.jpeg
51kHbKLb4lL._SX342_.jpg
VisuinoAdvrtisementRaspberryPiRobot1.jpg
FNLOD2CKEY93G5N.jpg
FMMM5N5KEY93G5M.jpg
FMT2X9VKEY93G5P.jpg

  • NEO-6M GPS Module
  • ST7789 TFT Display
  • Arduino Uno or any other Arduino board
  • Breadboard
  • Jumper wires
  • Visuino software: Download here

The Circuit

2020-09-23_21-59-11.jpg

  • Connect Arduino 5V to GPS module VCC
  • Connect Arduino GND to GPS module GND
  • Connect GPS module RX to Arduino TX
  • Connect GPS module TX to Arduino RX
  • Connect Arduino 5V to LCD pin VCC
  • Connect Arduino 5V to LCD pin BLK
  • Connect Arduino GND to LCD pin GND
  • Connect LCD pin SCL to Arduino digital pin 13
  • Connect LCD pin SDA to Arduino digital pin 11
  • Connect LCD pin Reset to Arduino digital pin 9
  • Connect LCD pin DC to Arduino digital pin 8

Start Visuino, and Select the Arduino UNO Board Type

F2SVM2QKEY93GBE.jpg
FCRI91OKEY93GBH.jpg

The Visuino: https://www.visuino.eu also needs to be installed. Download Free version or register for a Free Trial.

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

In Visuino Add Components

2020-09-23_22-54-02.jpg
2020-09-23_22-53-47.jpg
2020-09-23_22-51-46.jpg
2020-09-23_22-49-13.jpg
2020-09-23_22-48-55.jpg

  • Add "Serial GPS" component
  • Add "Decode(Split) Date/Time" component
  • Add "Add Date/Time" component
  • Add 2X "Formatted Text" text
  • Add "TFT Color Display ST7735/ST7789" component

In Visuino Set Components

2020-09-23_22-58-00.jpg
2020-09-23_22-59-20.jpg
2020-09-23_23-09-38.jpg
2020-09-23_23-11-50.jpg
2020-09-23_23-25-42.jpg
42597-satellite-icon.png
  • Select "Display1" and in the properties window set Orientation to goDown, Type to dtST7789_240_240
  • Double click on the "Display1"

In the Elements window:

  • Drag "Draw Text" to the left

In the properties window set Color to aclDarkOrange, size to 3, Text to "GPS CLOCK", X to 70, Y to 20

  • Drag "Draw Text" to the left

In the properties window set size to 2, Text to "Time:", Y to 90

  • Drag "Text Field"

In the properties window set Color to aclTurquoise, size to 3, X to 70, Y to 90

  • Drag "Draw Text"

In the properties window set size to 2, Text to "Date:", Y to 140

  • Drag "Text Field"

In the properties window set Color to aclTurquoise, size to 3, X to 70, Y to 140

  • Drag "Draw Line"

In the properties window set Height to 0, Width to 240, Y to 70

  • Drag "Draw Bitmap" to the left

In the properties window select bitmap and click on the 3 dots and in the bitmap editor load the bitmap file (included here)

Note: you can get other bitmaps here

  • Close the Bitmap Editor
  • Close the Elements window
  • Select "FormattedText1" and in the property window set text to %0:%1:%2
  • Double click on the "FormattedText1" and in the elements window drag 3X "Text Element" to the left

Close the Elements window

  • Select "FormattedText2" and in the property window set text to %0:%1:%2
  • Double click on the "FormattedText2" and in the elements window drag 3X "Text Element" to the left

Close the Elements window

To adjust the time zone select "AddDateTime1" and in the property window change hours to your time zone, example hours: 2 ,this will add 2h to the time received from the satellite.

In Visuino Connect Components

2020-09-23_23-27-18.jpg
2020-09-23_23-27-35.jpg
gps-time.png

  • Connect Display1 pin Out SPI to Arduino board pin SPI In
  • Connect Display1 pin Reset to Arduino board digital pin 9
  • Connect Display1 pin Register Select to Arduino board digital pin 8
  • Connect GPS1 pin Date time to AddDateTime1 pin In
  • Connect AddDateTime1 pin Out to DecodeDateTime1pin In
  • Connect GPS1 pin Out to Arduino board pin Serial[0] In
  • Connect DecodeDateTime1 pin Year to FormattedText2 pin Text Element3 In
  • Connect DecodeDateTime1 pin Month to FormattedText2 pin Text Element1 In
  • Connect DecodeDateTime1 pin Day to FormattedText2 pin Text Element2 In
  • Connect DecodeDateTime1 pin Hour to FormattedText1 pin Text Element1 In
  • Connect DecodeDateTime1 pin Minute to FormattedText1 pin Text Element2 In
  • Connect DecodeDateTime1 pin Second to FormattedText1 pin Text Element3 In
  • Connect FormattedText1 pin Out to Display1Text Field1 pin In
  • Connect FormattedText2 pin Out to Display1Text Field2 pin In

Before Uploading to Arduino

2020-09-23_21-57-59.jpg
2020-09-23_21-58-26.jpg

  • Before you upload to Arduino disconnect the RX pin on the Arduino
  • After the upload connect the wire back to Arduino pin RX

Generate, Compile, and Upload the Arduino Code

2020-09-23_23-40-20.jpg

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Play

If you power the Arduino UNO module, the Display will start to show the time and date acquired from the satellites.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it and open it in Visuino: https://www.visuino.eu

File GPS-SAT-TIME.visuino (Project with a zone adjustment)

File GPS-TIME2.visuino (Project without zone adjustment)