A kind of battery charge controller and charge control method
Technical field
The present invention relates to moving communicating field, more particularly to a kind of battery charge controller and charge control method.
Background technology
At present, mobile terminal with science and technology development greatly popularized, the use of mobile phone, flat board and computer is daily
It is also more and more important in life.Increasing for mobile terminal function, adds the lifting of utilization rate, causes user to making in mobile terminal
Prescription for the battery of main power source is also higher, and the standby amount of overlength, the electricity of superelevation has been stored into people to the thirsty of battery
Hope.
But in actual life, due to technical restriction, the battery of high storage capacity is currently not met by requiring, right
It is people's necessary work when using mobile terminal that battery charges, with many families such as Samsung, Fructus Mali pumilae world-class mobile end
There are charging related accidents in end production firm, mobile terminal production firm and user are for charging safety also more and more in succession
Pay attention to, if mobile terminal occurs surprisingly, not only to damage mobile terminal, it is possible to can be to the safety of user when charging
Threaten.
Because the research and development of mobile terminal are extremely complex, after mobile terminal is sold in user's handss, exist unavoidably
Some still unsolved bug, even can make in some cases mobile terminal crash;If now mobile terminal fills
Electricity, and mobile terminal causes to crash for some reason, then charge function will not may be controlled by mobile terminal, and this is to endanger very much
Danger.
Therefore prior art awaits further improvement.
The content of the invention
In view of above-mentioned weak point of the prior art, it is an object of the invention to provide the user a kind of charge control dress
Put and a kind of charge control method, to solve prior art in due to can not in time find that mobile terminal occurs in charging process
Failure, cause the problem of charging accident.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of battery charge controller, wherein, for automatically controlling to the charging process of mobile terminal, described device bag
Include the charging input interface, charge switch, power management chip and the intervalometer that are sequentially connected and with the power management chip
The battery being connected;
The charging input interface, is charged for connecting charger to the battery of mobile terminal;
The power management chip, for being charged to coupled battery, and every the first Preset Time pair
The intervalometer is resetted;
The intervalometer, for being timed to the charging interval in charging circuit, when timer time is beyond second pre-
If the time, then exporting high level pulse disconnects charge switch, and stopping is charged to battery;
Second Preset Time is more than first Preset Time.
The battery charge controller, wherein, the power management chip includes:Charger connection detection module, software are fixed
When device, intervalometer reseting module and intervalometer enable module;
The charger connection detection module, for detecting to whether charging input interface is connected with charger,
The software timer is triggered if connection start timing;
The software timer, for carrying out timing to the charging interval;
The intervalometer reseting module, for after the software timer is detected beyond the first Preset Time, to institute
State intervalometer to be resetted;
The intervalometer enables module, and for controlling the intervalometer timing or stopping timing being opened.
The battery charge controller, wherein, the intervalometer includes Enable Pin, reset terminal and outfan, the Enable Pin
With the intervalometer enable module be connected, the reset terminal is connected with the intervalometer reseting module, the outfan with
Charge switch is connected;
The intervalometer enables module by exporting the Enable Pin of high level pulse to intervalometer come opening timing device timing,
Intervalometer is set to stop timing by exporting low level pulse to intervalometer;
The intervalometer reseting module, after software timer time-out is detected high level pulse answering to intervalometer is exported
Position end, makes intervalometer reclocking.
The battery charge controller, wherein, the charger connection detection module, by detecting that charging input interface is produced
Interruption judging whether charger is connected with charging input interface;When rising edge interruption is detected, then charger and shifting
Dynamic terminal is connected, and when trailing edge interruption is detected, then charger is disconnected with charging input interface.
The battery charge controller, wherein, the charger connection detection module detects charger and connects with charging input
After mouth disconnects, control software intervalometer is closed, while intervalometer enables module output low level pulse making to intervalometer Enable Pin
Intervalometer stops timing.
A kind of charge control method, wherein, control is charged using described device, methods described includes:
A, charging input interface, charge switch, power management chip and intervalometer are sequentially connected;
B, it is connected with charger using charging input interface;
C, power management chip are charged to coupled battery, and intervalometer is entered every the first Preset Time
Row resets;
If D, intervalometer exceed the second Preset Time, output high level pulse disconnects charge switch, stops to battery
It is charged;
Second Preset Time is more than first Preset Time.
The charge control method, wherein, include in above-mentioned steps C:
C1, detect to whether charging input interface is connected with charger, if connection the software timing is triggered
Device starts timing;
C2, for when detect the software timer beyond the first Preset Time after, the intervalometer is resetted;
The charge control method, wherein, the intervalometer includes Enable Pin, reset terminal and outfan, the Enable Pin
With the intervalometer enable module be connected, the reset terminal is connected with the intervalometer reseting module, the outfan with
Charge switch is connected;
Above-mentioned steps C also include:
The intervalometer enables module by exporting the Enable Pin of high level pulse to intervalometer come opening timing device timing,
Intervalometer is set to stop timing by exporting low level pulse to intervalometer;
The reset terminal of high level pulse to intervalometer is exported after software timer is detected beyond the first Preset Time, is made
Intervalometer reclocking.
The charge control method, wherein, also include that whether connecting charger to charging input interface enters in step B
Row detection;
When rising edge interruption is detected, then charger is connected with charging input interface, interrupts when trailing edge is detected
When, then charger is disconnected with charging input interface.
The charge control method, wherein, after charger is detected with charging input interface disconnection, control software timing
Device is closed, and makes intervalometer stop timing while intervalometer enables module output low level pulse to intervalometer Enable Pin.
Beneficial effect, a kind of battery charge controller provided by the present invention and charge control method, by charging circuit
In set up charge switch, power management chip and intervalometer, the timing in intervalometer is monitored by power management chip,
When mobile terminal normally runs, then intervalometer is resetted every the first Preset Time, it is fixed if mobile terminal breaks down
When device timing also do not reset to after the second Preset Time or stop timing, then control timer output high level pulse make charging
Switch off, so as to cut off charging circuit, it is to avoid the generation of charging accident.
Description of the drawings
Fig. 1 is a kind of structure principle chart of battery charge controller of the invention.
Fig. 2 is the structure principle chart of power management chip and intervalometer in the present invention.
The step of Fig. 3 is a kind of charge control method in present invention flow chart.
Specific embodiment
To make the objects, technical solutions and advantages of the present invention clearer, clear and definite, develop simultaneously referring to the drawings embodiment pair
The present invention is further described.It should be appreciated that specific embodiment described herein is used only for explaining of the invention, and without
It is of the invention in limiting.
The invention discloses a kind of battery charge controller, as shown in figure 1, the battery charge controller is used for mobile terminal
Charging process automatically controlled, described device includes the charging input interface 100, the charge switch 200, power supply that are sequentially connected
Managing chip 300 and intervalometer 500 and the battery 400 being connected with the power management chip 300.
The charging input interface 100, is charged for connecting charger to the battery of mobile terminal.
The power management chip 200 for being charged and default every first to coupled battery 400
Time resets to the intervalometer 500.
The intervalometer 500, for being timed to the charging interval in charging circuit, exceeds when the time of intervalometer 500
Second Preset Time, then exporting high level pulse disconnects charge switch 200, and stopping is charged to battery 400.
Second Preset Time is more than first Preset Time.
When charging input interface accesses charger, charge switch closure starts to be charged battery, power management chip
Intervalometer is resetted every the first Preset Time, intervalometer then exports low level pulse, battery is normally carried out charging.If electric
Pond when charging, mobile terminal due to CPU over-burden or there is bug when, power management chip cannot be according to default every
The intervalometer is resetted every the first Preset Time, therefore when the time in intervalometer the second Preset Time is reached, then
Intervalometer directly exports high level pulse disconnects charge switch, so as to avoid the generation of charging accident.
Preferably, first Preset Time could be arranged to 800 seconds, and second Preset Time is set to 1000 seconds,
Above-mentioned Preset Time manually can also can be configured by described device default setting by user.
Specifically, as shown in Fig. 2 the power management chip 300 is included with lower module:Charger connection detection module
340th, software timer 310, intervalometer reseting module 320 and intervalometer enable module 330.
The charger connection detection module 340, for examining to whether charging input interface is connected with charger
Survey, the software timer 500 is triggered if connection and starts timing.
Whether the charger connection detection module, charger is judged by detecting the interruption of charging input interface generation
It is connected with charging input interface;When detecting rising edge and interrupting, then charger is connected with mobile terminal, when detecting down
Along when interrupting, then charger is disconnected drop with charging input interface.
The charger connection detection module is detected after charger and charging input interface disconnection, control software intervalometer
Close, make intervalometer stop timing while intervalometer enables module output low level pulse to intervalometer Enable Pin.
The software timer 310, for carrying out timing to the charging interval.
The intervalometer reseting module 320, the software timer 310 is detected beyond the first Preset Time for working as
Afterwards, the intervalometer 500 is resetted.
The intervalometer enables module 330, and for controlling the intervalometer 500 timing or stopping timing being opened.
Figure it is seen that the intervalometer includes Enable Pin EN, reset terminal RST and outfan OUT, the Enable Pin
EN enables module 330 and is connected with the intervalometer, and the reset terminal RST is connected with the intervalometer reseting module 320, institute
State outfan to be connected with charge switch.
The intervalometer enables module by exporting Enable Pin EN of high level pulse to intervalometer come opening timing device meter
When, make intervalometer stop timing by exporting low level pulse to intervalometer.
The intervalometer reseting module, after software timer time-out is detected high level pulse answering to intervalometer is exported
Position end, makes intervalometer reclocking.
When charger connection detection module detects charging inlet is connected with charger, then triggering software timer is carried out
Regularly, after the timing for detecting software timer exceeds the first Preset Time, then by being connected with software timer
Intervalometer reseting module intervalometer is resetted, the specific reset terminal by output high level pulse to intervalometer makes
Intervalometer reclocking.
If mobile terminal, because system response is excessively slow, causes the intervalometer reseting module cannot be default in charging process
Time resets intervalometer, then intervalometer will proceed timing, after timing exceeds the second Preset Time in intervalometer,
Timer output end OUT will export high level pulse, disconnect charge switch.
On the basis of the battery charge controller that the present invention is provided, as shown in figure 3, the invention also discloses one kind is filled
Electric control method, wherein, control is charged using described device, methods described includes:
S1, charging input interface, charge switch, power management chip and intervalometer are sequentially connected;Concrete connected mode
As shown in Figure 1.
S2, it is connected with charger using charging input interface.
S3, power management chip are charged to coupled battery, and every the first Preset Time to intervalometer
Resetted;
If S4, intervalometer exceed the second Preset Time, output high level pulse disconnects charge switch, stops to battery
It is charged;
Second Preset Time is more than first Preset Time.
The charge control method, wherein, include in above-mentioned steps S3:
S31, detect to whether charging input interface is connected with charger, if connection the software timing is triggered
Device starts timing;
S32, for after the software timer is detected beyond the first Preset Time, carrying out to the intervalometer multiple
Position;
The charge control method, wherein, the intervalometer includes Enable Pin, reset terminal and outfan, the Enable Pin
With the intervalometer enable module be connected, the reset terminal is connected with the intervalometer reseting module, the outfan with
Charge switch is connected;
Above-mentioned steps S3 also include:
The intervalometer enables module by exporting the Enable Pin of high level pulse to intervalometer come opening timing device timing,
Intervalometer is set to stop timing by exporting low level pulse to intervalometer;
The reset terminal of high level pulse to intervalometer is exported after software timer is detected beyond the first Preset Time, is made
Intervalometer reclocking.
Also include that whether connecting charger to charging input interface detects in step S2;When detecting rising edge
During interruption, then charger is connected with charging input interface, and when trailing edge interruption is detected, then charger connects with charging input
Mouth is disconnected.
After charger is detected with charging input interface disconnection, control software intervalometer is closed, while intervalometer is enabled
Module output low level pulse to intervalometer Enable Pin makes intervalometer stop timing.
A kind of battery charge controller provided by the present invention and charge control method, by setting up charging in the charge circuit
Switch, power management chip and intervalometer, are monitored, in mobile terminal by power management chip to the timing in intervalometer
During normal operation, then intervalometer is resetted every the first Preset Time, if mobile terminal breaks down, power management core
Piece normally cannot reset to intervalometer, and intervalometer will proceed timing, if intervalometer timing is to after the second Preset Time
Timing is not also resetted or stops, then control timer output high level pulse disconnects charge switch, so as to cut off the electricity that charges
Road, it is to avoid the generation of charging accident.
It is understood that for those of ordinary skills, with technology according to the present invention scheme and its can send out
Bright design in addition equivalent or change, and all these changes or replace the guarantor that should all belong to appended claims of the invention
Shield scope.