Help with battery script for 2S setup!
Posted: Mon Aug 20, 2018 7:21 am
Hi, all, I am putting a Retropie in a Wii U gamepad, using the following Lithium-Ion 2S 7.4V setup as diagrammed by sudomod community member Banjokazooie on another thread.

Banjokazooie’s own build, as described in that thread, is not this 2S setup (which was diagrammed for another user), but a 3.7V setup using a Powerboost. Therefore, that build is able
to use a setup and script called Pi Power, linked here:
https://github.com/craic/pi_power/blob/master/README.md
The purpose of this script is to allow a series of LEDs to act as battery status indicators; cause a graceful shutdown when the battery charge falls below a certain level; and allow a pushbutton shutdown process. Of these features, it is the first two that I’d like to have in my setup — I can live with the standard software shutdown process.
The problem is, the Pi Power setup relies on the particular pinout of the Powerboost, specifically the Enable control pin, and as you may be able to tell from the above diagram, I am using a stepdown converter, not a Powerboost.
Thus, I am looking for a hardware and/or software solution that is comparable to the Power Pi tutorial, but which is compatible with a 2S setup. Again, all I need is some way to monitor the voltage of the battery (doesn’t have to be LEDs — onscreen status indicator is ok too), and preferably an auto-shutoff feature if the battery drops below a certain level. And of course, I am looking for the most parsimonious solution available, in terms of hardware components.
Thank you in advance to anyone who can point me in the right direction!

Banjokazooie’s own build, as described in that thread, is not this 2S setup (which was diagrammed for another user), but a 3.7V setup using a Powerboost. Therefore, that build is able
to use a setup and script called Pi Power, linked here:
https://github.com/craic/pi_power/blob/master/README.md
The purpose of this script is to allow a series of LEDs to act as battery status indicators; cause a graceful shutdown when the battery charge falls below a certain level; and allow a pushbutton shutdown process. Of these features, it is the first two that I’d like to have in my setup — I can live with the standard software shutdown process.
The problem is, the Pi Power setup relies on the particular pinout of the Powerboost, specifically the Enable control pin, and as you may be able to tell from the above diagram, I am using a stepdown converter, not a Powerboost.
Thus, I am looking for a hardware and/or software solution that is comparable to the Power Pi tutorial, but which is compatible with a 2S setup. Again, all I need is some way to monitor the voltage of the battery (doesn’t have to be LEDs — onscreen status indicator is ok too), and preferably an auto-shutoff feature if the battery drops below a certain level. And of course, I am looking for the most parsimonious solution available, in terms of hardware components.
Thank you in advance to anyone who can point me in the right direction!