Designing a battery charger for nickel, lithium-ion (Li-ion) and lead-acid cells requires special considerations for proper charging and safety. A comprehensive charging algorithm must be created that is dependent on the chemistry that needs to be supported. The easiest way to accomplish this type of design is to use an integrated, flexible multichemistry battery charger in conjunction with a microprocessor. The microprocessor is used to identify the battery chemistry and adjust for proper charging conditions, including termination criteria. It also monitors operating conditions for safety.