Battary charger (circuts and firmware)