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 disused 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:
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.
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). It also had an internal power supply which made the enclosure significantly bulkier. Rev_2 has a number of newer features and improvements, notable better firmware, hardware and woodwork (i.e. everything).
By default, the clock boots into a mode that displays date/time in human-readable ISO-8601 format. The EPOCH time display mode isn't super intuitive and was really just implemented to amuse myself.
The epoch time variable is stored as an unsigned 32-bit integer, so this clock should not suffer the year 2038 problem which is an affliction of devices that use a signed 32-bit integer. The down-side is that it cannot show time/date prior to the 1st of January 1970, but that's not a feature needed for a clock anyway.
More recently, I had some additional display board PCBs fabricated, this time with a correction. The previous iteration had a de-coupling capacitor 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.