CN114498831A - Electronic device and charging control method - Google Patents

Electronic device and charging control method Download PDF

Info

Publication number
CN114498831A
CN114498831A CN202210079826.6A CN202210079826A CN114498831A CN 114498831 A CN114498831 A CN 114498831A CN 202210079826 A CN202210079826 A CN 202210079826A CN 114498831 A CN114498831 A CN 114498831A
Authority
CN
China
Prior art keywords
charging
module
port
electronic device
interface
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.)
Pending
Application number
CN202210079826.6A
Other languages
Chinese (zh)
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202210079826.6A priority Critical patent/CN114498831A/en
Publication of CN114498831A publication Critical patent/CN114498831A/en
Pending legal-status Critical Current

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
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00045Authentication, i.e. circuits for checking compatibility between one component, e.g. a battery or a battery charger, and another component, e.g. a power source
    • 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/007Regulation of charging or discharging current or voltage
    • 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/007Regulation of charging or discharging current or voltage
    • H02J7/00712Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The application discloses electronic equipment and a charging control method, and belongs to the technical field of communication. The electronic device includes: the device comprises a first interface, a switching module, a target type interface and a charging module; the first interface is connected with the switching module, the switching module is connected with the first port of the target type interface, and the second port of the target type interface is connected with the charging module; when the electronic equipment is connected with the charging device and the electronic equipment is in power failure, the first interface is used for outputting charging voltage within a target voltage range to the switching module, the switching module is used for outputting the charging voltage to the target type interface, and the target type interface is used for receiving communication signals output by the charging device and outputting the communication signals to the charging module under the condition of receiving the charging voltage.

Description

