gothiclord wrote:
Is there a rule of thumb on how long a battery will last based on the mah capacity? (of course I realise this would be reduced when using USB devices on the RPI)
Even better than a rule of thumb is the exact science.
Power consumed by RPi = 5 volts multiplied by current drawn.
For battery: Power multiplied by hours = battery volts multiplied by Ah (mAh/1000): Rearranging that gives:
Battery life in hours = batt volts multiplied by batt Ah divided by power consumed by RPi.
If battery is connected to RPi via a voltage regulator or converter then its effect needs to be taken into account.
A model B RPi is usually reckoned to draw 0.7 amps.
A 5 volt 2 Ah battery would therefore last 2 divided by 0.7 hours.
A higher voltage battery also rated at 2Ah connected via a linear voltage regulator would also last just under 3 hours.
A higher voltage battery (B volts) also rated at 2Ah but connected via a perfect switching regulator (100% efficient) would last proportionally longer: 2 times B divided by (0.7 times 5). In practice no switching regulator is 100% efficient. So reduce the time in line with actual efficiency.
If battery has capacity different from 2Ah scale the time to reflect that.
Note that putting cells in series (to increase the voltage) does not increase the Ah figure to use.
Also be aware that most quoted battery capacities are on the optimistic side and that capacity reduces with age so build in another reducing factor.