CN112583064A - Charging control method and device, electronic device and computer storage medium - Google Patents

Charging control method and device, electronic device and computer storage medium Download PDF

Info

Publication number
CN112583064A
CN112583064A CN201910945056.7A CN201910945056A CN112583064A CN 112583064 A CN112583064 A CN 112583064A CN 201910945056 A CN201910945056 A CN 201910945056A CN 112583064 A CN112583064 A CN 112583064A
Authority
CN
China
Prior art keywords
charging
adapter
electronic device
parameter
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910945056.7A
Other languages
Chinese (zh)
Other versions
CN112583064B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910945056.7A priority Critical patent/CN112583064B/en
Priority to PCT/CN2020/117935 priority patent/WO2021063274A1/en
Publication of CN112583064A publication Critical patent/CN112583064A/en
Application granted granted Critical
Publication of CN112583064B publication Critical patent/CN112583064B/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
    • H02J7/007Regulation of charging or discharging current or voltage
    • 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
    • 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
    • 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

本公开提供了一种充电控制方法及其装置、电子设备、计算机存储介质。所述充电控制方法包括:获取为所述电子设备充电的适配器的端口类型;根据所述适配器的端口类型设置电子设备内充电电路的电路参数;检测所述适配器是否为PD适配器;当所述适配器为PD适配器时,获取当前的电池电压;根据所述当前的电池电压,获取并运行PD充电控制脚本;根据所述PD充电脚本,从所述PD适配器获取充电功率。本公开的充电控制方法具有较好的通用性。

Figure 201910945056

The present disclosure provides a charging control method and a device thereof, an electronic device, and a computer storage medium. The charging control method includes: acquiring a port type of an adapter charging the electronic device; setting circuit parameters of a charging circuit in the electronic device according to the port type of the adapter; detecting whether the adapter is a PD adapter; When it is a PD adapter, obtain the current battery voltage; obtain and run a PD charging control script according to the current battery voltage; obtain charging power from the PD adapter according to the PD charging script. The charging control method of the present disclosure has good versatility.

Figure 201910945056

Description

