Making a battery powered arduino wifi solution can be bothersome. In most cases a lot of the on board and external components draw too much current, even when not in use.
We will look into modifying the on-board power supply and leds. The on-board ldo typically use 5 mA Quiescent Current and needs at least an input 1.3 v higher than output, making it impractical using it for battery applications. The on-board leds use around 1-2 mA.
I found that most available external power supplies also have a high Quiescent Current use. The best cheap external power supply i found uses 0.3 mA, which is still a little high but doable for medium duration. 18650 Battery Charge Shield Board
The best solution is to change the on-board ldo. I used the MCP1702T-3302E/CB which is relatively easy to install and uses only 5 μA and has an input range 2.7 V to 13.2 V. Only drawback is you need to stabilize with with 1.0 µF to 22 µF Output Capacitor. Remember only to use the input range om the Vin pin and not the 3.3 V.
Start of by soldering the two rows of pins for stability. It is easily done by using a breadboard, to ensure a perfect fit.
To remove the on-board ldo, use your soldering iron on the three pins, being careful not to touch the other components. You should be able to slide it of once the ldo gets hot enough.
Once the ldo is off use a little solder flux on the three pads and even the solder. Use a small tweezer for this part. Solder the MCP1702 on the two left pads with the middle pin oriented towards TXD on the board. I then used the cut off legs from a capacitor to connect the Vin to the third pad. Do not connect the Vin to the top most wide pad.
You will at this stage note that the board is not stable. Power is on but the ESP8266 is not handling the output very well. It needs to be stabilized with a 1.0 µF capacitor. Solder or add it to a breadboard to the 3.3V and GND pin. Remember the correct polarity. I find that with some cheap or non ceramic capacitors I need to use two capacitors for reliable booting.
Next desolder the led resistor. You can remove both leds, but the top one is used when uploading sketches. You can at this point solder the permanent connections EN – VIN and IO15 – GND. IO0 can be soldered to a switch between GND and 3.3V to make programming and sketch running easier.
When now putting the board in deepsleep the total power consumption is around 0.03 mA. Using this battery calculator you will with a little tweaking of sleep cycles reach over a year battery life.
To program the ESP8266-PRO see this post.