Qwiic GPS Clock

Qwiic-ly build a GPS clock.

Favorited Favorite 0

Ah, I remember it now - walking through the halls of the old SparkFun building and being amazed by all the cool projects. One project that caught my eyes was Nate's alphanumeric GPS wall clock.

Nate's Alphanumeric Clock

Serial GPS Clock

The alphanumeric GPS wall clock project inspired me to build my own one day. After working in technical support on a few cases related to GPS, I started getting familiar with GPS receivers and libraries. I gathered the parts and built a GPS clock of my own.

This required me to solder the parts together. I decided to use Mikal Hart's TinyGPSPlus library that did most of the heavy lifting to parse the serial data and wrote some code to display the current time as a challenge. It was big with wires sticking out, as expected from a prototype. I was quite satisfied with how it turned out and just left it mounted on a piece of cardboard.

Just like Nate, I had the same issue where we had to fall back and spring forward the time whenever daylight savings time hit. I had to adjust the code and re-upload back to the Arduino a few times. I decided to update the code by adding/subtracting an hour using a piece of jumper wire acting as a switch. It still works to this day!

Bobby's Old GPS Clock with UART Pins

Qwiic GPS Clock

Time flies and there have been advances in technology. With uBlox GPS modules and Qwiic-enabled devices, it's even quicker to build a GPS clock! For this version of the GPS clock, I managed to bring down the size of the clock using the Qwiic Micro with SAMD21 and Qwiic Micro OLED breakout. The Qwiic cables are more aesthetically pleasing to the eye compared to the dangling jumper wires connecting to a breadboard. What's great about the Qwiic Micro OLED is that it has the ability to draw characters and objects on the display. Thus, time can be displayed as a digital or analog clock.

Qwiic GPS Clock with Qwiic micro OLED and Qwiic Micro (SAMD21)

If you are looking to build a Qwiic-enabled GPS clock, check out the tutorial below! The tutorial uses the RedBoard Qwiic with ATmega328P for those that have an SparkFun Inventor's Kit v4.1 and were looking for another project. However, it was tested to work on the Qwiic Micro's SAMD21 should you decide to go smaller and want to try a different microcontroller as well.

The code can be adjusted for 12-hour/24-hour format depending on your personal preference. You'll need to tweak the code for daylight savings time depending on your region. If you decide to use a different output, you can grab the template to modify the code with your choice of display! At the time of this writing, I managed to squeezed in examples with the SerLCD and 7-segment serial LED display to display the date/time.

Qwiic GPS Clock

September 14, 2020

What time is it? Time for you to... Qwiic-ly build a GPS clock and output it to a display! This project provides you with the current date and time using GPS satellites. Read the date and time as a digital or analog clock. Or even configure the clock for military, your time zone, or automatically adjust the time for daylight savings time!

Making It Better

So what are the next steps to the project? I'd probably want to mount the Qwiic GPS clock on a panel or inside an enclosure. Or maybe add a Qwiic button to easily switch between modes depending on the display. To prevent the OLED from screen burn-in, I'd probably turn off the micro OLED when not in use and wake it up using a distance sensor. Until next time!



Comments 3 comments

  • Member #134773 / about 4 years ago / 1

    Great little project!

    One way to avoid the problem of adjusting for DST is to live in one of the areas that doesn't do it. Although I've only lived in AZ since the mid-80s, I've heard that Arizona tried Daylight Savings(sic) Time for one year back in the 60s, and that the power usage (and electric bills) went through the roof. The power companies told the legislature that if they didn't drop DST, they likely would have to have blackouts the next year, so DST went away. Every once in a while I hear the suggestion that we should actually go an hour the OTHER WAY ("spring back, fall forward") but it never gets much traction as we don't like the idea of resetting the clocks...

    BTW, when I first got into Amateur ("Ham") Radio in the early 90s, and went to some repeater sites, I was a bit confused by the GPS antennas -- did they really think that the mountain or tall building was going to wander off? I hadn't really thought about it at that time that you could get highly accurate time from GPS... (The commecrial pager systems in use in those days needed accurate time, the Amateur repeaters didn't need it, so we didn't have GPS receivers, but we both benefitted from being atop mountains or tall buildings, and there's only so much space for equipment there...)

    • santaimpersonator / about 4 years ago / 1

      I grew up in Hawaii, I still forget and show up late/early (people probably think I am just irresponsible). As someone who has never had to adjust their clock growing up, I think DST is outdated and annoying.

    • Thanks! Yeah, I've lived in Colorado since I was born. I didn't realize that certain states/countries do not observe DST until I did more research to ensure that the code would work in any region. Luckily, there is a way to override the calculation in the code. I've never heard of the DST the "other way" before.

      That's an interesting tid bit on the commercial pager systems. =)

Related Posts

Recent Posts

Halloween Hacking

SparkFun Spooktacular

Tags


All Tags