Charging control method and device, electronic device and computer storage medium
Technical Field
The present disclosure relates to the field of electronics, and in particular, to a charging control method and apparatus, an electronic device, and a computer storage medium.
Background
The PD power transmission protocol published by the USB-IF organization can enable the theoretical transmission power of typeC of the existing 5V2A to reach 100w, and meanwhile, the effect of one-device multi-charging is achieved for the normalized fast-charging market, and the PD charging protocol must be supported by the version above android7.0 specified by google. The current USB-PD has released the 3.0 version, and a plurality of electronic equipment manufacturers have integrated and supported a PD charging scheme at the ap end.
However, some handsets are able to recognize the PD adapter but cannot support the PD charging protocol because the hardware does not support charging voltages above 5V. Another situation is that hardware differences are caused by different types of electronic devices, and the same type of electronic device but different models. This hardware difference results in a large specificity of the charging parameters of the supported PDs.
Therefore, great trouble is caused to software design, and manufacturers need to design a set of charging control method for electronic equipment with different hardware, so that a great deal of manpower and material resources are consumed.
Disclosure of Invention
An object of the present disclosure is to provide a charge control method with high versatility.
In order to solve the technical problem, the following technical scheme is adopted in the disclosure:
according to an aspect of the present disclosure, there is provided a charge control method for charging an electronic device, the charge control method including:
acquiring a port type of an adapter for charging the electronic equipment;
setting circuit parameters of a charging circuit in the electronic equipment according to the port type of the adapter, and charging the electronic equipment by using the circuit parameters of the charging circuit;
detecting whether the adapter is a PD adapter;
when the adapter is a PD adapter, acquiring the current battery voltage of the electronic equipment;
operating a PD charging control script to charge the electronic equipment according to the current battery voltage;
wherein when the current battery voltage is less than or equal to a first voltage threshold, the PD charge control script is run including the steps of:
setting a first PD charging parameter according to the charging parameter supported by the PD adapter and the charging parameter supported by the electronic equipment, and charging the electronic equipment by using the first PD charging parameter.
According to another aspect of the present disclosure, there is provided a charge control device including:
the port type acquisition module is used for acquiring the port type of an adapter for charging the electronic equipment;
the charging circuit parameter adjusting module is used for setting circuit parameters of a charging circuit in the electronic equipment according to the port type of the adapter;
the PD adapter judging module is used for detecting whether the adapter is a PD adapter;
the voltage acquisition module is used for acquiring the current battery voltage of the electronic equipment when the adapter is a PD adapter;
the PD charging control script processing module is used for operating a PD charging control script according to the current battery voltage;
and the PD charging parameter setting module is used for setting a first PD charging parameter according to the charging parameter supported by the PD adapter and the charging parameter supported by the electronic equipment, and charging the electronic equipment by using the first PD charging parameter.
According to another aspect of the present disclosure, an electronic device is provided, the electronic device including:
a storage unit storing a charging control program;
and the processing unit is used for executing the steps of the charging control method when the charging control program is operated.
According to another aspect of the present disclosure, a computer storage medium is provided that stores a charging control program that, when executed by at least one processor, implements the steps of the charging control method.
According to the embodiment of the disclosure, the interface of the PD charging control script which can be called is set in the main charging thread which is suitable for various hardware environments of the electronic device, so that a specific PD charging control script can be specifically set in advance according to the specificity of the hardware environment of the electronic device itself, so as to call the main charging thread. Therefore, when the PD adapter is detected to be the power supply equipment, the PD charging control script can be called, so that the electronic equipment can be charged quickly based on the PD charging protocol. The charging control method disclosed by the invention has the advantages that the charging step suitable for hardware environments of various electronic equipment is separated from the specific PD charging step, so that the charging can be carried out by utilizing the charging control method disclosed by the invention no matter whether the electronic equipment supports PD charging or whether the supported PD charging parameters are the same. Therefore, the method can be basically applied to electronic equipment in various hardware environments, and has better universality.
Drawings
FIG. 1a is a schematic structural diagram of an embodiment of an electronic device according to the present disclosure;
FIG. 1b is a block diagram of a circuit configuration of the electronic device of the present disclosure;
FIG. 2 is a communication diagram of a USB PD in charging an electronic device;
FIG. 3 is a flowchart of an embodiment of a charge control method of the present disclosure;
FIG. 4 is a flow chart of another embodiment of the disclosed charge control method;
FIG. 5 is a partial flow diagram of another embodiment of a charge control method of the present disclosure;
FIG. 6 is a partial flow diagram of another embodiment of a charge control method of the present disclosure;
fig. 7 is a functional block schematic diagram of the charge control device of the present disclosure;
fig. 8 is a system architecture diagram of an electronic device of the present disclosure.
Detailed Description
While this disclosure may be susceptible to embodiment in different forms, there is shown in the drawings and will herein be described in detail only some specific embodiments thereof with the understanding that the present description is to be considered as an exemplification of the principles of the disclosure and is not intended to limit the disclosure to that as illustrated herein.
Thus, a feature indicated in this specification will serve to explain one of the features of one embodiment of the disclosure, and not to imply that every embodiment of the disclosure must have the stated feature. Further, it should be noted that this specification describes many features. Although some features may be combined to show a possible system design, these features may also be used in other combinations not explicitly described. Thus, the combinations illustrated are not intended to be limiting unless otherwise specified.
In the embodiments shown in the drawings, directional references (such as upper, lower, left, right, front and rear) are used to explain the structure and movement of the various elements of the disclosure not absolutely, but relatively. These descriptions are appropriate when the elements are in the positions shown in the drawings. If the description of the positions of these elements changes, the indication of these directions changes accordingly.
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted.
Preferred embodiments of the present disclosure are described in further detail below with reference to the accompanying drawings of the present specification.
The embodiment of the disclosure provides a method for detecting battery leakage current, which can be applied to an intelligent terminal and a mobile terminal device configured with a battery power supply system. The device to be charged may be, for example, a terminal or a communication terminal including, but not limited to, a device arranged to receive/transmit communication signals via a wireline connection, such as via a Public Switched Telephone Network (PSTN), a Digital Subscriber Line (DSL), a digital cable, a direct cable connection, and/or another data connection/network and/or via, for example, a cellular network, a Wireless Local Area Network (WLAN), a digital television network such as a digital video broadcasting-handheld (DVB-H) network, a satellite network, an amplitude modulation-frequency modulation (AM-FM) broadcast transmitter, and/or a wireless interface of another communication terminal. Communication terminals arranged to communicate over a wireless interface may be referred to as "wireless communication terminals", "wireless terminals", and/or "smart terminals". Examples of smart terminals include, but are not limited to, satellite or cellular phones; personal Communication System (PCS) terminals that may combine a cellular radiotelephone with data processing, facsimile and data communication capabilities; personal Digital Assistants (PDAs) that may include radiotelephones, pagers, internet/intranet access, Web browsers, notepads, calendars, and/or Global Positioning System (GPS) receivers; and conventional laptop and/or palmtop receivers or other electronic devices that include a radiotelephone transceiver. In addition, the terminal may further include, but is not limited to, a rechargeable electronic device having a charging function, such as an electronic book reader, a smart wearable device, a mobile power source (e.g., a charger, a travel charger), an electronic cigarette, a wireless mouse, a wireless keyboard, a wireless headset, a bluetooth speaker, and the like.
Please refer to fig. 1a and 1 b. The electronic device may comprise a back cover 11, a display 12, a circuit board, a battery. It should be noted that the electronic device is not limited to include the above contents. Wherein the rear shell 11 may form the outer contour of the electronic device. In some embodiments, the rear housing 11 may be a metal rear housing, such as a metal such as magnesium alloy, stainless steel, and the like. It should be noted that the material of the rear case 11 in the embodiment of the present application is not limited to this, and other manners may also be adopted, such as: the rear housing 11 may be a plastic rear housing, a ceramic rear housing, a glass rear housing, or the like.
Wherein the display screen 12 is mounted in the rear case 11. The display screen 12 is electrically connected to the circuit board to form a display surface of the electronic device. In some embodiments, the display surface of the electronic device may be provided with non-display areas, such as: the top end or/and the bottom end of the electronic device may form a non-display area, that is, the electronic device forms a non-display area on the upper portion or/and the lower portion of the display screen 12, and the electronic device may mount a camera, a receiver, and the like on the non-display area. Note that the display surface of the electronic device may not be provided with the non-display area, that is, the display 12 may be a full-screen. The display screen can be laid on the whole display surface of the electronic equipment, so that the display screen can be displayed on the display surface of the electronic equipment in a full screen mode.
The display 12 may be one or a combination of liquid crystal display, organic light emitting diode display, electronic ink display, plasma display, and display using other display technologies. The display screen 12 may include an array of touch sensors (i.e., the display screen 12 may be a touch display screen). The touch sensor may be a capacitive touch sensor formed by a transparent touch sensor electrode (e.g., an Indium Tin Oxide (ITO) electrode) array, or may be a touch sensor formed using other touch technologies, such as acoustic wave touch, pressure sensitive touch, resistive touch, optical touch, and the like, and the embodiments of the present application are not limited thereto.
It should be noted that, in some embodiments, a cover plate may be disposed on the display 12, and the cover plate may cover the display 12 to protect the display 12. The cover may be a clear glass cover so that the display 12 is shown through the cover. In some embodiments, the cover plate may be a glass cover plate made of a material such as sapphire. In some embodiments, after the display screen 12 is mounted on the rear case 11, a receiving space is formed between the rear case 11 and the display screen 12, and the receiving space can receive components of the electronic device, such as a circuit board, a battery, and the like. The circuit board is mounted in the rear case 11, and may be a main board of the electronic device, and one, two or more functional devices of a motor, a microphone, a speaker, an earphone interface, a universal serial bus interface, a camera, a distance sensor, an ambient light sensor, a receiver, a processing unit, and the like may be integrated on the circuit board.
In some embodiments, the circuit board may be fixed within the rear case 11. Specifically, the circuit board may be screwed to the rear case 11 by screws, or may be snap-fitted to the rear case 11 by means of a snap. It should be noted that the way of fixing the circuit board to the rear shell 11 specifically is not limited to this, and other ways, such as a way of fixing by a snap and a screw together, are also possible. Wherein a battery is mounted in the rear case 11, and the battery 11 is electrically connected to the circuit board to supply power to the electronic device. The rear case 11 may serve as a battery cover of the battery. The rear case 11 covers the battery to protect the battery, reducing damage to the battery due to collision, dropping, etc. of the electronic apparatus.
Referring to fig. 2, fig. 2 is a block diagram of an electronic device according to an embodiment of the present disclosure. The electronic device may comprise a storage and processing circuit 131, and the storage and processing circuit 131 may be integrated on a circuit board. The storage and processing circuit 131 may include a memory unit, such as a hard disk drive memory unit, a non-volatile memory unit (e.g., a flash memory or other electronically programmable read only memory unit used to form a solid state drive, etc.), a volatile memory unit (e.g., a static or dynamic random access memory unit, etc.), and the like, and embodiments of the present application are not limited thereto. Processing circuitry in the storage and processing circuitry 131 may be used to control the operation of the electronic device. The processing circuitry may be implemented based on one or more micro-processing units, microcontrollers, digital signal processing units, baseband processing units, power management units, audio codec chips, application specific integrated circuits, display driver integrated circuits, and the like.
The storage and processing circuit 131 may be used to run software in the electronic device, such as an Internet browsing application, a Voice Over Internet Protocol (VOIP) phone call application, an email application, a media playing application, operating system functions, and the like.
The electronic device may include input-output circuitry 132, and the input-output circuitry 132 may be disposed on a circuit board. The input-output circuitry 132 may be used to enable the electronic device to enable input and output of data, i.e., to allow the electronic device to receive data from and also to allow the electronic device to output data from the electronic device to an external device. The input-output circuit 132 may further include a sensor 1321. The sensors 1321 can include ambient light sensors, optical and capacitive based proximity sensors, touch sensors (e.g., optical based touch sensors and/or capacitive touch sensors, where the touch sensors can be part of a touch display screen or used independently as a touch sensor structure), acceleration sensors, temperature sensors, and other sensors, among others.
The electronic device may include power management circuitry and other input-output units 1322. Input-output units may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light emitting diodes and other status indicators, and the like.
A user may input commands through the input-output circuitry 132 to control the operation of the electronic device and may use the output data of the input-output circuitry 132 to enable receiving status information and other outputs from the electronic device.
The electronic device further comprises a charging circuit 133. The charging circuit 133 may charge the battery cell 14 of the electronic device. The charging circuit 133 may be used to further regulate the charging voltage and/or charging current input from the adapter to meet the charging requirements of the battery.
The electronic device is configured with a charging interface, and the charging interface 123 may be, for example, a USB2.0 interface, a Micro USB interface, or a USB TYPE-C interface. In some embodiments, the charging interface may also be a lightning interface, or any other type of parallel or serial interface capable of being used for charging. The charging interface 400 is connected with the adapter through a data line, the adapter obtains electric energy from mains supply, and the electric energy is transmitted to the charging circuit through the data line and the charging interface 400 after voltage conversion, so that the electric energy can be charged into the battery cell to be charged through the charging circuit.
The battery 14 in the present disclosure includes a housing, and a battery core, a battery protection board, and the like, which are wrapped in the housing. The battery protection board is an integrated circuit board which plays a role in protecting the battery core. The battery protection board is generally provided with a sampling circuit and a protection circuit. Battery 14 may include a single cell or multiple cells. When the battery 14 includes multiple cells, the multiple cells may be connected in series. Therefore, the charging voltage which can be borne by the battery 14 is the sum of the charging voltages which can be borne by a plurality of battery cores, the charging speed can be increased, and the charging heat emission can be reduced.
For example, taking the electronic device 10 as a mobile phone as an example, when the battery 14 of the electronic device 10 includes a single cell, the voltage of the internal single cell is generally between 3.0V and 4.35V. And when the battery 14 of the electronic device 10 includes two cells connected in series, the total voltage of the two cells connected in series is 6.0V-8.7V. Therefore, when a plurality of cell segments are connected in series, the output voltage of the charging circuit 133 can be increased as compared with a single cell. Compared with a single battery cell, the charging speed is equivalent, and the charging current required by multiple battery cells is about 1/N of the charging current required by a single battery cell (N is the number of the battery cells connected in series in the electronic device 10). In other words, on the premise of ensuring the same charging speed (the same charging current), the scheme of multiple cell segments can reduce the magnitude of the charging current, thereby reducing the heat productivity of the electronic device 10 during the charging process. On the other hand, compared with the single-cell scheme, the charging voltage can be increased by adopting the multi-cell series scheme under the condition that the charging current is kept the same, so that the charging speed is increased.
The following describes a related adapter for charging the electronic device 10 in the related art.
In the related art, the adaptor may operate in a constant voltage mode, and the voltage output therefrom is maintained substantially constant, such as 5V, 9V, 12V, or 20V. The output current can be pulsating direct current (the direction is unchanged, the amplitude is changed along with time), alternating current (both the direction and the amplitude are changed along with time) or constant direct current (both the direction and the amplitude are not changed along with time). The voltage output by the associated adapter is not suitable for being directly applied to the terminals of the battery, but needs to be converted by a conversion circuit in the electronic device 10 to obtain the desired charging voltage and/or charging current of the battery in the electronic device 10.
The adapter may also operate in a voltage-following manner. That is, the adapter performs bidirectional communication with the electronic device 10 to be charged, and the adapter adjusts the voltage and current output by itself according to the charging voltage and charging current required by the electronic device 10, so that the output voltage and current can be directly loaded on the battery of the electronic device 10 to charge the battery, and the electronic device 10 does not need to readjust the charging voltage and charging current again.
The conversion circuit may control the charging voltage and/or the charging current of the battery during different charging phases. For example, during the constant current charging phase, the inverter circuit may utilize a current feedback loop to cause the magnitude of the current into the battery to meet the magnitude of the first charging current expected by the battery. In the constant voltage charging stage, the conversion circuit may utilize a voltage feedback loop so that the magnitude of the voltage applied across the battery satisfies the magnitude of the charging voltage expected by the battery. During the trickle charge phase, the conversion circuit may utilize a current feedback loop such that the magnitude of the current into the battery meets the magnitude of a second charge current expected by the battery (the second charge current being less than the first charge current).
For example, when the voltage output by the relevant adapter is greater than the expected charging voltage of the battery, the conversion circuit is configured to perform a voltage-down conversion process on the voltage output by the relevant adapter, so that the magnitude of the charging voltage obtained through the voltage-down conversion meets the expected charging voltage of the battery.
The charging mode for the battery of the electronic device 10 is roughly a "normal charging mode" or a "quick charging mode". The normal charging mode refers to the adapter outputting a relatively small current value (typically less than 2.5A) or charging the battery in the device to be charged with a relatively small power (typically less than 15W). It usually takes several hours to fully charge a larger capacity battery (e.g., 3000 ma-hour capacity battery) in the normal charging mode. The fast charging mode means that the adapter is capable of outputting a relatively large current (typically greater than 2.5A, such as 4.5A, 5A or even higher) or charging the battery in the device to be charged with a relatively large power (typically greater than or equal to 15W). Compared with the ordinary charging mode, the adapter has higher charging speed in the quick charging mode, and the charging time required for completely charging the battery with the same capacity can be obviously shortened.
A PD charging scheme for charging the electronic device 10 according to a PD charging protocol is described below.
USB-Power Delivery (USBPD) is one of the mainstream fast-charge protocols at present. Is a fast charging specification established by the USB-IF organization. The USBPD increases power delivery through the USB cable and connector, extending the cable bus power supply capability in USB applications. The specification can realize higher voltage and current, the transmitted power can reach 100 watts at most, and the transmission direction of the power can be freely changed.
Referring to fig. 2, the USBPD communication is a process of modulating a message of a protocol layer into a 24MHZ FSK signal and coupling the FSK signal to or obtaining the FSK signal from the VBUS to realize communication between a handset and an adapter.
As shown in fig. 2, in USB PD communication, 24MHz FSK is coupled to the dc level of VBUS through cAC-Coupling capacitor, and in order to prevent 24MHz FSK from affecting the VBUS dc voltage of Power Supply or USB boost, a low pass filter composed of zIsolation inductor is added in the loop to filter out FSK signal.
The charging interface of the PD adapter supporting the PD charging protocol generally includes a voltage pin VBUS, a ground pin GND, data pins USB _ D + (D +) and USB _ D- (D-), a first pin CC1 and a second pin CC 2. When an electronic device 10 supports the charging of the PD adapter, its USB PD protocol interface chip will pass through
Taking the Type-C interface on the electronic device 10 as an example, two sides of the Type-C interface respectively have 12 pins. Wherein, TX1+, TX1-, RX1+, RX1-, TX2+, TX2-, RX2+ and RX 2-are four pairs of differential signal pins, GND is a ground pin, D + and D-are USB differential signal pins compatible with USB2.0, VBUS is a power pin, CC1 and CC2 are pins for detecting positive and negative insertion, distinguishing master and slave, configuring VBUS voltage, etc., and SBU1 and SBU2 are bus pins.
Because the Type-C interface has four power pins and four ground connection pins, consequently, the Type-C interface can support 100W's power output in theory, and this is also the reason that the USB-PD quick charge can be realized to the Type-C interface. On this basis, the USB-PD fast charging refers to a process of requesting the adapter to adjust the output voltage and current by coupling an FSK signal at the VBUS dc level, and specifically includes the following steps:
step 1: the electronic device 10 recognizes whether the inserted adapter is a PD adapter supporting fast charging, and if so, switches to change the Type-C differential signal pin to be used for transmitting DP signals (including PD commands and data), and change the Type C SBU1 and SUB2 bus pins to be used for transmitting AUX auxiliary signals.
Step 2: starting a USB-PD equipment strategy manager, monitoring a Frequency-shift keying (FSK) signal coupled on a direct current level of VBUS by the strategy manager, decoding the FSK signal to obtain a capability resource (Capabilities Source) message, and analyzing the capability resource message according to a USB-PD specification to obtain all voltage and current pair lists supported by a PD adapter;
and step 3: the electronic device 10 selects a voltage and current pair from the Capabilities Source message based on the user's configuration and loads the voltage and current pair into the payload portion of the charge Request (Request) message, and the policy manager then couples the FSK signal to the VBUS dc level.
And 4, step 4: the adapter decodes the FSK signal and sends a receive (Accept) message to the electronic device 10 while adjusting the output voltage and current of the adapter.
And 5: after receiving the Accept message, the electronic device 10 adjusts the charging voltage and current of the charging IC.
Referring to fig. 3, fig. 3 shows a flowchart of a charging control method according to the present disclosure. Specifically, the charging control method firstly enters a main charging thread, and the main charging thread is suitable for electronic devices 10 with different hardware environments, and the charging control method specifically includes:
in step S20, the port type of the adapter is acquired.
In an embodiment, when the charging interface of the electronic device 10 is connected to the adapter, the charging control module in the electronic device 10 detects the port type according to the BC1.2 charging protocol. The Port types of the adapter include SDP (Standard Downstream Port), CDP (Charging Downstream Port), and DCP (Dedicated Charging Port).
Step S21, setting circuit parameters of the charging circuit in the electronic device 10 according to the port type of the adapter, and charging the electronic device 10 with the circuit parameters of the charging circuit.
In one embodiment, depending on the detected port type, a first charging current is obtained from the adapter to charge the electronic device if the charging control module detects that the adapter is of the SDP type, and a second charging current is obtained from the adapter to charge the electronic device if the charging control module detects that the adapter is of the CDP type. Taking the adaptor type as DCP as an example, when it is detected that the charging interface type of the electronic device 10 is DCP, the charging power of 5V and 2A input by the adaptor is received.
Meanwhile, in this embodiment, the charging control module controls the circuit parameters of the charging circuit through a logic circuit inside the hardware system to adapt to the current output by the adapter. Since the charging circuit in the electronic device 10 is connected to the adapter to form a path after the start of charging, the output of the adapter can be adjusted by adjusting the circuit parameters of the charging circuit.
Specifically, in this embodiment, a series of desired charging currents and/or charging voltages, such as a charging input current, a charging current, and a cutoff current, are set, and then a logic control circuit in a hardware system adjusts circuit parameters of the charging circuit according to the parameters.
In the next step, step S22, it is detected whether the adapter is a PD adapter.
Please refer to the method for detecting whether the adapter is a PD adapter in the above PD charging scheme section. There are two types of detection results depending on whether the adapter is a PD adapter. In the following examples, the first case is described first:
step S23, when the adapter is a PD adapter, acquiring the current battery voltage of the electronic device 10;
specifically, the current battery voltage may be obtained by reading a measurement value of a voltage measurement circuit on the battery protection board.
In step S24, the PD charging control script is executed according to the current battery voltage.
In this embodiment, when the PD charging control script is executed, a specific PD charging thread is entered. And then according to the steps in the PD charging thread, sending specific PD charging parameters to the adapter so as to acquire corresponding charging power from the PD adapter.
When the adapter is detected to be a specific PD adapter, a jump can be made to the charging chip file stored in the application processor in the electronic device 10 by means of the function pointer. A PD charging function specific to the electronic device 10 is written in this file.
The PD charging control script may be pre-set within the electronic device 10 according to charging parameters supported by the hardware system of the electronic device 10. Or may be set by the manufacturer or the user after the electronic device 10 is shipped.
The charging parameters supported by different hardware systems may differ, and thus the specific charging control parameters in the PD charging control script corresponding to each electronic device 10 may differ accordingly.
Specifically, when the PD charging control script runs, at least the following steps are performed:
when the current battery voltage is less than or equal to the first voltage threshold, the PD charging control script runs the following steps:
step S241 sets a first PD charging parameter according to the charging parameter supported by the PD adapter and the charging parameter supported by the electronic device 10, and charges the electronic device 10 with the first PD charging parameter.
When the adapter is detected to be a PD adapter, the charging process between the adapter and the electronic device 10 is performed according to a PD charging protocol, and according to the PD protocol, the PD adapter sends a list of all voltage and current pairs supported by the PD adapter to one end of the electronic device 10, so that one end of the electronic device 10 selects a specific one of the voltage and current pairs from the list, where the selection principle is that a hardware system of the electronic device 10 must support the charging voltage and charging current, and which specific selected set of voltage and current pairs may be according to a configuration for quickly charging a user or may be the highest available charging power.
Here, if the battery in the electronic device 10 has a high voltage already at the start of charging, the voltage rises quickly when charging is performed by the PD charging method, and the battery tends to generate a large amount of heat. Therefore, in the embodiment, the first voltage threshold is set to ensure safety during the charging process. When the current charging voltage is smaller than or equal to the first voltage threshold value, setting a first PD charging parameter, and sending the first PD charging parameter to the adapter for obtaining the charging power configured by the first PD charging parameter from the adapter.
Taking the adaptor type as DCP as an example, when it is detected that the charging interface type of the electronic device 10 is DCP in the charging main thread, the charging power of 5V and 2A input by the adaptor is received. And if the adapter is a PD adapter and the voltage is less than the preset 9V, jumping to a specific PD charging thread and executing related steps in the PD charging thread.
It will be appreciated that the operation of the PD charging control script is generally based on the PD charging protocol, and thus reference may be made to the PD charging protocol section above with respect to the information interaction process between the electronic device 10 and the PD adapter.
In the PD charging thread, when the PD adapter responds to the charging parameter sent by the electronic device 10, the output voltage and the output current are adjusted to supply power to the battery of the electronic device 10. However, the PD adapter needs a certain time to adjust its charging voltage and charging current to the first charging parameter. In the time process, the electronic device 10 cannot know when the PD adapter can complete the switching of the charging voltage and the charging current, so that the circuit parameter of the charging circuit cannot be adjusted to adapt to the charging current output by the PD adapter, and thus the circuit parameter of the charging circuit is not matched with the electric energy output by the PD adapter, which easily causes the electronic device 10 to draw an excessive current from the PD adapter, and causes the charging current output by the PD adapter to exceed the rated value thereof, thereby starting overcurrent protection.
Moreover, if a non-normal PD adapter is used, or the PD adapter has a relatively high compatibility with the charging parameter requested by the electronic device 10, the PD adapter does not output the charging voltage and the charging current according to the first charging parameter sent by the electronic device 10, so that the circuit parameter of the charging circuit adjusted by the charging circuit according to the first charging parameter is not matched with the actual output voltage and the actual charging current of the PD adapter, and the charging speed is too slow or the charging safety is threatened.
Therefore, referring to fig. 4, in the present embodiment, in the PD charging thread, the step of setting the first PD charging parameter according to the charging parameter supported by the PD adapter and the charging parameter supported by the electronic device 10, and the step of obtaining the charging power configured with the first PD charging parameter from the PD adapter further includes:
step S22, monitoring the output voltage of the PD adapter;
in step S25, when the output voltage of the PD adapter is adjusted to a voltage value matching the first PD charging parameter, a circuit parameter of the charging circuit is adjusted for matching the charging current configured according to the first PD charging parameter.
In this embodiment, a single thread is opened up for detecting a transition in the output voltage of the PD adapter. For example, the electronic device 10 requests the PD adapter with the first charging parameter to monitor the instant when the output voltage of the PD adapter jumps by monitoring the voltage on the current charging bus Vbus.
For example, the charging parameter set in the main charging thread by the electronic device 10 starts to be 5V, 2A, and after entering the PD charging thread, the electronic device 10 sets the first charging parameter to be 9V, 2A and applies for the PD adapter. The electronic device 10 then monitors the point in time when the output voltage of the PD adapter jumps from 5V to 9V.
Once the time point when the output voltage of the PD adapter jumps from 5V to 9V is monitored, the charging circuit parameter in the charging circuit 10 is adjusted to adapt the charging power configured with the first PD charging parameter, so as to ensure stable and safe charging process.
It should be noted that "adjustment of charging voltage and charging current by the PD adaptor in response to the request of the first PD charging parameter" when "the current charging voltage is adjusted to the voltage value matching the first PD charging parameter". The case where the output voltage of the PD adaptor is the same as the charging voltage in the first PD charging parameter includes a case where a certain charging parameter is automatically selected instead of the first PD charging parameter to output the charging power because the PD adaptor cannot output the charging voltage and the charging current corresponding to the first PD charging parameter.
Therefore, the circuit parameters of the charging circuit can be flexibly adjusted according to the actual output voltage and the charging current of the PD adapter, and can be timely adjusted when the output voltage of the PD adapter jumps, so that the circuit parameters of the charging circuit can be well matched with the output voltage of the PD adapter, and the stable and safe charging process is ensured;
in addition, through the adaptive mechanism of this embodiment, the circuit parameters of the charging circuit can be adjusted according to the output voltage of the PD adapter, so as to avoid the situation that the charging circuit adapts to the wrong current gear.
In an embodiment, the output voltage of the adapter may be monitored through thread polling, and in this embodiment, in order to save memory consumption and occupied CPU resources, the method in this embodiment further includes: when the output voltage of the PD adapter is adjusted to a voltage value matched with the first PD charging parameter, triggering to generate a first interrupt signal;
monitoring the output voltage of the PD adapter includes:
monitoring for the occurrence of a first interrupt signal;
when the output voltage of the PD adapter is adjusted to a voltage value matched with the first PD charging parameter, triggering to generate a first interrupt signal;
when the first interrupt signal is monitored, circuit parameters of the charging circuit are adjusted for matching a charging current configured according to the first PD charging parameters.
For example, when the output voltage of the adapter is adjusted from 5V to 9V, the first interrupt signal is automatically triggered. And then the step is skipped: circuit parameters of the charging circuit are adjusted for adapting the charging current configured with the first PD charging parameters.
In this embodiment, in order to save the memory consumption and the occupied CPU resource, the PD charging thread is only executed once when the battery voltage satisfies the condition. Specifically, the charging control method is executed only when the charging control method is operated for the first time in the current charging process. In this embodiment, the operating the PD charging control script to charge the electronic device according to the current battery voltage further includes:
when the PD charging control script is executed once, charging the electronic equipment by using the first PD charging parameter;
monitoring the receiving condition of the parameter adjusting instruction of the charging circuit every preset time length;
and when receiving a charging circuit parameter adjusting instruction, adjusting the circuit parameters of the charging circuit according to the charging parameter adjusting instruction.
When the electronic device 10 applies for the charging power configured with the first PD charging parameters, the adapter supplies power to the electronic device 10 according to the charging power. In a specific example, after the PD charging control script has been executed once, a corresponding flag is made so that the PD charging control script is not executed again when the charging control method is executed next time.
In this embodiment, when the electronic device 10 needs to adjust the charging current under some conditions, in order to enable the circuit parameter of the charging circuit to be matched with the current charging current at any time, in this embodiment, it is set that the circuit parameter of the charging circuit is adjusted correspondingly each time the charging current is adjusted.
Specifically, when the PD charge control script is marked, it indicates that the PD charge control script has been executed once, and the adapter is already outputting the charging power configured according to the first PD charging parameter. However, the electronic device 10 is capable of self-regulating the magnitude of the charging current. Therefore, when the electronic device 10 is in some special situations and the charging current is adjusted, the charging circuit parameter adjustment command is generated.
It is understood that there are many scenarios that may trigger the generation of the charging circuit parameter adjustment instruction, such as lighting, extinguishing, and making a call on the screen of the electronic device 10, which all affect the magnitude of the charging current.
In the above embodiments, the steps performed by the PD charge control script when the current battery voltage is less than or equal to the first voltage threshold are explained. As charging progresses, when the battery voltage approaches the rated voltage, the voltage may be too high to fully charge. Therefore, referring to fig. 5, in the embodiment, when the current battery voltage is greater than the first voltage threshold, the PD charge control script runs and includes the following steps:
step S242 sets a second PD charging parameter according to the charging parameter supported by the PD adapter and the charging parameter supported by the electronic device 10, and charges the electronic device with the second PD charging parameter.
Wherein the output voltage of the adapter configured with the second PD charging parameters is less than the output voltage of the adapter configured with the first PD charging parameters.
In the PD charging thread, when the acquired current battery voltage is greater than a first voltage threshold value, the battery voltage is high, and the charging is required to be carried out by using a small current and a small voltage. Therefore, at this time, the electronic device 10 sends the second PD charging parameter with smaller charging power to the PD adaptor, so that the PD adaptor outputs smaller charging power to avoid the phenomenon that the battery voltage is high and cannot be fully charged.
Similarly, after the electronic device 10 sends the second PD charging parameter to the PD adapter, when the PD adapter adjusts the charging power to output the second PD charging parameter from the first PD charging parameter output, the electronic device 10 cannot know when the PD adapter can complete the switching of the charging voltage and the charging current, and thus cannot adjust the circuit parameter of the charging circuit to adapt to the charging current output by the PD adapter, which is likely to cause the mismatch between the circuit parameter of the charging circuit and the electric energy output by the PD adapter to cause the electronic device 10 to draw an excessive current from the PD adapter, and cause the charging current output by the PD adapter to exceed its rated value to start overcurrent protection.
Therefore, in this embodiment, the step of setting in the PD charging thread, setting the second PD charging parameter according to the charging parameter supported by the PD adapter and the charging parameter supported by the electronic device 10, and charging the electronic device 10 with the second PD charging parameter further includes:
monitoring an output voltage of the PD adapter;
skipping to the main charging thread according to the result of the output voltage of the PD adapter, and acquiring the charging power from the PD adapter according to the PD charging script, and then:
and when the output voltage of the PD adapter is adjusted to a voltage value matched with the second PD charging parameter, adjusting the circuit parameter of the charging circuit for matching the charging current configured according to the second PD charging parameter.
Specifically, for example, the first PD charging parameter is 9V, 2A, and the second PD charging parameter is 5V, 2A, so that after the electronic device 10 sends the second charging parameter to the PD adapter, the electronic device 10 monitors a time point when the output voltage of the PD adapter jumps from 9V to 5V.
Once the time point when the output voltage of the PD adapter jumps from 9V to 5V is monitored, the charging circuit parameter in the charging circuit is adjusted to adapt the charging power configured with the first PD charging parameter, so as to ensure stable and safe charging process.
Referring to fig. 6, in the above embodiment, the case when the adaptor is a PD adaptor is explained, and the case when the adaptor is not a PD adaptor will be explained here. Specifically, the following steps are further included after detecting whether the adapter is a PD adapter:
step S26, when the adapter is not a PD adapter, monitoring the receiving condition of the parameter adjusting instruction of the charging circuit at preset time intervals;
in step S27, when the charging circuit parameter adjustment instruction is received, the circuit parameter of the charging circuit is adjusted according to the charging parameter adjustment instruction.
Specifically, when the adapter is not a PD adapter, the charging control method continues to execute according to the steps in the main charging thread. Considering that the charging current is adjusted when the electronic device 10 is in some special situations, the charging circuit parameter adjustment command is generated when the electronic device 10 adjusts the charging current.
It is understood that there are many scenarios that may trigger the generation of the charging circuit parameter adjustment instruction, such as lighting, extinguishing, and making a call on the screen of the electronic device 10, which all affect the magnitude of the charging current.
The embodiment of the present disclosure sets an interface of the PD charging control script for calling in the main charging thread applicable to various hardware environments of the electronic device 10, and the PD charging control script has specificity for the hardware environment of the electronic device 10 itself. Therefore, when the PD adapter is detected as the power supply device, the electronic device 10 can be quickly charged based on the PD charging protocol by calling the PD charging control script. The charging control method disclosed by the invention separates the charging step suitable for various hardware environments of the electronic equipment 10 from the specific PD charging step, so that the method can be applied to the electronic equipment 10 in various hardware environments, and therefore, the charging control method disclosed by the invention has better universality.
The present disclosure further provides a charging control device 30 for charging a battery of an electronic device, and please refer to the above charging control method for an embodiment of the charging control device 30. Referring to fig. 6, the charging control apparatus 30 includes:
a port type obtaining module 31, configured to obtain a port type of an adapter that charges an electronic device;
a charging circuit parameter adjusting module 32, configured to set a circuit parameter of a charging circuit in the electronic device according to a port type of the adapter;
a PD adapter judging module 34, configured to detect whether the adapter is a PD adapter;
a voltage obtaining module 35, configured to obtain a current battery voltage of the electronic device 10 when the adapter is a PD adapter;
the PD charging control script processing module 36 is configured to obtain and run a PD charging control script according to the current battery voltage;
a charging power determining module 33, configured to obtain charging power from the PD adapter according to the PD charging script;
the PD charging parameter setting module 37 is configured to set a first PD charging parameter according to the charging parameter supported by the PD adapter and the charging parameter supported by the electronic device, and charge the electronic device with the first PD charging parameter.
In one embodiment, the charging control device 30 further includes:
the monitoring module is used for monitoring the output voltage of the PD adapter;
and the charging circuit parameter adjusting module 32 is configured to adjust a circuit parameter of the charging circuit to match the charging current configured according to the first PD charging parameter when the output voltage output by the PD adapter is adjusted to a voltage value matching the first PD charging parameter.
In one embodiment, the apparatus includes a monitoring module for monitoring for an occurrence of a first interrupt signal;
and a charging circuit parameter adjusting module 32, configured to adjust a circuit parameter of the charging circuit when the first interrupt signal is monitored, so as to match a charging current configured according to the first PD charging parameter.
In one embodiment, the charging control device 30 further includes:
in one embodiment, the charging control device 30 further includes:
the parameter adjusting instruction monitoring module is used for monitoring the receiving condition of the parameter adjusting instruction of the charging circuit at intervals of preset time;
the charging circuit parameter adjusting module 32 is configured to, when receiving a charging circuit parameter adjusting instruction, adjust a circuit parameter of the charging circuit according to the charging parameter adjusting instruction;
in an embodiment, the PD charging parameter setting module 37 is configured to set a second PD charging parameter according to the charging parameter supported by the PD adapter and the charging parameter supported by the electronic device, and charge the electronic device with the second PD charging parameter;
wherein the charging power configured with the second PD charging parameter is less than the charging power configured with the first PD charging parameter.
In one embodiment, the monitoring module is used for monitoring the output voltage of the PD adapter;
and the charging circuit parameter adjusting module 32 is configured to adjust a circuit parameter of the charging circuit when the output voltage output by the PD adapter is adjusted to a voltage value matched with the second PD charging parameter, so as to match the charging current configured according to the second PD charging parameter.
In one embodiment, the monitoring module is configured to monitor for an occurrence of a second interrupt signal;
and a charging circuit parameter adjusting module 32, configured to adjust a circuit parameter of the charging circuit when the second interrupt signal is monitored, so as to match the charging current configured according to the second PD charging parameter.
In an embodiment, the parameter adjustment instruction monitoring module is configured to monitor a receiving condition of a parameter adjustment instruction of the charging circuit every preset time interval when the adapter is not a PD adapter;
and the charging circuit parameter adjusting module 32 is configured to adjust a circuit parameter of the charging circuit according to the charging parameter adjusting instruction when receiving the charging circuit parameter adjusting instruction.
The embodiment also provides an electronic device 10, which includes a battery, a charging circuit, a storage unit, and a processing unit; a storage unit storing a charging control program; the processing unit is used for executing the steps of the charging control method when the charging control program is run.
Referring to FIG. 8, the electronic device 10 is embodied as a general purpose computing device. The components of the electronic device 10 may include, but are not limited to: the at least one processing unit 42, the at least one memory unit 41, and the bus 43 connecting the different system components (including the memory unit 420 and the processing unit 410), wherein the memory unit 41 stores program codes, which can be executed by the processing unit 42, so that the processing unit 42 performs the steps according to the various exemplary embodiments of the present disclosure described in the above embodiment section of this specification.
The storage unit 41 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM)411 and/or a cache memory unit 412, and may further include a read only memory unit (ROM) 413.
The storage unit 41 may also include a program/utility 414 having a set (at least one) of program modules 415, such program modules 415 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 43 may be one or more of any of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 10 may also communicate with one or more external devices 50 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 10, and/or with any devices (e.g., router, modem, display unit 44, etc.) that enable the robotic electronic device 10 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 45. Also, the robotic electronic device 10 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 46. As shown in fig. 7, the network adapter 46 communicates with the other modules of the robot's electronic device 10 via the bus 43. It should be understood that although not shown in fig. 8, other hardware and/or software modules may be used in conjunction with the robotic electronic device 10, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the disclosure described in the above-mentioned example section of this specification, when the program product is run on the terminal device.
While the present disclosure has been described with reference to several exemplary embodiments, it is understood that the terminology used is intended to be in the nature of words of description and illustration, rather than of limitation. As the present disclosure may be embodied in several forms without departing from the spirit or essential characteristics thereof, it should also be understood that the above-described embodiments are not limited by any of the details of the foregoing description, but rather should be construed broadly within its spirit and scope as defined in the appended claims, and therefore all changes and modifications that fall within the meets and bounds of the claims, or equivalences of such meets and bounds are therefore intended to be embraced by the appended claims.

