The emonGLCD can be powered directly by USB 5V or via a 3.7V Lithium Polymer / Ion battery back. Charging of the battery is controlled by the MCP73831T. The current Vin input voltage can be monitored using ADC 4 via a 1/2 voltage divider circuit. e.g Vin=5 ADC4=2.5V > ADC level 776 @ 3.3V
Expected power draw 20-35mA. With some code tweaks the emonGLCD should run for about 5 days from 2000mAh battery.
Battery Charging Circuit
Lithium polymer batteries should not be charged at a rate grater than 1C (e.g. 850 mAh cell shouldn't be charged at more than 850 mA). 2000mAh is the largest Lipo battery which will fit in the emonGLCD case (60mm x 54mm x 5.8mm)?
Lipo batteries should not be discharged to less than 3V. The emonGLCD firmware should be set up to detect low voltage and shut down the device before damage is done.
LiPo batteries have a two pin JST connector
The charge rate on the MCP73831T is set by an external resistor. Using a 4.6K resistor gives a charge rate of 213mA. This means batteries smaller than 250mAh should not be used with the emonGLCD. With a charging current of 213mA, a 2000mAh battry will take approximately 9.5hrs to go from full discharge to full charge. However, if we want to charge from a USB port, we should not draw more than 100mA. If we use a 10K resistor as Rprog on the MCP73831T, charge current will be limited to 100mA. A 2000mAh battery will take 20hrs to charge.