Electronic device and charging control method
Technical Field
The application belongs to the technical field of communication, and particularly relates to an electronic device and a charging control method.
Background
Generally, when an electronic device is connected to another device, a type C (Universal Serial Bus (USB)) interface may be used for connection. Specifically, the type C port of the electronic device may control Data Positive signal (DP)/Data negative signal (Data Minus, DM) to communicate with the outside through the type C switch, so as to charge the electronic device when the electronic device is connected to the charger.
However, since the Type C switch needs to be powered by a Central Processing Unit (CPU), when there is no power supply, an external DP/DM signal cannot cross the Type C switch to communicate with the CPU, so that when the charger charges the overdischarged battery, the internal charging circuit cannot perform a charging protocol handshake with the external charger, and thus, the electronic device has a power failure risk.
Disclosure of Invention
The embodiment of the application aims to provide electronic equipment and a charging control method, and the problem that the electronic equipment has power failure risks can be solved.
In a first aspect, an embodiment of the present application provides an electronic device, where the electronic device includes: the device comprises a first interface, a switching module, a target type interface and a charging module; the first interface is connected with the switching module, the switching module is connected with the first port of the target type interface, and the second port of the target type interface is connected with the charging module; when the electronic equipment is connected with the charging device and the electronic equipment is in power failure, the first interface is used for outputting charging voltage within a target voltage range to the switching module, the switching module is used for outputting the charging voltage to the target type interface, and the target type interface is used for receiving communication signals output by the charging device and outputting the communication signals to the charging module under the condition of receiving the charging voltage.
In a second aspect, an embodiment of the present application provides a charging control method, including: under the condition that the electronic equipment is connected with the charging device and the electronic equipment is in power failure, outputting charging voltage within a target voltage range to the electronic equipment through the switching module; and controlling a charging module in the electronic equipment to charge the electronic equipment based on the charging voltage.
In a third aspect, embodiments of the present application provide an electronic device, which includes a processor and a memory, where the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method according to the second aspect.
In a fourth aspect, the present application provides a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the second aspect.
In a fifth aspect, the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the second aspect.
In a sixth aspect, the present application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the method according to the second aspect.
In the embodiment of the application, a switching module is additionally arranged between a first interface in the electronic equipment and a target type interface, so that under the condition that the electronic equipment is connected with a charging device, power is directly supplied to the target type interface, and the electronic equipment can identify the charging device and perform charging. In the scheme, the switching module is additionally arranged in the electronic equipment, so that when the electronic equipment is connected with the charging device, the switching module can directly supply power to the target type interface, the situation that the charging device cannot be identified or identified wrongly by the electronic equipment, so that the charging device cannot supply power to the electronic equipment is avoided, and the power failure risk of the electronic equipment is reduced.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a second schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 3 is a third schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 4 is a fourth schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 5 is a fifth schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 6 is a sixth schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 7 is a seventh schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 8 is an eighth schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 9 is a flowchart of a charging control method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The electronic device and the charging control method provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
With the abundance of functions of electronic devices, more and more functions need to communicate with the outside through a DP/DM interface in a USB interface, including USB data transmission, charging protocol detection, digital headphones, etc., and thus a type C switch is needed to transmit externally transmitted DP/DM signals to different chips (e.g., a CPU or a charging control chip) at appropriate times, so that the electronic device can implement different functions according to the DP/DM port, and generally, when the electronic device is charging, the electronic device needs to activate a charging circuit through a charging voltage, so that an internal logic circuit of the charging circuit starts to operate, so that the type C switch can control the DP/DM port in the charging circuit to perform a charging protocol handshake with the DP/DM port in a charger to charge the electronic device, however, due to over-discharge of a battery, the electronic device is already in a power-down state, therefore, a platform (for example, a CPU) supplying power to the Type-C switch is also powered down, which causes a power loop in the electronic device to be not operated, and the electronic device is still in a power-down state, in this state, the electronic device may perform a first detection of a charging protocol (for example, BC1.2) through a DP/DM in the charging circuit, and since the Type-C switch is not powered, the CPU may recognize the charger as a Standard Downlink Port (SDP), that is, the CPU may recognize the charger as a data transmission interface, so that the CPU may automatically set the charging current threshold as a threshold corresponding to the SDP, which is generally 500mA, and since the first charging protocol sets the charging current threshold as 500mA, when the electronic device is charging, the electronic device itself needs to consume a certain current, which causes the current to be insufficient to supply power to the electronic device, and if the charging current is greater than 500mA, if the charging circuit judges that the current is over-current, and the power loop of the charging circuit stops supplying power for protecting the electronic equipment from being damaged, the electronic equipment enters a power-down state, or the electronic equipment is restarted, namely, the electronic equipment cannot be charged under the condition that the electronic equipment is connected with the charger.
In order to solve the above problem, in an implementation manner of the embodiment of the present application, a voltage stabilizing module is added between a first interface and a target type interface (i.e. a type C switch) in an electronic device, so that when the electronic device is connected to a charging device, power is directly supplied to the target type interface, and the electronic device can identify the charging device and perform charging. In this scheme, owing to increase voltage stabilizing module in electronic equipment to when electronic equipment is connected with charging device, voltage stabilizing module can directly supply power to type C switch, has avoided the unable discernment charging device of electronic equipment or discernment mistake, and leads to charging device to supply power to electronic equipment, consequently has reduced electronic equipment's the risk of falling the electricity.
In another implementation manner of the embodiment of the application, a switch module may be added to the electronic device, wherein the switch module is connected to the first interface and the charging module, and the communication signal may be directly transmitted to the charging module through the switch module, so that the electronic device may identify the charging device and perform charging. In the scheme, the switch module is additionally arranged in the electronic equipment, so that when the electronic equipment is connected with the charging device, the communication signal of the first interface can be directly sent to the charging module through the switch module, the situation that the charging device cannot be identified or the identification error of the electronic equipment is wrong, and the charging device cannot supply power to the electronic equipment is avoided, and therefore the power failure risk of the electronic equipment is reduced.
An embodiment of the present application provides an electronic device, and fig. 1 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application. As shown in fig. 1, an electronic device provided in an embodiment of the present application may include: a first interface 10, a transit module 11, a target type interface 12 and a charging module 13.
In the embodiment of the present application, the first interface 10 is connected to a transit module 11, the transit module 11 is connected to a first port of a target type interface 12, and a second port of the target type interface 12 is connected to a charging module 13. When the electronic device is connected with the charging device and the electronic device is in power failure, the first interface is used for outputting charging voltage within a target voltage range to the switching module, the switching module is used for outputting the charging voltage to the target type interface, and the target type interface is used for receiving a communication signal output by the charging device and outputting the communication signal to the charging module under the condition of receiving the charging voltage.
It should be noted that for convenience of illustration of the respective ports in fig. 1, the first port of the target type interface 12 is represented by a VCC port, and the second port of the target type interface is represented by a D1 port.
Optionally, in this embodiment of the application, the first interface may be a type C interface or a USB interface, where the first interface is specifically configured to be connected with a charging device, that is, the electronic device is connected with the charging device through the first interface, and in a case that the first interface is a communication interface, the electronic device may send data to another electronic device through the first interface or receive data of another electronic device; under the condition that the first interface is the charging interface, the electronic device can be connected with the charging device through the first interface, so that the charging device can charge the electronic device.
Optionally, in this embodiment of the application, the target type interface may be an interface having a function of switching a circuit, such as a type C switch interface, a USB switch interface, or a Lightning switch interface.
It can be understood that after the electronic device is connected to the charging apparatus, since the target type interface may receive the charging voltage, and the target type interface is in an operating state at this time, after receiving the communication signal sent by the charging apparatus, the target type interface may send the communication signal to the charging module, so that the charging module detects the communication signal to determine whether to supply power to the electronic device.
In the embodiment of the application, after the Charging module receives the Charging voltage, the internal logic circuit of the Charging module starts to operate, at this time, the power loop does not start to operate yet, and the electronic device is still in a power-down state, in this state, the Charging module can perform first-time Charging protocol detection through a communication signal, and because the target type interface is already in an operating state, the Charging device can communicate with the Charging module through the communication signal, so that the electronic device can identify the Charging device as a Dedicated Charging Port (DCP), and set a corresponding Charging current threshold (e.g., 3.25A) for the DCP, and after the electronic device identifies the Charging device, the Charging module can charge the electronic device according to the Charging current.
Optionally, in this embodiment of the application, with reference to fig. 1, as shown in fig. 2, the adaptor module includes: a voltage regulation module 14 and a CPU 15.
In the embodiment of the present application, the first interface 10 is respectively connected to an input port (Vin in fig. 2) of a regulator module 14 (LDO in fig. 2) and an enable port (CE in fig. 2) of the regulator module 14, an output port (Vout in fig. 2) of the regulator module 14 is connected to a first port (VCC in fig. 2) of the target type interface 12, a first port (VCC in fig. 2) of the CPU15 is connected to an output port of the regulator module 14, and a second port (IO in fig. 2) of the CPU15 is connected to the enable port. The voltage stabilizing module is used for outputting charging voltage to the CPU; the CPU is used for detecting whether the charging module is in a charging state or not under the condition of receiving the charging voltage, and controlling the enabling port to enable the voltage stabilizing module to be in a non-working state under the condition that the charging module is in the charging state so as to control the voltage stabilizing module to stop outputting the charging voltage to the CPU and the target type interface.
It can be understood that, under the condition that the electronic device is connected with the charging device, the enabling port of the voltage stabilizing module is connected with the charging device through the first interface, so that the charging voltage output by the charging device can be stabilized through the voltage stabilizing module, and the charging module in the electronic device can charge the electronic device based on the stabilized charging voltage.
In the embodiment of the application, when the electronic device is already in the charging state, the CPU may control the voltage stabilizing module to stop outputting the charging voltage to the target type interface, so that the electronic device may implement different functions through the target type interface when receiving other communication signals (e.g., data transmission signals), so as to improve the compatibility of the electronic device.
Optionally, in this embodiment of the application, when the voltage stabilizing module receives the charging voltage output by the charging device, the voltage stabilizing module may control a voltage drop of an adjusting tube in the voltage stabilizing module according to a change in an amplitude of the charging voltage, so as to output the stable voltage.
Optionally, in this embodiment of the application, the electronic device may enable the voltage stabilizing module to enable the charging voltage to reach the operating voltage of the target type interface according to the operating voltage range (i.e., the target voltage range) of the target type interface, so that the target type interface may be in an operating state.
In the embodiment of the application, the voltage stabilizing module can enable the charging voltage through the enabling port, and output the stabilized charging voltage to the target type interface, that is, output the charging voltage (for example, 5V) within the target voltage range, so that the target type interface can conduct the communication circuit between the charging device and the charging module, thereby ensuring that the communication signal can be output to the charging circuit through the target type interface, avoiding the situation that the charging device cannot be identified by the electronic equipment, and causing the electronic equipment to be incapable of charging, therefore, the risk of power failure of the electronic equipment is reduced.
Optionally, in this embodiment of the application, the electronic device further includes a resistive element 17.
In the embodiment of the present application, one end of the resistor element 17 is connected to the enable port, the other end of the resistor element 17 is connected to the first interface 10, and the first interface 10 is connected to the charging device 18. When the electronic equipment is connected with the charging device, the enabling port enables the charging device to output the charging voltage within the target voltage range to the voltage stabilizing module through the first interface through the resistance element.
Illustratively, as shown in fig. 3, the electronic device includes a first interface 10 including an output port, a target type interface 12, a charging module 13, a voltage stabilization module 14, a CPU15, and a resistance element 17. Wherein the output port (denoted VBUS in fig. 3) of the first interface 10 is connected to the input port (denoted Vin in fig. 3) of the regulator module 14 (denoted LDO in fig. 3), and the output port of the first interface 10 is connected to the first end (denoted by R1 in fig. 3) of the resistive element 17 (denoted by R in fig. 3), the second end (denoted by R2 in fig. 3) of the resistive element is connected to the enable end (denoted by CE in fig. 3) of the regulator module 14, the first port (denoted by VCC in fig. 3) of the CPU15 is connected to the output port (denoted by Vout in fig. 3) of the regulator module 14, the second port (denoted by IO in fig. 3) of the CPU15 is connected to the enable port, the output port of the regulator module 14 is connected to the first port (denoted by VCC in fig. 3) of the target type interface 12, and the second port (denoted by D1 in fig. 3) of the target type interface 12 is connected to the charging module 13.
In this embodiment, in a situation that the electronic device is connected to the charging apparatus, the voltage stabilizing module may pull up the VBUS of the first interface through the resistance element, so that when the charging apparatus outputs the charging voltage to the first interface, the voltage stabilizing module may adjust the charging voltage through the resistance element, so that the charging voltage meets an operating voltage range of the target type interface, and thus the target type interface may transmit the DP/DM signal output by the charging apparatus to the charging module.
Alternatively, the resistance element may be any one of: fixed resistance, variable resistance, special resistance, etc.
Optionally, in this embodiment of the application, with reference to fig. 1, as shown in fig. 4, the adaptor module includes: a switch module 16 and a CPU 15.
In the embodiment of the present application, the first interface 10 is connected to a first end (denoted by T1 in fig. 4) of the switch module 16, and a second end (denoted by T2 in fig. 4) of the switch module 16 is connected to the charging module 13; the first port (IO in fig. 4) of the CPU15 is connected to the third port (T3 in fig. 4) of the switch module 16. The electronic equipment comprises a charging device, a switch module and a charging module, wherein the charging device is used for charging the electronic equipment; the charging module is used for charging the electronic equipment under the condition that the communication signal is a charging signal; the CPU is used for controlling the switch module to be in an open circuit state under the condition that the charging module is in the charging state so as to control the switch module to stop outputting the communication signal to the charging module.
It can be understood that, in the case that the electronic device is connected to the charging device, the communication signal of the charging device may be transmitted to the charging module through the first port and the switch module, that is, the charging module may directly communicate with the charging device, so as to charge the electronic device.
It should be noted that, for the description of the first interface 10 and the charging module 13, reference may be made to the description in the foregoing embodiments, and details are not described here again.
Optionally, in this embodiment of the present application, the switch module 16 may be a fet or a single-pole double-throw switch, or may also be another component having a switching function, which is not limited in this embodiment of the present application.
Optionally, in this embodiment, as shown in fig. 5 in combination with fig. 3, the first interface 10 includes a first DP port and a first DM port, the second port of the target type interface 12 includes a second DP port and a second DM port, and the charging module 13 includes a third DP port and a third DM port.
In the embodiment of the present application, the first DP port (indicated by DP1 in fig. 5) is connected to a second DP port (indicated by DP2 in fig. 5), the first DM port (indicated by DM1 in fig. 5) is connected to a second DM port (indicated by DM2 in fig. 5), the second DP port is connected to a third DP port (indicated by DP3 in fig. 5), and the second DM port is connected to a third DM port (indicated by DM3 in fig. 5).
It is understood that, in the case where the electronic device is connected to the charging apparatus, the first interface is configured to output a communication signal to the target type interface through the first DP port and the first DM port; a target type interface for receiving a communication signal output from the charging device through the second DP port and the second DM port in case of receiving the charging voltage; the charging module is used for receiving the communication signal output by the target type interface through the third DP port and the third DM port, and supplying power to the electronic device when the communication signal is the charging signal.
Optionally, in this embodiment of the application, the switch module is a first fet and a second fet.
In this embodiment, the source S of the first fet is connected to the first DP port, and the drain D of the first fet is connected to the third DP port; the source S of the second field effect transistor is connected to the first DM port, and the drain D of the second field effect transistor is connected to the third DM port.
Illustratively, in conjunction with fig. 4, as shown in fig. 6, the electronic device includes: the system comprises a first interface 10, a first field effect transistor B1, a second field effect transistor B2, a target type interface 12, a charging module 13 and a CPU 15; the CPU15 includes a second destination port and a first destination port including a first port and a second port. Wherein, the first DP port (denoted by DP1 in fig. 6) of the first interface 10 is connected to the S pole of the first fet B1 and the second DP port (denoted by DP2 in fig. 6) of the target type interface 12, the first DM port (denoted by DM1 in fig. 6) of the first interface is connected to the S pole of the second fet B2 and the second DM port (denoted by DM2 in fig. 6) of the target type interface 12, respectively, the second DP port of the target type interface 12 is connected to the third DP port (denoted by DP3 in fig. 6) of the charging module, the second DM port of the target type interface 12 is connected to the third DM port (denoted by DM3 in fig. 6) of the charging module, the first port (denoted by IO1 in fig. 6) of the CPU15 is connected to the g pole of the first fet B1, the second port (denoted by IO2 in fig. 6) of the CPU15 is connected to the VCC pole of the second fet B84, and the second DP port (denoted by IO 464) of the target type interface 856 is connected to the target type interface 856.
It should be noted that, the first field effect transistor and the second field effect transistor are both depletion type P-type field effect transistors, when there is no external voltage, the voltage between the gate and the source of the depletion type P-type field effect transistor is less than zero or equal to zero, in this state, the drain and the source of the depletion type P-type field effect transistor are on, and when the voltage between the gate and the source of the depletion type P-type field effect transistor is greater than zero, the drain and the source of the depletion type P-type field effect transistor are off, that is, when the electronic device is in a power-down state, the communication signal can reach the charging module through the drain and the source of the depletion type P-type field effect transistor, so that the electronic device can receive the charging signal to perform charging.
In the embodiment of the application, because the first field effect transistor and the second field effect transistor are depletion type P-type field effect transistors, when the electronic equipment is in a power failure state, the communication signal can be directly transmitted to the charging module through the first interface, and therefore, even if the target type interface is in the power failure state, the electronic equipment can correctly identify the charging device, the situation that the electronic equipment cannot identify the charging device or identify errors, and the charging device cannot supply power to the electronic equipment is avoided, and the power failure risk of the electronic equipment is reduced.
It can be understood that when the electronic device is in the charging state, the CPU may control the switch module to be turned off through the IO port, so that when the electronic device receives other communication signals, the electronic device may still process the other communication signals through the target type interface.
In the embodiment of the application, when it is detected that the electronic device is in the charging state, the electronic device can control the switch module to be in the off state, so that the electronic device can realize different functions through the target type interface when receiving other communication signals (for example, data transmission signals), and thus, the compatibility of the electronic device is improved.
Optionally, in this embodiment of the application, the charging device includes a DCP.
In an embodiment of the present application, the charging module is specifically configured to determine a current value range corresponding to the DCP when the communication signal is a charging signal, and charge the electronic device through a target current, where the target current is a current in the current value range corresponding to the DCP.
In this embodiment, when the electronic device is connected to the charging apparatus, the electronic device may perform charging protocol detection through the DP/DM port, and since the target type interface may receive the charging voltage at this time, the target type interface may transmit the communication signal to the charging module, so that the electronic device may determine that the communication signal is the charging signal, identify the charging apparatus as the DCP port, and set a current value range (e.g., 2A to 3.25A) for the DCP port, so that the charging module may use a charging current threshold value (e.g., 3.25A) corresponding to the DCP port to supply power to the electronic device.
In the embodiment of the application, after the electronic device determines that the communication signal is the charging signal, the electronic device can recognize that the charging device is the charger, and supply power to the electronic device by adopting the current corresponding to the DCP, so that the problem that the electronic device cannot be started or restarted repeatedly due to too small charging current is avoided, and the risk of power failure of the electronic device is reduced.
Alternatively, in the embodiment of the present application, as shown in fig. 7 in combination with fig. 1 to fig. 3 and fig. 5, the electronic device includes the first interface 10, the target type interface 12, the charging module 13, the voltage stabilizing module 14, the CPU15, the resistive element 17, and the charging apparatus 18 includes a fourth DP port and a fourth DM port. Wherein the fourth DP port (denoted by DP4 in fig. 7) of the charging device 18 is connected to the first DP port (denoted by DP1 in fig. 7) of the first interface 10, the fourth DM port (denoted by DM4 in fig. 7) of the charging device 18 is connected to the first DM port (denoted by DM1 in fig. 7) of the first interface 10, the VBUS port of the first interface 10 is respectively connected to the input port (denoted by Vin in fig. 7) of the regulator module 14 and the first end (denoted by R in fig. 7) of the resistive element 17 (denoted by R1 in fig. 7), the other end (denoted by R2 in fig. 7) of the resistive element 17 is connected to the enable end (denoted by CE in fig. 7) of the regulator module 14, the output port (denoted by Vout in fig. 7) of the regulator module 14 is respectively connected to the first port (denoted by VCC in fig. 7) of the CPU15 and the first port (denoted by VCC in fig. 7) of the target type interface 12, the second DP port (denoted by IO port 15 in fig. 7) of the regulator module 14 is connected to the regulator module, the first DP port of the first interface 10 is connected to the second DP port (denoted by DP2 in fig. 7) of the target type interface 12, the first DM port (denoted by DM1 in fig. 7) of the first interface 10 is connected to the second DM port (denoted by DM2 in fig. 7) of the target type interface 12, the second DP port of the target type interface 12 is connected to the third DP port (denoted by DP3 in fig. 7) of the charging module 13, and the second DM port of the target type interface 12 is connected to the third DM port (denoted by DM3 in fig. 7) of the charging module 13.
Optionally, in this embodiment of the present application, with reference to fig. 1, fig. 4, and fig. 6, as shown in fig. 8, the electronic device includes: a first interface 10, a first fet B1, a second fet B2, a target type interface 12, a charging module 13, a CPU15 and a charging device 18; the CPU15 includes a second destination port and a first destination port, the first destination port includes a first port and a second port, and the charging device 18 includes a fourth DP port and a fourth DM port. Wherein the fourth DP port (denoted by DP4 in fig. 8) of the charging device 18 is connected to the first DP port (denoted by DP1 in fig. 8) of the first interface 10, the fourth DM port (denoted by DM4 in fig. 8) of the charging device 18 is connected to the first DM port (denoted by DM1 in fig. 8) of the first interface 10, the first DP port of the first interface 10 is respectively connected to the S-pole of the first fet B1 and the second DP port (denoted by DP2 in fig. 8) of the destination type interface 12, the first DM port (denoted by DM1 in fig. 8) of the first interface 10 is respectively connected to the S-pole of the second fet B2 and the second DM port (denoted by DM2 in fig. 8) of the destination type interface 12, the second DP port of the destination type interface 12 is connected to the third DP port (denoted by DM2 in fig. 8) of the charging module 13, the second DM port of the destination type interface 12 is connected to the third DM port (denoted by DM3 in fig. 8), a first port (denoted IO1 in fig. 8) of the CPU15 is connected to the g-pole of the first fet B1, a second port (denoted IO2 in fig. 8) of the CPU15 is connected to the g-pole of the second fet B2, and a second target port (denoted VCC1 in fig. 8) of the CPU15 is connected to the third port (denoted VCC2 in fig. 8) of the target type interface 12.
The embodiment of the application provides an electronic device, and a switching module is added between a first interface and a target type interface in the electronic device, so that under the condition that the electronic device is connected with a charging device, power is directly supplied to the target type interface, and the electronic device can identify the charging device and perform charging. In the scheme, the switching module is added in the electronic equipment, so that when the electronic equipment is connected with the charging device, the switching module can directly supply power to the target type interface, the situation that the charging device cannot supply power to the electronic equipment due to the fact that the electronic equipment cannot identify the charging device or identify errors is avoided, and the power failure risk of the electronic equipment is reduced.
An embodiment of the present application further provides a charging control method, and fig. 9 shows a flowchart of the charging control method provided in the embodiment of the present application. As shown in fig. 9, the charging control method provided in the embodiment of the present application may include steps 201 and 202 described below.
Step 201, when the electronic device is connected with the charging device and the electronic device is in power failure, the electronic device outputs a charging voltage within a target voltage range to the electronic device through the switching module.
In this embodiment, the charging device may output the charging voltage within the target voltage range to the adaptor module through the first interface, so that the adaptor module may output the charging voltage (e.g., 5V) to the target type interface, and the target type interface may control the conduction of the charging module and the charging device to charge the electronic device.
Optionally, in this embodiment of the application, the step 201 may be specifically implemented by the following step 201 a.
Step 201a, when the electronic device is connected with the charging device and the electronic device is in power failure, the electronic device controls the charging device to output the charging voltage within the target voltage range to the electronic device through enabling of the enabling port.
In this embodiment, in a case that the electronic device is connected to the charging apparatus, the voltage stabilizing module may be pulled up to the VBUS of the first interface through the resistance element, so that when the charging apparatus outputs the charging voltage to the first interface, the voltage stabilizing module may adjust the charging voltage through the resistance element, so that the charging voltage meets an operating voltage range of the target type interface, and thus the target type interface may transmit the DP/DM signal output by the charging apparatus to the charging module.
Step 202, the electronic device controls a charging module in the electronic device to charge the electronic device based on the charging voltage.
In this application embodiment, the electronic device may output the charging voltage to the target type interface through the charging voltage received by the switching module, so that the electronic device may control the target type interface to be conducted with the charging module, and the charging device may charge the electronic device.
Alternatively, in this embodiment of the application, the step 202 may be specifically implemented by the following step 202a or step 202 b.
Step 202a, in a case that a target type interface in the electronic device receives a charging voltage, the electronic device controls the target type interface to output a communication signal to the charging module, and in a case that the communication signal is the charging signal, controls the charging module to charge the electronic device.
In this embodiment, after the voltage stabilizing module outputs the charging voltage to the target type interface, the CPU in the electronic device controls the target type interface to connect the DP/DM port of the target type interface with the DP/DM port of the charging module, so that the charging module may establish a charging protocol handshake with the charging device, so that the electronic device may control the charging module to charge the electronic device.
In the embodiment of the application, the voltage stabilizing module supplies power to the target type interface, so that the situation that the electronic equipment is in a power failure state, a charging protocol handshake cannot be established between the charging module in the electronic equipment and an external charger, and the electronic equipment cannot be started is avoided, and the risk of power failure of the electronic equipment is reduced.
Alternatively, in this embodiment of the application, the step 202a may be specifically implemented by the step 202a1 described below.
Step 202a1, in a case that the target type interface in the electronic device receives the charging voltage, the electronic device controls the target type interface to output a communication signal to the charging module, and in a case that the communication signal is the charging signal, determines a current value range corresponding to the dedicated charging port DCP, and controls the charging module to charge the electronic device with a target current, where the target current is a current having a current value within the current value range corresponding to the DCP.
In this embodiment of the application, under the condition that the DP/DM port of the target type interface and the DP/DM port of the charging module are connected, the electronic device may detect that the communication signal is the charging signal, so that when the charging module establishes the charging handshake protocol with the charging device, the type of the charging device is identified as DCP, and thus the electronic device may charge the electronic device by using the charging current corresponding to the DCP.
In the embodiment of the application, under the condition that the target type interface in the electronic equipment receives the charging voltage, the DP/DM port of the charging module can perform charging protocol detection with the DP/DM port of the target type interface, so that the charging device can be accurately identified, the charging current threshold is determined, the electronic equipment is prevented from being started or restarted repeatedly due to the fact that the current of the electronic equipment is too small, and therefore the power failure risk of the electronic equipment is reduced.
202b, under the condition that the electronic equipment is connected with the charging device, receiving a communication signal output by the charging device through the switch module, and controlling the switch module to output the communication signal to the charging module by the electronic equipment; and controlling the charging module to charge the electronic equipment under the condition that the communication signal is the charging signal.
In this embodiment, when the electronic device is connected to the charging device, the electronic device may transmit the communication signal from the DP/DM port of the charging device to the DP/DM port of the charging module through the switch module, so that the electronic device may receive the communication signal of the charging device to perform a charging handshake protocol to charge the electronic device.
Alternatively, in this embodiment of the application, the step 202a or 202b may specifically be implemented by the step 202a1 described below, where "controlling the charging module to charge the electronic device when the communication signal is the charging signal".
Step 202a1, in case that the communication signal is a charging signal, the electronic device determines a current value range corresponding to the DCP, and controls the charging module to charge the electronic device with a target current, where the target current is a current having a current value within the current value range corresponding to the DCP.
In this application embodiment, after the communication signal in the charging device is transmitted to the charging module, the electronic device can determine that the communication signal is the charging signal, and thus the charging module can perform a charging handshake protocol with the charging device, and thus the electronic device can recognize that the type of the charging device is DCP, and thus the electronic device can adopt the charging current corresponding to the DCP to charge the electronic device.
The application provides a charging control method, under the condition that an electronic device is connected with a charging device, the charging device can output charging voltage to the electronic device through a switching module, so that the electronic device can control the charging module to charge the electronic device according to the charging voltage. In the scheme, the switching module can directly output the charging voltage to the electronic equipment, so that the electronic equipment can be in charging communication with the charging device according to the charging voltage, the electronic equipment can identify the charger and perform charging, the problem that the electronic equipment cannot accurately identify the charging device due to the fact that the electronic equipment cannot perform charging protocol handshake when being in a power-down state is avoided, and therefore the electronic equipment cannot be started or restarted repeatedly when being connected with the charging device is solved, and the power-down risk of the electronic equipment is reduced.
Optionally, in this embodiment of the application, after the step 202a1, the charging control method provided in this embodiment of the application further includes the following step 301 or step 302.
Step 301, under the condition that the charging module is detected to be in the charging state, the electronic device controls the enabling port to enable the voltage stabilizing module in the electronic device to be in the non-working state so as to control the voltage stabilizing module to stop outputting the charging voltage to the target type interface.
In this embodiment, the second port (i.e., the IO port) of the CPU controls the enable port of the voltage stabilizing module, so that the voltage stabilizing module is enabled to be grounded, and when the electronic device receives other communication signals, the target type interface may conduct other circuits (e.g., a data transmission circuit) to implement different functions.
In the embodiment of the application, when it is detected that the electronic device is in a charging state, the electronic device may control the voltage stabilizing module to stop outputting the charging voltage to the CPU and the target type interface, so that the electronic device may implement different functions through the target type interface when receiving other communication signals (e.g., data transmission signals), and thus, the compatibility of the electronic device is improved.
And 302, controlling the switch module to be in an open circuit state under the condition that the charging module is in the charging state so as to control the switch module to stop outputting the communication signal to the charging module.
In this application embodiment, under the condition that the charging module is in the charging state, the CPU supplies power to the switch module through the first target port to control the switch module to be turned off, so that when the electronic device receives other communication signals, the electronic device may turn on other circuits (for example, a data transmission circuit) through the target type interface to implement different functions.
In the embodiment of the application, when it is detected that the electronic device is in the charging state, the electronic device can control the switch module to be in the off state, so that the electronic device can realize different functions through the target type interface when receiving other communication signals (for example, data transmission signals), and thus, the compatibility of the electronic device is improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the present embodiments are not limited to those precise embodiments, which are intended to be illustrative rather than restrictive, and that various changes and modifications may be effected therein by one skilled in the art without departing from the scope of the appended claims.

