CN106329628A - Charging method and device - Google Patents
Charging method and device Download PDFInfo
- Publication number
- CN106329628A CN106329628A CN201610797126.5A CN201610797126A CN106329628A CN 106329628 A CN106329628 A CN 106329628A CN 201610797126 A CN201610797126 A CN 201610797126A CN 106329628 A CN106329628 A CN 106329628A
- Authority
- CN
- China
- Prior art keywords
- type
- voltage
- charging
- port
- charger
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J7/00—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
- H02J7/0029—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits
- H02J7/0036—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits using connection detecting circuits
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J7/00—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
- H02J7/007—Regulation of charging or discharging current or voltage
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02E—REDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
- Y02E60/00—Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
- Y02E60/10—Energy storage using batteries
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Charge And Discharge Circuits For Batteries Or The Like (AREA)
Abstract
The embodiment of the invention discloses a charging method and device. The charging method comprises the steps of acquiring the port type of a charger, and judging whether the port type is a dedicated charging port (DCP) type or not; if the port type is the DCP type, acquiring a charging protocol; when the charging protocol comprises a pump express plus 2.0 (PE+ 2.0), adopting a charging scheme corresponding to the PE+ 2.0 to perform charging; when the charging protocol comprises a Qualcomm quick charge 3.0 (QC 3.0), adopting a charging scheme corresponding to the QC 3.0 or a charging scheme corresponding to a Qualcomm quick charge 2.0 (QC 2.0) to perform charging; when the charging protocol comprises the Qualcomm quick charge 2.0 (QC 2.0), adopting a charging scheme corresponding to the QC 2.0 to perform charging. By adopting the charging method and device disclosed by the embodiment of the invention, charging is performed through detecting the port type of the charger and the corresponding charging protocol and adopting a charging mode corresponding to the protocol, and thus the charging efficiency is improved.
Description
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of charging method and device.
Background technology
Along with the development of mobile terminal technology, the function of the mobile terminal such as mobile phone, panel computer gets more and more, the most gradually becomes
For a requisite part in people's work and life.
But, along with increasing of mobile terminal function, its power consumption is also with increase, it usually needs use charger to it
It is charged.In existing charging technique, after mobile terminal accesses charger, the charger mobile terminal to being accessed is all
Use fixing charging modes to be charged, such as constant-voltage charge, so will extend the mobile terminal bigger to battery capacity
Charging duration, thus reduce the charge efficiency of mobile terminal.
Summary of the invention
Embodiment of the present invention technical problem to be solved is, it is provided that a kind of charging method and device, is filled by detection
The port type of electrical equipment and the charge protocol of correspondence, and use the fast charge mode corresponding with agreement to be charged, thus improve
Charge efficiency.
In order to solve above-mentioned technical problem, embodiments providing a kind of charging method, described method includes:
Obtain the port type of charger, it is judged that whether described port type is special charging port DCP type;
When described port type is described DCP type, obtain charge protocol;
When described charge protocol includes that connection fills agreement PE+2.0 soon, charging scheme corresponding for described PE+2.0 is used to enter
Row charging;
When described charge protocol includes that high pass fills agreement QC3.0 soon, use charging scheme corresponding for described QC3.0 or
Charging scheme corresponding for QC2.0 is charged;
When described charge protocol includes that high pass fills agreement QC2.0 soon, charging scheme corresponding for described QC2.0 is used to carry out
Charging.
Correspondingly, the embodiment of the present invention additionally provides a kind of charging device, and described device includes:
Type judging module, for obtaining the port type of charger, it is judged that whether described port type is DCP type;
Agreement acquisition module, for when described port type is described DCP type, obtains charge protocol;
Charging module, for when described charge protocol includes PE+2.0, uses charging scheme corresponding for described PE+2.0
It is charged;
Described charging module, is additionally operable to, when described charge protocol includes QC3.0, use charging corresponding for described QC3.0
Scheme or charging scheme corresponding to QC2.0 are charged;
Described charging module, is additionally operable to, when described charge protocol includes QC2.0, use charging corresponding for described QC2.0
Scheme is charged.
In embodiments of the present invention, first obtain the port type of charger, and judge whether this port type is special
Charging port DCP type, obtains included charge protocol: connection fills agreement PE+2.0 soon and/or high pass fills association soon the most again
View QC3.0 and/or high pass fill agreement QC2.0 soon, then use charging scheme corresponding for PE+2.0 or QC3.0 or QC2.0 to carry out
Charging.By port type and the charge protocol of correspondence of detection charger, and the fast charge mode corresponding with agreement is used to carry out
Charging, thus improve charge efficiency, additionally, also add the mobile terminal compatibility to different quick chargers (adapter)
Property, by arranging in pairs or groups, different chargers can realize the quick charge to mobile terminal.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to
Other accompanying drawing is obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of a kind of charging method in the embodiment of the present invention;
Fig. 2 is the structural representation of a kind of charging device in the embodiment of the present invention;
Fig. 3 is the structural representation of the type judging module of charging device in the embodiment of the present invention;
Fig. 4 is the structural representation of the type judging module of charging device in another embodiment of the present invention;
Fig. 5 is the structural representation of the type judging module of charging device in another embodiment of the present invention;
Fig. 6 is the Organization Chart of a kind of computer system performing above-mentioned charging method in the embodiment of the present invention.
Detailed description of the invention
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
Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under not making creative work premise
Embodiment, broadly falls into the scope of protection of the invention.
Term in description and claims of this specification and above-mentioned accompanying drawing " include " and " having " and they appoint
What deformation, it is intended that cover non-exclusive comprising.Such as contain series of steps or the process of unit, method, system, product
Product or equipment are not limited to step or the unit listed, but the most also include step or the unit do not listed, or
The most also include other steps intrinsic for these processes, method, product or equipment or unit.
The execution of the charging method mentioned in the embodiment of the present invention depends on computer program, can run on Feng Ruoyiman body
On the computer system of system.This computer program can run based on charging device.This charging device can be PC, put down
The mobile terminal devices such as plate computer, notebook computer, smart mobile phone, Intelligent worn device.
It is described in detail individually below.
Fig. 1 is the schematic flow sheet of a kind of charging method in the embodiment of the present invention, and the most described method at least includes:
Step S101, obtains the port type of charger, it is judged that whether described port type is special charging port DCP class
Type.
Concrete, the charging device such as equipment general serial by charger such as mobile phone, panel computer or PC
Bus (Universal Serial Bus, USB) port is attached with charger, and upon connection, detection charger is at USB
Port type under battery charging specifications (USB Charging 1.2, BC1.2) specification, and judge that the port type detected is
No for standard down port (Service Design Package, SDP) type or charging downlink port (Charging
Downstream Port, CDP) type.Wherein, BC1.2 specification determines how each port should be enumerated to terminal unit, with
And identify the agreement of port type.
It addition, the port type of USB BC1.2 specification is as shown in table 1, including SDP, CDP, charging downlink port
(Dedicated Charging Port, DCP) and other port type.
Judge whether described port type is special charging port DCP type, including:
Obtain first voltage of the positive signal D+ of differential lines and second voltage of the negative signal D-of described differential lines;
When described first voltage is more than the second voltage threshold more than the first voltage threshold and described second voltage, connect institute
State pull-up power supply and the draw power of described D+ of D-, obtain the level of described D+;
If the level of described D+ is high level, it is determined that described port type is DCP type.
Table 1
In being embodied as, when charging device is connected to DCP type charger, first believe because of (Data+, the D+) of charger
Number level is higher than the D+ signal comparative level of charger, and the D+ of DCP type charging is short-circuit with (Data-, D-) signal, therefore
D-signal is driven high and is higher than the decision level of D-signal, and now the port type of charger is identified as DCP type or CDP class
Type;Then opening the pull-up power supply of charging device D-signal, i.e. maintaining D-signal is high level, disconnects the pull-up electricity of D+ signal
Source, opens the draw power of D+ signal simultaneously, and now D+ signal will become high level, i.e. when detecting that charging device D+ signal is
During high level, determine that the port of this charger is DCP type.
Wherein, the port of described special charging port (DCP) type does not support that any data are transmitted, but can provide 1.5A
Above electric current, is therefore usually used in supporting charger and onboard charger on the wall of relatively high charge ability, it is not necessary to enumerate.
In the present embodiment, the D+ voltage in charging device and D-voltage after charging device acquisition connection charger, and point
Do not compare with corresponding predetermined threshold value, when comparative result is both greater than corresponding predetermined threshold value, obtains and connecting D-'s
The level of D+ under the conditions of the draw power of pull-up power supply and connection D+, and when the level of this D+ is high level, determine described end
Mouth type is DCP type.
Optionally, described judge whether described port type is special charging port DCP type after, also include:
When described port type is not described DCP type, it is judged that whether described port type is standard down port SDP
Type or charging downlink port CDP type;
When described port type is described SDP type, the first predetermined current threshold is used to be charged;
When described port type is described CDP type, the second predetermined current threshold is used to be charged;
Described port type be not described SDP type and not for described CDP type time, use the 3rd predetermined current threshold
It is charged.
Concrete, when described port type is described SDP type, use the first predetermined current threshold to be charged.Right
In SDP type port charger, it is 2.5mA that the cut-off current of its correspondence is respectively when hanging up, and is 100mA, connects and join during connection
Being set to during higher-wattage is 500mA, and described first predetermined current threshold can be 500mA;It is described CDP at described port type
During type, using the second predetermined current threshold to be charged, described second predetermined current threshold can be 900mA;At described end
Mouthful type be described SDP type and during not for described CDP type, and employing the 3rd predetermined current threshold is charged, described the
Two predetermined current threshold can be 500mA.
Wherein, it is judged that whether described port type is standard down port SDP type, including:
Obtain the tertiary voltage of the positive signal D+ of differential lines and the 4th voltage of the negative signal D-of described differential lines, institute
State tertiary voltage and described 4th voltage is to connect the voltage before described charger;
Obtain the 5th voltage of the positive signal D+ of differential lines and the 6th voltage of the negative signal D-of described differential lines, institute
State the 5th voltage and described 6th voltage is to connect the voltage after described charger;
When described tertiary voltage is more than described six voltage more than described 5th voltage and described 4th voltage, determine institute
Stating port type is described SDP type.
In being embodied as, due on the positive signal line D+ and negative signal line D-line of the such port of SDP all
Having 15k Ω pull down resistor, therefore when charging device is connected to SDP type charger, the D+ voltage of charging device is electrically charged device
The pull down resistor of internal D+ signal drags down, and the D-voltage of charging device is also electrically charged the pull down resistor of the internal D-signal of device and drags down,
I.e. detect when the D+ voltage within charging device and D-voltage all become after receiving charger when charging device (access device)
Time low, determine that the port of this charger is SDP type.
In the present embodiment, obtain respectively connect charging device before charger D+ and D-voltage and connect charger it
D+ and the D-voltage of rear charging device, compares D+ voltage before and after connection with D-voltage, it is judged that the D before connection the most respectively
+ voltage and D-voltage the most all diminish.
Wherein, it is judged that whether described port type is charging downlink port CDP type, including:
Obtain the 7th voltage of the positive signal D+ of differential lines and the 8th voltage of the negative signal D-of described differential lines;
When described 7th voltage is more than four voltage thresholds more than tertiary voltage threshold value and described 8th voltage, connect institute
State pull-up power supply and the draw power of described D+ of D-, obtain the level of described D+;
If the level of described D+ is low level, it is determined that described port type is CDP type.
In being embodied as, when charging device is connected to CDP type charger, first high because of the D+ signal level of charger
In the D+ signal comparative level of charger, now CDP equipment turns on the power, and D-signal is driven high and electric higher than the judgement of D-signal
Flat, now the port type of charger is identified as CDP type or DCP type;Then the pull-up of charging device D-signal is opened
Power supply, i.e. maintaining D-signal is high level, disconnects the pull-up power supply of D+ signal, opens the draw power of D+ signal, now D simultaneously
+ signal will become low level, i.e. when detecting that charging device D+ signal is low level, determine that the port of this charger is CDP
Type.
Wherein, the port of described charging downlink port (CDP) type had both supported large current charge, also supported completely compatible
The data transmission of USB 2.0, and port has D+ with D-and communicate necessary 15k Ω pull down resistor, it may have charger detection
The internal circuit of stage switching.
In the present embodiment, the D+ voltage in charging device and D-voltage after charging device acquisition connection charger, and point
Do not compare with corresponding predetermined threshold value value, when comparative result is both greater than corresponding predetermined threshold value, obtains and connecting D-
Pull-up power supply and the level of D+ under the conditions of connecting the draw power of D+, and be low level at the level of this D+, determine described end
Mouth type is CDP type.
Step S102, when described port type is described DCP type, obtains charge protocol.
Concrete, as shown in table 1, when port type is DCP type, support multiple charge protocol, obtain charging now
Agreement, as connection send out fill agreement (Pump Express Plus 2.0, PE+2.0) soon, high pass fills agreement (Quick Charge soon
3.0, QC3.0) and high pass fills agreement (Quick Charge 2.0, QC2.0) soon.
Step S103, when described charge protocol includes that connection fills agreement PE+2.0 soon, uses described PE+2.0 corresponding
Charging scheme is charged.
Concrete, a kind of fast charge protocol of PE+2.0 Shi Lianfa company, the charging scheme that PE+2.0 is corresponding charges
The output voltage values of device is that 3.6V, 3.8V, 4.0V, 4.2V, 4.4V, 4.6V, 4.8V, 5.0V, 7V, 9V, 12V self adaptation is adjustable,
To ensure that, when charging, voltage floats and makes charging device be difficult to heating.
Step S104, when described charge protocol includes that high pass fills agreement QC3.0 soon, uses corresponding the filling of described QC3.0
Electricity scheme or charging scheme corresponding to QC2.0 are charged.
Concrete, it is a kind of fast charge protocol that high pass fills agreement QC3.0 soon, improves charging voltage, increases charging current,
Being 3.0 to be version number, mainly improve the motility of charging compared with QC2.0, charging rate is faster.
QC2.0/3.0 has Class A and two standards of Class B.Wherein, the QC2.0 of Class A standard supports 5V/
Tri-kinds of voltages of 9V/12V, QC3.0 then supports the fluctuation voltage of 3.6V~12V;The QC2.0 of Class B standard supports 5V/9V/
Tetra-kinds of voltages of 12V/20V, QC3.0 then supports the fluctuation voltage of 3.6V~20V.Owing to not using 20V electricity in smart mobile phone field
Pressure, so the QC2.0/3.0 of the charger of its periphery, portable power source is based on Class A standard.
Further, since agreement is all backward compatible, say, that when supporting QC3.0, also support QC2.0, therefore, when filling
When electricity agreement includes QC3.0, the charging scheme of a kind of correspondence in QC3.0 and QC2.0 can be used to be charged.
Step S105, when described charge protocol includes that high pass fills agreement QC2.0 soon, uses corresponding the filling of described QC2.0
Electricity scheme is charged.
Concrete, it is a kind of fast charge protocol that high pass fills agreement QC2.0 soon, by the chip of protocol controller such as
FP6600 can identify charger type automatically, adjusts the output voltage of charger, and the safety being allowed to obtain charger permission is the highest
Charging voltage, saves the charging interval on the premise of protection charger.
Charging scheme corresponding for QC2.0 is: the charger that QC2.0 fills soon and the charging device holding wire D by USB interface
+ carry out communication, the output voltage of regulation QC2.0 with on-load voltage on D-.Concrete, when by charger (QC2.0 identification chip
FP6600) end is when linking on charging device by data wire, and charger acquiescence allows D+ and D-short circuit, and charging device detects charging
Device type is DCP type.Now output voltage is 5v, and charging device charges normal.If QC2.0 quick charge supported by charging device
Agreement, then the hvdcp process of Android user's space will start, and starts to load the voltage of 0.325V on D+.When this electricity
After pressure maintains 1.25s, charger will be switched off the short circuit of D+ and D-, and the voltage on D-will decline;Charging device detects on D-
Voltage decline after, the value of hvdcp reading/sys/class/power_supply/usb/voltage_max, if
9000000 (mV), arranging the voltage on D+ is 3.3V, and the voltage on D-is 0.6V, charger output 9v voltage.If
5000000 (mV) arrange D+ be 0.6V, D-be 0V, charger output 5V voltage.
Optionally, described method also includes:
Fill agreement PE+2.0 soon and time high pass fills agreement QC2.0 soon when described charge protocol includes that connection is sent out, obtain institute respectively
State the priority level attribute of PE+2.0 and the priority level attribute of described QC2.0;
Described PE+2.0 and described QC2.0 medium priority other attribute preferably charge protocol is used to be charged;
Wherein, at least one during described priority level attribute includes priority, detection duration or detection ordering.
Concrete, priority be computer time sharing system when processing multiple operation routine, determine each operation journey
Sequence accepts the parameter of the priority level of system resource, if the biggest priority level of the parameter of priority level is high, then with QC2.0 and PE+
Charging scheme corresponding to agreement that the parameter of the priority level in 2.0 is bigger is charged;If detection time short priority level is high,
Then it is charged with the charging scheme that the agreement that the detection time in QC2.0 with PE+2.0 is shorter is corresponding;If detection ordering is preferential
Priority level high, then be charged with the charging scheme that the agreement first detected in QC2.0 with PE+2.0 is corresponding.
In embodiments of the present invention, first obtain the port type of charger, and judge whether this port type is special
Charging port DCP type, obtains included charge protocol: connection fills agreement PE+2.0 soon and/or high pass fills association soon the most again
View QC3.0 and/or high pass fill agreement QC2.0 soon, then use charging scheme corresponding for PE+2.0 or QC3.0 or QC2.0 to carry out
Charging.By port type and the charge protocol of correspondence of detection charger, and the fast charge mode corresponding with agreement is used to carry out
Charging, thus improve charge efficiency, additionally, also add the mobile terminal compatibility to different quick chargers (adapter)
Property, by arranging in pairs or groups, different chargers can realize the quick charge to mobile terminal.
Fig. 2 is the composition structural representation of a kind of charging device that the embodiment of the present invention provides, the most described device
Including:
Type judging module 210, for obtaining the port type of charger, it is judged that whether described port type is DCP class
Type.
Concrete, charging device such as the equipment such as mobile phone, panel computer or PC by the USB port of charger and
Charger is attached, and upon connection, detects charger port type under USB BC1.2 specification, and judge to detect
Port type be whether standard down port SDP type or charging downlink port CDP type.Wherein, BC1.2 specification determines
How each port should be enumerated to terminal unit, and identifies the agreement of port type.
It addition, the port type of USB BC1.2 specification is as shown in table 1, including SDP, CDP, DCP and other port class
Type.
Concrete, as it is shown on figure 3, described type judging module 210 judges whether described port type is DCP type, bag
Include:
First voltage acquisition unit 211, for obtaining first voltage of the positive signal D+ of differential lines and described differential lines
Second voltage of negative signal D-;
First level acquiring unit 212, for being more than the first voltage threshold and described second voltage at described first voltage
During more than the second voltage threshold, connect pull-up power supply and the draw power of described D+ of described D-, obtain the level of described D+;
First port determines unit 213, for when the level of described D+ is high level, determines that described port type is
DCP type.
In being embodied as, when charging device is connected to DCP type charger, first high because of the D+ signal level of charger
In the D+ signal comparative level of charger, and D+ Yu the D-signal of DCP type charging is short-circuit, and therefore D-signal is driven high and high
In the decision level of D-signal, now the port type of charger is identified as DCP type or CDP type;Then charging is opened
The pull-up power supply of device D-signal, i.e. maintaining D-signal is high level, disconnects the pull-up power supply of D+ signal, opens D+ signal simultaneously
Draw power, now D+ signal will become high level, i.e. when detecting that charging device D+ signal is high level, determine that this fills
The port of electrical equipment is DCP type.
Wherein, the port of described special charging port (DCP) type does not support that any data are transmitted, but can provide 1.5A
Above electric current, is therefore usually used in supporting charger and onboard charger on the wall of relatively high charge ability, it is not necessary to enumerate.
In the present embodiment, the D+ voltage in charging device and D-voltage after charging device acquisition connection charger, and point
Do not compare with corresponding predetermined threshold value, when comparative result is both greater than corresponding predetermined threshold value, obtains and connecting D-'s
The level of D+ under the conditions of the draw power of pull-up power supply and connection D+, and when the level of this D+ is high level, determine described end
Mouth type is DCP type.
Agreement acquisition module 220, for when described port type is described DCP type, obtains charge protocol.
Concrete, as shown in table 1, when port type is DCP type, support multiple charge protocol, obtain charging now
Agreement, fills agreement PE+2.0, high pass soon fill agreement QC3.0 soon and high pass fills agreement QC2.0 soon as connection is sent out.
Charging module 230, for when described charge protocol includes PE+2.0, uses described charging side corresponding for PE+2.0
Case is charged.
Concrete, a kind of fast charge protocol of PE+2.0 Shi Lianfa company, the charging scheme that PE+2.0 is corresponding charges
The output voltage values of device is that 3.6V, 3.8V, 4.0V, 4.2V, 4.4V, 4.6V, 4.8V, 5.0V, 7V, 9V, 12V self adaptation is adjustable,
To ensure that, when charging, voltage floats and makes charging device be difficult to heating.
Described charging module, is additionally operable to, when described charge protocol includes QC3.0, use charging corresponding for described QC3.0
Scheme or charging scheme corresponding to QC2.0 are charged.
Concrete, it is a kind of fast charge protocol that high pass fills agreement QC3.0 soon, improves charging voltage, increases charging current,
Being 3.0 to be version number, mainly improve the motility of charging compared with QC2.0, charging rate is faster.
QC2.0/3.0 has Class A and two standards of Class B.Wherein, the QC2.0 of Class A standard supports 5V/
Tri-kinds of voltages of 9V/12V, QC3.0 then supports the fluctuation voltage of 3.6V~12V;The QC2.0 of Class B standard supports 5V/9V/
Tetra-kinds of voltages of 12V/20V, QC3.0 then supports the fluctuation voltage of 3.6V~20V.Owing to not using 20V electricity in smart mobile phone field
Pressure, so the QC2.0/3.0 of the charger of its periphery, portable power source is based on Class A standard.
Further, since agreement is all backward compatible, say, that when supporting QC3.0, also support QC2.0, therefore, when filling
When electricity agreement includes QC3.0, the charging scheme of a kind of correspondence in QC3.0 and QC2.0 can be used to be charged.
Described charging module 230, is additionally operable to, when described charge protocol includes QC2.0, use corresponding the filling of described QC2.0
Electricity scheme is charged.
Concrete, it is a kind of fast charge protocol that high pass fills agreement QC2.0 soon, by the chip of protocol controller such as
FP6600 can identify charger type automatically, adjusts the output voltage of charger, and the safety being allowed to obtain charger permission is the highest
Charging voltage, saves the charging interval on the premise of protection charger.
Charging scheme corresponding for QC2.0 is: the charger that QC2.0 fills soon and the charging device holding wire D by USB interface
+ carry out communication, the output voltage of regulation QC2.0 with on-load voltage on D-.Concrete, when by charger (QC2.0 identification chip
FP6600) end is when linking on charging device by data wire, and charger acquiescence allows D+ and D-short circuit, and charging device detects charging
Device type is DCP type.Now output voltage is 5v, and charging device charges normal.If QC2.0 quick charge supported by charging device
Agreement, then the hvdcp process of Android user's space will start, and starts to load the voltage of 0.325V on D+.When this electricity
After pressure maintains 1.25s, charger will be switched off the short circuit of D+ and D-, and the voltage on D-will decline;Charging device detects on D-
Voltage decline after, the value of hvdcp reading/sys/class/power_supply/usb/voltage_max, if
9000000 (mV), arranging the voltage on D+ is 3.3V, and the voltage on D-is 0.6V, charger output 9v voltage.If
5000000 (mV) arrange D+ be 0.6V, D-be 0V, charger output 5V voltage.
Optionally, described type judging module 210, it is additionally operable to when described port type is not for described DCP type, it is judged that
Whether described port type is SDP type or CDP type;
Described charging module 230, is additionally operable to, when described port type is described SDP type, use the first predetermined current
Threshold value is charged;
Described charging module 230, is additionally operable to, when described port type is described CDP type, use the second predetermined current
Threshold value is charged;
Described charging module 230, being additionally operable at described port type not for described SDP type and is not described CDP type
Time, use the 3rd predetermined current threshold to be charged.
Concrete, when described port type is described SDP type, use the first predetermined current threshold to be charged.Right
In SDP type port charger, it is 2.5mA that the cut-off current of its correspondence is respectively when hanging up, and is 100mA, connects and join during connection
Being set to during higher-wattage is 500mA, and described first predetermined current threshold can be 500mA;It is described CDP at described port type
During type, using the second predetermined current threshold to be charged, described second predetermined current threshold can be 900mA;At described end
Mouthful type be described SDP type and during not for described CDP type, and employing the 3rd predetermined current threshold is charged, described the
Two predetermined current threshold can be 500mA.
Concrete, as shown in Figure 4, described type judging module 210 judges whether described port type is SDP type, bag
Include:
Second voltage acquisition unit 214, for obtaining the tertiary voltage of the positive signal D+ of differential lines and described differential lines
The 4th voltage of negative signal D-, described tertiary voltage and described 4th voltage are to connect the voltage before described charger;
Described second voltage acquisition unit 214, is additionally operable to obtain the 5th voltage of positive signal D+ of differential lines and described
6th voltage of the negative signal D-of differential lines, after described 5th voltage and described 6th voltage are the described charger of connection
Voltage;
Second port determines unit 215, for being more than described 5th voltage and described 4th voltage at described tertiary voltage
During more than described six voltage, determine that described port type is described SDP type.
In being embodied as, due on the positive signal line D+ and negative signal line D-line of the such port of SDP all
Having 15k Ω pull down resistor, therefore when charging device is connected to SDP type charger, the D+ voltage of charging device is electrically charged device
The pull down resistor of internal D+ signal drags down, and the D-voltage of charging device is also electrically charged the pull down resistor of the internal D-signal of device and drags down,
I.e. detect when the D+ voltage within charging device and D-voltage all become after receiving charger when charging device (access device)
Time low, determine that the port of this charger is SDP type.
In the present embodiment, obtain respectively connect charging device before charger D+ and D-voltage and connect charger it
D+ and the D-voltage of rear charging device, compares D+ voltage before and after connection with D-voltage, it is judged that the D before connection the most respectively
+ voltage and D-voltage the most all diminish.
Concrete, as it is shown in figure 5, described type judging module 210 judges whether described port type is CDP type, bag
Include:
Tertiary voltage acquiring unit 216, for obtaining the 7th voltage of the positive signal D+ of differential lines and described differential lines
The 8th voltage of negative signal D-;
Second electrical level acquiring unit 217, is additionally operable at described 7th voltage more than tertiary voltage threshold value and described 8th electricity
When pressure is more than four voltage thresholds, connects pull-up power supply and the draw power of described D+ of described D-, obtain the level of described D+;
3rd port determines unit 218, for when the level of described D+ is low level, determines that described port type is
CDP type.
In being embodied as, when charging device is connected to CDP type charger, first high because of the D+ signal level of charger
In the D+ signal comparative level of charger, now CDP equipment turns on the power, and D-signal is driven high and electric higher than the judgement of D-signal
Flat, now the port type of charger is identified as CDP type or DCP type;Then the pull-up of charging device D-signal is opened
Power supply, i.e. maintaining D-signal is high level, disconnects the pull-up power supply of D+ signal, opens the draw power of D+ signal, now D simultaneously
+ signal will become low level, i.e. when detecting that charging device D+ signal is low level, determine that the port of this charger is CDP
Type.
Wherein, the port of described charging downlink port (CDP) type had both supported large current charge, also supported completely compatible
The data transmission of USB 2.0, and port has D+ with D-and communicate necessary 15k Ω pull down resistor, it may have charger detection
The internal circuit of stage switching.
In the present embodiment, the D+ voltage in charging device and D-voltage after charging device acquisition connection charger, and point
Do not compare with corresponding predetermined threshold value, when comparative result is both greater than corresponding predetermined threshold value, obtains and connecting D-'s
Pull-up power supply and the level of D+ under the conditions of connecting the draw power of D+, and be low level at the level of this D+, determine described port
Type is CDP type.
Optionally, as in figure 2 it is shown, described device also includes:
Attribute acquisition module 240, for when described charge protocol includes PE+2.0, QC3.0 and QC2.0, obtains respectively
The priority level taking the priority level attribute of described PE+2.0, the priority level attribute of described QC3.0 and described QC2.0 belongs to
Property;
Described charging module 230, is additionally operable to use described PE+2.0, described QC3.0 and described QC2.0 medium priority other
Attribute preferably charge protocol is charged;
Wherein, at least one during described priority level attribute includes priority, detection duration or detection ordering.
Concrete, priority be computer time sharing system when processing multiple operation routine, determine each operation journey
Sequence accepts the parameter of the priority level of system resource, if the biggest priority level of the parameter of priority level is high, then with QC3.0, QC2.0
The charging scheme that the agreement bigger with the parameter of the priority level in PE+2.0 is corresponding is charged;If detection time short priority
The highest, then it is charged with the charging scheme that the agreement that QC3.0, QC2.0 are shorter with the detection time in PE+2.0 is corresponding;If inspection
The survey the most preferential priority level of order is high, then with charging scheme that the agreement first detected in QC3.0, QC2.0 and PE+2.0 is corresponding
It is charged.
In embodiments of the present invention, first obtain the port type of charger, and judge whether this port type is special
Charging port DCP type, obtains included charge protocol: connection fills agreement PE+2.0 soon and/or high pass fills association soon the most again
View QC3.0 and/or high pass fill agreement QC2.0 soon, then use charging scheme corresponding for PE+2.0 or QC3.0 or QC2.0 to carry out
Charging.By port type and the charge protocol of correspondence of detection charger, and the fast charge mode corresponding with agreement is used to carry out
Charging, thus improve charge efficiency, additionally, also add the mobile terminal compatibility to different quick chargers (adapter)
Property, by arranging in pairs or groups, different chargers can realize the quick charge to mobile terminal.
Fig. 6 illustrates a kind of computer system based on von Neumann system 10 running above-mentioned charging method.This calculating
Machine system 10 can be smart mobile phone, panel computer, palm PC, the subscriber terminal equipment such as notebook computer or PC.
Concrete, it may include the outer input interface 1001, processor 1002, memorizer 1003 and the output that are connected by system bus are connect
Mouth 1004.Wherein, outer input interface 1001 can include touch screen 10016, optionally can also include network interface 10018.
Memorizer 1003 can include external memory 10032 (such as hard disk, CD or floppy disk etc.) and built-in storage 10034.Output interface
1004 can include the equipment such as display screen 10042 and sound equipment/loudspeaker 10044.
In the present embodiment, the operation of this method is stored in based on computer program, the program file of this computer program
In the external memory 10032 of aforementioned computer system based on von Neumann system 10, operationally it is loaded into built-in storage
In 10034, it is transferred to after being then compiled as machine code in processor 1002 perform, so that based on von Neumann system
Computer system 10 in form type judging module 210 in logic, agreement acquisition module 220, charging module 230 and attribute
Acquisition module 240, and during above-mentioned charging method performs, the parameter of input is all received by outer input interface 1001,
And it is transferred in memorizer 1003 caching, it is then input in processor 1002 process, the result data of process or caching
Subsequently process in memorizer 1003, or be passed to output interface 1004 and export.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, be permissible
Instructing relevant hardware by computer program to complete, described program can be stored in a computer read/write memory medium
In, this program is upon execution, it may include such as the flow process of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic
Dish, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access
Memory, RAM) etc..
The above disclosed present pre-ferred embodiments that is only, can not limit the right model of the present invention with this certainly
Enclose, the equivalent variations therefore made according to the claims in the present invention, still belong to the scope that the present invention is contained.
Claims (12)
1. a charging method, it is characterised in that including:
Obtain the port type of charger, it is judged that whether described port type is special charging port DCP type;
When described port type is described DCP type, obtain charge protocol;
When described charge protocol includes that connection fills agreement PE+2.0 soon, charging scheme corresponding for described PE+2.0 is used to fill
Electricity;
When described charge protocol includes that high pass fills agreement QC3.0 soon, use charging scheme corresponding for described QC3.0 or
Charging scheme corresponding for QC2.0 is charged;
When described charge protocol includes that high pass fills agreement QC2.0 soon, charging scheme corresponding for described QC2.0 is used to fill
Electricity.
2. the method for claim 1, it is characterised in that described judge whether described port type is special charging port
After DCP type, also include:
When described port type is not described DCP type, it is judged that whether described port type is standard down port SDP type
Or charging downlink port CDP type;
When described port type is described SDP type, the first predetermined current threshold is used to be charged;
When described port type is described CDP type, the second predetermined current threshold is used to be charged;
Described port type be not described SDP type and not for described CDP type time, use the 3rd predetermined current threshold carry out
Charging.
3. the method for claim 1, it is characterised in that described judge whether described port type is special charging port
DCP type, including:
Obtain first voltage of the positive signal D+ of differential lines and second voltage of the negative signal D-of described differential lines;
When described first voltage is more than the second voltage threshold more than the first voltage threshold and described second voltage, connect described D-
Pull-up power supply and the draw power of described D+, obtain the level of described D+;
If the level of described D+ is high level, it is determined that described port type is DCP type.
4. method as claimed in claim 2, it is characterised in that described judge whether described port type is standard down port
SDP type, including:
Obtain the tertiary voltage of positive signal D+ of differential lines and the 4th voltage of the negative signal D-of described differential lines, described the
Three voltages and described 4th voltage are to connect the voltage before described charger;
Obtain the 5th voltage of positive signal D+ of differential lines and the 6th voltage of the negative signal D-of described differential lines, described the
Five voltages and described 6th voltage are to connect the voltage after described charger;
When described tertiary voltage is more than described six voltage more than described 5th voltage and described 4th voltage, determine described end
Mouth type is described SDP type.
5. method as claimed in claim 2, it is characterised in that described judge whether described port type is charging downlink port
CDP type, including:
Obtain the 7th voltage of the positive signal D+ of differential lines and the 8th voltage of the negative signal D-of described differential lines;
When described 7th voltage is more than four voltage thresholds more than tertiary voltage threshold value and described 8th voltage, connect described D-
Pull-up power supply and the draw power of described D+, obtain the level of described D+;
If the level of described D+ is low level, it is determined that described port type is CDP type.
6. the method for claim 1, it is characterised in that described method also includes:
Fill agreement PE+2.0, high pass soon fill agreement QC3.0 soon and high pass fills agreement soon when described charge protocol includes that connection is sent out
During QC2.0, obtain the priority level attribute of described PE+2.0, the priority level attribute of described QC3.0 and described QC2.0 respectively
Priority level attribute;
Described PE+2.0, described QC3.0 and described QC2.0 medium priority other attribute preferably charge protocol is used to fill
Electricity;
Wherein, at least one during described priority level attribute includes priority, detection duration or detection ordering.
7. a charging device, it is characterised in that including:
Type judging module, for obtaining the port type of charger, it is judged that whether described port type is DCP type;
Agreement acquisition module, for when described port type is described DCP type, obtains charge protocol;
Charging module, for when described charge protocol includes PE+2.0, uses charging scheme corresponding for described PE+2.0 to carry out
Charging;
Described charging module, is additionally operable to, when described charge protocol includes QC3.0, use charging scheme corresponding for described QC3.0
Or charging scheme corresponding for QC2.0 is charged;
Described charging module, is additionally operable to, when described charge protocol includes QC2.0, use charging scheme corresponding for described QC2.0
It is charged.
8. device as claimed in claim 7, it is characterised in that described device includes:
Described type judging module, is additionally operable to when described port type is not for described DCP type, it is judged that described port type is
No for SDP type or CDP type;
Described charging module, is additionally operable to, when described port type is described SDP type, use the first predetermined current threshold to carry out
Charging;
Described charging module, is additionally operable to, when described port type is described CDP type, use the second predetermined current threshold to carry out
Charging;
Described charging module, be additionally operable to described port type for described SDP type and not for described CDP type time, use
3rd predetermined current threshold is charged.
9. device as claimed in claim 7, it is characterised in that described type judging module judges that whether described port type is
DCP type, including:
First voltage acquisition unit, the negative pole letter of the first voltage and described differential lines for obtaining the positive signal D+ of differential lines
Second voltage of number D-;
First level acquiring unit, for being more than second at described first voltage more than the first voltage threshold and described second voltage
During voltage threshold, connect pull-up power supply and the draw power of described D+ of described D-, obtain the level of described D+;
First port determines unit, for when the level of described D+ is high level, determines that described port type is DCP type.
10. device as claimed in claim 8, it is characterised in that whether described type judging module judges described port type
For SDP type, including:
Second voltage acquisition unit, the negative pole letter of tertiary voltage and described differential lines for obtaining the positive signal D+ of differential lines
4th voltage of number D-, described tertiary voltage and described 4th voltage are to connect the voltage before described charger;
Described second voltage acquisition unit, is additionally operable to obtain the 5th voltage of positive signal D+ of differential lines and described differential lines
6th voltage of negative signal D-, described 5th voltage and described 6th voltage are to connect the voltage after described charger;
Second port determines unit, for being more than described at described tertiary voltage more than described 5th voltage and described 4th voltage
During six voltage, determine that described port type is described SDP type.
11. devices as claimed in claim 8, it is characterised in that whether described type judging module judges described port type
For CDP type, including:
Tertiary voltage acquiring unit, the negative pole letter of the 7th voltage and described differential lines for obtaining the positive signal D+ of differential lines
8th voltage of number D-;
Second electrical level acquiring unit, is additionally operable at described 7th voltage more than tertiary voltage threshold value and described 8th voltage more than the
During four voltage thresholds, connect pull-up power supply and the draw power of described D+ of described D-, obtain the level of described D+;
3rd port determines unit, for when the level of described D+ is low level, determines that described port type is CDP type.
12. devices as claimed in claim 7, it is characterised in that described device also includes:
Attribute acquisition module, for when described charge protocol includes PE+2.0, QC3.0 and QC2.0, obtains described PE respectively
The priority level attribute of+2.0, the priority level attribute of described QC3.0 and the priority level attribute of described QC2.0;
Described charging module, is additionally operable to use described PE+2.0, described QC3.0 and the other attribute of described QC2.0 medium priority relatively
Excellent charge protocol is charged;
Wherein, at least one during described priority level attribute includes priority, detection duration or detection ordering.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610797126.5A CN106329628B (en) | 2016-08-31 | 2016-08-31 | A kind of charging method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610797126.5A CN106329628B (en) | 2016-08-31 | 2016-08-31 | A kind of charging method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106329628A true CN106329628A (en) | 2017-01-11 |
CN106329628B CN106329628B (en) | 2019-06-11 |
Family
ID=57787736
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610797126.5A Active CN106329628B (en) | 2016-08-31 | 2016-08-31 | A kind of charging method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106329628B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108491342A (en) * | 2018-02-08 | 2018-09-04 | 青岛海信移动通信技术股份有限公司 | A kind of method and terminal carrying out access switching |
CN112803558A (en) * | 2021-04-09 | 2021-05-14 | 深圳英集芯科技股份有限公司 | Multi-quick-charging-protocol control circuit, control method, chip and electronic equipment |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102025173A (en) * | 2009-09-10 | 2011-04-20 | 美国博通公司 | Method and system for distinguishing between charging ports |
CN102156524A (en) * | 2011-02-11 | 2011-08-17 | 威盛电子股份有限公司 | Adaptive universal serial bus charging method and system |
CN102684270A (en) * | 2012-05-31 | 2012-09-19 | 华为技术有限公司 | Method for identifying type of universal serial bus (USB) chargers and USB device |
CN103106167A (en) * | 2013-01-22 | 2013-05-15 | 矽力杰半导体技术(杭州)有限公司 | Universal Serial Bus (USB) equipment and control method thereof |
US20140223200A1 (en) * | 2013-02-01 | 2014-08-07 | Broadcom Corporation | Charger detection and optimization prior to host control |
CN103986217A (en) * | 2014-05-30 | 2014-08-13 | 深圳市中兴移动通信有限公司 | Charger outputting different voltages in self-adaptation mode and implementation method thereof |
CN104756350A (en) * | 2012-10-29 | 2015-07-01 | 高通股份有限公司 | High voltage dedicated charging port |
CN105723297A (en) * | 2013-11-18 | 2016-06-29 | 高通股份有限公司 | Devices and methods for facilitating usb charger detection |
CN105896679A (en) * | 2016-05-31 | 2016-08-24 | 合肥联宝信息技术有限公司 | Charging control method and electronic equipment employing same |
-
2016
- 2016-08-31 CN CN201610797126.5A patent/CN106329628B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102025173A (en) * | 2009-09-10 | 2011-04-20 | 美国博通公司 | Method and system for distinguishing between charging ports |
CN102156524A (en) * | 2011-02-11 | 2011-08-17 | 威盛电子股份有限公司 | Adaptive universal serial bus charging method and system |
CN102684270A (en) * | 2012-05-31 | 2012-09-19 | 华为技术有限公司 | Method for identifying type of universal serial bus (USB) chargers and USB device |
CN104756350A (en) * | 2012-10-29 | 2015-07-01 | 高通股份有限公司 | High voltage dedicated charging port |
CN103106167A (en) * | 2013-01-22 | 2013-05-15 | 矽力杰半导体技术(杭州)有限公司 | Universal Serial Bus (USB) equipment and control method thereof |
US20140223200A1 (en) * | 2013-02-01 | 2014-08-07 | Broadcom Corporation | Charger detection and optimization prior to host control |
CN105723297A (en) * | 2013-11-18 | 2016-06-29 | 高通股份有限公司 | Devices and methods for facilitating usb charger detection |
CN103986217A (en) * | 2014-05-30 | 2014-08-13 | 深圳市中兴移动通信有限公司 | Charger outputting different voltages in self-adaptation mode and implementation method thereof |
CN105896679A (en) * | 2016-05-31 | 2016-08-24 | 合肥联宝信息技术有限公司 | Charging control method and electronic equipment employing same |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108491342A (en) * | 2018-02-08 | 2018-09-04 | 青岛海信移动通信技术股份有限公司 | A kind of method and terminal carrying out access switching |
CN112803558A (en) * | 2021-04-09 | 2021-05-14 | 深圳英集芯科技股份有限公司 | Multi-quick-charging-protocol control circuit, control method, chip and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN106329628B (en) | 2019-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106329627A (en) | Charging method and device | |
CN106230070A (en) | A kind of charging method and device | |
CN102684270B (en) | Method for identifying type of universal serial bus (USB) chargers and USB device | |
CN106329630A (en) | Charging method and device | |
CN102393837B (en) | USB charger recognition device and method | |
CN103080868B (en) | Charging port | |
CN104756350B (en) | High voltage special charging port | |
JP5388484B2 (en) | Apparatus and method for detecting power supply | |
CN103186483B (en) | Terminal, for its OTG function and the executed in parallel method of charge function | |
CN108988431B (en) | Multi-protocol charging device and multi-protocol charging method | |
CN103208661A (en) | Intelligent terminal and method for carrying out large-current charging | |
CN201813422U (en) | Charging chip and mobile terminal capable of automatically adjusting charging mode | |
CN104617615B (en) | Charging method and electronic equipment | |
CN103427460A (en) | Power supply terminal, charge control method and charge control device | |
CN203722283U (en) | Charging cable and charging system | |
CN103219770A (en) | Mobile terminal with multi-port charging control function | |
CN101783427A (en) | Intelligent charging method and intelligent charging device of terminal | |
CN106356918A (en) | Quick charge recognition method and terminal equipment | |
CN103683384A (en) | Host apparatus and charging method thereof | |
CN206099469U (en) | USB OTG mobile device reading and writing charging device | |
CN106329625A (en) | Charging method and device | |
CN105048018B (en) | The charging method and device of a kind of terminal with data exchanging function | |
KR20110129202A (en) | Computer system and control method thereof | |
CN111327087B (en) | Electronic equipment and charging method thereof | |
CN106329628B (en) | A kind of charging method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |