I thought I'd maybe start a thread to keep track of my progress with my attempts at battery monitoring. This won't be a simple "the battery is too low!" alert, but hardware monitoring using analog pins of an ATTiny85 development board. I bought the male version, so the USB fingers can be removed to save space.
At the moment, I'm at the stage of sending and receiving single bytes of data to the ATTiny. It simply flashes the activity LED and sends the same character back. The plan is to have a script on the Pi send requests to the ATTiny at a pre-set interval, and the ATTiny will respond with the information requested. Initially, this will be battery voltage, but it can be exploited to pull other analog information too.
The reverse is also possible, it's possible to have the ATTiny's settings changed by the Pi. For example; the ATTiny could independently handle a low battery LED, the voltage level stored in a variable. The user would be able to adjust this level, or even change the colour if RGB LED is used.
I do plan to integrate the ATTiny85 chip into a future board, but for the moment, this thread will serve to help anyone who wants to build something similar.
Below is my testing setup. The breadboard is so I can quickly remove the connections to re-flash the chip. The USB connection is just an extension lead and I haven't connected the battery to the ATTiny yet. Also pictured is my Safe Shutdown switch for the BangGood power supply.
