Battery switching charger and method for controlling battery switching charger

A battery switching charger includes a PWM signal generator, a switching circuit, an inductor, a resistor and an analog-to-digital converter. The PWM signal generator is utilized for generating a PWM signal. The switching circuit includes cascoded transistors controlled by the PWM signal for generating an output voltage. The inductor is utilized for receiving the output voltage. The resistor is coupled between the inductor and a charge terminal of the battery switching charger, where the charge terminal is connected to a battery when the battery is being charged by the battery switching charger. The analog-to-digital converter is coupled to the PWM signal generator and the resistor, and is utilized for receiving voltages of two terminals of the resistor to generate control data to the PWM signal generator. In addition, the PWM signal generator adjusts a duty cycle of the PWM signal according to the control data.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a battery switching charger, and more particularly, to a battery switching charger that can determine a charging voltage accurately.

2. Description of the Prior Art

When a battery switching charger is charging a battery, especially a lithium battery, the battery switching charger needs to provide an accurate and stable charging voltage to charge the battery. The conventional battery switching charger generally has a feedback control loop to provide the accurate charging voltage to the battery, however, how to build a feedback control loop that can provide the accurate and stable charging voltage is an important topic.

SUMMARY OF THE INVENTION

It is therefore an objective of the present invention to provide a battery switching charger that can provide an accurate and stable charging voltage.

According to one embodiment, a battery switching charger comprises a PWM signal generator, a switching circuit, an inductor, a resistor and an analog-to-digital converter. The PWM signal generator is utilized for generating a PWM signal. The switching circuit comprises cascoded transistors controlled by the PWM signal for generating an output voltage. The inductor is coupled to the switching circuit, and is utilized for receiving the output voltage. The resistor is coupled between the inductor and a charge terminal of the battery switching charger, where the charge terminal is connected to a battery when the battery is being charged by the battery switching charger. The analog-to-digital converter is coupled to the PWM signal generator and the resistor, and is utilized for receiving voltages of two terminals of the resistor to generate control data to the PWM signal generator. In addition, the PWM signal generator adjusts a duty cycle of the PWM signal according to the control data.

According to another embodiment of the present invention, a method for controlling a battery switching charger comprises: generating a PWM signal; providing a switching circuit comprising cascoded transistors controlled by the PWM signal for generating an output voltage; providing an inductor coupled to the switching circuit, for receiving the output voltage; providing a resistor coupled between the inductor and a charge terminal of the battery switching charger, wherein the charge terminal is connected to a battery when the battery is being charged by the battery switching charger; providing an analog-to-digital converter coupled to the PWM signal generator and the resistor, for receiving voltages of two terminals of the resistor to generate control data; and adjusting a duty cycle of the PWM signal according to the control data.

DETAILED DESCRIPTION

Please refer toFIG. 1, which illustrates a battery switching charger100according to one embodiment of the present invention. As shown inFIG. 1, the battery switching charger100includes a pulse width modulation (PWM) signal generator110, a driver120, an inverter130, a switching circuit140, an inductor L, a resistor R and an analog-to-digital converter (ADC), where the switching circuit140includes cascoded transistors M1 and M2. In addition, in the battery switching charger100is used to provide a stable and accurate voltage (e.g., 4.2 volts) to charge a battery160. In this embodiment, the battery160is a lithium battery.

In the operations of the battery switching charger100, the PWM signal generator110generates a PWM signal VPWMto control the switching circuit140via the driver120and the inverter130. In detail, the duty cycle of the PWM signal VPWMdetermines turn-on periods and turn-off periods of the transistors M1 and M2 to generate an output voltage VOUT. Then, the output voltage VOUTpasses through the inductor L and the resistor R to charge the battery160.

The ADC150receives voltages of two terminals N1 and N2 of the resistor R, where the voltage differences between the terminals N1 and N2 can be used by the ADC150to generate a signal which is represented as a current flowing through the resistor R. Then, the ADC150samples the signal derived from the voltages of the two terminals N1 and N2 of the resistor R to generate the control data Dl. In addition, in this embodiment, a sampling rate of the ADC150is higher than a frequency of the PWM signal VPWM, and the ADC150samples the signal within a period shorter than a PWM period of the PWM signal to generate the control data Dl. In detail, please refer toFIG. 2, which is a diagram illustrating the signal within a PWM period of the PWM signal VPWM. For example, the ADC150can sample the signal at times t0-t4 to generate the control data Dl, that is the control data Dlis generated according to the sampled voltages V0-V4(for example, the control data Dlcan be an average of the sampled voltages V0-V4).

Then, the PWM signal generator110receives the control data Dl, and uses the control data Dlto generate estimated data associated with the current flowing through the resistor R, and utilizes the estimated data to adjust the duty cycle of the PWM signal VPWM. In detail, although the control data Di merely represents the sampled voltages V0-V4, the PWM signal generator110can use the control data Dlto predict the other sampled voltages V5-V8to generate the estimated data. If the estimated data indicated that the current flowing through the resistor R is too low (i.e., the output voltage Vout is lower than a required charging voltage), the PWM signal generator110increases the duty cycle of the PWM signal VPWM; and if the estimated data indicated that the current flowing through the resistor R is too high (i.e., the output voltage VOUTis greater than the required charging voltage), the PWM signal generator110decreases the duty cycle of the PWM signal VPWM.

Furthermore, the PWM signal generator110compares the estimated data with a threshold value, and when the estimated data reaches the threshold value, the PWM signal generator110immediately changes a state of the PWM signal VPWM(i.e., turn off the transistor M1) to immediately lower the output voltage VOUT.

In addition, the ADC150also samples the voltage of the terminal N2 (i.e., the feedback voltage of the battery switching charger100) to generate control data Dv, where the control data Dvis a digital representation of the voltage of the terminal N2. Then, the PWM signal generator110receives the control data Dv, and utilizes the control data Dvto adjust the duty cycle of the PWM signal VPWM. In detail, if the control data Dvindicated that the voltage of the terminal N2 is too low by comparing the control data Dvwith a threshold code, the PWM signal generator110increases the duty cycle of the PWM signal VPWM, and if the control data Dvindicated that the voltage of the terminal N2 is too high by comparing the control data Dvwith the threshold code, the PWM signal generator110decreases the duty cycle of the PWM signal VPWM.

In one embodiment, the PWM signal generator110can first use the control data Dlto adjust the duty cycle of the PWM signal VPWM, and then the control data Dvis used to adjust the duty cycle of the PWM signal VPWMlater.

Please refer toFIG. 3, which is a flowchart of a method for controlling a battery switching charger according to one embodiment of the present invention. Referring toFIG. 1andFIG. 3, the flow is described as follows:

Step302: provide a switching circuit comprising cascoded transistors controlled by the PWM signal for generating an output voltage.

Step304: provide an inductor coupled to the switching circuit, for receiving the output voltage.

Step306: provide a resistor coupled between the inductor and a charge terminal of the battery switching charger, wherein the charge terminal is connected to a battery when the battery is being charged by the battery switching charger.

Step308: provide an analog-to-digital converter coupled to the PWM signal generator and the resistor, for receiving voltages of two terminals of the resistor to generate control data.

Step310: adjust a duty cycle of the PWM signal according to the control data.

Briefly summarized, in the battery switching charger and associated method of the present invention, the ADC is applied to the battery switching charger to generate the control data within a period shorter than a PWM period of the PWM signal. Then, the PWM signal generator generates an estimated data according to the control data to adjust the duty cycle of the PWM signal. Therefore, the battery switching charger can provide a stable and accurate charging voltage to the battery.