Epoch Clock

Updated 31 March 2022

I read somewhere about UNIX Epoch time and thought wouldn't it be neat to have a clock that showed time in this format?

This project developed from that idea. I had a unused GPS module with serial output so I thought it would also be cool to use that for syncing the time and thus avoiding setting the clock manually. The final clock has the following features and characteristics:

16 digit 7-segment LED display

Date/Time display EPOCH format (seconds elapsed since 1970-01-01)

Date/Time display ISO-8601 format ((YYYY.MM.DD.HH.MM.SS)

Adjustable brightness (setting retained with power-cycle)

Programmable UTC offset from -12hrs to +12hrs (setting retained with power-cycle)

RTC with battery back-up to retain time with power-cycle and/or absence of GPS signal.

The main components for this project include: /catalog/product/view/sku/

The KiCAD files (schematics and PCB layouts) as well as all the firmware code (in C) can be found on the github repository: https://github.com/Clewsy/gps_clock

Date/time data is parsed from the RMC NMEA string output by the GPS module over the USART. This is converted to local time according to an adjustable UTC offset. This offset is stored in eeprom so that it is retained after a power-cycle. The offset can be adjusted in half-hour increments from -12hrs to +12hrs.

After a sync, the time is set in the DS3234 RTC module which is referenced whenever the display is refreshed. The RTC has a battery back-up so that the time is retained with no power. The RTC is only re-set after a "successful" time sync from the GPS, so if there is no signal, the current time is not changed.

The schematic and PCB cad files were developed with KiCAD. The code was written in C and developed using Atom. All these files are included in the github repository.

This project served as my first attempt sourcing boards from a fabricator (previously I have etched them myself). This meant I was able to use SMD components (also a first) to reduce board size. I used OSH Park for board fab due to user-friendlieness. Next time I will try a different supplier (hopefully more local and at lower cost).

The project is actually an iteration on a similar project (rev_1) created in 2014. Rev_1 used single-sided hand-etched PCBs and a much more "rustic" enclosure. Rev_2 has a number of newer features and improvements, particularly in firmware.

Design and Construction:

The circuit schematic was designed with KiCAD and prototyped with a breadboard.

Prototyping stage with display board and breadboard.

The circuit boards were also designed with KiCAD and the files were sent to OSH Park for fabrication.

Display Board

Control Board

Once received, the boards were assembled into a funcioning clock module.

Assembled Back

Assembled Top

Assembled Front

I wanted to use the clock in a nicer enclosure so I fabricated one from some spotted gum.

Wood Construction Progress

Wood Construction Finished

Once the box was made, I installed the electronics including some panel-mount buttons and DC jack.

Installing electronice into enclosure.

Fully enclosed back

Fully enclosed front

Fully enclosed front

By default it boots into a date/time display mode in format YYYY.MM.DD. HH.MM.SS.

Running in ISO-8601 Mode

But it can also display the UNIX Epoch time (seconds elapsed since 1970.01.01 00.00.00).

Running Epoch Mode

This project is actually an iteration on an old project created about four years ago. Here is a comparison of the final product:

Rev_1 with Rev_2

Attachment - Project Files

Have a question? Ask the Author of this guide today!

Please enter minimum 20 characters

Your comment will be posted (automatically) on our Support Forum which is publicly accessible. Don't enter private information, such as your phone number.

Expect a quick reply during business hours, many of us check-in over the weekend as well.

Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.