Background technology
Fig. 1 shows the typical portable power source charging circuit of one of the prior art, and it has constant pressure and flow characteristic.Constant voltage loop in this portable power source charging circuit is made up of chip internal voltage reference module 101 (Band gap), voltage error amplifier 102, PMW controller 104 (PWM Controller), drive circuit 105 (Driver), upper power MOSFET tube 107 (can be P type power tube, can be also N-type power tube), lower power MOSFET tube 108 and inductance 109; Constant current loop is made up of output electric current measure resistance 110, current error amplifier 103, PMW controller 104, drive circuit 105, upper power MOSFET tube 107, lower power MOSFET tube 108 and inductance 109; Wherein, two of voltage error amplifier 102 input ports receive respectively the voltage VBAT of portable power source battery 111 and the chip internal reference voltage V REF that chip internal voltage reference module 101 provides; Current error amplifier 103 detects the voltage at output electric current measure resistance 110 two ends, and it is amplified.
The operation principle of foregoing circuit structure is as follows: under normal circumstances, when the voltage VBAT of portable power source battery 111 during lower than normal value (generally, voltage VBAT should be the several times of chip internal reference voltage V REF), this voltage VBAT is by the reference edge level VREF lower than voltage error amplifier 102, be chip internal reference voltage V REF, the difference of these two voltages obtains a higher output level VCOMP after voltage error amplifier 102 relatively amplifies.Simultaneously, (current error amplifier 103 detects voltage drop on output electric current measure resistance 110, the voltage at output electric current measure resistance 110 two ends), and amplify and obtain output level VSENSE, and the value of this output level VSENSE is less than the value of output level VCOMP.Now, inductive current peak Ipk (, by the peak current of upper power MOSFET tube 107) be subject to the voltage modulated of the output level VSENSE that reflects output current mean value, if charging current value (, the charging current of this charging circuit to portable power source battery 111, namely flow through the current value of output electric current measure resistance 110) be less than load current value, the magnitude of voltage of output level VSENSE rises, the inductive current peak Ipk allowing also increases, thereby charging current is increased, if charging current value is greater than load current value, the magnitude of voltage of output level VSENSE declines, the inductive current peak Ipk allowing also reduces, thereby charging current is reduced, and then reach the object of constant current.In the time that the voltage VBAT of portable power source battery 111 equals or approaches normal value, output level VCOMP is less than output level VSENSE, and this charging circuit shows as constant-voltage characteristic.Above-mentioned portable power source charging circuit can not only charge to portable power source, the energy of normal work is provided also to the power-supply management system 112 of mobile phone or panel computer.
Fig. 2 shows another kind of typical portable power source charging circuit in prior art.In this circuit, chip internal voltage reference module 202 (Band gap), voltage error amplifier 205, PMW controller 206 (PWM Controller), drive circuit 207 (Driver), upper power MOSFET tube 209 (can be P type power tube, also can be N-type power tube), lower power MOSFET tube 210 and inductance 213 form a step-down circuit, thereby external input voltage VIN is dropped to and is about VBAT+200mV (wherein, VBAT represents the voltage of portable power source battery 214), use with power-supply management system 215 and battery live part that mobile phone or panel computer are provided, battery live part is made up of constant voltage loop, constant current loop and dynamic power supplies path 216 (PowerPath), specifically,, voltage amplifier 203, current amplifier 204 and dynamic power supplies path 216 form constant voltage constant current charging circuit part.When external input voltage, VIN is non-vanishing, and while having electricity, portable power source charging circuit powers on the one hand power-supply management system 215, charges on the other hand portable power source battery 214.After external input voltage VIN removes, portable power source battery 214 powers to power-supply management system 215 by dynamic power supplies path 216.The underlayer voltage in dynamic power supplies path 216 is controlled by substrate control module 212 (Body Controller), and substrate control module 212 is selected a high underlayer voltage as dynamic power supplies path 216 in dynamic power supplies path 216 sources (being the voltage VBAT of portable power source battery 214) and drain terminal (being the voltage VSYS of power-supply management system 215) voltage.
But there is respectively following problem in above-mentioned two kinds of portable power source charging circuits of the prior art:
Thereby the portable power source charging circuit of Fig. 1 is by the voltage drop modulation electric inducing current peak I pk on sampling output electric current measure resistance 110 to reach good constant current effect, but it needs a high-accuracy resistance as current sense resistor.In general, high-accuracy resistance ratio is more expensive, will increase the cost of whole system.In addition, in order not to be subject to the interference of noise, offset voltage etc., voltage drop on requirement output electric current measure resistance 110 must not be lower than 100mV, to reach good antijamming capability and electric current precision, if charging current is 2A, the power loss that output electric current measure resistance 110 causes is 0.2W, accounts for the 2%-4% of power output.Therefore, on the whole, output electric current measure resistance 110 not only increases system cost but also cause energy dissipation and Efficiency Decreasing.
By sampling, the voltage drop on dynamic power supplies path 216 reaches constant current object to the portable power source charging circuit of Fig. 2, and the advantage in dynamic power supplies path 216 is, low or can wake power-supply management system up without plug-in in battery situation at battery; But, can normally work in order to make battery constant-current constant-voltage charging circuit, voltage drop on dynamic power supplies path 216 generally will remain on 200mV, therefore no matter be that external power source charges to battery or the power-supply management system 215 that battery is mobile phone or panel computer provides electricity, dynamic power supplies path 216 all needs to consume part system capacity.If charging current or discharging current are 2A, the power loss that cause in dynamic power supplies path 216 is about 0.4W, account for the 4%-7% of power output, thereby greatly affect system effectiveness, and used the portable power source charging circuit in dynamic power supplies path 216 in design than the circuit complexity as shown in Fig. 1 as Fig. 2.The equivalent resistance of common dynamic power source path 216 is 50Ohm, and this must cause chip area to increase, and cost increases.
Summary of the invention
The problem existing in order to solve above-mentioned prior art, the present invention aims to provide a kind of portable power source charging circuit, with without the accurate sampling resistor in outside or dynamic power supplies path in the situation that, very accurately controls output current constant current.
A kind of portable power source charging circuit of the present invention, it comprises: a voltage error amplifier, an one input is connected with a chip internal voltage reference module, its output is connected with PMW controller and an one drive circuit in turn, and two outputs of described driving voltage are connected to respectively the grid of power switch pipe on one and power switch pipe once, another input of described voltage error amplifier and is connected for outside portable power source battery and the direct-connected battery pin of external power source management system; Described portable power source charging circuit also comprises:
One peak-to-valley value current detection module, it is sampled respectively by the electric current of described upper power switch pipe and by the electric current of described lower power switch pipe, and by this electric current by described upper power switch pipe and a default current peak comparison, by this electric current by described lower power switch pipe and a default electric current valley comparison, in the time that this electric current by described upper power switch pipe equals described current peak, turn-off control signal to described PMW controller output for the first switching tube of controlling described upper power switch pipe shutoff and described lower power switch pipe conducting, in the time that this electric current by described lower power switch pipe equals described electric current valley, the second switch pipe shutoff control signal of turn-offing for controlling described upper power switch pipe conducting and described lower power switch pipe to described PMW controller output,
One constant voltage loop reference level selection module, it is connected between an input of described chip internal voltage reference module and described voltage error amplifier, so that a constant voltage loop reference level to be provided to described voltage error amplifier; And
One battery detecting module, it is connected between described battery pin and described constant voltage loop reference level selection module, it detects described battery pin place and whether is connected with described portable power source battery, when detecting while being connected with described portable power source battery, control described constant voltage loop reference level selection module and export the maximum voltage of described portable power source battery and minimum voltage as described constant voltage loop reference level, otherwise, control described constant voltage loop reference level selection module and export the fixed level being provided by described chip internal voltage reference module as described constant voltage loop reference level.
In above-mentioned portable power source charging circuit, described peak-to-valley value current detection module comprises:
One peak current sampling unit, its input is connected with source electrode and the drain electrode of described upper power switch pipe, so that the described electric current by upper power switch pipe is sampled;
One peak current comparing unit, its input is connected with the output of described peak current sampling unit, with by the described electric current by upper power switch pipe and described current peak comparison, and export described the first switching tube according to comparative result to described PMW controller and turn-off control signal;
One valley point current sampling unit, its input is connected with source electrode and the drain electrode of described lower power switch pipe, so that the described electric current by lower power switch pipe is sampled; And
One valley point current comparing unit, its input is connected with the output of described valley point current sampling unit, with by the described electric current by lower power switch pipe and the comparison of described electric current valley, and export described second switch pipe according to comparative result to described PMW controller and turn-off control signal.
In above-mentioned portable power source charging circuit, described peak current sampling unit comprises:
One peak current sampling transistor, its source electrode is connected with the source electrode of described upper power switch pipe and receives an external input voltage, the first driving signal controlling that its grid is connected with the grid of described upper power switch pipe and is exported by described drive circuit, its drain electrode by the first voltage clamp circuit clamper to keeping identical level with the drain electrode of described upper power switch pipe, described by the electric current of upper power switch pipe to sample; And
The first current mirror, its input is connected with the output of described the first voltage clamp circuit, with by the described current mirror by upper power switch pipe to described peak current comparing unit.
In above-mentioned portable power source charging circuit, described the first voltage clamp circuit comprises:
The first operational amplifier, its positive input terminal is connected with the drain electrode of described upper power switch pipe and described lower power switch pipe simultaneously, and its negative input end is connected with the drain electrode of described peak current sampling transistor; And
First adjusts pipe, and its grid is connected with the output of described the first operational amplifier, and its source electrode is connected with the drain electrode of described peak current sampling transistor, and its drain electrode is connected with the input of described the first current mirror.
In above-mentioned portable power source charging circuit, described the first current mirror comprises:
First mirror image tube, its grid and drain electrode are connected to the output of described the first voltage clamp circuit; And
The second mirror image pipe, the source electrode of its source electrode and described first mirror image tube is connected to ground, and its grid is connected with the grid of described first mirror image tube, and its drain electrode is connected with described peak current comparing unit.
In above-mentioned portable power source charging circuit, described peak current comparing unit comprises:
The first resistance, one termination is received an external input voltage, and its other end is connected with the output of described peak current sampling unit; And
Peak comparator, its positive input terminal is connected with the other end of described the first resistance, it is proportional to described current peak with reference to peak level that its negative input end reception one is preset, and its output is exported described the first switching tube to described PMW controller and turn-offed control signal.
In above-mentioned portable power source charging circuit, described valley point current sampling unit comprises:
One valley point current sampling transistor, the source electrode of its source electrode and described lower power switch pipe is connected to ground, the second driving signal controlling that its grid is connected with the grid of described lower power switch pipe and is exported by described drive circuit, its drain electrode by second voltage clamp circuit clamper to keeping identical level with the drain electrode of described lower power switch pipe, with the described electric current of lower power switch pipe that passes through of sampling; And
The second current mirror, its input is connected with the output of described second voltage clamp circuit, with by the described current mirror by lower power switch pipe to described valley point current comparing unit.
In above-mentioned portable power source charging circuit, described second voltage clamp circuit comprises:
The second operational amplifier, its positive input terminal is connected with the drain electrode of described upper power switch pipe and described lower power switch pipe simultaneously, and its negative input end is connected with the drain electrode of described valley point current sampling transistor; And
Second adjusts pipe, and its grid is connected with the output of described the second operational amplifier, and its source electrode is connected with the drain electrode of described valley point current sampling transistor, and its drain electrode is connected with the input of described the second current mirror.
In above-mentioned portable power source charging circuit, described the second current mirror comprises:
The 3rd mirror image pipe, its grid and drain electrode are connected to the output of described second voltage clamp circuit; And
The 4th mirror image pipe, its source electrode is connected with the source electrode of described the 3rd mirror image pipe and receives an external input voltage, and its grid is connected with the grid of described the 3rd mirror image pipe, and its drain electrode is connected with described valley point current comparing unit.
In above-mentioned portable power source charging circuit, described valley point current comparing unit comprises:
The second resistance, one end ground connection, its other end is connected with the output of described valley point current sampling unit; And
Valley comparator, its positive input terminal is connected with the other end of described the second resistance, it is proportional to described electric current valley with reference to valley level that its negative input end reception one is preset, and its output is exported described second switch pipe to described PMW controller and turn-offed control signal.
In above-mentioned portable power source charging circuit, described battery detecting module comprises:
One for the constant-current source to described battery pin charging, and one termination is subject to an external input voltage;
One charge switch pipe, its drain electrode is connected with the other end of described constant-current source, its source electrode is connected with described battery pin, its grid receives an internal cell sampling pulse signal, and the conducting within the positive pulse time of described internal cell sampling pulse signal of this charge switch pipe is turn-offed within the negative pulse time of described internal cell sampling pulse signal;
Be connected on the first divider resistance and the second divider resistance between described battery pin and ground;
One battery detecting comparator, a battery reference level being provided by described chip internal voltage reference module is provided its positive input terminal, its negative input end is connected to described first, between the second divider resistance, whether exceed described battery reference level with the voltage that judges described battery pin place, if the voltage at described battery pin place is greater than described battery reference level, described in the output control of this battery detecting comparator, constant voltage loop reference level selection module is exported the fixed level being provided by described chip internal voltage reference module as described constant voltage loop reference level, otherwise, described in the output control of this battery detecting comparator, constant voltage loop reference level selection module is exported the maximum voltage of described portable power source battery and minimum voltage as described constant voltage loop reference level.
Owing to having adopted above-mentioned technical solution, the present invention is directed to and in prior art, need an outside precision resistance to detect charging current and utilize dynamic power supplies path to detect brought deficiency to charging current---increase system cost, affect system effectiveness, complex circuit designs, by adopting peak-to-valley value current detection module to inductive current, by upper, the electric current of lower power switch pipe is accurately sampled, in control, lower power switch pipe turn-on and turn-off, so that inductive current linear change between current peak and electric current valley, thereby reach output constant current control and without the outside accurate object that detects resistance, thereby reduce system cost and improved system effectiveness, meanwhile, removing behind traditional dynamic power supplies path, by battery detecting module, can realize the startup without battery, and for the low situation of cell voltage, after system can first judge that battery charges, just allow start, thereby protection battery.In addition, all can cause under charge status with using dynamic power supplies path in prior art compared with the situation of efficiency losses, the present invention is without dynamic power supplies path, and battery can directly be received on the power-supply management system of mobile phone or panel computer, has improved the efficiency of portable power source charging circuit.And, because system is directly connected on battery, be equivalent to large energy pond or a super capacitor, also improve the dynamic response of portable power source charging circuit.
Embodiment
Below in conjunction with accompanying drawing, provide preferred embodiment of the present invention, and be described in detail.
As shown in Figure 3, the present invention, it is a kind of portable power source charging circuit, comprise: chip internal voltage reference module 301 (Band gap), voltage error amplifier 302, PMW controller 304 (PWM Controller), drive circuit 305 (Driver), upper power switch pipe (PowerMosfet) 307 (can be P type power tubes, also can be N-type power tube) and lower power switch pipe 308 (these parts are all identical with the operation principle of corresponding component in the prior art shown in Fig. 1 above, below will repeat no more); Circuit of the present invention also comprises: peak-to-valley value current detection module 310 (Peak-Valley Current Detector), constant voltage loop reference level selection module 315 and battery detecting module 316 (BAT Detector).
The input of chip internal voltage reference module 301 receives external input voltage VIN, and its output is connected with an input of constant voltage loop reference level selection module 315; another input of this constant voltage loop reference level selection module 315 is connected with the output of battery detecting module 316, the output of constant voltage loop reference level selection module 315 is connected with an input of voltage error amplifier 302, to export constant voltage loop reference level VREF to voltage error amplifier 302, another input of voltage error amplifier 302 is connected with the input of battery detecting module 316, and be connected (in the present embodiment with the battery pin BAT of the circuit chip being directly attached thereto for the power-supply management system 312 of portable power source battery 311 and mobile phone or panel computer, one end of portable power source battery 311 and power-supply management system 312 is connected and is connected with the voltage error amplifier 302 of chip internal by the battery pin BAT of circuit chip of the present invention, the other end of portable power source battery 311 and power-supply management system 312 is distinguished ground connection), the output of voltage error amplifier 302 is connected with an input of PMW controller 304, another input of PMW controller 304 is connected with the output of peak-to-valley value current detection module 310, the output of PMW controller 304 is connected with the input of drive circuit 305, two outputs of drive circuit 305 are connected with the grid of upper power switch pipe 307 and lower power switch pipe 308 respectively, the drain electrode of upper power switch pipe 307 and lower power switch pipe 308 is connected (inductance 309 is connected with the drain electrode of upper power switch pipe 307 and lower power switch pipe 308 by the inductance pin SW of circuit chip of the present invention) with one end of inductance 309 after being connected, the other end of this inductance 309 is connected to the connected end of portable power source battery 311 and power-supply management system 312, the source electrode of upper power switch pipe 307 is connected with the input of chip internal voltage reference module 301, the source ground of lower power switch pipe 308, upper power switch pipe 307 is also connected with peak-to-valley value current detection module 310 respectively with lower power switch pipe 308, detect respectively by the electric current of upper power switch pipe 307 and lower power switch pipe 308 for this peak-to-valley value current detection module 310.
In the present invention, peak-to-valley value current detection module 310 is for respectively to the electric current by upper power switch pipe 307 and lower power switch pipe 308 (, inductive current) accurately sample, and by the electric current sampling respectively with default current peak and the comparison of electric current valley, finally be used for controlling to 304 outputs of PMW controller according to comparative result, lower power switch pipe 307, the switching tube of 308 conductings and shutoff turn-offs control signal, so that inductive current linear change between current peak and electric current valley all the time, control charging current (thereby reach, the mean value of inductive current) constant object.
As shown in Figure 4, in the present embodiment, peak-to-valley value current detection module 310 specifically comprises:
Peak current sampling unit 403, the source electrode of its input and upper power switch pipe 307 and drain electrode are connected, with to accurately sampling by the electric current of upper power switch pipe 307;
Peak current comparing unit 401, its input is connected with the output of peak current sampling unit 403, with by the electric current by upper power switch pipe 307 and default current peak ILIM_H comparison, when the Current rise by upper power switch pipe 307 is during to default current peak ILIM_H, export the first digital switching tube to PMW controller 304 and turn-off control signal IU_Latch, this first switching tube turn-offs control signal IU_Latch (will turn-off down power switch pipe 308 for controlling the shutoff of power switch pipe 307 and the conducting of lower power switch pipe 308 in the time that the first switching tube turn-offs the upset of control signal IU_Latch level, and power switch pipe 307 in conducting),
Valley point current sampling unit 404, the source electrode of its input and lower power switch pipe 308 and drain electrode are connected, with to accurately sampling by the electric current of lower power switch pipe 308; And
Valley point current comparing unit 402, its input is connected with the output of valley point current sampling unit 404, with by the electric current by lower power switch pipe 308 and default electric current valley ILIM_L comparison, when be decreased to default electric current valley ILIM_L by the electric current of lower power switch pipe 308, export digital second switch pipe to PMW controller 304 and turn-off control signal ID_Latch, this second switch pipe turn-offs control signal ID_Latch (will turn-off power switch pipe 307 for controlling the conducting of power switch pipe 307 and the shutoff of lower power switch pipe 308 in the time that second switch pipe turn-offs the upset of control signal ID_Latch level, and power switch pipe 308 under conducting).
As shown in Figure 6, in the present embodiment, above-mentioned peak current sampling unit 403 specifically comprises:
Peak current sampling transistor 601, its source electrode is connected with the source electrode of upper power switch pipe 307 and receives external input voltage VIN, its grid be connected with the grid of upper power switch pipe 307 and exported by drive circuit 305 first drive signal HS to control, its drain electrode by the first voltage clamp circuit 602 clampers to keeping identical level (in the present embodiment with the drain electrode of upper power switch pipe 307, for convenience of description, adopt the type of P type switching tube as peak current sampling transistor 601 and upper power switch pipe 307, but, the type of peak current sampling transistor 601 and upper power switch pipe 307 is not limited only to P type switching tube, and be equally applicable to N-type switching tube), thereby reach both perfect matchings, and then the accurate sampling of realization to the electric current by upper power switch pipe 307,
The first voltage clamp circuit 602, it comprises the first operational amplifier 603 and the first adjustment pipe 604 (metal-oxide-semiconductors), wherein, the positive input terminal of the first operational amplifier 603 is connected with the drain electrode of upper power switch pipe 307 and lower power switch pipe 308 simultaneously, its negative input end is connected with the drain electrode of peak current sampling transistor 601, its output is connected with the first grid of adjusting pipe 604, this first source electrode of adjusting pipe 604 is connected with the drain electrode of peak current sampling transistor 601, its drain electrode is connected with the input of the first current mirror 617, with by this first current mirror 617 by the current mirror by upper power switch pipe 307 to peak current comparing unit 401,
The first current mirror 617, it comprises first mirror image tube 611 and the second mirror image pipe 612 (being metal-oxide-semiconductor), wherein, the grid of first mirror image tube 611 and drain electrode are connected to the drain electrode of the first adjustment pipe 604, the source electrode of its source electrode and the second mirror image pipe 612 is connected to ground, the grid of this second mirror image pipe 612 is connected with the grid of first mirror image tube 611, and its drain electrode is connected with peak current comparing unit 401.
As shown in Figure 6, in the present embodiment, above-mentioned peak current comparing unit 401 specifically comprises:
The first resistance 613, it is voltage for the current conversion of passing through upper power switch pipe 307 that peak current sampling unit 403 is sampled, one end of this first resistance 613 receives external input voltage VIN, the output of its other end and the first current mirror 617,, the drain electrode of the second mirror image pipe 612 connects; And
Peak comparator 615, its positive input terminal is connected with the other end of the first resistance 613, its negative input end receives a default reference peak level VILIM_H (this is proportional with default current peak ILIM_H with reference to peak level VILIM_H), and its output is exported the first switching tube shutoff control signal IU_Latch to PMW controller 304.
In like manner, as shown in Figure 6, in the present embodiment, above-mentioned valley point current sampling unit 404 specifically comprises:
Valley point current sampling transistor 607, the source electrode of its source electrode and lower power switch pipe 308 is connected to ground, its grid is connected with the grid of lower power switch pipe 308 and the two driving signal LS that exported by drive circuit 305 controls, its drain electrode by second voltage clamp circuit 608 clampers to keeping identical level with the drain electrode of lower power switch pipe 308, thereby reach both perfect matchings, and then realize the accurate sampling to the electric current by lower power switch pipe 308;
Second voltage clamp circuit 608, it comprises the second operational amplifier 606 and the second adjustment pipe 605 (metal-oxide-semiconductors), wherein, the positive input terminal of the second operational amplifier 606 is connected with the drain electrode of upper power switch pipe 307 and lower power switch pipe 308 simultaneously, its negative input end is connected with the drain electrode of valley point current sampling transistor 607, its output is connected with the second grid of adjusting pipe 605, this second source electrode of adjusting pipe 605 is connected with the drain electrode of valley point current sampling transistor 607, its drain electrode is connected with the input of the second current mirror 618, with by this second current mirror 617 by the current mirror by lower power switch pipe 308 to valley point current comparing unit 402,
The second current mirror 618, it comprises the 3rd mirror image pipe 609 and the 4th mirror image pipe 610 (being metal-oxide-semiconductor), wherein, the grid of the 3rd mirror image pipe 609 and drain electrode are connected to the drain electrode of the second adjustment pipe 605, its source electrode is connected with the source electrode of the 4th mirror image pipe 610 and receives external input voltage VIN, the grid of the 4th mirror image pipe 612 is connected with the grid of the 3rd mirror image pipe 609, and its drain electrode is connected with valley point current comparing unit 402.
As shown in Figure 6, in the present embodiment, above-mentioned valley point current comparing unit 402 specifically comprises:
The second resistance 614, its current conversion for power switch pipe 308 under the passing through that valley point current sampling unit 404 is sampled is voltage, one end ground connection of this second resistance 614, the output of its other end and the second current mirror 618,, the drain electrode of the 4th mirror image pipe 610 connects; And
Valley comparator 616, its positive input terminal is connected with the other end of the second resistance 614, its negative input end receives a default reference valley level VILIM_L (this is proportional with default electric current valley ILIM_L with reference to valley level VILIM_L), and its output is exported second switch pipe shutoff control signal ID_Latch to PMW controller 304.
Known according to the concrete structure of above-mentioned peak current sampling unit 403 and peak current comparing unit 401, the first operational amplifier 603 carries out clamper by the drain electrode of 604 pairs of peak current sampling transistors 601 of the first adjustment pipe, make the drain voltage of peak current sampling transistor 601 identical with the drain voltage of upper power switch pipe 307 all the time, peak current sampling transistor 601 just can accurately copy by the electric current of upper power switch pipe 307 like this, then, electric current on peak current sampling transistor 601 is again by the first current mirror 617, finally flow through the first resistance 613, with produce one to the proportional voltage of size of current by upper power switch pipe 307.According to foregoing circuit, can obtain following formula:
IU/KU*R613=VILIM_H (1)
Wherein: KU is upper power switch pipe 307 and the size ratio of peak current sampling transistor 601, and IU is by the size of current of upper power switch pipe 307, and R613 is the resistance of the first resistance 613.
In the time reaching the calculated value of formula (1) by the electric current of upper power switch pipe 307, peak comparator 615 is exported the first switching tube and is turn-offed control signal IU_Latch, power switch pipe 307 in shutoff, power switch pipe 308 under conducting.
In like manner, known according to the concrete structure of above-mentioned valley point current sampling unit 404 and valley point current comparing unit 402, the second operational amplifier 606 carries out clamper by the drain electrode of 605 pairs of valley point current sampling transistors 607 of the second adjustment pipe, make the drain voltage of valley point current sampling transistor 607 identical with the drain voltage of lower power switch pipe 308 all the time, valley point current sampling transistor 607 just can accurately copy by the electric current of lower power switch pipe 308 like this, then, electric current on valley point current sampling transistor 607 is again by the second current mirror 618, finally flow through the second resistance 614, with produce one to the proportional voltage of size of current by lower power switch pipe 308.According to foregoing circuit, can obtain following formula:
ID/KD*R614=VILIM_L (2)
Wherein: KD is lower power switch pipe 308 and the size ratio of valley point current sampling transistor 607, and ID is by the size of current of lower power switch pipe 308, and R614 is the resistance of the second resistance 614.
In the time reaching the calculated value of formula (2) by the electric current of lower power switch pipe 308, valley comparator 616 is exported second switch pipe and is turn-offed control signal ID_Latch, turn-offs lower power switch pipe 308, power switch pipe 307 in conducting.
By selecting above-mentioned constant K U, R613, KD and R614, can regulate the size of portable power source charging current.
Fig. 5 shows above-mentioned by the electric current I U of upper power switch pipe 307, electric current I D, the first switching tube shutoff control signal IU_Latch by lower power switch pipe 308, the oscillogram that second switch pipe turn-offs the inductance pin SW place voltage of control signal ID_Latch and circuit chip of the present invention.
In the present invention, battery detecting module 316 is connected with the battery pin BAT of this circuit chip, whether be connected with portable power source battery 311 for detecting this battery pin BAT place, in the time being connected with portable power source battery 311, control constant voltage loop reference level selection module 315 to the maximum voltage of voltage error amplifier 302 output mobile power-supply batterys 311 and minimum voltage as constant voltage loop reference level VREF, and by the relatively size of this constant voltage loop reference level VREF and the real-time voltage VBAT in battery pin BAT place (now namely the voltage VBAT of portable power source battery 311) of voltage error amplifier 302, and work by subsequent conditioning circuit (operation principle of voltage error amplifier 302 and subsequent conditioning circuit is consistent with prior art, repeat no more) herein, thereby at the voltage VBAT of portable power source battery 311 (, the voltage at battery pin BAT place) while rising to maximum voltage, stop charging to portable power source battery 311 and power-supply management system 312, so that depending on portable power source battery 311, power-supply management system 312 continues power supply, and in the time that the voltage VBAT of portable power source battery 311 is consumed to minimum voltage, again charge to portable power source battery 311 and power-supply management system 312, in the time not being connected with portable power source battery 311, control constant voltage loop reference level selection module 315 and export the fixed level being provided by chip internal voltage reference module 301 to voltage error amplifier 302 as constant voltage loop reference level VREF, same by the work of voltage error amplifier 302 and subsequent conditioning circuit, provide stable level to power-supply management system 312 all the time, so far make portable power source charging circuit work in constant voltage mode.
As shown in Figure 7, in the present embodiment, battery detecting module 316 specifically comprises:
Constant-current source 701, it is for providing charging current to battery pin BAT, and external input voltage VIN is accepted in one end of this constant-current source 701, and the other end is connected with the drain electrode of control switch pipe 702;
Charge switch pipe 702, it is for controlling charging interval and the interval of constant-current source 701 to battery pin BAT, the source electrode of this charge switch pipe 702 is connected with battery pin BAT, its grid receives an internal cell sampling pulse signal SBAT, the positive pulse time of this internal cell sampling pulse signal SBAT is Tcharge, interior charge switch pipe 702 conductings during this period of time, constant-current source 701 charges to battery pin BAT by charge switch pipe 702, the negative pulse time of internal cell sampling pulse signal SBAT is Tidle, interior charge switch pipe 702 turn-offs during this period of time, constant-current source 701 stops battery pin BAT to charge,
Be connected on first, second divider resistance 704,705 between battery pin BAT and ground, it is for being divided to suitable voltage by the voltage VBAT at battery pin BAT place;
Battery detecting comparator 703, a battery reference level VBAT_ref who is provided by chip internal voltage reference module 301 is provided its positive input terminal, its negative input end is connected to first, the second divider resistance 704, between 705, thereby whether the voltage VBAT that judges battery pin BAT place exceedes battery reference level VBAT_ref, if the voltage VBAT at battery pin BAT place is greater than battery reference level VBAT_ref, represent not exist portable power source battery 311, otherwise represent to exist portable power source battery 311 (its principle will describe in detail hereinafter), the output of battery detecting comparator 703 is selected signal QBAT according to above-mentioned comparative result to 315 outputs of constant voltage loop reference level selection module, select corresponding constant voltage loop reference level VREF (its principle describes in detail hereinbefore) to control constant voltage loop reference level selection module 315, thereby obtain the voltage VSYS (the namely voltage VBAT at battery pin BAT place) of the supply power management system 312 being directly proportional to this constant voltage loop reference level VREF accordingly.
The present invention is without outside output electric current measure resistance or dynamic power supplies path and to realize the general principle of constant current control as follows:
As shown in Figure 3, in the time of upper power switch pipe 307 (can be P type power tube, can be also N-type power tube) conducting, set up from upper power switch pipe 307, inductance 309, to the current path of portable power source battery 311, power-supply management system 312, and this electric current is increasing; In the time reaching ILIM_H by the electric current of upper power switch pipe 307, upper power switch pipe 307 turn-offs, lower power switch pipe 308 conductings, and current path is now from lower power switch pipe 308, inductance 309, to portable power source battery 311, power-supply management system 312, and this electric current is more and more less; In the time being reduced to ILIM_L by the electric current of lower power switch pipe 308, lower power switch pipe 308 turn-offs, upper power switch pipe 307 conductings.
As can be seen here, the peak value of inductive current (, by the peak current of upper power switch pipe 307) equal ILIM_H, its valley (, by the valley point current of lower power switch pipe 308) be ILIM_L, and the mean value of inductive current is battery charge, can obtain thus:
Iout=(ILIM_H+ILIM_L)/2 (3)
According to above-mentioned constant current principle, the invention provides a kind of constant-current control circuit, it comprises: peak-to-valley value current detection module 310, PMW controller 304 (, switching tube turn-offs logic module), on, lower power switch pipe 307, 308 and inductance 309, wherein, peak value in peak-to-valley value current detection module 310, valley point current comparing unit 401, the generation of control signal is turn-offed control switch pipe in 402 output, and this switching tube shutoff control signal will be controlled, lower power switch pipe 307, when 308 turn-off, thereby make inductive current linear change between current peak ILIM_H and electric current valley ILIM_L, and then reach and control output current (being battery charge) constant object.
In addition, prior art needs dynamic power supplies path to control between different voltage to switch, and very complicated in system control, chip area is large, and cost is high; In the present invention without dynamic power supplies path, and by portable power source battery 311 and power-supply management system 312 direct short-circuits (, portable power source battery 311 and power-supply management system 312 are all connected between the battery pin BAT and ground of chip), thereby eliminate the complexity of different voltage switched system control, also eliminated the system power dissipation being brought by dynamic power supplies path.
But, as shown in Figure 8, without dynamic power supplies path in the situation that, when this portable power source charging circuit is in the time connecting without portable power source battery 311, charging circuit to battery pin BAT (, the pin being connected with power-supply management system 312 for portable power source battery 311) charge, until the voltage VSYS of power-supply management system 312 is while reaching VSYS_MAX, charging circuit stops charging; When the voltage VSYS of power-supply management system 312 slowly reduces until while reaching VSYS_MIN, charging circuit starts again charging, thereby make the voltage VSYS rising of power-supply management system 312, so repeatedly.Because the voltage difference of VSYS_MAX and VSYS_MIN is larger, therefore, said process can cause the voltage VSYS ripple of power-supply management system 312 larger.
Therefore, for fear of the too large problem of voltage ripple (as shown in the VSYS_No battery in Fig. 8) of the power-supply management system 312 bringing without dynamic power supplies path, the present invention also provides battery detecting module 316, it has battery detecting function,, whether exist and the operating state of decision systems by detecting battery, thereby make the voltage ripple of power-supply management system 312 reach customer demand.The general principle of battery detecting function is as follows:
As shown in Figure 3, by battery detecting module 316 at set intervals Tidle adopt an internal current (being provided by constant-current source 701) to the battery pin BAT of this charging circuit chip carry out the short time (charging interval is Tcharge) charging, if there is portable power source battery 311 to be connected to battery pin BAT, because rechargeable energy is very little with respect to battery capacity, the voltage VBAT (the namely voltage VSYS of power-supply management system 312) substantially constant (as shown in the VSYS_with battery with BAT detector in Fig. 8) at this battery pin BAT place, if battery pin BAT is attached thereto without portable power source battery 311, because the electric capacity at battery pin BAT place is very little, in each charging interval Tcharge, voltage VSYS can increase, the voltage VBAT that is battery pin BAT place can rise (as shown in VSYS_No battery with BAT detector in Fig. 8), thereby the existence of portable power source battery 311 detected, adjust portable power source charging circuit operating state, now, battery detecting comparator 703 in battery detecting module 316 overturns, the output of battery detecting comparator 703 is controlled constant voltage loop reference level selection module 315 and whether is existed and select different constant voltage loop reference level VREF according to battery, thereby supplied with accordingly voltage VSYS (the namely voltage VBAT at battery pin BAT place of the power-supply management system 312 of mobile phone or panel computer, in the time being connected with portable power source battery 311, the voltage VBAT at this battery pin BAT place namely supplies with the voltage VBAT of portable power source battery 311).
Specifically, if battery detecting module 316 detects the existence of portable power source battery 311, minimum voltage VSYS_MIN when maximum voltage VSYS_MAX while selecting to rise corresponding to the voltage VBAT of portable power source battery 311 and the voltage VBAT of portable power source battery 311 decline is as constant voltage loop reference level VREF, portable power source charging circuit stops charging in the time that the voltage VBAT of portable power source battery 311 (the namely voltage VSYS of power-supply management system 312) reaches its maximum voltage VSYS_MAX, now power-supply management system 312 depends on the 311 continuation power supplies of portable power source battery, in the time that the voltage VBAT of portable power source battery 311 is depleted to its minimum voltage VSYS_MIN, portable power source charging circuit charges again to portable power source battery 311, so repeatedly.
If battery detecting module 316 detects portable power source battery 311 and does not exist, its arrange constant voltage loop reference level be a fixed level (, constant voltage loop reference level selection module 315 is provided by the reference level being provided by chip internal voltage reference module 301), to charge to power-supply management system 312 by battery pin BAT, and make the voltage VSYS of this power-supply management system 312 also maintain a stable level, thereby realize the startup without battery, this voltage VSYS also can not change between maximum voltage VSYS_MAX and minimum VSYS_MIN again simultaneously, and then effectively reduce the voltage ripple of power-supply management system 312.
Above-described, be only preferred embodiment of the present invention, not in order to limit scope of the present invention, the above embodiment of the present invention can also make a variety of changes.Be that simple, the equivalence that every claims according to the present patent application and description are done changes and modify, all fall into the claim protection range of patent of the present invention.The present invention not detailed description be routine techniques content.