This project was inspired by a student of mine who told me he was programming a javascript analog clock. A bug in his code caused the number to rotate rather than the hands... True or not, my immediate thought was: I want that in real-life. It was the perfect excuse for finally buying a 3D printer.

Instead of creating a clock from scratch, this device takes a standard wall-clock that is clamped inside a large 216T gear, which sits on top of two 36T gears. The clock is simply balancing on these two gears without additional support, which makes it very easy to pick up and adjust (if for instance you want the stationary hand to point in a different direction).

Inside the housing is a stepper-motor that drives one of the 36T gears, an Arduino Nano, an L298 motor-driver and a DS3231 real-time clock. Based on the switch-setting, the Arduino calculates exactly how many milliseconds should be between subsequent steps of the stepper-motor. It turned out however that the millis()-function will drift slightly over time, so a real-time clock is used for long-term synchronization.

Counter-Rotating Clock Frame | Hackaday.io