Building a cleaner analog voltmeter clock with maple and an AVR MCU
A hobbyist revisits a 2019 build of a clock that uses three analog panel voltmeters in place of a traditional face, one each for hours, minutes, and seconds. Most of the effort goes into woodworking rather than electronics: cheap Baomain 65C5 meters are disassembled and refitted with custom printed decals (13 divisions for hours, 61 for minutes and seconds) to allow continuous hand motion, and the ugly plastic flanges are hidden behind a CNC-milled maple front panel. The curved side wall is shaped by cutting internal notches into a flat board, moistening it, clamping it to a template, and gluing it once dry.
The electronics are deliberately minimal. An AVR128DB28 microcontroller running off an 8 MHz crystal drives the three meters directly from digital output pins, with two pushbuttons for time setting. There is no DAC: a 1-bit pulse train at varying duty cycle exploits the inertia of the meter movements and coil inductance to settle the needles at the right intermediate positions. A timer interrupt advances a 10 Hz counter, and the main loop computes duty cycles and toggles pins in software rather than using the chip’s hardware PWM.
The piece is a reminder that for small embedded projects, the enclosure and mechanical fit often dominate the work, while the firmware is a short, well-commented afterthought. Templates and source code are linked from the post for anyone wanting to replicate the build.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.