Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is a part of embodiment of the invention, rather than whole embodiments.Based on this hair
Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made
Example, belongs to the scope of protection of the invention.
Referring to Fig. 1, Fig. 1 is a kind of schematic diagram of charging circuit provided in an embodiment of the present invention, as shown in figure 1, described fill
Circuit includes MOSFET and charge pump (Charge Pump) circuit for controlling MOSFET to be turned on or off.Work as movement
When terminal is connected with charger, charge pump circuit detects input voltage (Vbus) increase, and control MOSFET is turned on, and electric current is through defeated
Enter end, MOSFET and output end to power supply, and then to power source charges, as shown in Figure 2.When extracting charger, due to MOSFET
Still in conducting state, supply voltage is through output end and MOSFET to the input of the charging circuit, (void in Fig. 3 as shown in Figure 3
Line represent electric current very little or in the absence of), changed because charging circuit can't detect Vbus, will not control MOSFET break
Open, anti-filling phenomenon occur.
Based on above-mentioned situation, the embodiment of the present invention provides a kind of charging method and mobile terminal, for realizing anti-filling phenomenon
Detection.Below in conjunction with specific embodiment, the present invention is described in detail.
Referring to Fig. 4, Fig. 4 is a kind of flow chart of charging method provided in an embodiment of the present invention, the charging method application
In mobile terminal, the mobile terminal includes charging circuit and power supply, described when the mobile terminal is connected with charger
Charger is connected by the charging circuit with the power supply, as shown in figure 4, the charging method includes:
Input voltage, output voltage and the input current of step 401, the detection charging circuit.
Specifically, default detection cycle can be divided into multiple timeslices, is then detected one by one in each timeslice
Input voltage, output voltage and the input current of charging circuit;The default detection cycle can not also be divided into multiple
Timeslice, but detect above-mentioned parameter in the default detection cycle.
In the present embodiment, when detecting the mobile terminal and being connected with charger, the charging of the mobile terminal is detected
Input voltage, output voltage and the input current of circuit.That is, the step 401 is in the mobile terminal and charging
Performed under the trigger condition of device connection., can be with it should be noted that when detecting the mobile terminal and being connected with charger
Periodically carry out the step 401.
Step 402, it is less than predeterminated voltage, and the input when the difference between the input voltage and the output voltage
When electric current is less than predetermined current, the charging circuit is controlled to disconnect.
Specifically, if the difference between the input voltage and the output voltage is less than the predeterminated voltage, and it is described
When input current is less than the predetermined current, determine that anti-filling phenomenon occurs in the charging circuit, and control the charging circuit to break
Open.
Wherein, predetermined current can be set according to the model difference of the charging circuit of the mobile terminal, for example, described
Predeterminated voltage can be 0V, and the predetermined current can be 20mA.It is understood that when the predeterminated voltage is 0V, institute
The method of stating can by judge the input voltage whether be less than the output voltage come judge the input voltage with it is described defeated
Whether the difference gone out between voltage is less than the predeterminated voltage.Specifically, if the input voltage is less than the output voltage, institute
The method of stating judges that the difference between the input voltage and the output voltage is less than the predeterminated voltage;If on the contrary, described
Input voltage is not less than the output voltage, and methods described judges difference between the input voltage and the output voltage not
Less than the predeterminated voltage.
Alternatively, the charging circuit includes switch element;
The control charging circuit disconnects, including:
The switch element in the charging circuit is controlled to end;
Before the step of input voltage of the detection charging circuit, output voltage and input current, in addition to:
When detecting the mobile terminal and being connected with charger, the switching elements conductive in the charging circuit is controlled.
In the step, the charging circuit includes switch element, described to control the mode that the charging circuit disconnects to be control
Make the switch element cut-off in the charging circuit.Methods described is when detecting that the mobile terminal is connected with charger, control
Switching elements conductive in the charging circuit, realization is charged to the mobile terminal.
In the embodiment, methods described is after the switching elements conductive in controlling the charging circuit, with described default
Detection cycle is the cycle, and the input voltage, output voltage and input current of the charging circuit are detected.
Alternatively, the switch element is Metal-Oxide Semiconductor field effect transistor M OSFET.
In the embodiment, the switch element is MOSFET, and the mode that methods described controls the charging circuit to disconnect has
Body disconnects for the MOSFET in the control charging circuit.It is understood that because the MOSFET is in the conduction state, institute
Anti- filling phenomenon can be produced by stating charging circuit when mobile terminal disconnects with the charger, and methods described described in control by filling
MOSFET in circuit disconnects the realization control charging circuit and disconnected, and instead fills phenomenon in such manner, it is possible to eliminate in time, it is to avoid increase
Plus the mobile terminal power consumption and avoid to the power supply of mobile terminal cause damage.
Alternatively, the step of input voltage of the detection charging circuit, output voltage and input current, bag
Include:
In the very first time piece of default detection cycle, the input voltage of the charging circuit is detected;
In the second timeslice of the default detection cycle, the output voltage of the charging circuit is detected;And
In the 3rd timeslice of the default detection cycle, the input current of the charging circuit is detected.
In the embodiment, methods described detects the charging circuit in the different time piece of the default detection cycle
Input voltage, output voltage and input current.Specifically, methods described is in the very first time piece of the default detection cycle
The input voltage of the charging circuit is detected, the charging circuit is detected in the second timeslice of the default detection cycle
Output voltage, the input current for detecting in the 3rd timeslice of the default detection cycle charging circuit.Need explanation
, in the embodiment, the order between the very first time piece, the second timeslice and the 3rd timeslice is not done specifically
Limit.That is, methods described detects the order of the input voltage, output voltage and input current of the charging circuit not
Limit.
Alternatively, it is described in the 3rd timeslice of the default detection cycle, detect the input electricity of the charging circuit
After the step of stream, before the step of control charging circuit disconnects, methods described also includes:
In the 4th timeslice of the default detection cycle, judge between the input voltage and the output voltage
Whether difference is less than predeterminated voltage and judges whether the input current is less than predetermined current.
In the embodiment, methods described judge in the 4th timeslice of the default detection cycle input voltage with
The relation between relation and the input current and the predetermined current between the output voltage.It should be noted that
4th timeslice is behind the very first time piece, the second timeslice and the 3rd timeslice, that is to say, that when
Methods described complete to after the input voltage, output voltage and input current of the charging circuit just to the input voltage
The relation between difference and the predeterminated voltage between output voltage, and the input current and the predetermined current it
Between relation judged.
Specifically, methods described can start the timeslice of default detection cycle after the charging circuit conducting is controlled
Timing, that is to say, that after each default detection cycle terminates, methods described starts the timeslice timing of a new round.The side
Method can determine unit interval piece and multiple timeslice coefficients, and the multiple timeslice coefficient correspondence performs different operations,
When the timeslice timing is equal to a timeslice coefficient, methods described performs operation corresponding with the timeslice coefficient.Lift
For example, methods described can preset multiple timeslice COEFFICIENT Ks 1, K2, K3 and K4 (K1, K2, K3, K4 are not mutually equal),
The input voltage of the K1 correspondence detections charging circuit, the output voltage of the K2 correspondence detections charging circuit, K3 correspondences are detected
The input current of the charging circuit, K4 correspondences judge relation between the input voltage and the output voltage and described
Relation between input current and the predetermined current.It is described when the time of the timeslice timing is K1* unit interval pieces
Method performs operation corresponding with the timeslice COEFFICIENT K 1, that is, detects the input voltage of the charging circuit;When the timeslice
When timing time is K2* unit interval pieces, methods described performs operation corresponding with the timeslice COEFFICIENT K 2, i.e., filled described in detection
The output voltage of circuit;When the timeslice timing time is K3* unit interval pieces, methods described is performed and the timeslice
The corresponding operation of COEFFICIENT K 3, that is, detect the input current of the charging circuit;Similarly, when the timeslice timing time is
During K4* unit interval pieces, methods described perform it is corresponding with the timeslice COEFFICIENT K 4 operates, that is, judge the input voltage with it is defeated
Between the relation gone out between the difference between voltage and the predeterminated voltage, and the input current and the predetermined current
Relation.
In the embodiment, the default detection cycle can be 50ms, and the unit interval piece can be 10ms, when described
Between piece COEFFICIENT K 1, K2, K3 and K4 can be respectively 1,2,3,4.
So, in the embodiment, methods described is based on timeslice and anti-filling detection, and whole inspection is carried out to the charging circuit
Flow measurement process control is completed in default detection cycle, the anti-exception that fills can quickly be handled, improve the anti-reality for filling detection
Shi Xing.In addition, this method is independent of IC is specifically directly filled, with versatility.
In the embodiment of the present invention, above-mentioned mobile terminal can be any mobile terminal, for example:Mobile phone, tablet personal computer
(Tablet Personal Computer), laptop computer (Laptop Computer), personal digital assistant (personal
Digital assistant, abbreviation PDA), mobile Internet access device (Mobile Internet Device, MID) or wearable
Equipment (Wearable Device) etc..
In the present embodiment, the charging method detects input voltage, output voltage and the input of the charging circuit
Electric current;When the difference between the input voltage and the output voltage is less than in advance less than predeterminated voltage, and the input current
If during electric current, controlling the charging circuit to disconnect.So, the charging method that the present embodiment is provided can occur anti-in mobile terminal
When filling phenomenon, charging circuit is disconnected in time, it is too fast so as to be prevented effectively from mobile terminal power consumption, and improve mobile terminal
Security.
Referring to Fig. 5, Fig. 5 is a kind of flow chart of charging method provided in an embodiment of the present invention, and the present embodiment is real with upper one
The main distinction for applying example is, also further charging can be pointed out to terminate after controlling the charging circuit to disconnect.Such as Fig. 5 institutes
Show, the charging method includes:
Input voltage, output voltage and the input current of step 501, the detection charging circuit.
Step 502, it is less than predeterminated voltage, and the input when the difference between the input voltage and the output voltage
When electric current is less than predetermined current, the charging circuit is controlled to disconnect.
Step 503, prompting charging terminate.
In the embodiment, it is determined that after the anti-filling phenomenon of charging circuit appearance, sending prompting message to point out charging
Terminate.It is understood that after methods described determines that anti-filling phenomenon occurs in the charging circuit, methods described can be determined
It is due to that the anti-phenomenon that fills is caused that the voltage of the charging circuit input, which is not zero, rather than because being in charged state, because
This, methods described can determine that now mobile terminal is disconnected with charger, so as on the mobile terminal
Prompting message is sent to point out mobile terminal charging described in user to terminate.The prompting message can be one in sound, light, vibration
Plant or a variety of, e.g. any combination of voice message, text prompt and vibration prompt.
In the embodiment, the charging method detects the input voltage, output voltage and input electricity of the charging circuit
Stream;When the difference between the input voltage and the output voltage is less than predeterminated voltage, and the input current be less than it is default
During electric current, control the charging circuit to disconnect, prompting message is sent on the mobile terminal to point out charging to terminate.So,
The charging method that the present embodiment is provided can send prompting message on the mobile terminal after the charging circuit is disconnected
Point out the mobile terminal charging to terminate, be easy to user to understand the charge condition of the mobile terminal.
It is a kind of structural representation of mobile terminal provided in an embodiment of the present invention, the mobile terminal 600 referring to Fig. 6
Including charging circuit (not shown) and power supply (not shown), when the mobile terminal is connected with charger, the charger leads to
Cross the charging circuit to be connected with the power supply, as shown in fig. 6, the mobile terminal 600 also includes:
Detection module 601, input voltage, output voltage and input current for detecting the charging circuit;
Control module 602, for being less than predeterminated voltage when the difference between the input voltage and the output voltage, and
When the input current is less than predetermined current, the charging circuit is controlled to disconnect.
Alternatively, the charging circuit includes switch element;
The control module 602, specifically for being less than in advance when the difference between the input voltage and the output voltage
If voltage, and the input current is when being less than predetermined current, controls the switch element cut-off in the charging circuit;
When control module 602 in the present embodiment can occur anti-filling phenomenon in mobile terminal, charging circuit is disconnected in time,
It is too fast so as to be prevented effectively from mobile terminal power consumption, and improve the security of mobile terminal.
Referring to Fig. 7, Fig. 7 is the structural representation of another mobile terminal provided in an embodiment of the present invention, as shown in fig. 7,
The mobile terminal 600 also includes:
Conduction module 603, when being connected for detecting the mobile terminal with charger, is controlled in the charging circuit
Switching elements conductive.
Alternatively, the switch element is Metal-Oxide Semiconductor field effect transistor M OSFET.
Alternatively, referring to Fig. 8, Fig. 8 is the structural representation of another mobile terminal provided in an embodiment of the present invention, is such as schemed
Shown in 8, the detection module 601 includes:
First detection sub-module 6011, in the very first time piece of default detection cycle, detecting the mobile terminal
Charging circuit input voltage;
Second detection sub-module 6012, in the second timeslice of the default detection cycle, detecting the charging
The output voltage of circuit;
3rd detection sub-module 6013, in the 3rd timeslice of the default detection cycle, detecting the charging
The input current of circuit.
Alternatively, referring to Fig. 9, Fig. 9 is the structural representation of another mobile terminal provided in an embodiment of the present invention, is such as schemed
Shown in 9, the mobile terminal 600 also includes:
Judge module 604, in the 4th timeslice of the default detection cycle, judging the input voltage and institute
State whether the difference between output voltage is less than predeterminated voltage and judges whether the input current is less than predetermined current.
Alternatively, referring to Figure 10, Figure 10 is the structural representation of another mobile terminal provided in an embodiment of the present invention, such as
Shown in Figure 10, the mobile terminal 600 also includes:
Reminding module 605, for after controlling the charging circuit to disconnect, pointing out charging to terminate.
Mobile terminal 600 can realize each process that mobile terminal is realized in Fig. 4 to Fig. 5 embodiment of the method, to keep away
Exempt to repeat, will not be repeated here.
Referring to Figure 11, Figure 11 is a kind of structural representation of mobile terminal 1 100 provided in an embodiment of the present invention, such as Figure 11
Shown, mobile terminal 1 100 includes:At least one processor 1101, memory 1102, at least one user interface 1103 and net
Network interface 1104.Each component in mobile terminal 1 100 is coupled by bus system 1105.It is understood that total
Linear system system 1105 is used to realize the connection communication between these components.Bus system 1105 in addition to including data wire, in addition to
Power bus, controlling bus and status signal bus in addition.But for the sake of clear explanation, be in fig. 11 all designated as various buses
Bus system 1105.In the present embodiment, the mobile terminal also includes charging circuit (not shown) and power supply (not shown), when
When the mobile terminal is connected with charger, the charger is connected by the charging circuit with the power supply.
Wherein, user interface 1103 can include display, keyboard or pointing device, such as mouse, trace ball
(trackball), touch-sensitive plate or touch-screen etc..
It is appreciated that the memory 1102 in the embodiment of the present invention can be volatile memory or non-volatile memories
Device, or may include both volatibility and nonvolatile memory.Wherein, nonvolatile memory can be read-only storage
(Read-Only Memory, ROM), programmable read only memory (Programmable ROM, PROM), erasable programmable are only
Read memory (Erasable PROM, EPROM), Electrically Erasable Read Only Memory (Electrically EPROM,
) or flash memory EEPROM.Volatile memory can be random access memory (Random Access Memory, RAM), and it is used
Make External Cache.By exemplary but be not restricted explanation, the RAM of many forms can use, such as static random-access
Memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random-access
Memory (Synchronous DRAM, SDRAM), double data speed synchronous dynamic RAM (Double Data
Rate SDRAM, DDRSDRAM), it is enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), synchronous
Connect dynamic random access memory (Synchlink DRAM, SLDRAM) and direct rambus random access memory
(Direct Rambus RAM, DRRAM).The memory 1102 of system and method described herein be intended to including but not limited to this
The memory of a little and any other suitable type.
In some embodiments, memory 1102 stores following element, can perform module or data structure, or
Their subset of person, or their superset:Operating system 11021 and application program 11022.
Wherein, operating system 11021, comprising various system programs, such as ccf layer, core library layer, driving layer, are used for
Realize various basic businesses and handle hardware based task.Application program 11022, includes various application programs, such as matchmaker
Body player (Media Player), browser (Browser) etc., for realizing various applied business.Realize that the present invention is implemented
The program of example method may be embodied in application program 11022.
In embodiments of the present invention, by calling program or the instruction of the storage of memory 1102, specifically, can be application
The program stored in program 11022 or instruction, processor 1101 are used for:
Detect the input voltage, output voltage and input current of the charging circuit of the mobile terminal;
When the difference between the input voltage and the output voltage is less than less than predeterminated voltage, and the input current
During predetermined current, the charging circuit is controlled to disconnect.
The method that the embodiments of the present invention are disclosed can apply in processor 1101, or real by processor 1101
It is existing.Processor 1101 is probably a kind of IC chip, the disposal ability with signal.In implementation process, the above method
Each step can be completed by the instruction of the integrated logic circuit of the hardware in processor 1101 or software form.Above-mentioned
Processor 1101 can be general processor, digital signal processor (Digital Signal Processor, DSP), special
Integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field
Programmable Gate Array, FPGA) or other PLDs, discrete gate or transistor logic,
Discrete hardware components.It can realize or perform disclosed each method, step and the logic diagram in the embodiment of the present invention.It is general
Processor can be microprocessor or the processor can also be any conventional processor etc..With reference to institute of the embodiment of the present invention
The step of disclosed method, can be embodied directly in hardware decoding processor and perform completion, or with the hardware in decoding processor
And software module combination performs completion.Software module can be located at random access memory, and flash memory, read-only storage may be programmed read-only
In the ripe storage medium in this area such as memory or electrically erasable programmable memory, register.The storage medium is located at
Memory 1102, processor 1101 reads the information in memory 1102, the step of completing the above method with reference to its hardware.
It is understood that embodiments described herein can with hardware, software, firmware, middleware, microcode or its
Combine to realize.Realized for hardware, processing unit can be realized in one or more application specific integrated circuit (Application
Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing,
DSP), digital signal processing appts (DSP Device, DSPD), programmable logic device (Programmable Logic
Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general processor,
In controller, microcontroller, microprocessor, other electronic units for performing herein described function or its combination.
Realize, can be realized by performing the module (such as process, function) of function described herein herein for software
Described technology.Software code is storable in memory and by computing device.Memory can within a processor or
Realized outside processor.
Alternatively, the charging circuit includes switch element;
The control charging circuit disconnects, including:
The switch element in the charging circuit is controlled to end;
The processor 1101, is additionally operable to:
When detecting the mobile terminal and being connected with charger, the switching elements conductive in the charging circuit is controlled.
Alternatively, the switch element is Metal-Oxide Semiconductor field effect transistor M OSFET.
Alternatively, the processor 1101 detects the input voltage, output voltage and input current of the charging circuit
The step of, including:
In the very first time piece of default detection cycle, the input voltage of the charging circuit is detected;
In the second timeslice of the default detection cycle, the output voltage of the charging circuit is detected;And
In the 3rd timeslice of the default detection cycle, the input current of the charging circuit is detected.
Alternatively, it is described in the 3rd timeslice of the default detection cycle, detect the input electricity of the charging circuit
After the step of stream, before the step of control charging circuit disconnects, the processor 1101 is additionally operable to:
In the 4th timeslice of the default detection cycle, judge between the input voltage and the output voltage
Whether difference is less than predeterminated voltage and judges whether the input current is less than predetermined current.
Alternatively, after the processor 1101 controls the step of charging circuit disconnects, it is additionally operable to:
Prompting charging terminates.
Mobile terminal 1 100 can realize each process that mobile terminal 1 100 is realized in previous embodiment, to avoid weight
It is multiple, repeat no more here.
Mobile terminal 1 100 in the present embodiment can disconnect charging circuit in time when there is anti-filling phenomenon, so as to
Enough it is prevented effectively from that mobile terminal power consumption is too fast, and improves the security of mobile terminal.
The present invention also provides the calculating that is stored with a kind of computer-readable recording medium, the computer-readable recording medium
The executable one or more programs of machine, one or more of programs perform the computer when being performed by the computer
Following steps:
Input voltage, output voltage and the input current of the charging circuit of mobile terminal are detected, the mobile terminal is also
Including power supply, when the mobile terminal is connected with charger, the charger is connected by the charging circuit and the power supply
Connect;
When the difference between the input voltage and the output voltage is less than less than predeterminated voltage, and the input current
During predetermined current, the charging circuit is controlled to disconnect.
Alternatively, the charging circuit includes switch element;
The control charging circuit disconnects, including:
The switch element in the charging circuit is controlled to end;
Before the step of input voltage of the detection charging circuit, output voltage and input current, the meter
Calculation machine is also executed the following steps:
When detecting the mobile terminal and being connected with charger, the switching elements conductive in the charging circuit is controlled.
Alternatively, the step of input voltage of the detection charging circuit, output voltage and input current, bag
Include:
In the very first time piece of default detection cycle, the input voltage of the charging circuit is detected;
In the second timeslice of the default detection cycle, the output voltage of the charging circuit is detected;And
In the 3rd timeslice of the default detection cycle, the input current of the charging circuit is detected.
Alternatively, in the 3rd timeslice of the default detection cycle, the input current of the charging circuit is detected
After step, before the step of control charging circuit disconnects, the computer is also executed the following steps:
In the 4th timeslice of the default detection cycle, judge between the input voltage and the output voltage
Whether difference is less than predeterminated voltage and judges whether the input current is less than predetermined current.
Alternatively, after the step of control charging circuit disconnects, the computer is also executed the following steps:
Prompting charging terminates.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein
Member and algorithm steps, can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
Performed with hardware or software mode, depending on the application-specific and design constraint of technical scheme.Professional and technical personnel
Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed
The scope of the present invention.
It is apparent to those skilled in the art that, for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
In embodiment provided herein, it should be understood that disclosed apparatus and method, others can be passed through
Mode is realized.For example, device embodiment described above is only schematical, for example, the division of the unit, is only
A kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple units or component can combine or
Person is desirably integrated into another system, or some features can be ignored, or does not perform.Another, shown or discussed is mutual
Between coupling or direct-coupling or communication connection can be the INDIRECT COUPLING or communication link of device or unit by some interfaces
Connect, can be electrical, machinery or other forms.
The unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize scheme of the embodiment of the present invention according to the actual needs
Purpose.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.
If the function is realized using in the form of SFU software functional unit and is used as independent production marketing or in use, can be with
It is stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially in other words
The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter
Calculation machine software product is stored in a storage medium, including some instructions are to cause a computer equipment (can be individual
People's computer, server, or network equipment etc.) perform all or part of step of each of the invention embodiment methods described.
And foregoing storage medium includes:USB flash disk, mobile hard disk, ROM, RAM, magnetic disc or CD etc. are various can be with store program codes
Medium.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be defined by scope of the claims.