CN107346905B - Power supply method and device - Google Patents

Power supply method and device Download PDF

Info

Publication number
CN107346905B
CN107346905B CN201610296885.3A CN201610296885A CN107346905B CN 107346905 B CN107346905 B CN 107346905B CN 201610296885 A CN201610296885 A CN 201610296885A CN 107346905 B CN107346905 B CN 107346905B
Authority
CN
China
Prior art keywords
power supply
equipment
power
determining
supply equipment
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.)
Active
Application number
CN201610296885.3A
Other languages
Chinese (zh)
Other versions
CN107346905A (en
Inventor
李阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201610296885.3A priority Critical patent/CN107346905B/en
Priority to PCT/CN2016/102321 priority patent/WO2017190474A1/en
Publication of CN107346905A publication Critical patent/CN107346905A/en
Application granted granted Critical
Publication of CN107346905B publication Critical patent/CN107346905B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0068Battery or charger load switching, e.g. concurrent charging and load supply
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Manufacturing & Machinery (AREA)
  • Chemical & Material Sciences (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Electrochemistry (AREA)
  • General Chemical & Material Sciences (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The invention provides a power supply method and a power supply device, wherein the method comprises the following steps: judging whether a device which supplies power to a first power supply device is the first power supply device; and if the judgment result is yes, controlling the charging input function of the first power supply equipment to be closed and/or controlling the power supply output function of the first power supply equipment to be closed. According to the invention, the problems of battery power consumption, increased system power consumption and potential safety hazard in the related technology are solved, and the effects of avoiding unnecessary power consumption and system power consumption and improving the safety of power supply equipment are achieved.

Description

Power supply method and device
Technical Field
The invention relates to the field of communication, in particular to a power supply method and a power supply device.
Background
In the present mobile terminal, it is more common to add a power bank function, and the power supply standard needs to support the BC1.2 standard, and there are generally three power supply modes: the first is to supply power to the outside in a Standard downlink port (SDP for short), the second is to supply power to the outside in a DCP (Dedicated charge port) mode that does not support charging in a serial manner, and the third is to supply power to the outside in a DCP mode that supports charging in a serial manner.
The first power supply mode is to pull down an id pin of a Universal Serial Bus (USB for short) of the mobile terminal, enumerate the id pin as a USB master device, and then supply power to the slave device in an SDP manner, where the highest power supply is generally 5V/500mA, the current of the power supply is small, and the charging time is long.
The second power supply mode is to supply power to the mobile terminal in a DCP mode, and the power supply mode can support large-current charging of 5V/1A, 5V/2A and the like, but due to some factors inside the terminal, the power supply mode does not support serial charging, namely, the power supply mode cannot supply power to the mobile terminal while charging the mobile terminal, and thus the problem of poor user experience is caused.
The third power supply mode supports both DCP power supply and serial charging, but the problem that a user mistakenly connects a USB power supply port to a USB charging port exists during serial charging, so that not only can the electric quantity of a battery be consumed, the power consumption of a system is increased, but also potential safety hazards exist. In order to solve the problem, no effective solution is provided at present.
Disclosure of Invention
The embodiment of the invention provides a power supply method and a power supply device, which are used for at least solving the problems of battery power consumption, system power consumption increase and potential safety hazard in the related technology.
According to an embodiment of the present invention, there is provided a power supply method including: judging whether equipment for supplying power to first power supply equipment is the first power supply equipment; and if so, controlling the charging input function of the first power supply equipment to be closed and/or controlling the power supply output function of the first power supply equipment to be closed.
Optionally, the determining whether the device that supplies power to the first power supply device is the first power supply device includes: when the power supply mode for supplying power to the first power supply equipment is determined to be a special charging port (DCP), the power supply output function of the first power supply equipment is closed; after a predetermined time, detecting whether the first power supply equipment can still receive power; determining that the equipment which supplies power to the first power supply equipment before the power supply output function of the first power supply equipment is turned off is the first power supply equipment under the condition that the detection result is that the electric energy cannot be received; and/or determining that the equipment for supplying power to the first power supply equipment is not the first power supply equipment under the condition that the detection result is that the electric energy can still be received.
Optionally, the method further includes: determining that a power supply manner of supplying power to the first power supply apparatus is the DCP by: after determining that the device supplying power to the first power supply device is successfully connected, enabling a voltage source of a first voltage value on a data pin D + of a charging input port of the first power supply device and enabling a current source of a first current value on D-; when the voltage on the D-is detected to be the first voltage value, the voltage source and the current source are closed, and the voltage source with the second voltage value and the current source with the second current value are enabled on the D +; and when the voltage on the D + is detected to be the second voltage value, determining that the power supply mode is the DCP.
Optionally, controlling the charging input function of the first power supply device to be turned off includes: and de-enabling the low dropout regulator (LDO) of the first power supply equipment, wherein the LDO is used for connecting a charging input port of the first power supply equipment with a battery.
Optionally, after controlling the charging input function of the first power supply device to be turned off and/or controlling the power supply output function of the first power supply device to be turned off, the method further includes: determining to disconnect the first power supply apparatus from an apparatus that supplies power to the first power supply apparatus; and starting a charging input function and/or a power supply output function of the first power supply equipment.
According to another embodiment of the present invention, there is also provided a power supply apparatus including: the device comprises a judging module, a judging module and a judging module, wherein the judging module is used for judging whether a device for supplying power to first power supply equipment is the first power supply equipment; and the closing module is used for controlling the charging input function of the first power supply equipment to be closed and/or controlling the power supply output function of the first power supply equipment to be closed under the condition that the judgment result of the judgment module is yes.
Optionally, the determining module includes: a shutdown unit, configured to, when it is determined that a power supply manner in which the first power supply device is supplied is a dedicated charging port DCP, shutdown a power supply output function of the first power supply device; the detection unit is used for detecting whether the first power supply equipment can still receive the electric energy after a preset time; a first determining unit, configured to determine, when the detection result is that the power supply output function of the first power supply apparatus cannot be received, that an apparatus that supplies power to the first power supply apparatus before the power supply output function of the first power supply apparatus is turned off is the first power supply apparatus; and/or determining that the equipment for supplying power to the first power supply equipment is not the first power supply equipment under the condition that the detection result is that the electric energy can still be received.
Optionally, the determining module further includes a second determining unit, configured to determine that a power supply manner of supplying power to the first power supply device is the DCP by: after determining that the device powering the first power supply device is successfully connected, enabling a voltage source of a first voltage value on a data pin D + of a charging input port of the first power supply device and a current source of a first current value on D-; when the voltage on the D-is detected to be the first voltage value, the voltage source and the current source are closed, and the voltage source with the second voltage value on the D-and the current source with the second current value on the D + are enabled; and when the voltage on the D + is detected to be the second voltage value, determining that the power supply mode is the DCP.
Optionally, the closing module comprises: and the disabling unit is used for disabling the low dropout regulator (LDO) of the first power supply device, wherein the LDO is used for connecting the charging input port of the first power supply device with a battery.
Optionally, the apparatus further comprises: the determining module is used for determining to disconnect the first power supply device from a device for supplying power to the first power supply device after controlling a charging input function of the first power supply device to be closed and/or controlling a power supply output function of the first power supply device to be closed; and the starting module is used for starting the charging input function and/or the power supply output function of the first power supply equipment.
According to the invention, when the self-charging of the first power supply equipment is detected, the charging input function of the first power supply equipment is controlled to be closed and/or the power supply output function of the first power supply equipment is controlled to be closed, so that the self-charging condition of the first power supply equipment is eliminated, unnecessary electric quantity waste is avoided, the problems of battery electric quantity consumption, system power consumption increase and potential safety hazard in the related technology are solved, and the effects of avoiding unnecessary electric quantity consumption and system power consumption and improving the safety of the power supply equipment are achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention and do not constitute a limitation of the invention. In the drawings:
FIG. 1 is a flow chart of a method of supplying power according to an embodiment of the present invention;
fig. 2 is a block diagram of a configuration of a power supply apparatus according to an embodiment of the present invention;
fig. 3 is a block diagram of the structure of the determination module 22 in the power supply apparatus according to the embodiment of the present invention;
fig. 4 is a block diagram of the structure of the detection unit 32 in the power supply apparatus according to the embodiment of the present invention;
fig. 5 is a block diagram showing the configuration of the shutdown module 24 in the power supply apparatus according to the embodiment of the present invention;
fig. 6 is a block diagram of a preferred structure of a power supply device according to an embodiment of the present invention;
fig. 7 is a block diagram of a charger baby according to an embodiment of the present invention;
fig. 8 is a flowchart of a detection performed when the electrical powered device detects that an electrical powered device is inserted according to an embodiment of the present invention;
fig. 9 is a flowchart of detection performed when the electrical powered device detects that the electrical powered device is unplugged, according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In the present embodiment, a power supply method is provided, and fig. 1 is a flowchart of a power supply method according to an embodiment of the present invention, as shown in fig. 1, the flowchart includes the following steps:
step S102, judging whether equipment for supplying power to first power supply equipment is the first power supply equipment;
and step S104, controlling the charging input function of the first power supply equipment to be closed and/or controlling the power supply output function of the first power supply equipment to be closed under the condition that the judgment result is yes.
Wherein, it may be the first power supply apparatus that performs the above-described operation. In the above-described embodiment, controlling the charge input function to be turned off may include two cases, one being controlling the charge input function to be turned off when an operation of turning off the charge input function has been performed in the course of performing S102, to maintain the charge input function in the turned-off state; alternatively, when the charging input function is in an on state after the execution of S102, controlling the charging input function to be off is to perform an off operation of the charging input function, and after the charging input function is turned off, the off state is maintained. Similarly, the control of the power supply output function to be turned off may be performed in both cases of the above-described type, one being that when the operation of turning off the power supply output function has been performed in the process of executing S102, the control of the power supply output function to be turned off is to control the power supply output function to maintain the off state; alternatively, when the power supply output function is in the on state after the execution of S102, the control of turning off the power supply output function is to perform the off operation of the power supply output function, and to maintain the off state after turning off the power supply output function.
According to the steps, when the first power supply equipment is detected to be self-charged, the charging input function of the first power supply equipment is controlled to be closed and/or the power supply output function of the first power supply equipment is controlled to be closed, so that the self-charging condition of the first power supply equipment is eliminated, unnecessary electric quantity waste is avoided, the problems of battery electric quantity consumption, system power consumption increase and potential safety hazard existing in the related technology are solved, the effects of avoiding unnecessary electric quantity consumption and system power consumption and improving the safety of the power supply equipment are achieved.
In an optional embodiment, in the step S102, when determining whether the device that supplies power to the first power supply device is the first power supply device, the determination may be performed in the following manner: when the power supply mode for supplying power to first power supply equipment is determined to be a special charging port (DCP), the power supply output function of the first power supply equipment is closed; after a preset time, detecting whether the first power supply equipment can still receive the electric energy (namely, judging whether the first power supply equipment is self-charging, if the first power supply equipment can receive the electric energy, the first power supply equipment is not self-charging, and if the first power supply equipment cannot receive the electric energy, the first power supply equipment is self-charging); determining that the equipment which supplies power to the first power supply equipment before the power supply output function of the first power supply equipment is turned off is first power supply equipment under the condition that the detection result is that the electric energy cannot be received; and/or determining that the equipment for supplying power to the first power supply equipment is not the first power supply equipment under the condition that the detection result shows that the equipment can still receive the electric energy. The predetermined time needs to be set according to specific situations. In the embodiment, whether the first power supply device is possibly in the self-charging state is determined by judging the power supply mode of the external power supply device, and the determination is further performed by controlling the power supply output function of the first power supply device, so that the accuracy of determining whether the first power supply device is self-charging is improved.
In an alternative embodiment, the method for determining the power supply mode of the external power supply device may be various, and for example, the method may be determined as follows: after determining that the device powering the first power sourcing equipment is successfully connected, enabling a voltage source at a first voltage value (e.g., 0.5v-0.7 v) on a data pin D + of a charging input port of the first power sourcing equipment and enabling a current source at a first current value (e.g., 25 μ a-175 μ a) on D-; when the voltage on the D-is detected to be a first voltage value, determining that the power supply mode is DCP or a charging downlink port CDP; and/or, when the voltage on the D-is detected to be 0, determining that the power supply mode is a standard downlink port SDP; when the power supply mode is determined to be the DCP or the CDP, the specific DCP or the CDP can be continuously determined in the following mode: turning off the voltage source and the current source, and enabling the voltage source with a second voltage value (for example: 0.5v-0.7 v) on D + and the current source with a second current value (for example: 50 μ a) on D +; when the voltage on the D + is detected to be a second voltage value, determining the power supply mode to be DCP; and/or determining the power supply mode to be CDP when the voltage on the D + is detected to be 0.
In an optional embodiment, the controlling of the turning off of the charging input function of the first power supply device includes: a low dropout regulator (LDO) for enabling the first power supply device, wherein the LDO is used to connect a charging input port of the first power supply device with a battery, in this embodiment, the LDO is equivalent to a soft switch of a charging input function of the first power supply device, and when the LDO is enabled, the charging input function of the first power supply device is turned on; when the LDO is disabled, the charging input function of the first power supply device is off. It should be noted that the use of the LDO as the soft switch is only a preferable mode, and other devices may be used as the switch for controlling the on/off of the charging input function of the first power supply device.
In an optional embodiment, after controlling the charging input function of the first power supply device to be turned off and/or controlling the power supply output function of the first power supply device to be turned off, the method further includes: determining to disconnect the first power supply device from a device that supplies power to the first power supply device; and starting a charging input function and/or a power supply output function of the first power supply equipment. In this embodiment, after it is determined that the first power supply device exits from the self-charging state, the normal function of the first power supply device needs to be recovered, that is, the function turned off on the first power supply device needs to be recovered to be normal.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention or portions thereof contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a power supply device is further provided, and the power supply device is used for implementing the above embodiments and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware or a combination of software and hardware is also possible and contemplated.
Fig. 2 is a block diagram of a power supply apparatus according to an embodiment of the present invention, which includes a determination module 22 and a shutdown module 24, as shown in fig. 2, and is explained below.
A judging module 22, configured to judge whether a device that supplies power to the first power supply device is the first power supply device; and a closing module 24, connected to the determining module 22, configured to control the charging input function of the first power supply device to be closed and/or control the power supply output function of the first power supply device to be closed if the determination result of the determining module 22 is yes.
Fig. 3 is a block diagram of a structure of the determining module 22 in the power supply device according to the embodiment of the present invention, and as shown in fig. 3, the determining module 22 includes a closing unit 32, a detecting unit 34, and a first determining unit 36, and the determining module 22 is explained below.
A shutdown unit 32, configured to, when it is determined that a power supply manner of supplying power to a first power supply device is a dedicated charging port DCP, shutdown a power supply output function of the first power supply device; a detecting unit 34, connected to the turning-off unit 32, for detecting whether the first power supply device can still receive power after a predetermined time; a first determining unit 36, connected to the detecting unit 34, for determining that the device supplying power to the first power supply device before turning off the power supply output function of the first power supply device is the first power supply device, if the detecting result is that the power cannot be received; and/or determining that the equipment for supplying power to the first power supply equipment is not the first power supply equipment under the condition that the detection result is that the electric energy can still be received.
Fig. 4 is a block diagram of a preferred structure of the judging module 22 in the power supply device according to the embodiment of the present invention, and as shown in fig. 4, the judging module 22 further includes a second determining unit 42, and the judging module 22 is explained below:
a second determination unit 42, connected to the shutdown unit 32, for determining that the power supply method of supplying power to the first power supply apparatus is DCP by: after determining that the equipment for supplying power to the first power supply equipment is successfully connected, enabling a voltage source with a first voltage value on a data pin D + of a charging input port of the first power supply equipment, and enabling a current source with a first current value on a D-; when the voltage on the D-is detected to be a first voltage value, the voltage source and the current source are closed, and the voltage source with a second voltage value on the D-and the current source with a second current value on the D + are enabled; and when the voltage on the D + is detected to be a second voltage value, determining the power supply mode to be the DCP.
Fig. 5 is a block diagram of a shutdown module 24 in a power supply apparatus according to an embodiment of the present invention, and as shown in fig. 5, the shutdown module 24 includes a disabling unit 52, and the disabling unit 52 is described below:
the disable unit 52 is configured to disable the low dropout regulator LDO of the first power supply device, wherein the LDO is configured to connect the charging input port of the first power supply device to the battery.
Fig. 6 is a block diagram of a preferred structure of a power supply device according to an embodiment of the present invention, and as shown in fig. 6, the device includes a determination module 62 and an opening module 64 in addition to all modules shown in fig. 2, and the device is explained below.
A determining module 62, connected to the turning-off module 24, configured to determine to turn off the connection between the first power supply device and the device supplying power to the first power supply device after controlling the charging input function of the first power supply device to be turned off and/or controlling the power supply output function of the first power supply device to be turned off; and a starting module 64, connected to the determining module 62, for starting the charging input function and/or the power supply output function of the first power supply device.
The apparatuses shown in fig. 2 to 6 may be applied to a first power supply device, and the first power supply device may be a power bank.
The invention is explained in detail below by taking the charger as an example:
fig. 7 is a block diagram of a power bank according to an embodiment of the present invention, and as shown in fig. 7, the power bank includes a microprocessor module 72 (corresponding to the above-mentioned shutdown module 24 and startup module 64), a boost output module 74, a USB detection module 76 (corresponding to the above-mentioned determination module 22 and determination module 62), a charging control module 78, a voltage detection module 710, and an LDO712 with controllable output. The following explains each module:
the microprocessor module 72 may be formed by a single chip or a microprocessor (e.g., a Central Processing Unit (CPU) chip), and mainly performs execution of software instructions and control of the whole system.
The boost output module 74 is implemented by a boost chip, and the inside thereof may be implemented by a Direct Current-Direct Current (DC-DC) boost circuit, which mainly boosts the internal output voltage to make the boosted voltage output a standard value (e.g., 5V).
The USB detection module 76, the charging control module 78, the voltage detection module 710, and the LDO712 may be implemented by one powerful charging chip, or may be implemented by separate chips.
The microprocessor module 72 may control the boost Output module 74 and the charging control module 78 through an I2C bus (or may use other Peripheral control buses, such as a Serial Peripheral Interface (SPI), a Universal Asynchronous Receiver/Transmitter (UART), and the like), and receive interrupt information from the charging control module 78 through a General Purpose Input/Output (GPIO). The boost output module 74 boosts the internal voltage to enable the USB output pin Vbus to output 5V voltage, and the D + and D- (DP and DM in fig. 7 refer to D + and D-) pins of the USB are shorted, so that the USB output conforms to the DCP charging protocol in BC1.2, thereby simulating a standard adapter. The USB detection module 76 distinguishes the type of USB charging that is plugged in by detecting the voltage change at the input terminals D + and D-. The output controllable LDO712 is controlled by the charge control chip to enable and disable operations. The voltage detection module 710 is used for detecting whether the external power is normal or not, and reporting the external power to the charging control module 78 through high and low levels. The charging control module 78 reflects the interrupt to the micro-processing module 72 through the acquisition voltage detection module 710 and the USB detection module 76, and the micro-processing module 72 performs logic processing and then performs enable control on the LDO712 through the I2C control charging control module 78.
The implementation circuit of the USB detection module 76 needs to be implemented according to the BC1.2 protocol, and the detection process includes:
vbus detection. To ensure proper sequencing for any device connected to the USB port, the Vbus and GND pins of the connector may be made longer than the D + and D-pins. This ensures that the long pins are first held in contact with the insertion device. Therefore, before any detection occurs, vbus must first be detected, which in the present system is detected by voltage detection module 710, which voltage detection module 710 may be implemented by a voltage comparator.
2. And (5) detecting for the first time. In this detection, the terminal device (for example, the above-described charger) distinguishes between the ports (CDP and DCP) of 500mA or more and the ports (SDP) of 500mA or less having the charging tag. The end device needs to enable the 0.5v to 0.7v voltage source on D + and the 25 μ a to 175 μ a sink current source on D-. If a DCP or CDP is connected, a 0.5v to 0.7v level will appear on D-; if SDP is connected, the D-voltage will drop to zero. The terminal switches in a comparator that compares the D-voltage with 0.25v to 0.4 v. If the D-voltage is above 0.4v but below the logic low threshold of 0.8v, the terminal device assumes that a charging port is present.
3. And detecting the secondary charger. In this detection, the terminal equipment needs to distinguish CDP and DCP after turning off the voltage and current sources in 2 above. The above tests were performed in reverse order, with a voltage source of 0.5v to 0.7v applied at D + and a current source of 50 μ a applied at D +. If DCP is connected, D + will appear at a 0.5v to 0.7v level; if a CDP is connected, the D + voltage is zero.
The above detection logic is implemented in the USB detection module 76 by a hardware circuit, and during detection, the start of detection can be controlled by the microprocessor module 73, and after D + and D-are removed, the USB detection module 76 reflects the change of logic level to the charging control module 78, and finally the charging control module 78 reports the change of logic level to the microprocessor module 72 by means of system interrupt.
The USB output port is a DCP port conforming to BC1.2 standard.
The LDO712 may be an LDO module that outputs a high impedance state and performs control.
Fig. 8 is a flowchart of detection performed when the power charging apparatus is inserted into the power charging apparatus according to an embodiment of the present invention, and as shown in fig. 8, the flowchart includes the following steps:
step S802, in a default state, the boost output module 74 and the controllable LDO712 are both turned on, so when an external power (i.e., an external charging device) is inserted, the microprocessor module 72 first reads the state of the voltage detection module 710, and the voltage detection module 710 detects Vbus;
step S804, judging whether the external power exists by detecting Vbus, if yes, turning to step S806, otherwise, turning to step S818;
step S806, the voltage detection module 710 determines whether the external power supply is normal through voltage comparison, and controls the USB detection module 76 to detect the D + and the D-if the external power supply is normal;
step S808, determining whether the charging mode of the external charging device is DCP, if yes, going to step S810, otherwise, going to step S818;
step S810, when it is determined that the charging mode is DCP, turning off the boost output module 74 for 50ms, where the 50ms is the sum of the response times of the two chips of the controllable LDO712 and the voltage detection module 710 (when the sum of the response times of the LDO712 and the voltage detection module 710 is other value, the turn-off time needs to be adjusted correspondingly), specifically, the switching time of the chip may be queried from a chip manual, and the turn-off time generally needs to be the sum of the maximum values of the switching time;
step S812, reading the state of the voltage detection module 710, determining whether an external power exists, if not, going to step S814, otherwise, going to step S816;
step S814, turn off LDO712 to output high impedance;
step S816, turns on the boost output module 74;
step S818, end.
In a normal state, when the system does not detect the state at this time, the boost output module and the controllable LDO are both turned on, so that no processing is performed on the charging terminal or the charged terminal during pulling out, and if the last state is detected to be the self-charging state, the power bank needs to exit from the self-charging state after the user pulls out the charging wire, fig. 9 is a detection flowchart performed when the power bank device detects that the charging device is pulled out according to the embodiment of the present invention. As shown in fig. 9, the process includes the following steps:
step S902, the charger quits the self-charging state;
in step S904, after the USB detection module 76 detects the USB pulling event, it will notify the micro-processing module 72 that there is a USB pulling event in an interrupt manner;
step S906, the microprocessor module 72 enables the LDO to output normally;
step S908 ends.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are located in different processors in any combination.
The embodiment of the invention also provides a storage medium. Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, judging whether equipment for supplying power to first power supply equipment is the first power supply equipment;
and S2, controlling the charging input function of the first power supply equipment to be closed and/or controlling the power supply output function of the first power supply equipment to be closed under the condition that the judgment result is yes.
Optionally, in this embodiment, the storage medium may include but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, in this embodiment, the processor executes the steps in the above method embodiments according to the program code stored in the storage medium.
Optionally, for a specific example in this embodiment, reference may be made to the examples described in the above embodiment and optional implementation, and this embodiment is not described herein again.
Through above-mentioned embodiment, after the user mistake is with battery charging outfit's power supply output port access input port that charges, the system can carry out the self-checking to close controllable LDO through microprocessor, make the system not have the condition of electric leakage under this scene, thereby avoid unnecessary electric quantity consumption and system's consumption, improve power supply outfit's security.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method of supplying power, comprising:
judging whether equipment for supplying power to first power supply equipment is the first power supply equipment;
if so, controlling a charging input function of the first power supply equipment to be closed and/or controlling a power supply output function of the first power supply equipment to be closed;
determining whether the apparatus that supplies power to the first power supply apparatus is the first power supply apparatus includes: when the power supply mode for supplying power to the first power supply equipment is determined to be a special charging port (DCP), the power supply output function of the first power supply equipment is closed; after a preset time, detecting whether the first power supply equipment can still receive the electric energy; determining that the equipment which supplies power to the first power supply equipment before the power supply output function of the first power supply equipment is closed is the first power supply equipment under the condition that the detection result is that the electric energy cannot be received; and/or determining that the equipment for supplying power to the first power supply equipment is not the first power supply equipment under the condition that the detection result is that the electric energy can still be received.
2. The method of claim 1, further comprising: determining that a power supply manner of supplying power to the first power supply device is the DCP by:
after determining that the device powering the first power supply device is successfully connected, enabling a voltage source of a first voltage value on a data pin D + of a charging input port of the first power supply device and a current source of a first current value on D-;
when the voltage on the D-is detected to be the first voltage value, the voltage source and the current source are closed, and the voltage source with the second voltage value and the current source with the second current value are enabled on the D +;
and when the voltage on the D + is detected to be the second voltage value, determining that the power supply mode is the DCP.
3. The method of claim 1, wherein controlling the charging input function of the first power supply device to be turned off comprises:
and de-enabling the low dropout regulator (LDO) of the first power supply equipment, wherein the LDO is used for connecting the charging input port of the first power supply equipment with a battery.
4. The method according to any one of claims 1 to 3, characterized in that after controlling the charging input function of the first power supply device to be turned off and/or controlling the power supply output function of the first power supply device to be turned off, the method further comprises:
determining to disconnect the first power supply apparatus from an apparatus that supplies power to the first power supply apparatus;
and starting a charging input function and/or a power supply output function of the first power supply equipment.
5. A power supply device, comprising:
the device comprises a judging module, a judging module and a judging module, wherein the judging module is used for judging whether a device for supplying power to first power supply equipment is the first power supply equipment;
the closing module is used for controlling the charging input function of the first power supply equipment to be closed and/or controlling the power supply output function of the first power supply equipment to be closed under the condition that the judgment result of the judgment module is yes;
the judging module comprises: a shutdown unit, configured to shutdown a power supply output function of the first power supply device when it is determined that a power supply manner for supplying power to the first power supply device is a dedicated charging port DCP; the detection unit is used for detecting whether the first power supply equipment can still receive the electric energy after the preset time; a first determining unit, configured to determine, when the detection result is that the power supply output function of the first power supply apparatus cannot be received, that an apparatus that supplies power to the first power supply apparatus before the power supply output function of the first power supply apparatus is turned off is the first power supply apparatus; and/or determining that the equipment for supplying power to the first power supply equipment is not the first power supply equipment under the condition that the detection result is that the electric energy can still be received.
6. The apparatus according to claim 5, wherein the determining module further comprises a second determining unit configured to determine that the first power supply device is powered by the DCP by:
after determining that the device supplying power to the first power supply device is successfully connected, enabling a voltage source of a first voltage value on a data pin D + of a charging input port of the first power supply device and enabling a current source of a first current value on D-;
when the voltage on the D-is detected to be the first voltage value, the voltage source and the current source are closed, and the voltage source with the second voltage value and the current source with the second current value are enabled on the D +;
and when the voltage on the D + is detected to be the second voltage value, determining that the power supply mode is the DCP.
7. The apparatus of claim 5, wherein the shutdown module comprises:
and the disabling unit is used for disabling the low dropout regulator (LDO) of the first power supply equipment, wherein the LDO is used for connecting the charging input port of the first power supply equipment with a battery.
8. The apparatus of any of claims 5 to 7, further comprising:
the determining module is used for determining to disconnect the first power supply device from a device for supplying power to the first power supply device after controlling a charging input function of the first power supply device to be closed and/or controlling a power supply output function of the first power supply device to be closed;
and the starting module is used for starting the charging input function and/or the power supply output function of the first power supply equipment.
CN201610296885.3A 2016-05-06 2016-05-06 Power supply method and device Active CN107346905B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610296885.3A CN107346905B (en) 2016-05-06 2016-05-06 Power supply method and device
PCT/CN2016/102321 WO2017190474A1 (en) 2016-05-06 2016-10-18 Power supply method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610296885.3A CN107346905B (en) 2016-05-06 2016-05-06 Power supply method and device

Publications (2)

Publication Number Publication Date
CN107346905A CN107346905A (en) 2017-11-14
CN107346905B true CN107346905B (en) 2023-01-31

Family

ID=60202647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610296885.3A Active CN107346905B (en) 2016-05-06 2016-05-06 Power supply method and device

Country Status (2)

Country Link
CN (1) CN107346905B (en)
WO (1) WO2017190474A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
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
CN112702176B (en) * 2020-12-22 2022-11-29 海光信息技术股份有限公司 I2C bus power supply control circuit, control method and chip

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002169618A (en) * 2000-11-30 2002-06-14 Ricoh Co Ltd Constant-voltage power circuit and electronic equipment incorporating the constant-voltage power circuit
CN1934765A (en) * 2004-03-29 2007-03-21 日新电机株式会社 Uninterruptible power supply apparatus and power failure compensating system
CN204578123U (en) * 2015-02-15 2015-08-19 庄景阳 The charge protection device of human body sensing power-off and mobile phone, portable power source, Mobile phone housing, charger, data wire

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005018416A (en) * 2003-06-26 2005-01-20 Toshiba Corp Electronic equipment and power source control method
CN101126781B (en) * 2006-08-18 2010-11-10 鸿富锦精密工业(深圳)有限公司 USB apparatus power consumption test device
JP2010079775A (en) * 2008-09-29 2010-04-08 Nec Infrontia Corp Usb low-order unit and usb system
JP4977797B1 (en) * 2011-11-30 2012-07-18 和征 榊原 Battery system
JP5877480B2 (en) * 2011-12-06 2016-03-08 清水建設株式会社 Self-sustaining operation system and method for distributed power supply
JP6024288B2 (en) * 2012-08-27 2016-11-16 株式会社バッファロー Information processing system and external device
CN203387203U (en) * 2013-05-09 2014-01-08 上海斐讯数据通信技术有限公司 Charging switching system possessing USB on-the-go (OTG) function
CN104953631A (en) * 2014-03-26 2015-09-30 中兴通讯股份有限公司 Current control method and terminal device
CN105449731A (en) * 2014-09-25 2016-03-30 中兴通讯股份有限公司 Portable power source device and charge-discharge processing method
CN105140985B (en) * 2015-08-05 2017-08-25 青岛海信移动通信技术股份有限公司 Mobile terminal, can directly charge source adapter and charging method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002169618A (en) * 2000-11-30 2002-06-14 Ricoh Co Ltd Constant-voltage power circuit and electronic equipment incorporating the constant-voltage power circuit
CN1934765A (en) * 2004-03-29 2007-03-21 日新电机株式会社 Uninterruptible power supply apparatus and power failure compensating system
CN204578123U (en) * 2015-02-15 2015-08-19 庄景阳 The charge protection device of human body sensing power-off and mobile phone, portable power source, Mobile phone housing, charger, data wire

Also Published As

Publication number Publication date
WO2017190474A1 (en) 2017-11-09
CN107346905A (en) 2017-11-14

Similar Documents

Publication Publication Date Title
TWI559650B (en) Method and apparatus for performing system power management
US9483093B2 (en) Electronic device and method for controlling a setting of a maximum consumption current
CN106575879B (en) Fast battery charging by digital feedback
US9465393B2 (en) Power management circuit and method thereof
US10574073B2 (en) Electronic device and method for controlling power supply
EP3086433A1 (en) Charging method, alternating current adaptor, charging management device and terminal
CN108988431B (en) Multi-protocol charging device and multi-protocol charging method
CN106230070B (en) Charging method and device
CN104007801A (en) Method and apparatus for providing power to an electronic device
US20170005495A1 (en) Method and apparatus for charging electronic device with usb connection
US20100095139A1 (en) Docking station
CN101853970A (en) Method and device for charging through universal serial bus (USB) interface
JP5613135B2 (en) Battery unit for portable terminal device and power supply method
CN107346905B (en) Power supply method and device
CN104659867A (en) Power supply device and method for modulating charging current of power supply device of portable device
CN108181978B (en) Power control method and device for electronic equipment
TWI559125B (en) Power bank apparatus and power control method thereof
CN104953631A (en) Current control method and terminal device
CN106329625B (en) charging method and device
CN109491493B (en) Dynamic power control technique and docking station with dynamic power control technique
JP5689944B2 (en) Battery unit for supplying power to electrical and electronic equipment and power supply method
TW201814543A (en) Apparatus and method for USB charge and communication
CN111711235B (en) Charging method and device, terminal and storage medium
CN111049202A (en) Method and device for identifying charging type and computer readable storage medium
JP2013196179A (en) Charge control device and electronic apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant