The final clock, epoch time display mode.

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 dis-used GPS module with serial output so I thought I could use that for syncing the time and thus avoiding setting the clock manually.

The final clock has the following features and characteristics:

  1. 16 digit 7-segment LED display.
  2. Date/Time display in EPOCH format (seconds elapsed since 1970-01-01T00:00:00).
  3. Date/Time display ISO-8601 format (YYYY.MM.DD.HH.MM.SS).
  4. Adjustable brightness (setting retained with power-cycle).
  5. Programmable UTC offset from -12hrs to +12hrs in 0.5 hour increments (setting retained with power-cycle).
  6. RTC with battery back-up to retain time with power-cycle and/or absence of a GPS signal.

The date/time data is parsed from the NMEA sentence output by the GPS module via the ATmega's 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 gitlab repository.

Assembled with new display board.

This project served as my first attempt at sourcing boards from a fabricator (previously I have etched using the toner transfer method). 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 or at lower cost, preferably both).

The enclosure was made on the fly from some spotted gum. The back panel is just stained plywood.

The project is actually an iteration on a similar project (rev_1) created in 2014. Rev_1 used single-sided hand-etched PCBs and was finished with a much more "rustic" enclosure (stained pine). Rev_2 has a number of newer features and improvements, notable better firmware, hardware and woodwork (i.e. everything).

Note, by default, the clock boots into a mode that displays date/time in ISO-8601 format. The EPOCH time display mode isn't super intuitive and was really just implemented to amuse myself.

More recently, I had some more display board PCBs fabricated, this time with a correction. The previous iteration had a de-coupling on one of the MAX-7219 chips that wasn't grounded. I also tried out an alternative fabricator, this time going with JLCPCB and having the boards fabricated in slick black.