Circuit Design V3 (Has not been tested)
Version 3 is the most recent version of the project so it is what will be detailed. I will assume that most of the circuit is fairly easy to understand from the schematic, this includes the battery monitor portion, the battery recharge portion and LED array. I will go into more detailed about the parts of the circuit that I do not find to be immediately obvious. The first of these is U5 which is being used as a buffer because the MIC842L cannot output enough current to drive the bases of both transistors. The next part is the USB connection detector. This ensures that none of LEDs are on and pulling current from the battery while the battery is charging; it does this by pulling down the voltage dividers, that are connected to the comparators, that control the LEDs, when the USB is pluged in. U1 is needed because measurements done on the last prototype show that there is a small amount of voltage on the USB rail even when it is not plugged in. This could potentially turn on Q1 if it was hooked up directly.