A nicer voltmeter clock
366 points
• 2 days ago
• Article
Link
作者重温了 2019 年的一个项目:他们制作了一台电压表时钟,用模拟面板电压表替代传统表盘来显示时、分、秒。虽然原作运行良好,但作者决定重新设计一版,更加优雅且文档更完善。新版选用了从 Amazon 购买的三只通用 90 度面板电压表,拆解后在自粘纸上定制印刷了刻度盘。小时表盘分为 13 格(0 到 12),分钟和秒钟表盘各为 61 格(00 到 60),因此指针可以连续移动而不是跳动。
外壳是与第一版最大的不同。作者没有手工拼装,而是用 CNC 铣床在枫木板上铣出前后面板。为实现无缝的弧形侧壁,他们在一块木板上切出内凹槽,使其更容易绕成型模板弯折。木板先加湿、夹紧定型并晾干,再用胶合板模板精确粘合到前后面板上。经打磨并喷涂一层硝化纤维素清漆后,成品外观干净光滑,带有凹陷的装饰纹理,巧妙地掩盖了电压表难看的塑料法兰。
电子部分相当简单,核心是一颗 AVR128DB28 微控制器,由外接电源适配器供电,并配有 8 MHz 晶振做时钟。三只电压表直接接到数字输出引脚,背部设有两颗按键用于校时。值得一提的是,设计不需要数模转换器;作者改用高频一位数字脉冲序列,借助表头机构的机械惯性和线圈的电感,使表针根据软件输出信号的占空比停在介于刻度之间的位置。代码精简且注释充分,利用定时中断推进一个 10 Hz 的计数器,主循环则计算并切换各表的占空比。
作者还附上了一段视频,记录了时钟在午夜前后的戏剧性翻转效果。在回应 Hacker News 的评论时,作者解释指针在过渡时的轻微下坠与弹跳是刻意为之,旨在增强视觉效果,并将这种表现手法与豪华腕表中的逆跳机构相类比——那类花巧往往能卖出高价。这个项目也体现了作者的理念:电子设计往往同样需要木工和实体制作方面的匠心,与电路设计和编程并重。
The author revisits a project from 2019 where they built a voltmeter clock, a timepiece that uses analog panel voltmeters instead of traditional clock faces to display hours, minutes, and seconds. While the original version worked well, the author decided to create a revised design that would be both more elegant and better documented. The new version uses three generic 90-degree panel voltmeters purchased from Amazon, which were disassembled and fitted with custom-printed decals on adhesive paper. The hour gauge features 13 divisions (0 to 12), while the minute and second gauges have 61 divisions (00 to 60), allowing for continuous motion of the hands rather than discrete jumps.
The enclosure represents a significant departure from the first version. Rather than building it by hand, the author opted to machine the front and back faces from maple lumber using a CNC mill. To achieve a seamless curved side wall, the author cut internal notches into a flat piece of wood, allowing it to flex more easily around a shaped template. The wood was moistened, clamped into shape, and left to dry before being glued to the front and back faces using a plywood template for precision. After sanding and applying a coat of nitrocellulose lacquer, the finished enclosure has a clean, polished appearance with a recessed decorative pattern that hides the voltmeters' unsightly plastic flanges.
The electronics are straightforward, centered around an AVR128DB28 microcontroller powered by a wall wart and synchronized with an 8 MHz crystal. The three voltmeters are connected directly to digital output pins, and two pushbuttons on the back allow for time setting. Notably, the design doesn't require digital-to-analog converters. Instead, it uses high-frequency 1-bit digital pulse trains, relying on the mechanical inertia of the meter movements and the inductance of their coils to settle at intermediate positions based on the duty cycle of the software-controlled signal. The code is compact and well-commented, using a timer interrupt to advance a 10 Hz counter while the main loop computes and toggles the appropriate duty cycles for each meter.
The author includes a video showing the clock's behavior around midnight, capturing the dramatic rollover effect. In response to comments on Hacker News, the author explains that the slight drop and bounce of the hands during the transition is intentional, adding visual flair to the clock. They compare this to the retrograde mechanisms in luxury wristwatches, where such theatrics command a premium. The project reflects the author's philosophy that electronic design often involves as much craftsmanship in woodworking and physical construction as it does in circuit design and programming.
50 comments • Comments Link
• 一位制作者分享了自己制作类似模拟仪表钟的经历:在 Princess Auto 发现几只剩下的面板仪表,每只只要一美元多一点。尽管他做得没那么精致,但这些仪表能有效显示时间,而且会引起路人的小小好奇心。
• 一位从事模拟计算机项目的爱好者描述了用数字 LCD(通过 ESP32)和真实面板仪表来可视化模拟计算结果。他发现看到物理仪表与模拟计算同步移动,特别令人满足,也更有真实感。
• 一位专业家具制造者建议,拥有 CNC 路由器的创客空间能处理大部分木工活。他指出,如果绕过仪表周围的榫接,前面板就能简化为单面加工,可能用基本工具也能完成。
• 有评论者讨论了指针在切换时的过冲和跳动问题,其中一位解释说应逐渐降低 PWM 的占空比而不是瞬时改变以避免这种现象,另一位则担心反复的冲击会损坏便宜的面板仪表。
• 一个人幽默地指出,模拟仪表的自然跳动正是开发者经常试图用额外代码在数字显示上复制的,大家都很欣赏物理运动那种有机的质感。
• 一个技术性解释说明了 PWM(脉宽调制)如何用来控制等效电压:晶体管以某个占空比脉冲输出,从而模拟中间电压;而电子电压测量依赖于电容充电速率,这与模拟仪表靠机械弹簧和电磁铁的工作机制不同。
• 评论里也表达了对工艺的钦佩,有些人说这个项目激励他们去学 3D 建模或木工;也有人提到在过于雄心勃勃的建模项目中遇到困难,于是有人建议从 Tinkercad 等更简单的工具入门。
• 一位观察者最初以为秒针会更平滑地移动,怀疑 10Hz 的控制是否太慢;另一位对仪表不会在一天内真实升压感到些许失望,后来意识到 PWM 的方式其实能有效模拟这一点。
整体讨论展现出大家对模拟美学与数字控制交汇处的浓厚兴趣,参与者很看重面板仪表带来的触觉和物理化数据表现。技术话题集中在 PWM 的实现以及如何在实现真实模拟行为和延长设备寿命之间权衡。社区还给出实用建议,比如利用共享创客空间的设备,以及从更简单的工具和项目入手以降低门槛。反复出现的主题是:在纯数字显示无法复制的物理运算中,人们能找到特别的满足感。 • A builder shares their experience creating a similar analog meter clock after finding surplus meters at Princess Auto for just over $1 each, noting that while their version isn't as polished, it effectively displays time and draws mild fascination from observers.
• An enthusiast working on an analog computer project describes using both digital LCD displays (via ESP32) and actual panel meters to visualize simulation results, finding that seeing a real physical meter move in sync with the analog computation was particularly satisfying and authentic.
• A professional furniture maker suggests that makerspaces with CNC routers could handle most of the woodworking, noting that skipping the rabbets around the gauges would simplify the front panel to a single-sided job, potentially achievable with basic tools.
• Several commenters address the meter needle's overshoot and bounce behavior during transitions, with one explaining that ramping down the PWM duty cycle gradually rather than instantaneously would prevent this, while another expresses concern that repeated shocks might damage cheaper panel meters.
• One person humorously notes that the natural bounce of analog meters is something developers often try to replicate digitally with extra code, appreciating the organic quality of the physical movement.
• A technical explanation clarifies how PWM (Pulse Width Modulation) works for voltage control, where transistors pulse at specific duty cycles to simulate intermediate voltages, and how electronic voltage measurement relies on timing capacitor charge rates rather than the mechanical spring-and-electromagnet mechanism of analog meters.
• Commenters express admiration for the craftsmanship, with some noting the project inspires them to learn 3D modeling or woodworking, though one mentions struggling with overly ambitious modeling projects and receives a suggestion to start with Tinkercad.
• One observer initially expected the seconds hand to move more smoothly, questioning whether 10Hz control is too slow, while another expresses slight disappointment that the meters don't literally increase voltage throughout the day before realizing the PWM approach effectively simulates this.
The discussion reveals a strong appreciation for the intersection of analog aesthetics and digital control, with participants valuing the tactile, physical representation of data that panel meters provide. Technical conversations center on PWM implementation and the trade-offs between authentic analog behavior and equipment longevity. The community offers practical advice for overcoming barriers to similar projects, from utilizing shared makerspace resources to starting with simpler tools and projects. There's a recurring theme of finding satisfaction in physical computing that purely digital displays can't replicate.