Claims (12)

1. An electronic device, characterized in that the electronic device comprises: the device comprises a first interface, a switching module, a target type interface and a charging module;
the first interface is connected with the switching module, the switching module is connected with a first port of the target type interface, and a second port of the target type interface is connected with the charging module;
when the electronic equipment is connected with a charging device and the electronic equipment is in power failure, the first interface is used for outputting charging voltage within a target voltage range to the switching module, the switching module is used for outputting the charging voltage to a target type interface, and the target type interface is used for receiving a communication signal output by the charging device and outputting the communication signal to the charging module when receiving the charging voltage.
2. The electronic device of claim 1, wherein the patching module comprises: a voltage stabilizing module and a Central Processing Unit (CPU);
the first interface is respectively connected with an input port of the voltage stabilizing module and an enabling port of the voltage stabilizing module, an output port of the voltage stabilizing module is connected with a first port of the target type interface, a first port of the CPU is connected with an output port of the voltage stabilizing module, and a second port of the CPU is connected with the enabling port;
the voltage stabilizing module is used for outputting the charging voltage to the CPU; the CPU is used for detecting whether the charging module is in a charging state or not under the condition that the charging voltage is received, and controlling the enabling port to enable the voltage stabilizing module to be in a non-working state under the condition that the charging module is in the charging state so as to control the voltage stabilizing module to stop outputting the charging voltage to the CPU and the target type interface.
3. The electronic device of claim 1, wherein the patching module comprises: a switch module and a CPU;
the first interface is connected with a first end of the switch module, and a second end of the switch module is connected with the charging module; the first port of the CPU is connected with the third end of the switch module;
under the condition that the electronic equipment is connected with a charging device and the switch module is in a conducting state, the switch module is used for receiving the communication signal output by the charging device and outputting the communication signal to the charging module; the charging module is used for charging the electronic equipment under the condition that the communication signal is a charging signal; the CPU is used for controlling the switch module to be in an open circuit state under the condition that the charging module is in a charging state, so as to control the switch module to stop outputting the communication signal to the charging module.
4. The electronic device of claim 1 or 2, further comprising a resistive element;
one end of the resistor element is connected with the enable port, the other end of the resistor element is connected with the first interface, and the first interface is connected with the charging device;
when the electronic device is connected with the charging device, the enabling port enables the charging device to output the charging voltage within the target voltage range to the voltage stabilizing module through the first interface through the resistance element.
5. The electronic device of claim 1, wherein the first interface comprises a first data positive signal (DP) port and a first data negative signal (DM) port, wherein the second port of the target type interface comprises a second DP port and a second DM port, and wherein the charging module comprises a third DP port and a third DM port;
wherein the first DP port is connected to the second DP port, the first DM port is connected to the second DM port, the second DP port is connected to the third DP port, and the second DM port is connected to the third DM port.
6. The electronic device of claim 5, wherein the switch module is a first FET and a second FET;
the source S of the first field effect transistor is connected with the first DP port, and the drain D of the first field effect transistor is connected with the third DP port; and the source S of the second field effect transistor is connected with the first DM port, and the drain D of the second field effect transistor is connected with the third DM port.
7. The electronic device of claim 1, wherein the charging device comprises a Dedicated Charging Port (DCP);
the charging module is specifically configured to determine a current value range corresponding to the DCP when the communication signal is a charging signal, and charge the electronic device with a target current, where the target current is a current in the current value range corresponding to the DCP.
8. A charging control method applied to the electronic device according to any one of claims 1 to 7, the charging control method comprising:
under the condition that the electronic equipment is connected with a charging device and the electronic equipment is in power failure, outputting charging voltage within a target voltage range to the electronic equipment through a switching module;
and controlling a charging module in the electronic equipment to charge the electronic equipment based on the charging voltage.
9. The method of claim 8, wherein outputting, by the transition module, the charging voltage within the target voltage range to the electronic device comprises:
and controlling the charging device to output the charging voltage within the target voltage range to the electronic equipment through the enabling of the enabling port.
10. The method of claim 8, wherein the controlling a charging module in the electronic device to charge the electronic device based on the charging voltage comprises:
under the condition that a target type interface in the electronic equipment receives the charging voltage, controlling the target type interface to output a communication signal to the charging module, and under the condition that the communication signal is a charging signal, controlling the charging module to charge the electronic equipment;
or,
under the condition that the electronic equipment is connected with the charging device, the communication signal output by the charging device is received through the switch module, the switch module is controlled to output the communication signal to the charging module, and under the condition that the communication signal is the charging signal, the charging module is controlled to charge the electronic equipment.
11. The method of claim 10, wherein the controlling the charging module to charge the electronic device if the communication signal is a charging signal comprises:
and under the condition that the communication signal is a charging signal, determining a current value range corresponding to a special charging port DCP, and controlling the charging module to charge the electronic equipment through a target current, wherein the target current is a current with a current value within the current value range corresponding to the DCP.
12. The method of any one of claims 8-10, wherein after controlling a charging module in the electronic device to charge the electronic device based on the charging voltage, the method further comprises:
under the condition that the charging module is detected to be in a charging state, controlling the enabling port to enable a voltage stabilizing module in the electronic equipment to be in a non-working state so as to control the voltage stabilizing module to stop outputting a charging voltage to a target type interface;
or,
and under the condition that the charging module is in a charging state, controlling the switch module to be in an open circuit state so as to control the switch module to stop outputting the communication signal to the charging module.
CN202210079826.6A 2022-01-24 2022-01-24 Electronic device and charging control method Pending CN114498831A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210079826.6A CN114498831A (en) 2022-01-24 2022-01-24 Electronic device and charging control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210079826.6A CN114498831A (en) 2022-01-24 2022-01-24 Electronic device and charging control method

