0

I have a Uninterruptible Power Supply HAT For Raspberry Pi (bought here https://www.cytron.io/p-uninterruptible-power-supply-hat-for-raspberry-pi) and there is an INA219 chip on it. I'm using a python script to read from the I2C and it provides:

  • Load Voltage
  • Power
  • Current

I'm using 2 LiPo 18650 6,800 mAh / 3.7 V batteries. I'm trying to figure out what data I can use to shutdown the RPi. I've read that a 80% discharged LiPo is a safe value. Should it be 80% from the voltage? From the power? I dout it would be from the current.

3

You've not supplied any details on this UPS - other than a link to a web page that says the unit is discontinued. The best source of information for your question is probably the manufacturer. The mfr. does have a Q&A section on their page which seems to be supported, as someone (you maybe) have asked this question today.

One thing that might help is to consider the fact that the RPi has its own power supply specifications. These specifications include a Power Supply Warning at 4.63 V. And so one criteria to consider would be to monitor this warning signal, and use it to safely shut down. And so - if your UPSHAT can monitor its own output voltage - that might be the way to do it.

Another approach would be to monitor the system's Low Voltage Warning. I've not done this myself, but I understand that GPIO 35 can be read. A couple of references that may help: ref 1, ref 2. Note that this approach is by no means a "proven path" (GPIO35 is not even "pinned out" to the header), and its availability and function are subject to firmware changes by The Foundation - i.e. it may be a "loosey-goosey" arrangement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.