Introduction: GPS Car Clock
This instructable is based on my youtube Speedometer/Clock project https://www.youtube.com/watch?v=T1d3fXBsUu0&t=11s . Here a GPS car clock is presented for those who own a reasonably priced vehicle that don’t have the luxury of a time piece. The original project presented on YOUTUBE was very demanding on the Arduino in terms decoding the realtime GPS data for the Speedometer part, and this code was removed. This design is specifically for Instructables and does only one thing …it tells time. The current time is displayed on a 4 segment 8x8 dot matrix display which is controlled by the MAX7219. The Arduino Nano (compatible) filters only the time information received from whatever satellites it is connected to.The Arduino does this with the aid of libraries <TinyGPS++.h> and <SoftwareSerial.h>.
If you didn't want to use the libraries mentioned above,you could easily extract the data you wanted from the GPS unit if you mirror the data received from the GPS onto the Serial monitor of the Arduino IDE and design the necessary C++ queries,but these libraries allow us to develop projects real fast with minimum hassle. The code for this project is 60 lines in total and works.
In line 29 of the code you will notice that the hour unit received from the GPS is amended with +2 this is because South Africa where i live is offset by +2 from GMT and this is the only change that you will have to make to the code provided (adjust the hour received to your GMT offset). I did not test a subtraction from GMT so i believe that this can be a flaw which i have faith that all of you that are affected will fix.
Attachments
Supplies
1 x Arduino Nano (compatible with c-type usb)
1 x Arduino Nano terminal adapter
1 x ATGM332D GPS
1 x Four segment 8x8 dot matrix display MAX7219 (GREEN LED)
1 x USB C-type cable (1 meter length is acceptable)
1 x cigarette lighter 5v USB adapter
many wires for soldering
glue gun with at least 15cm of glue (you don't need that much)
A piece of black sock (cut to cover display)
(adequate breadboards for testing)
Step 1: The Circuit Diagram
The circuit can be built really quickly as the inter connections between the modules are few. Testing the circuit by following the circuit diagram is essential.Start by adding power to each module from the GPS and the Matrix Display by connecting GND and VCC from each module to the Arduino Nano. RXD and TXD of the GPS is connected to pin D8 and D7 of the Arduino respectively. We start with the pin declared in the code for the display which is CS, and this is assigned pin D10 of the Arduino. CLK is connected to pin D13 while Din is connected to pin D11 of the Arduino.
Step 2: Construction
Make sure that your glue gun and soldering iron are functional. Again we start with the power rail, solder VCC and GND of the GPS and MAX 7219 display and connect the other ends of the appropriate wires together,finally connect into the terminal adapter of the Arduino Nano.Follow the circuit diagram until all connections are made. Use the black sock as a filter for the display and glue with the hot glue gun to the sides of the dot matrix displays. This unit once programmed can be used anywhere not just a vehicle but always remember that GPS coverage is essential.
Step 3: Fault Finding
On start up the unit searches for GPS data and when this data is received the correct time is displayed. If the unit displays "No GPS" even though a GPS module is connected then the signal level from the satellites is poor or the unit is faulty.I have tested the unit indoors and found it working correctly although not all throughout my home.
Step 4: Guidance From Above
With a GPS module based clock there is never a need to adjust anything as the time is always correct. This module was tested extensively and in may different environments it is robust and easy to build.. I hope you have fun building this clock.




