Vetinari's Clock (2011)

https://news.ycombinator.com/rss Hits: 8
Summary

In the excellent Discworld series the character Lord Vetinari has a clock in his waiting room which is designed to tick irregularly in order to make his visitor feel ill at ease. Inspired by a post featured on Hackaday I decided to build my own version of this clock with a simple and easy to make design. Vetinari’s Clock Akafugu.jp have released a kit version of this clock based on the ATtiny25 complete with open-source and open-hardware documentation, so if you want to get your very own clock you can purchase one over on their website (note that waitingforfriday.com is not affiliated with Akafugu.jp, so for support and questions on their kit please contact them directly): Akafugu.jp YouTube Demonstration Video Clock controller design The clock controller simply replaces the built in controller in a standard quartz clock movement. The clock works using a simple stepping motor design which is pulsed every second. With each pulse the polarity is reversed in order to flip-flop the magnetic field of the motor’s electromagnet. The following scope trace shows the output from the original controller: Original Control pulses Controller design The following diagram shows the circuit schematic for the clock controller: Vetinari Clock Schematic The clock controller uses a PIC12F683 which is externally clocked using a 32.768Khz clock crystal (using the LP oscillator mode). This means that the PIC is running at 32768 clock cycles per second which makes timing the clock very easy to do (and also means you do not need an additional RTC chip). To ensure good time-keeping the firmware uses the overflow of timer0 to cause an interrupt 4 times a second. Since the 8-bit timer starts counting from zero after the overflow the firmware does not loose clock cycles in resetting the timer. This means the clock is as accurate as the crystal and that the PIC consumes very little power since it is running at such a low clock speed. The firmware has a ‘random’ sequence of pulses which over 32 se...

First seen: 2025-09-05 13:09

Last seen: 2025-09-05 20:16