Hi,
Device powered on by USB Power Bank.
A 110mHa battery attached as well. If the capacity goes below a certain level how can I shutdown the Rpi? is there a mechanism already?
Thanks
Should of clarified I want to say in my code that if lipo battery < X then I will shutdown. How can I read 'X'?
@andrew-simpson17 This can not be done when you use power bank, because power bank has internal DC/DC converter and it always feed 5V to Witty Pi. If its battery runs low it will simply cut the output so the voltage from 5V to 0V. There is no way you can detect the voltage drop and still have enough time to shut the device down properly.
The voltage monitoring only works when you power the device with a raw battery (e.g. 7.4V Li-Po battery).
Hi
I was not trying to read the value from the Power Bank. I wanted to read the value from the Lipo battery?
Also, is it possible to detect if a Lipo battery is connected or not? I do not want the Rpi starting if no backup battery as it acts as the UPS.
Many thanks
Which model of Witty Pi are you using? The answer may vary according to that.
Hi
I do apologies for not following this up.
I got side-tracked.
It has become an issue again.
This morning, i disconected the usb power bank and the reconnected it. Your UPS was dead with no lights. I had to remove both batteries, and reconnect the same batteries to get it to restart. Just trying to find out why? I thought I would test to see if the smaller battery was dead though it is my understanding from your User Manual that the battery is charged as soon as the 5V power supply is connected - ie my USB Power Bank
How may I read the voltage from the smaller battery I mentioned above please?
The model I am using is:
L3V7.
Thanks for your time
For L3V7, you can only read the battery voltage when the power bank is disconnected, otherise the power bank will charge the battery and the VIN you read from the software is the voltage of the power bank (minus some voltage drop on a diode).
You can always disconnect the battery from the board, and use voltmeter to confirm its status.