The present invention relates to battery chargers. A first controller can
be configured to set, when a first power supply is coupled to a first
port, a current produced by a variable current source at a safe rate to
charge a battery. An ammeter can be configured to measure, when the
battery is coupled to a second port, the current flowing into the
battery. The first controller can be configured to increase, after a
passing of a quantifiable amount of time, the current produced by the
variable current source by a quantifiable amount of current. The first
controller can be configured to continue iteratively to increase, after
the passing of the quantifiable amount of time, the current produced by
the variable current source by the quantifiable amount of current until
the safe rate is near or at a highest safe rate to charge the battery.