Panel meter clock made from a Raspberry Pi

I know this has been done before with MSP430, Arduino, and Raspberry Pi but I thought I would make one too. The one thing I wanted to do differently with mine is have a sweep second hand instead of a step second hand.

Parts List:
Raspberry Pi Zero WH
3V Panel Meters
Adafruit 16-Channel 12-bit PWM/Servo Driver

The PWM range is 0-65500 and using some math I divided that value by 60 to get 1091.6667 repeating. The libraries from Adafruit only accept whole values so I convert that to int(1091.6667). That’s for each second with a time.sleep(1). Then it is just a simple matter of dividing it down by half until I get a smooth sweep of the seconds.

After 59 seconds have elapsed, the seconds, minutes, and hours hands are updated to the current time to keep everything in sync.

This is a time-lapse demonstration of the clock to show the sweep effect.

See the code at my github.

Thank you to Wilde Prints for creating the custom faces for the gauges.

Leave a Reply

Your email address will not be published. Required fields are marked *