An uninterruptible power supply (UPS) isn’t something solely to have hooked up to your desktop PC. Your Raspberry Pi SBC might also benefit from it. Yet the available options aren’t too great, or are too expensive. This leads folk including [Joachim Baumann] to modify cheerfully cheap Chinese UPS HAT boards such as the Geekworm UPS HAT to fix its myriad of issues and missing features.
Inspired by a number of other hacks on this board which fixed things like needing to push a button on the UPS to boot the Raspberry Pi, [Joachim] set out to make a similar ATtiny-based solution that would address all issues, above all the fact that this Geekworm UPS does not detect when the connected SBC has turned off and will happily run the lithium battery pack dry. Finding a blog post by Simon who had reverse-engineered the board previously was immensely helpful.
With [Simon]’s project, a PIC MCU was used to provide a supervisor for the UPS HAT. It also bypasses the HAT’s control over whether the Raspberry Pi gets power or not. The results did however not fit [Joachim]’s needs, so the ATtiny Daemon project was born. This uses some of the fixes [Simon] implemented and adds a daemon that runs on the Raspberry Pi to establish two-way communications between the UPS and OS.
The settings for the UPS are stored also on the HAT, in the MCU’s EEPROM, with the daemon able to update and read it out as needed. The completed system provides a whole list of new features, as listed on the above linked Github project page. Probably most important are thresholds for warning, hard shutdowns and restart. The entire add-on board is also laid out to use only through-hole components, making it very easy for even novices to assemble.