The charger adopting the switching power supply technology can accurately control the charging voltage and current through the single chip microcomputer. According to the different chemical composition and charging requirements of the battery, the charging process is divided into several different stages, charging with positive and negative pulses of different frequency, different interval, different pulse width and different amplitude, so as to reduce the temperature rise of the battery, reduce the gas evolution, improve the current acceptance capacity of the battery, and extend the battery life, In corresponding applications, fast charging can also be realized according to actual needs.