Claims (11)

1.一种充电控制方法,用于为电子设备充电,其特征在于,所述充电控制方法包括:1. A charging control method for charging an electronic device, wherein the charging control method comprises: 获取为所述电子设备充电的适配器的端口类型;obtain the port type of the adapter charging the electronic device; 根据所述适配器的端口类型设置电子设备内充电电路的电路参数,以所述充电电路的电路参数为所述电子设备充电;Set circuit parameters of the charging circuit in the electronic device according to the port type of the adapter, and use the circuit parameters of the charging circuit to charge the electronic device; 检测所述适配器是否为PD适配器;Detect whether the adapter is a PD adapter; 当所述适配器为PD适配器时,获取所述电子设备当前的电池电压;When the adapter is a PD adapter, obtain the current battery voltage of the electronic device; 根据所述当前的电池电压,运行PD充电控制脚本为所述电子设备充电;According to the current battery voltage, run the PD charging control script to charge the electronic device; 其中,在所述当前的电池电压小于或等于第一电压阈值时,所述PD充电控制脚本运行时包括以下步骤:Wherein, when the current battery voltage is less than or equal to the first voltage threshold, the PD charging control script includes the following steps when running: 根据所述PD适配器所支持的充电参数以及所述电子设备所支持的充电参数,设置第一PD充电参数,以所述第一PD充电参数为所述电子设备充电。According to the charging parameters supported by the PD adapter and the charging parameters supported by the electronic device, a first PD charging parameter is set, and the electronic device is charged with the first PD charging parameter. 2.根据权利要求1所述的充电控制方法,其特征在于,所述根据所述PD适配器所支持的充电参数以及所述电子设备所支持的充电参数,设置第一PD充电参数,以所述第一PD充电参数为所述电子设备充电的步骤之后还包括:2 . The charging control method according to claim 1 , wherein the first PD charging parameter is set according to the charging parameter supported by the PD adapter and the charging parameter supported by the electronic device, and the The step of charging the electronic device with the first PD charging parameter further includes: 监控所述PD适配器的输出电压;monitoring the output voltage of the PD adapter; 当所述PD适配器的输出电压调整至与所述第一PD充电参数匹配的电压值时,调整所述充电电路的电路参数,用于匹配根据所述第一PD充电参数配置的充电电流。When the output voltage of the PD adapter is adjusted to a voltage value matching the first PD charging parameter, the circuit parameters of the charging circuit are adjusted to match the charging current configured according to the first PD charging parameter. 3.根据权利要求2所述的充电控制方法,其特征在于,所述方法还包括:当所述PD适配器的输出电压调整至与所述第一PD充电参数匹配的电压值时,触发产生第一中断信号;3. The charging control method according to claim 2, wherein the method further comprises: when the output voltage of the PD adapter is adjusted to a voltage value matching the first PD charging parameter, triggering the generation of the first PD an interrupt signal; 所述监控所述PD适配器的输出电压,包括:The monitoring of the output voltage of the PD adapter includes: 监控所述第一中断信号的出现;monitoring the occurrence of the first interrupt signal; 所述调整所述充电电路的电路参数,用于匹配根据所述第一PD充电参数配置的充电电流,包括:The adjusting the circuit parameters of the charging circuit is used to match the charging current configured according to the first PD charging parameters, including: 当监控到所述第一中断信号时,调整所述充电电路的电路参数,用于匹配根据所述第一PD充电参数配置的充电电流。When the first interruption signal is monitored, the circuit parameters of the charging circuit are adjusted to match the charging current configured according to the first PD charging parameters. 4.根据权利要求1所述的充电控制方法,其特征在于,所述根据所述当前的电池电压,运行PD充电控制脚本为所述电子设备充电之后还包括:4 . The charging control method according to claim 1 , wherein after running a PD charging control script to charge the electronic device according to the current battery voltage, the method further comprises: 4 . 当已执行过一次所述PD充电控制脚本后,以所述第一PD充电参数为所述电子设备充电;After the PD charging control script has been executed once, charging the electronic device with the first PD charging parameter; 每隔预设时长监视充电电路参数调整指令的接收情况;Monitor the reception of the charging circuit parameter adjustment command every preset time period; 当接收到所述充电电路参数调整指令时,根据所述充电参数调整指令,调整所述充电电路的电路参数。When receiving the charging circuit parameter adjustment instruction, adjust the circuit parameters of the charging circuit according to the charging parameter adjustment instruction. 5.根据权利要求1所述的充电控制方法,其特征在于,在所述当前的电池电压大于所述第一电压阈值时,所述PD充电控制脚本运行时包括以下步骤:5. The charging control method according to claim 1, wherein when the current battery voltage is greater than the first voltage threshold, the PD charging control script comprises the following steps when running: 根据所述PD适配器所支持的充电参数以及所述电子设备所支持的充电参数,设置第二PD充电参数,以所述第二PD充电参数为所述电子设备充电。According to the charging parameters supported by the PD adapter and the charging parameters supported by the electronic device, a second PD charging parameter is set, and the electronic device is charged with the second PD charging parameter. 6.根据权利要求5所述的充电控制方法,其特征在于,所述根据所述PD适配器所支持的充电参数以及所述电子设备所支持的充电参数,设置第二PD充电参数,以所述第二PD充电参数为所述电子设备充电的步骤之后还包括:6 . The charging control method according to claim 5 , wherein the second PD charging parameter is set according to the charging parameter supported by the PD adapter and the charging parameter supported by the electronic device, and the charging parameter is set according to the charging parameter. 7 . The step of charging the electronic device with the second PD charging parameter further includes: 监控所述PD适配器的输出电压;monitoring the output voltage of the PD adapter; 当所述PD适配器输的输出电压调整至与所述第二PD充电参数匹配的电压值时,调整所述充电电路的电路参数,用于匹配根据所述第二PD充电参数配置的充电电流。When the output voltage of the PD adapter is adjusted to a voltage value matching the second PD charging parameter, the circuit parameters of the charging circuit are adjusted to match the charging current configured according to the second PD charging parameter. 7.根据权利要求6所述的充电控制方法,其特征在于,所述方法还包括:当所述PD适配器输的输出电压调整至与所述第二PD充电参数匹配的电压值时,触发产生第二中断信号;7 . The charging control method according to claim 6 , wherein the method further comprises: when the output voltage output by the PD adapter is adjusted to a voltage value matching the charging parameter of the second PD, triggering the generation of the second interrupt signal; 所述监控所述PD适配器的输出电压,包括:The monitoring of the output voltage of the PD adapter includes: 监控所述第二中断信号的出现;monitoring the occurrence of the second interrupt signal; 所述调整所述充电电路的电路参数,用于匹配根据所述第二PD充电参数配置的充电电流,包括:The adjusting the circuit parameters of the charging circuit is used to match the charging current configured according to the second PD charging parameters, including: 当监控到所述第二中断信号时,调整所述充电电路的电路参数,用于匹配根据所述第二PD充电参数配置的充电电流。When the second interruption signal is monitored, the circuit parameters of the charging circuit are adjusted to match the charging current configured according to the second PD charging parameters. 8.根据权利要求1至7任意一项所述的充电控制方法,其特征在于,所述检测所述适配器是否为PD适配器之后还包括以下步骤:8. The charging control method according to any one of claims 1 to 7, wherein the detecting whether the adapter is a PD adapter further comprises the following steps: 当所述适配器为不是PD适配器时,每隔预设时长监测充电电路参数调整指令的接收情况;When the adapter is not a PD adapter, monitoring the reception of the charging circuit parameter adjustment command every preset time period; 当接收到所述充电电路参数调整指令时,根据所述充电参数调整指令,调整所述充电电路的电路参数。When receiving the charging circuit parameter adjustment instruction, adjust the circuit parameters of the charging circuit according to the charging parameter adjustment instruction. 9.一种充电控制装置,其特征在于,包括:9. A charging control device, comprising: 端口类型获取模块,用于获取为所述电子设备充电的适配器的端口类型;a port type acquisition module, used to acquire the port type of the adapter for charging the electronic device; 充电电路参数调整模块,用于根据所述适配器的端口类型设置电子设备内充电电路的电路参数;A charging circuit parameter adjustment module, used for setting circuit parameters of the charging circuit in the electronic device according to the port type of the adapter; PD适配器判断模块,用于检测所述适配器是否为PD适配器;The PD adapter judgment module is used to detect whether the adapter is a PD adapter; 电压获取模块,用于在当所述适配器为PD适配器时,获取所述电子设备当前的电池电压;a voltage acquisition module, configured to acquire the current battery voltage of the electronic device when the adapter is a PD adapter; PD充电控制脚本处理模块,用于根据所述当前的电池电压,运行PD充电控制脚本;The PD charging control script processing module is used to run the PD charging control script according to the current battery voltage; PD充电参数设置模块,用于根据所述PD适配器所支持的充电参数以及所述电子设备所支持的充电参数,设置第一PD充电参数,以所述第一PD充电参数为所述电子设备充电。The PD charging parameter setting module is used to set first PD charging parameters according to the charging parameters supported by the PD adapter and the charging parameters supported by the electronic device, and use the first PD charging parameters to charge the electronic device . 10.一种电子设备,其特征在于,包括:10. An electronic device, comprising: 存储单元,存储有充电控制程序;a storage unit, storing a charging control program; 处理单元,用于在运行所述充电控制程序时,执行权利要求1至8任一项所述充电控制方法的步骤。The processing unit is configured to execute the steps of the charging control method according to any one of claims 1 to 8 when the charging control program is executed. 11.一种计算机存储介质,其特征在于,所述计算机存储介质存储有充电控制程序,所述充电控制程序被至少一个处理器执行时实现权利要求1至8任一项所述充电控制方法的步骤。11. A computer storage medium, characterized in that the computer storage medium stores a charging control program, and when the charging control program is executed by at least one processor, the charging control method according to any one of claims 1 to 8 is implemented. step.
CN201910945056.7A 2019-09-30 2019-09-30 Charging control method and device, electronic equipment and computer storage medium Active CN112583064B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910945056.7A CN112583064B (en) 2019-09-30 2019-09-30 Charging control method and device, electronic equipment and computer storage medium
PCT/CN2020/117935 WO2021063274A1 (en) 2019-09-30 2020-09-25 Charging control method and apparatus therefor, electronic device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910945056.7A CN112583064B (en) 2019-09-30 2019-09-30 Charging control method and device, electronic equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN112583064A true CN112583064A (en) 2021-03-30
CN112583064B CN112583064B (en) 2024-02-23

