Notes on using a Power Bank
You can now (mid 2016) purchase (very) cheap 'Power Bank' rechargeable battery packs which contain of one or more Lithium Polymer batteries (type 18650) with at least 700mA USB output.
Whilst these are designed to 'recharge' your smart phone / tablet, all you need to do is add a mains USB power-block (and, perhaps, a few diodes = see note 1). A basic 1200mAh UPS can now be built for less than £2.50 (£1 PowerBank, 50p diodes etc., £1 cable) !
The basic UPS depends on diodes for 'switching' between 'main' and PowerBank, which is fine when you can adjust the 'main' voltage - as you can when using PoE. In other circumstances you may need to use the MOSFET based 'switch over' circuit (shown below = the MOSFET is used because the USB 'mains charger' might deliver lower voltage than the Power Bank - expand the "(+) MOSFET switch" link below for an explanation of how it works)
Notes. 1) A 'high end' PowerBank that supports 'pass-through charging' or as here) a 'Duo-Charge function' has an internal 'switch over' circuit, so you plug your 5v power block into the Power Bank input and power the Pi from the Power Bank output. 2) I have seen 'DIY' LiPO battery based UPS designs. Most use overpriced 'model aircraft' LiPO batteries and expect you to build your own 'charging' circuit. Don't be tempted - a standard small 'Power Bank' (with it's internal recharging circuit) will be come in at 1/10th the cost (even if you have to build your own MOSFET switch over circuit) 3) Power Bank capacity claims (especially on eBay) are not what they seem. The mAh specified is for the (3.2v) LiPO BATTERY INSIDE THE UNIT = to 'convert' that to USB power voltage (5.0v) you multiply by (3.2/5.0 =) 0.64. Further, every PowerBank must 'cut-off' when it gets to about 10% capacity remaining (as the internal charger can't recharge a completely flat LiPo cell). So, when your single cell '2200mAh' unit arrives, you will discover it's actually 'rated' at no more than 1200mAh (and the dual cell '5,200 mAh' unit is really 2400mAh) :-) ). Of course even a 1200mAh unit will keep the average Pi running for more than an hour (one user reports 3 Hrs out of a "5200 mAh" (2400mAh) unit, so you can expect over 90 mins for the 1200mAh, even with the camera connected to the Pi) = see below for Pi power usage. Note, ALL the Power Banks I have ever found in UK retail shops turn out to be 'Made in China' = so don't waste your money on some 'branded' item (unless you like paying for very expensive sticky labels :-) )
A basic Power Bank UPS for the Pi Zero + camera can be assembled for less than £2. To see how I did this, click below :-
(+) diode switch
NOTE. When using a USB mains power-block that can't exceed the Power Bank voltage, the MOSFET switch (shown above) is needed. For an explanation of how this works, see below :-
(+) MOSFET switch
Interestingly, you can now find some cheap 'solar' equipped units (such as this 30000mAh-Solar-Charger-Battery-Power-Bank), however with the solar cells delivering a typical 1.5 Watts in bright sunlight with a Pi system consuming 5 Watts you will get 10 mins of use per half hour of solar charging - although it MIGHT just be up to running a Pi Zero + camera (1.3 watts))
Some Power Banks come with silly 'power buttons'. This can be an indication that they won't 'turn on' untill you press the button, so I generally avoid these types, however this RS branded unit which does have a 'power button' has been tested and works just fine. Another one known to work as a UPS is the LogiLink PA0064 Mobile Power Bank 2200mAh.
It's possible you may find a PowerBank that has to be 'switched on' or refuses to keep running at low current, however even the unit I found in the £1 shop (ITP Product Code H-28662) automatically turned on when I plugged in a 'load' (a USB memory stick) and kept 'running' even though the load current was < 1mA, only turning off a few seconds after the load was removed
Shutting down the Pi
The Pi needs to shut itself down before power is totally lost, ESPECIALLY if it's likely to be 'writing' to the SDHC card (as it will be in the case of a CCTV application when Ethernet comms is lost). For more details see :-