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 with more than 850 mA). 2000mAh is the largest Lipo which will fit in the emonGLCD case (60mm x 54mm x 5.8mm)?
Lipo batteries should not be discharged less then 3V, the emonGLCD firmware should be setup to detect low voltage and shutdown before damage is done.
LiPo batteris come with a two pin JST connector
The charge rate on the MCP73831T is set by one external resistor. Using a 4.6K resistor give a charge rate of 213mA. This means a batteries smaller then 250mAh should not be used with the emonGLCD. With a charge current of 213mA a 2000mAh will take around 9.5hrs to fully charge from flat. However if we want to charge from a USB port we should not try and 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!