02 February 2019

Timebase for homemade clocks, 1 pps

I am currently into a minimalist approach to building (Nixie) clocks that does not include a user interface. The are several reasons, like simpler and less buggy firmware, straightforward user interaction, less hardware, fewer holes to drill in the case. Since these are one-offs "products" without commercial intents, I can afford it.

I am after a simple way to get an accurate 1 pps or integer fractions of it so that the microprocessor can count the elapsed time.

The most elegant way would be to clock the AVR microprocessor with a purposely chosen XTAL, feed that timebase into a divider and use it as timekeeping interrupts. I've got plenty of 11059200 Hz crystals, but they don't divide well into suitable interrupt counts.

Another way is to take advantage of the AC line at 50 (60) Hz, but that means a special power supply (AC-AC) and additional circuitry to get DC voltage for the logic and the booster in case of Nixies. No, I don't want to use the direct-AC method!

How about a watch crystal at 32768 kHz and a 4060 divider? That would work, indeed.

But when you take into account both the additional wiring and the cost of each of these solutions, it turns out that modern RTC chips (at 1 USD shipped, already on breakout boards) are equally cheap, maybe even less complex to wire, output a 1 pps signal and offer greater upgrade possibilities if you ever want to, like battery/supercap backup, date, power loss warning. And their SOIC package is probably not too difficult to hand-solder either.

By the way, how to set the time on a interface-less clock? Well, it always starts at an agreed time, and you simply have to plug it in at that time. We are surrounded by clocks and "my" device doesn't aim at being the time reference standard.