A battery charger identifies the type of battery that is connected to it in order to provide the optimum voltage-current-time profile that is needed to safely and optimally charge and maintain the battery. In some embodiments, the battery current or voltage is monitored during charging, and as the…