Family

ID=75117285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910945056.7A Active CN112583064B (en) 2019-09-30 2019-09-30 Charging control method and device, electronic equipment and computer storage medium

Country Status (2)

Country Link
CN (1) CN112583064B (en)
WO (1) WO2021063274A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI870193B (en) * 2024-01-04 2025-01-11 華碩電腦股份有限公司 Electronic device and power supply optimization method thereof

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115472934A (en) * 2022-08-26 2022-12-13 厦门新能达科技有限公司 Secondary battery management method, device, system and product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030172312A1 (en) * 2002-03-07 2003-09-11 Fuji Xerox Co., Ltd. USB device
CN105977563A (en) * 2016-06-28 2016-09-28 努比亚技术有限公司 Charging method, charging equipment and terminal
US20170005499A1 (en) * 2014-01-28 2017-01-05 Guangdong Oppo Mobile Telecommunications Corp. Ltd. Battery charging apparatus and battery charging protection control method
CN106537725A (en) * 2014-07-22 2017-03-22 罗姆股份有限公司 Charging circuit, electronic device using same, and charger
CN106532820A (en) * 2016-11-16 2017-03-22 普联技术有限公司 Quick charging method and electronic equipment
CN107742912A (en) * 2017-11-08 2018-02-27 深圳天珑无线科技有限公司 Charging method, fast fill device and computer-readable recording medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106329655A (en) * 2016-09-26 2017-01-11 宇龙计算机通信科技(深圳)有限公司 Electronic device and charging method thereof
US10642333B2 (en) * 2017-08-24 2020-05-05 Dell Products L.P. Power storage adapter for efficient supply of power of multiple portable information handling systems

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030172312A1 (en) * 2002-03-07 2003-09-11 Fuji Xerox Co., Ltd. USB device
US20170005499A1 (en) * 2014-01-28 2017-01-05 Guangdong Oppo Mobile Telecommunications Corp. Ltd. Battery charging apparatus and battery charging protection control method
CN106537725A (en) * 2014-07-22 2017-03-22 罗姆股份有限公司 Charging circuit, electronic device using same, and charger
CN105977563A (en) * 2016-06-28 2016-09-28 努比亚技术有限公司 Charging method, charging equipment and terminal
CN106532820A (en) * 2016-11-16 2017-03-22 普联技术有限公司 Quick charging method and electronic equipment
CN107742912A (en) * 2017-11-08 2018-02-27 深圳天珑无线科技有限公司 Charging method, fast fill device and computer-readable recording medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI870193B (en) * 2024-01-04 2025-01-11 華碩電腦股份有限公司 Electronic device and power supply optimization method thereof

