Show HN:我用 1600 美元的 ESP32 取代了价值 12 万美元的保龄球馆系统

7 分•作者: section33•3 个月前
我可能是地球上唯一拥有自己保龄球馆的SRE。这比你想象的要深入得多。 我和我的家人在美中西部的农村地区买下了一个废弃的八道保龄球馆。在我们的小镇,家庭休闲选择不多。你听说过“食物沙漠”吗?这是一个“休息与娱乐沙漠”。 它被废弃是有原因的。屋顶漏水,电力系统经常过载,我那70岁的保龄球设备(仍然)不能完美工作。计分系统尤其让我感兴趣。它是你在比赛中会关注的东西,但除此之外就融入背景了。事实证明,这些东西非常酷,但价格却高得离谱。 我们的系统安装于2008年,花费了六位数。它能计算球速和轨迹,基于摄像头的球瓶检测(集成电路上的物体检测和三角测量!),运行犯规、动画、球瓶复位机和球道回送。以其年代而言,这是非常酷的东西。 从商业角度来看,我的设施仅花费了我10.5万美元。要直接替换计分系统,根据功能、供应商和设备年代,费用在8万至12万美元之间。请注意,这还不包括升级或服务合同,并且每项功能和定制都是一个单独的项目。这是针对2008年安装的系统的1:1替换。考虑到技术世界的快速发展,这真是令人难以置信。 更换零件的成本令人震惊,每对球道需要4000美元。但是等等,保龄球机器本身已经70年了,那么这个“先进”的系统到底在做什么呢?它只是驱动一个继电器来启动那台老旧的机器。其他一切都是纯粹的机械操作。而我手里却拿着一张六位数的发票。我感到很沮丧。 考虑到开源硬件、计算机视觉、实时事件流以及在全球范围内运行超大规模产品的开源技术现状,一定有办法自己来完成这项工作。 到目前为止,我已经用大约每对球道200美元的成本构建了一个等效的原型,如果想要更高级的配置,则为400美元。使用了ESP32和ESPNow,并带有RS485作为备用,向一个树莓派球道计算机报告,该计算机实际上只是一个Redis和一个状态机,连接到一个用于网状网络的ESP32网关。 由于全部是ESP32,我抽屉里有一把备用控制器,已经刷好固件或等待刷写。所有都是常见的现成硬件:微控制器连接继电器、光电耦合器和红外断束传感器,每个都运行略有不同的固件。编写固件和协议才是真正的难点。 这是一个ESPNow星型拓扑网状网络:每个节点从其传感器发出事件,并接受其控制器的命令,通过UART向连接到树莓派的网关节点报告。从那里开始是事件流:接收到的数据包被翻译并放入Redis,命令根据需要传回网状网络。RS485作为有线备用,用于嘈杂的射频环境。 一旦数据进入Redis,就可以进行熟悉的中间件/React/websocket/发布-订阅操作了。任何React开发者都可以构建自己的UI和保龄球动画。由于所有这些都运行在商品硬件上,作为经营者,我可以做任何我想做的事情,并且我拥有所有数据。维修只需五分钟;我可以在不到10分钟内更换一对球道的设备。我敢打赌,像我这样的房子可以在一两个小时内从零开始运行起来。 我们称之为OpenLaneLink,我计划在准备就绪时开源硬件、固件和软件栈。保龄球很有趣,我想帮助像我这样的保龄球馆保持其可负担性。 我痛恨供应商锁定。我不喜欢封闭系统,不喜欢为每一个小问题都打电话给客服,或者为“贴牌”自己的设备付费。想在某个晚上换成“创战纪”主题?祝你好运,在世纪之交购买的设备中找到一个霓虹灯神经形态主题。 所有这些都让我烦恼。当然,保龄球设备是小众的,但开源硬件和软件的格局是惊人的。 感谢阅读!如果有人对更多关于这些保龄球的胡闹文章感兴趣,请告诉我。
查看原文
I might be the only SRE on Earth with his own bowling center. It&#x27;s a more in-depth gig than you&#x27;d think.<p>My family and I bought an abandoned 8-lane bowling center in the rural mid-west. In our small town there weren&#x27;t many recreation options for families. You&#x27;ve heard of a food desert? This is an R&amp;R desert.<p>It had been abandoned for a good reason. The roof leaks, the electrical system was constantly surging, and my 70-year-old bowling equipment (still) doesn&#x27;t work perfectly. The system that keeps your score is particularly interesting to me. It&#x27;s the thing you watch during your game, but it fades into the background beyond that. Turns out these things are really cool, but absurdly expensive.<p>Ours was installed in 2008 and cost six figures. It&#x27;s calculating ball speed and trajectory, camera-based pin detection (object detection and trig, on ICs!), runs the fouling, the animations, the pinsetting machine and ball return. Very cool stuff for its age.<p>From the business perspective, my facility only cost me $105k. To forklift-replace the score keeping system runs anywhere between $80-$120k, depending on features, vendor, and unit age. No upgrades or service contracts, mind you, and every feature and customization is a new line item. That&#x27;s for a 1:1 replacement on a system installed in 2008. Incredible, given how fast the tech world moves.<p>Replacement parts cost a shocking $4000 per pair of lanes. But wait, the bowling machines themselves are 70 years old, so what&#x27;s this &quot;advanced&quot; system actually doing back there? Actuating a single relay to trigger that big old machine. Everything else is strictly mechanical. Meanwhile I&#x27;ve got a six-figure invoice in my hand. I&#x27;m upset.<p>Given the state of open hardware, computer vision, real-time event streaming, and open source running megascale products worldwide, there had to be a way to do this myself.<p>So far I&#x27;ve built an equivalent prototype for about $200 per lane-pair, $400 if you&#x27;re fancy. ESP32 and ESPNow with an RS485 fallback, reporting to a raspberry pi lane computer that&#x27;s really just redis and a state machine bolted to an ESP32 gateway for the mesh.<p>Since it&#x27;s all ESP32, I&#x27;ve got a fistful of spare controllers in a drawer, pre-flashed or waiting to be. All common off-the-shelf hardware: microcontrollers wired to relays, optocouplers, and IR-break-beam sensors, each running slightly different firmware. Writing the firmware and protocol is the actual hard part.<p>It&#x27;s an ESPNow star-topology mesh: each node emits events from its sensors and accepts commands for its controls, reporting to a gateway node connected to the raspi over UART. From there it&#x27;s event streaming: RX packets get translated and tossed into redis, commands relay back out to the mesh as needed. RS485 sits underneath as a wired fallback for noisy RF environments.<p>Once the data&#x27;s in redis, it&#x27;s familiar middleware&#x2F;React&#x2F;websocket&#x2F;pub-sub stuff. Any React dev can build their own UI and bowling animations. Since it all runs on commodity hardware, I can do legit anything I want as the proprietor, and I own all my data. Repairs take five minutes; I can swap the rig on a lane pair in under 10. I&#x27;d bet a house like mine could go from zero to running in an hour or two.<p>We&#x27;re calling it OpenLaneLink, and I plan to open source the hardware, firmware, and software stack when it&#x27;s ready. Bowling is fun, and I want to help keep it affordable for alleys like mine. I hate vendor lock-in. I&#x27;m not a fan of closed systems, calling support for every hiccup, or paying to &quot;white label&quot; my own equipment. Want to go Tron-themed for a night? Good luck finding a neon neumorphic theme in something bought at the turn of the century.<p>All that bugged me. Sure, bowling equipment is niche, but the open hardware and software landscape is amazing.<p>Thanks for reading! Let me know if anyone&#x27;s interested in more posts about this bowling nonsense.