Summary of the invention
In view of above-mentioned deficiencies of the prior art, the purpose of the present invention is to provide a kind of methods of quickly setting charging current
And system, it is intended to solve the problems, such as existing charging current setting method its consuming time is long, low efficiency.
Technical scheme is as follows:
A kind of method of quick setting charging current, wherein comprising steps of
A, when mobile terminal detects charger connection, setting charging current ICHG is initiation of charge electric current ICHG0;
B, it using the initiation of charge electric current ICHG0 as initial value, detects to obtain optimal charge electric current by a step value
Median;
C, it using the median of the optimal charge electric current as initial value, detects to obtain by reducing the step value several times
The end value ICHGf of optimal charge electric current.
The method of the quick setting charging current, wherein the step value is the first step value Δ I1, the step
B is specifically included:
B1, the first step value Δ I1 for increasing a unit for charging current ICHG:
ICHG=ICHG+ΔI1;
B2, judge whether charger output voltage VCHG is pulled low, if yes then follow the steps B3, it is no to then follow the steps
B1;
B3, setting charging current ICHG=ICHG- Δ I1, so that the median ICHG1 of optimal charge electric current is obtained, it is described
ICHG1=ICHG。
The method of the quick setting charging current, wherein in the step C, by reducing 2 first steppings
Value Δ I1 detects to obtain the end value ICHGf of optimal charge electric current.
The method of the quick setting charging current, wherein the step value after the first diminution is the second step value Δ I2,
The step C is specifically included:
C1, setting charging current ICHG=ICHG1;
C2, the second step value Δ I2 for increasing a unit for charging current ICHG:
ICHG=ICHG+ΔI2;
C3, judge whether charger output voltage VCHG is pulled low, if yes then follow the steps C4, it is no to then follow the steps
C2;
C4, setting charging current ICHG=ICHG- Δ I2, so that the median ICHG2 of optimal charge electric current is obtained, it is described
ICHG2=ICHG。
The method of the quick setting charging current, wherein the step value after second of diminution is third step value Δ
After I3, the step C4 further include:
C5, setting charging current ICHG=ICHG2;
C6, the third step value Δ I3 for increasing a unit for charging current ICHG:
ICHG=ICHG+ΔI3;
C7, judge whether charger output voltage VCHG is pulled low, if yes then follow the steps C8, it is no to then follow the steps
C6;
C8, setting charging current ICHG=ICHG- Δ I3, so that the end value ICHGf of optimal charge electric current is obtained, it is described
ICHGf=ICHG。
A kind of system of quick setting charging current, wherein include:
Setup module, for when mobile terminal detects charger connection, setting charging current ICHG to be initiation of charge
Electric current ICHG0;
Median detecting module, for being detected by a step value using the initiation of charge electric current ICHG0 as initial value
Obtain the median of optimal charge electric current;
End value detecting module, for using the median of the optimal charge electric current as initial value, by reducing several times
The step value detects to obtain the end value ICHGf of optimal charge electric current.
The system of the quick setting charging current, wherein the step value is the first step value Δ I1, the centre
Value detecting module specifically includes:
First adding unit, for increasing the first step value Δ I1 of a unit for charging current ICHG:
ICHG=ICHG+ΔI1;
First judging unit is visited for judging whether charger output voltage VCHG is pulled low if YES then executing first
Unit is surveyed, the first adding unit is otherwise executed;
First probe unit, for charging current ICHG=ICHG- Δ I1 to be arranged, to obtain in optimal charge electric current
Between value ICHG1, the ICHG1=ICHG.
The system of the quick setting charging current, wherein in the end value detecting module, by reducing 2 institutes
The first step value Δ I1 is stated to detect to obtain the end value ICHGf of optimal charge electric current.
The system of the quick setting charging current, wherein the step value after the first diminution is the second step value Δ I2,
The end value detecting module specifically includes:
First setting unit, for charging current ICHG=ICHG1 to be arranged;
Second adding unit, for increasing the second step value Δ I2 of a unit for charging current ICHG:
ICHG=ICHG+ΔI2;
Second judgment unit is visited for judging whether charger output voltage VCHG is pulled low if YES then executing second
Unit is surveyed, the second adding unit is otherwise executed;
Second probe unit, for charging current ICHG=ICHG- Δ I2 to be arranged, to obtain in optimal charge electric current
Between value ICHG2, the ICHG2=ICHG.
The system of the quick setting charging current, wherein the step value after second of diminution is third step value Δ
I3, the end value detecting module further include:
Second setting unit, for charging current ICHG=ICHG2 to be arranged;
Third adding unit, for increasing the third step value Δ I3 of a unit for charging current ICHG:
ICHG=ICHG+ΔI3;
Third judging unit is visited for judging whether charger output voltage VCHG is pulled low if YES then executing third
Unit is surveyed, third adding unit is otherwise executed;
Third probe unit, for charging current ICHG=ICHG- Δ I3 to be arranged, to obtain optimal charge electric current most
Final value ICHGf, the ICHGf=ICHG.
The utility model has the advantages that the present invention obtains the end value of optimal charge electric current by repeatedly reducing step value, compared to existing
Have in technology, charging current setting method of the invention not only shortens detection time, improves service efficiency, while passing through contracting
Small step value further improves setting accuracy rate, and the optimal charge electric current made more matches the fan-out capability of charger.
Specific embodiment
The present invention provides a kind of method and system of quickly setting charging current, to make the purpose of the present invention, technical solution
And effect is clearer, clear, the present invention is described in more detail below.It should be appreciated that specific implementation described herein
Example is only used to explain the present invention, is not intended to limit the present invention.
Referring to Fig. 1, Fig. 1 is a kind of flow chart of the method preferred embodiment of quickly setting charging current of the present invention, such as
Shown in figure comprising step:
S101, when mobile terminal detect charger connection when, setting charging current ICHG be initiation of charge electric current
ICHG0;
S102, using the initiation of charge electric current ICHG0 as initial value, detect to obtain optimal charge electricity by a step value
The median of stream;
S103, using the median of the optimal charge electric current as initial value, pass through and reduce step value detection several times
Obtain the end value ICHGf of optimal charge electric current.
In the present invention, step value be not it is unique, but diminishing, pass through the biggish step value in front just in this way
Can quick obtaining close to optimal charge electric current median, then using the median as initial value, by the step value of diminution come
Detection obtains the median closer to optimal charge electric current, successively detects in this way, so as to efficiently detect to obtain most
The end value of good charging current, compared with the existing technology in fixation step value, more efficient, the spent time is shorter, and
And the end value that detection obtains, closer to optimal charge electric current, accuracy is higher, can extend charger service life.
Further, the step value is the first step value Δ I1, as shown in Fig. 2, the step S102 is specifically included:
S201, the first step value Δ I1 for increasing a unit for charging current ICHG:
ICHG=ICHG+ΔI1;
S202, judge whether charger output voltage VCHG is pulled low, if yes then follow the steps S203, otherwise execute step
Rapid S201;
S203, setting charging current ICHG=ICHG- Δ I1, to obtain the median ICHG1 of optimal charge electric current, institute
State ICHG1=ICHG.
The present invention detects to obtain using initial step value as the first step value Δ I1 using the first step value Δ I1
One median ICHG1 close to optimal charge electric current, specific detection method are to increase a list for charging current ICHG
First step value Δ I1 of position, then judges whether charger output voltage VCHG is pulled low, i.e. charger output voltage VCHG
Whether threshold V T H is less than, if if, then illustrate that the charging current of current setting alreadys exceed the output energy of charger
Charging current ICHG is then reduced the first step value Δ I1 of a unit by power, i.e. setting charging current ICHG=ICHG- Δ I1,
To obtain median ICHG1(ICHG1=ICHG of optimal charge electric current).If charger output voltage VCHG is also greater than threshold
Threshold voltage VTH illustrates the charging current of current setting and is less than the fan-out capability of charger, can continue to increase charging current,
Its mode increased is primary the first step value Δ I1 for increasing a unit, then proceedes to detect, until charger exports electricity
Whether pressure VCHG is less than threshold V T H.
Illustrate below by a preferred example, initiation of charge electric current ICHG0=100 milliampere, Δ I1=100 milliampere,
VTH=4.6 volt.
So, the step S102 is specifically included:
S201 ', setting charging current are 100+100=200 milliampere, and being set charging current ICHG before is 100 milliamperes
(i.e. initiation of charge electric current ICHG0);Judge whether charger output voltage VCHG is pulled low again, i.e., whether less than 4.6 volts, if
S202 ' is thened follow the steps, S203 ' is if NO thened follow the steps;
S202 ', setting charging current ICHG=ICHG- Δ I1==200-100=100 milliampere, to obtain optimal charge electricity
The median ICHG1 of stream, ICHG1=ICHG=100 milliampere;
S203 ', setting charging current are 200+100=300 milliampere, then judge whether charger output voltage VCHG is drawn
It is low, i.e., whether less than 4.6 volts, if so then execute step S204 ', if NO then follow the steps S205 ';
S204 ', setting charging current ICHG=ICHG- Δ I1==300-100=200 milliampere, to obtain optimal charge electricity
The median ICHG1 of stream, ICHG1=ICHG=200 milliampere;
S205 ', setting charging current are 300+100=400 milliampere, then judge whether charger output voltage VCHG is drawn
It is low, i.e., whether less than 4.6 volts ... ..., and so on.
Above-mentioned detection steps are repeated always, obtain the median ICHG1 of optimal charge electric current until detecting, such as ICHG1=
400 milliamperes.
In the present invention, preferably detect to obtain the final of optimal charge electric current by reducing 2 the first step value Δ I1
Value ICHGf.The step value after reducing for the first time can be set as the second step value Δ I2, the step value after second of diminution is third step
Into value Δ I3, step value is successively reduced in this way, charging current can be faster set, both can guarantee and imitated with sufficiently high setting
Rate, while can guarantee certain accuracy again.Obviously, the first step value Δ I1, the second step value Δ I2, third step value Δ I3
Relationship should be: Δ I1 > Δ I2 > Δ I3 gradually reduces step value in this way, more accurately detection obtain closest to even etc.
In the end value ICHGf of optimal charge electric current.
Further, as shown in figure 3, the step S103 is specifically included:
S301, setting charging current ICHG=ICHG1;
S302, the second step value Δ I2 for increasing a unit for charging current ICHG:
ICHG=ICHG+ΔI2;
S303, judge whether charger output voltage VCHG is pulled low, if yes then follow the steps S304, otherwise execute step
Rapid S302;
S304, setting charging current ICHG=ICHG- Δ I2, to obtain the median ICHG2 of optimal charge electric current, institute
State ICHG2=ICHG.
Above-mentioned steps are using the median ICHG1 of optimal charge electric current as initial value, and then it is best to obtain another for detection
The median ICHG2 of charging current, this median ICHG2 are compared to median ICHG1 closer to optimal charge electric current.
It is specifically described below by a preferred example, median ICHG1=400 milliampere of optimal charge electric current,
Δ I2=30 milliampere (can certainly be set as 50 milliamperes), VTH=4.6 volt.
So, the step S103 is specifically included:
S301 ', setting charging current are 400+30=430 milliampere;Judge whether charger output voltage VCHG is drawn again
It is low, i.e., whether less than 4.6 volts, if so then execute step S302 ', if NO then follow the steps S303 ';
S302 ', setting charging current ICHG=ICHG- Δ I2==430-30=400 milliampere, to obtain optimal charge electric current
Median ICHG2, ICHG2=ICHG=400 milliampere;
S303 ', setting charging current are 430+30=460 milliampere, then judge whether charger output voltage VCHG is drawn
It is low, i.e., whether less than 4.6 volts, if so then execute step S304 ', if NO then follow the steps S305 ';
S304 ', setting charging current ICHG=ICHG- Δ I2==460-30=430 milliampere, to obtain optimal charge electricity
The median ICHG2 of stream, ICHG2=ICHG=430 milliampere;
S305 ', setting charging current are 460+30=490 milliampere, then judge whether charger output voltage VCHG is drawn
It is low, i.e., whether less than 4.6 volts ... ..., and so on.
Above-mentioned detection steps are repeated always, obtain the median ICHG2 of optimal charge electric current until detecting, such as ICHG2=
460 milliamperes.
Further, as shown in figure 4, after the step S304 further include:
S401, setting charging current ICHG=ICHG2;
S402, the third step value Δ I3 for increasing a unit for charging current ICHG:
ICHG=ICHG+ΔI3;
S403, judge whether charger output voltage VCHG is pulled low, if yes then follow the steps S404, otherwise execute step
Rapid S402;
S404, setting charging current ICHG=ICHG- Δ I3, to obtain the end value ICHGf of optimal charge electric current, institute
State ICHGf=ICHG.
Above-mentioned steps are using the median ICHG2 of optimal charge electric current as initial value, and then detection obtains optimal charge electricity
The end value ICHGf of stream.
It is specifically described below by a preferred example, median ICHG2=460 milliampere of optimal charge electric current,
Δ I3=10 milliampere, VTH=4.6 volt.
So, the step S103 is specifically included:
S301 ', setting charging current are 460+10=470 milliampere;Judge whether charger output voltage VCHG is drawn again
It is low, i.e., whether less than 4.6 volts, if so then execute step S302 ', if NO then follow the steps S303 ';
S302 ', setting charging current ICHG=ICHG- Δ I3==470-10=460 milliampere, to obtain optimal charge electric current
End value ICHGf, ICHGf=ICHG=460 milliampere;
S303 ', setting charging current are 470+10=480 milliampere, then judge whether charger output voltage VCHG is drawn
It is low, i.e., whether less than 4.6 volts, if so then execute step S304 ', if NO then follow the steps S305 ';
S304 ', setting charging current ICHG=ICHG- Δ I3==480-10=470 milliampere, to obtain optimal charge electricity
The end value ICHGf of stream, ICHGf=ICHG=470 milliampere;
S305 ', setting charging current are 480+10=490 milliampere, then judge whether charger output voltage VCHG is drawn
It is low, i.e., whether less than 4.6 volts ... ..., and so on.
Above-mentioned detection steps are repeated always, obtain the end value ICHGf of optimal charge electric current until detecting, such as ICHGf=
480 milliamperes.
The present invention also provides a kind of system preferred embodiments of quickly setting charging current, as shown in figure 5, comprising:
Setup module 100, for when mobile terminal detects charger connection, setting charging current ICHG to be that starting is filled
Electric current ICHG0;
Median detecting module 200, for passing through a step value using the initiation of charge electric current ICHG0 as initial value
Detection obtains the median of optimal charge electric current;
End value detecting module 300, it is several by reducing for using the median of the optimal charge electric current as initial value
The secondary step value detects to obtain the end value ICHGf of optimal charge electric current.
Further, the step value is the first step value Δ I1, as shown in fig. 6, the median detecting module 200 is specific
Include:
First adding unit 210, for increasing the first step value Δ I1 of a unit for charging current ICHG:
ICHG=ICHG+ΔI1;
First judging unit 220, for judging whether charger output voltage VCHG is pulled low, if YES then executing first
Otherwise probe unit 230 executes the first adding unit 210;
First probe unit 230, for charging current ICHG=ICHG- Δ I1 to be arranged, to obtain optimal charge electric current
Median ICHG1, the ICHG1=ICHG.
Further, it in the end value detecting module 300, detects to obtain by reducing 2 the first step value Δ I1
The end value ICHGf of optimal charge electric current.
Further, the step value after the first diminution is the second step value Δ I2, as shown in fig. 7, the end value detects mould
Block 300 specifically includes:
First setting unit 310, for charging current ICHG=ICHG1 to be arranged;
Second adding unit 320, for increasing the second step value Δ I2 of a unit for charging current ICHG:
ICHG=ICHG+ΔI2;
Second judgment unit 330, for judging whether charger output voltage VCHG is pulled low, if YES then executing second
Otherwise probe unit 340 executes the second adding unit 320;
Second probe unit 340, for charging current ICHG=ICHG- Δ I2 to be arranged, to obtain optimal charge electric current
Median ICHG2, the ICHG2=ICHG.
Further, the step value after second of diminution is third step value Δ I3, as shown in figure 8, the end value detects
Module 300 further include:
Second setting unit 350, for charging current ICHG=ICHG2 to be arranged;
Third adding unit 360, for increasing the third step value Δ I3 of a unit for charging current ICHG:
ICHG=ICHG+ΔI3;
Third judging unit 370, for judging whether charger output voltage VCHG is pulled low, if YES then executing third
Otherwise probe unit 380 executes third adding unit 360;
Third probe unit 380, for charging current ICHG=ICHG- Δ I3 to be arranged, to obtain optimal charge electric current
End value ICHGf, the ICHGf=ICHG.
In the method for technical detail in front about above-mentioned modular unit, it has been described in detail, so it will not be repeated.
Those of ordinary skill in the art will appreciate that all or part of the process in above-described embodiment method, is that can pass through
Computer program instructs relevant hardware to complete, and the computer program can be stored in a computer-readable storage medium
In, program is when being executed, it may include the process of the embodiment of above-mentioned each method.Storage medium therein can for magnetic disk, CD,
Read-only memory (ROM) or random access memory (RAM) etc..
In conclusion the present invention obtains the end value of optimal charge electric current by repeatedly reducing step value, compared to existing
Have in technology, charging current setting method of the invention not only shortens detection time, improves service efficiency, while passing through contracting
Small step value further improves setting accuracy rate, and the optimal charge electric current made more matches the fan-out capability of charger.
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can
With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention
Protect range.