I want to power my Raspberry Pi 4b with a powerbank. I know that I need a 3A powerbank. The question is: How can I measure it? I want to get a percentage of it (which will be displayed over a website).
Thank you for all of your answers!
I want to power my Raspberry Pi 4b with a powerbank. I know that I need a 3A powerbank. The question is: How can I measure it? I want to get a percentage of it (which will be displayed over a website).
Thank you for all of your answers!
you can make your own battery bank - what is needed:
ad 1. any LiPo is ok - of course provided you know for how long you would like to use battery only (to be considered: power consumption by your RPi project, capacity of your LiPo etc.). I tried with any LiPo from 600mAh (for Pico) up to 4000mAh (for other RPis) ad 2. I am using standard 1$ board from Ali, based on TP4056 chip, few variants there: USB A, C, micro. This board by default has 1A charging capacity but you can change it by altering the resistor on board as per datasheet ad 3. another cheap board from Ali based on MT3608 chip
There you have it - it works for me like a charm, total cost: 1 coffee on the street. My RPi projects rarely require more than 1.5A (for Pico based we are talking less than 100mA) so the chargers from point 1 and 3 have to be delivering the required amount of current obviously to avoid continuous undercharge of the LiPo I was in your shoes and honestly: after checking many battery banks - usually unsuccessfully (as per above comments from other members) - I decided to do it my way ;-) I am also monitoring continuously both: Vcc (the input voltage for point 1 above) and Vbat (together with the light sensor) - see below how that behaves on the graph (the deeps in blue is when I used the project without the charger - battery only):
As already mentioned, power banks don't have adequate voltage regulation to cope with the peaky power demands on a Pi4, so you'll typically get under voltage warnings, or worse it will crash when busy, or when you start adding USB devices to your Pi. But to read the voltage of the battery you need a board that has chip that can measure this voltage and make it accessible to your Pi, usually over the I2C interface through which your software can read it and force a safe shutdown when the voltage reaches around 3v.