After reading Eric Schlosser's Command and Control: Nuclear Weapons, the Damascus Accident, and the Illusion of Safety a year ago and searching related topics, I found myself watching the video Rocket Sled Impact Test In Slow-Motion from Sandia National Labs. In the background of a couple of shots in this video, a large digital clock in the background caught my eye:

My initial "oh, that's cool" thought turned a few days later into buying a bunch of 1.8" 7-segment digits. When these arrived a month later in April 2018, I put together a frame in Fusion360 to mount them on the wall (sans any other plan, which is typical for me). The resulting 28 x 8cm design was far too big to print in one go, so I split it into 6 pieces joined with dovetails:

After printing in ABS, test fitting and bonding the joints using acetone, I gave the frame a quick sand and a paint job:

Ready for assembly.
First attempt sanding and painting

The initial results weren't ideal; the digits fit perfectly, but the dovetail joints were too obvious for my liking. I did another round of sanding and paint, then the frame and digits sat on my bench for a few months:

Bench in June 2018

In July I had another go at sanding and painting the frame, this time using painters gap filler to fill in the gaps around the part joints. This worked much better:

Halfway through sanding and painting with the help of gap filler. The middle joins are almost invisible now.

With the frame looking more polished, I wired up the displays using a home-made wire-wrapping tool:

Wiring segments together using wire-wrapping as a non-permanent way to make connections. My "tool" is the 0.1 inch aluminum tube on left with a small hole drilled in closest end.
Close-up of wire wrapping from a make-shift tool.

For the next while, this project lived on my desk driven by an STM8S and MAX7219 on a breadboard. Initially this only counted seconds (roughly) from the power on time, but later I calibrated the timing to have a semi-accurate clock that maintained the time given at compile+flash time. Code for this STM8 prototype is on Github for reference.

Counting up milliseconds using an STM8 and MAX7219 to demo (the P represents decimal 14 in the MAX7219's BCD decoding)

At this point I replaced the STM8 with an ATTiny13A and plugged in a NEO-6M GPS to read the actual time from. I'd worked out the Tiny could just support the number of I/O I needed, and some tinkering proved that the required C program could comfortably fit in the 1KB of available program space.

First pass and still have space to play with!

Working with the ATTiny13A for this was a bit of fun as it lacks hardware UART (for the GPS) and hardware SPI (for the MAX7219). Additionally, the NMEA sentences sent by the GPS are up to 79 bytes, which won't fit into the tiny's 64 bytes of SRAM.

The code has a routine to find RMC ("Recommended Minimum") sentences in the GPS's serial output and extract time and date information with only a 2 byte buffer for converting the numbers represented in ASCII to 8-bit integers.

Now with GPS time and red transparent acrylic to increase contrast (looks worse here as the acrylic isn't flush, but this really helps)

After turning the clock off for a week, my girlfriend mentioned that it'd been useful to have a clock (even if it looked like "a bomb timer from a movie"), so I thought I'd finish it off.

I didn't like the look with a single piece of acrylic across the front, so I broke that filter into smaller pieces and recessed them:

"It looks even more like a bomb with the wires hanging out the bottom"

In the final schematic, there's a bit of pin sharing:

  • MISO for programming and the software UART RX use the same pin. These signals have to be isolated from each other as the programmer pulls the line high when connected, and the GPS transmissions step on the signals being sent...
Read more »