2

Is it possible to check how much power is left on the battery powering my Raspberry Pi zero using the terminal?

1
  • What sort of battery pack? LiPo, for example, might need to be treated differently to NiCad.
    – joan
    Feb 20, 2016 at 9:34

1 Answer 1

4

This isn't too difficult, although you're going to need a couple of additional components. There's a good walkthrough of the process at raspi.tv. The example there sends an email to a gmail account when the battery voltage dips low enough, but it should be trivial to remove that and add your own code to print to the terminal.

Circuit for Raspberry Pi battery monitoring

The setup used has the battery simultaneously hooked up to a 5V regulator to feed to Pi, and a voltage divider which feeds the ADC which feeds GPIO pins. A Python script monitors the input from the ADC to determine when the battery voltage drops below a cutoff point.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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