Also Published As

Publication number Publication date
WO2021063274A1 (en) 2021-04-08
CN112583064B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
CN102238278B (en) Electric energy control method and be suitable for the mobile device of this electric energy control method
CN108899952B (en) A multi-battery charging and discharging device and mobile terminal
CN113346568B (en) Method for charging battery, charging device and terminal equipment
CN113475051B (en) Apparatus and method for providing user interface based on wireless power sharing
KR102315042B1 (en) reverse charging device
CN110707772A (en) Charging control method and device, electronic equipment and computer storage medium
CN101415043B (en) Mobile terminal aware of externally connected device and control method for the same
KR20160027828A (en) Electronic device, method for charging control of the electronic device, charging device, and method for providing power of the charging device
US7900070B2 (en) Power saving method of bi-directional communication wireless periheral device
KR20120138311A (en) Apparatus and method for changing a battery in a portable terminal
CN106786961A (en) Charging process method, device and terminal
CN106340925A (en) A charging control method, device and terminal
KR102531333B1 (en) An electronic device providing a notofication for event occurred to the electronic device and control method thereof
CN112583064B (en) Charging control method and device, electronic equipment and computer storage medium
US20120089763A1 (en) Computer and usb interface module thereof
CN109038863A (en) Electronic equipment
JP6977143B2 (en) Terminal device and its electric leak detection method
CN111614131A (en) Electronic equipment and discharge control method
JP4504315B2 (en) Charge control device
CN103762390A (en) Charging method and action electronic device
US20220360093A1 (en) Charging and discharging structure, and charging method
CN113572232A (en) Charging circuit and mobile terminal
CN110505344A (en) Battery-powered method, electronic device, and computer-readable storage medium
WO2008054035A1 (en) A charging system for a mobile phone and bluetooth
CN111984107B (en) Method and device for handling abnormal power supply of terminal equipment

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