Publications (1)

Publication Number Publication Date
CN114498831A true CN114498831A (en) 2022-05-13

Family

ID=81474951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210079826.6A Pending CN114498831A (en) 2022-01-24 2022-01-24 Electronic device and charging control method

Country Status (1)

Country Link
CN (1) CN114498831A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114817337A (en) * 2022-06-23 2022-07-29 深圳市科中云技术有限公司 Hardware interface type self-adaptive matching method and related device
CN115589051A (en) * 2022-11-18 2023-01-10 荣耀终端有限公司 Charging method and terminal equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114817337A (en) * 2022-06-23 2022-07-29 深圳市科中云技术有限公司 Hardware interface type self-adaptive matching method and related device
CN114817337B (en) * 2022-06-23 2022-09-16 深圳市科中云技术有限公司 Hardware interface type self-adaptive matching method and related device
CN115589051A (en) * 2022-11-18 2023-01-10 荣耀终端有限公司 Charging method and terminal equipment
CN115589051B (en) * 2022-11-18 2023-04-18 荣耀终端有限公司 Charging method and terminal equipment

Similar Documents

Publication Publication Date Title
JP6923886B2 (en) High speed turn-on power switch
US9859737B2 (en) Method and apparatus for performing system power management in electronic device equipped with battery
US10622802B2 (en) Power receiving apparatus and control circuit thereof
EP2402864B1 (en) Portable charging apparatus, charging method thereof, and charging system
US9142982B2 (en) Method and apparatus for performing charging port detection control
US8880909B2 (en) Auto-detect polling for correct handshake to USB client
US9246342B2 (en) Charging system for portable electronic equipment
US8756358B2 (en) Method and device for identifying universal serial bus (USB) insertion or charger insertion of mobile terminal
US9142985B2 (en) Battery charger for portable electronic equipment
US20080265838A1 (en) Battery charging using a USB-ID pin of a USB interface
US8949631B2 (en) USB power supply method and device, and end device and system using the same
CN107453628B (en) Apparatus and method for soft short circuit protection
US10574073B2 (en) Electronic device and method for controlling power supply
US20090027010A1 (en) Portable communication device and method for charging through discernment of charging cable
US8188706B2 (en) Power management unit with battery detection controller and switchable regulator block
CN114498831A (en) Electronic device and charging control method
US11023030B2 (en) Electronic device and control method thereof
JP2014107970A (en) Semiconductor integrated circuit and operation method of the same
JP2010522527A (en) Charger
US11588402B2 (en) Systems and methods for charging a battery
US20130049680A1 (en) Electronic device
CN106249830B (en) Electric energy transmission system and method
CN113614919B (en) Semiconductor integrated circuit with a high-speed circuit
US10476290B2 (en) Charging two-terminal portable electronic devices
US9496737B2 (en) Charge devices and charge systems

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