(08-02-2022, 12:55 AM)CounterPillow Wrote: Hi,
I think the simplest way to implement this without any monitoring would be to just hook up a 12V lead-acid battery in parallel with the input on e.g. ROCKPro64 or Quartz64 Model A. For the 5V boards this would need a DC-to-DC regulator as well.
For monitoring, a fuel gauge chip connected over I²C could be used. That way the battery could just show up as a battery like in a laptop to the kernel, and the regular userspace daemons for shutting down systems when battery is low could be used; no need for hacky scripts.
Speaking of Quartz64 Model A, there this isn't needed at all because the RK817 PMIC has battery charging functionality, a LiPo cell can be connected to the board and it'll just work if the driver posted to the mailing list is applied.
Personally I don't really have a use for this though because I can't even remember the last time I've had a power outage, it was probably a decade ago.
I like your thoughts about monitoring it didn't cross my mind to think of it like a laptop and get the userspace daemons to shut it down , makes complete sense.
Unfortunately where I live I probably have a dozen or so power cuts a year , not as bad as some but enough to give me worry about the possible SD card corruption.
I use a Rockpro64 as a server and a NAS , I know I should invest in a emmc , but I'm not sure of a distro that supports it fully yet.