CN116031964B - Charging control method and terminal equipment - Google Patents

Charging control method and terminal equipment Download PDF

Info

Publication number
CN116031964B
CN116031964B CN202210673960.9A CN202210673960A CN116031964B CN 116031964 B CN116031964 B CN 116031964B CN 202210673960 A CN202210673960 A CN 202210673960A CN 116031964 B CN116031964 B CN 116031964B
Authority
CN
China
Prior art keywords
charger
charging
current
voltage
terminal equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210673960.9A
Other languages
Chinese (zh)
Other versions
CN116031964A (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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Publication of CN116031964A publication Critical patent/CN116031964A/en
Application granted granted Critical
Publication of CN116031964B publication Critical patent/CN116031964B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The application provides a charging control method and terminal equipment, and belongs to the technical field of terminal equipment. The method comprises the steps that after the charger is inserted into the terminal equipment, the terminal equipment polls the fast charging protocol supported by the charger, and if the charger supports a certain fast charging protocol and when charging is carried out based on the fast charging protocol, the terminal equipment can carry out a fast charging process based on the fast charging protocol. In addition, when the terminal equipment cannot successfully read the actual output current and voltage of the charger, the VBUS interface voltage and current are used as substitutes for the actual output voltage and current of the charger, so that the charging of the battery by dynamically adjusting the charging voltage and the charging current is realized. The method can avoid the problem of quick charging failure caused by the fact that the terminal equipment cannot acquire a protocol supported by the charger or cannot acquire actual output voltage and current.

Description

Charging control method and terminal equipment
The present application claims priority from the chinese patent application filed 30 months 2022, under the application number 202210600124.8, entitled "method of charging control and terminal device", the entire contents of which are incorporated herein by reference.
Technical Field
The present disclosure relates to the field of terminal devices, and in particular, to a method for controlling charging and a terminal device.
Background
The quick charging mode solves the problem of long charging time of terminal equipment such as mobile phones. However, chargers of different product types in the current market may support different fast charging protocols, and when a third-party charger is used for charging terminal equipment, the terminal equipment cannot be charged successfully fast easily due to protocol compatibility, so that user experience is seriously reduced.
Disclosure of Invention
The embodiment of the application provides a charging control method and terminal equipment, wherein a self-adaptive protocol negotiation process is used for acquiring a fast charging protocol supported by a charger, and when the actual output voltage and current of the charger cannot be acquired, the voltage and current at a VBUS interface are used as substitutes, so that the problem that the charger cannot charge fast due to the compatibility problem of the charger is solved.
In a first aspect, a method for controlling charging is provided, applied to a terminal device, where the terminal device supports at least one fast charging protocol, and the method includes:
detecting the type of the charger after the terminal equipment is inserted into the charger;
when the type of the charger is a special charging port DCP, the quick charging protocol supported by the charger is polled and acquired by sending waveform information corresponding to the quick charging protocol supported by the terminal equipment to the charger;
Acquiring a maximum threshold voltage and a maximum threshold current which need to be output by the charger, and sending the maximum threshold voltage and the maximum threshold current to the charger;
and dynamically adjusting the maximum threshold voltage and the maximum threshold current required to be output by the charger according to the current voltage and the current of the battery and the actual output voltage and the actual output current of the charger, wherein when the terminal equipment cannot inquire the actual output voltage and the actual output current from the charger, the voltage value at the VBUS interface of the terminal equipment is used as the actual output voltage, and the current value at the VBUS interface of the terminal equipment is used as the actual output current.
With reference to the first aspect, in certain implementation manners of the first aspect, when the charger supports a plurality of fast charging protocols, the method further includes:
and selecting a first quick charge protocol used by the quick charge from the plurality of quick charge protocols according to the priority of the power supported by the quick charge protocol indicated by the charger.
With reference to the first aspect, in certain implementation manners of the first aspect, the method further includes:
and closing other quick charging protocols except the first quick charging protocol in the plurality of quick charging protocols after the first quick charging protocol used in the quick charging is selected.
With reference to the first aspect, in certain implementation manners of the first aspect, the acquiring a maximum threshold voltage and a maximum threshold current that require the charger to output specifically includes:
and determining the maximum threshold voltage and the maximum threshold current required to be output by the charger according to the current voltage of the battery, the state of the battery and the corresponding impedance of a charging circuit.
With reference to the first aspect, in certain implementation manners of the first aspect, the dynamically adjusting the maximum threshold voltage and the maximum threshold current required to be output by the charger according to the present voltage and current of the battery and the actual output voltage and the actual output current of the charger specifically includes:
if the current voltage of the battery is smaller than the maximum threshold voltage, the output voltage of the charger is adjusted upwards;
when the output current of the charger reaches the maximum threshold current, the output voltage of the charger is downwards adjusted;
and if the current voltage of the battery reaches the maximum threshold voltage, switching to the maximum threshold voltage and the maximum threshold current corresponding to the preset next-gear battery voltage.
With reference to the first aspect, in certain implementation manners of the first aspect, the terminal device includes a charging logic module and a protocol negotiation module, and the method further includes:
After the terminal equipment is inserted into a charger, the charging logic module detects the type of the charger;
when the type of the charger is a special charging port DCP, the protocol negotiation module sends waveform information corresponding to a fast charging protocol supported by the terminal equipment to the charger, polls the fast charging protocol supported by the charger and acquires the fast charging protocol supported by the charger;
the charging logic module obtains the maximum threshold voltage and the maximum threshold current required to be output by the charger, and sends the maximum threshold voltage and the maximum threshold current to the charger;
the charging logic module dynamically adjusts a maximum threshold voltage and a maximum threshold current required to be output by the charger according to the current voltage and current of the battery and the actual output voltage and actual output current of the charger, wherein when the terminal equipment cannot inquire the actual output voltage and the actual output current from the charger, a voltage value at a VBUS interface of the terminal equipment is used as the actual output voltage, and a current value at the VBUS interface of the terminal equipment is used as the actual output current.
With reference to the first aspect, in certain implementations of the first aspect, the state of the battery includes a temperature of the battery and/or an amount of charge of the battery.
With reference to the first aspect, in certain implementations of the first aspect, the waveform information includes a current waveform, and the different fast charging protocols are in one-to-one correspondence with the current waveform.
In a second aspect, there is provided a terminal device comprising: one or more processors; one or more memories; the one or more memories store one or more computer programs comprising instructions that, when executed by the one or more processors, cause the terminal device to perform the method of any of the implementations of the first aspect described above.
In a third aspect, there is provided a computer readable storage medium storing computer executable program instructions which, when run on a computer, cause the computer to perform a method as described in any one of the implementations of the first aspect above.
In a fourth aspect, there is provided a computer program product comprising computer program code which, when run on a computer, causes the computer to perform the method according to any of the preceding implementation forms of the first aspect.
Drawings
Fig. 1 is a schematic block diagram of a terminal device 100 according to an embodiment of the present application.
Fig. 2 is a schematic circuit structure of a charging system according to an embodiment of the present application.
Fig. 3 is a software block diagram of a terminal device 100 according to an embodiment of the present application.
Fig. 4 is a schematic flowchart of a method for controlling charging according to an embodiment of the present application.
Fig. 5 is a schematic flow chart of a fast-charging voltage-regulating and current-regulating process according to an embodiment of the present application.
Fig. 6 is a schematic flowchart of a method for controlling charging according to an embodiment of the present application.
Detailed Description
It should be noted that the terms used in the implementation section of the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. In the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; "and/or" herein is merely one association relationship describing an associated obstacle, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, unless otherwise indicated, "a plurality" means two or more, and "at least one", "one or more" means one, two or more.
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a definition of "a first", "a second" feature may explicitly or implicitly include one or more of such features.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The current electric appliances supporting quick charging in the market are various, but the quick charging protocols supported by different chargers are different, and some chargers also do not support standard quick charging protocols, so that a user can use a hand charger to quickly charge the terminal equipment with high power originally when charging the terminal equipment, but the terminal equipment cannot be quickly charged due to the compatibility of the chargers, the charging time is prolonged, and the user experience is seriously reduced. Currently, there are a plurality of fast charging protocols existing in the terminal device, such as fast charging protocol standard (Fast Charge Protocol, FCP), super fast charging protocol standard (Super Charge Protocol, SCP), PPS (Programmable Power Supply) fast charging protocol, PD fast charging protocol, VOOC fast charging protocol, superVOOC fast charging protocol, PE fast charging protocol, flashCharge fast charging protocol, and the like, and the fast charging power supported by the different fast charging protocols is different. For example, FCP protocol supports 9v 2a 18w fast charging; for another example, SC protocols in the SCP protocol may support 4.5v 5a 22.5W or 5v 4.5a 22.5W, 10v 4a 40W, 11v 6a 66W fast charging, and HSC protocols in the SCP protocol may support charging power above 100W.
There are a number of common causes of charger fast charge protocol compatibility problems. For example, the charger supports multiple fast charging protocols at the same time, but when the terminal equipment is charged, the multiple fast charging protocols are operated at the same time, so that various anomalies, such as abnormal display of charging icons, repeated stopping and re-charging caused by conflict of the fast charging protocols, incapability of fast charging and the like, occur in the fast charging process of the terminal equipment; for another example, the charger does not support the terminal device to obtain real-time charging parameters such as current and voltage that are actually output, and so on.
In order to solve the problem of compatibility of a quick charging protocol of a charger and improve the success rate of charging between terminal equipment and various types of chargers in a quick charging mode, the embodiment of the application provides a charging control method. After the charger is inserted into the terminal equipment, the terminal equipment polls whether different quick charging protocols are supported or not, and if the charger supports a certain quick charging protocol and when charging is carried out based on the quick charging protocol, the terminal equipment can carry out a quick charging process based on the quick charging protocol. In addition, when the terminal equipment cannot successfully read the actual output current and the actual output voltage of the charger, the VBUS voltage and the VBUS current at the VBUS interface are respectively used as the substitute, and the charging voltage and the charging current are dynamically adjusted so as to realize the charging of the battery. The method can avoid the problem that the terminal equipment fails to charge quickly due to the fact that the terminal equipment cannot acquire a protocol supported by the charger or cannot acquire actual output voltage and actual output current.
The method provided by the embodiment of the application can be applied to various types of terminal equipment supporting quick charging, such as mobile phones, tablet computers, wearable equipment, vehicle-mounted equipment, augmented reality (augmented reality, AR)/Virtual Reality (VR) equipment, notebook computers, ultra-mobile personal computer (UMPC), netbooks, personal digital assistants (personal digital assistant, PDA) and the like. Exemplary embodiments of terminal devices include, but are not limited to, piggybackingOr other operating system. The embodiment of the application does not limit the specific type of the terminal equipment.
Exemplary, as shown in fig. 1, a schematic block diagram of a terminal device 100 according to an embodiment of the present application is provided.
The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, terminal device 100 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural center and a command center of the terminal device 100. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the terminal device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing function of terminal device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display function of the terminal device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the terminal device 100, or may be used to transfer data between the terminal device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other terminals, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiment of the present invention is only illustrative, and does not constitute a structural limitation of the terminal device 100. In other embodiments of the present application, the terminal device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. The charging management module 140 may also supply power to the terminal through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the terminal device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the terminal device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied to the terminal device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of terminal device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that terminal device 100 may communicate with a network and other devices via wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The terminal device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The display screen 194 is used to display images, videos, and the like.
The terminal device 100 may implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the terminal device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like. Video codecs are used to compress or decompress digital video. The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to realize expansion of the memory capability of the terminal device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card. The internal memory 121 may be used to store computer executable program code including instructions.
The terminal device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. The gyro sensor 180B may be used to determine a motion gesture of the terminal device 100. The magnetic sensor 180D includes a hall sensor. The terminal device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. The acceleration sensor 180E can detect the magnitude of acceleration of the terminal device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the terminal device 100 is stationary. The method can also be used for identifying the gesture of the terminal, and is applied to the applications such as horizontal and vertical screen switching, pedometers and the like. The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light outward through the light emitting diode. The ambient light sensor 180L is used to sense ambient light level. The terminal device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The fingerprint sensor 180H is used to collect a fingerprint. The temperature sensor 180J is for detecting temperature. The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The bone conduction sensor 180M may acquire a vibration signal.
In addition, the terminal device 100 further includes an air pressure sensor 180C and a distance sensor 180F. Wherein the air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates altitude from barometric pressure values measured by the barometric pressure sensor 180C, aiding in positioning and navigation.
A distance sensor 180F for measuring a distance. The terminal device 100 may measure the distance by infrared or laser. In some embodiments, the terminal device 100 may range using the distance sensor 180F to achieve fast focusing.
In order to facilitate understanding, taking the example that the terminal device is a mobile phone with reference to the drawings, a charging process between the mobile phone and the charger is first described.
Exemplary, as shown in fig. 2, a schematic circuit structure of a charging system according to an embodiment of the present application is provided. The charging system may include a terminal device 100 and a charger 200.
The terminal equipment and the charger are connected through a charging cable, and the charging cable can be connected with the terminal equipment through a Type-C interface. The manner in which the terminal device is charged by the charger through the charging cable may be referred to as direct charging or line charging.
The terminal device may include a VBUS interface, a charging logic System On Chip (SOC), a Buck charging Chip, a protocol Chip, a Switched-Capacitor circuit (SC) (hereinafter referred to as a main circuit SC), a Switched-Capacitor circuit (SC) (hereinafter referred to as an auxiliary circuit SC), and a battery.
The VBUS interface may be used primarily for transmitting charging voltages and charging currents. The voltage and current at the VBUS interface may be referred to as VBUS voltage and IBUS current, respectively.
The charging logic SOC may be used to set an initial voltage and an initial current for charging the terminal device; inquiring the actual output voltage and the actual output current of the charger in the charging process from the charger; the VBUS voltage and IBUS current at the VBUS interface are detected. The charge logic SOC may also be used to obtain battery status, including, for example, battery voltage, battery temperature, battery charge, etc., and hardware path conditions, which may include whether the hardware circuit is properly connected (e.g., no short circuit has occurred), path impedance, etc. The charging logic SOC may also be used to dynamically adjust a theoretical output voltage and/or a theoretical output current of the charger, where the theoretical output voltage and the theoretical output current refer to a voltage value and a current value of the charging logic SOC indicating the charger output, the theoretical output voltage may correspond to a maximum threshold voltage, and the theoretical output current may correspond to a maximum threshold current. For example, if when the battery voltage or the charging current of the terminal device reaches an initial voltage or initial current for charging the terminal device, the charging logic SOC may indicate a larger theoretical output voltage and/or theoretical output current to the charger to cause the terminal device to continue charging.
The protocol chip can be used for carrying out fast charging protocol negotiation with the charger. As shown in fig. 2, the protocol chip may be connected to the charge logic SOC through an I2C bus. When negotiating a fast charging protocol with the charger, the protocol chip can interact with the charger through the charging logic SOC.
The main path SC and the auxiliary path SC are hardware paths for charging the battery, and the current input from the charger to the terminal device charges the battery through the main path SC and the auxiliary path SC. As shown in fig. 2, the main path SC and the auxiliary path SC may be connected to the charging logic SOC through I2C buses, respectively. When the charging current/voltage is small, the battery can be charged only through the main circuit SC; when the charging current/voltage is large (e.g., when charging quickly), the battery can be charged through both the main circuit SC and the auxiliary circuit SC. When the main circuit SC and the auxiliary circuit SC charge the battery together, the current flowing through the main circuit SC and the auxiliary circuit SC may be set to a certain ratio, for example, the ratio of the current of the main circuit SC and the current of the auxiliary circuit SC is set to 4:1, but the embodiment of the present application is not limited thereto.
The Buck charging chip can be used for carrying out common charging on the battery, namely, when the quick charging condition is not met, the battery can be charged through the Buck charging chip.
In order to better understand the method of charging control provided in the embodiments of the present application, the charging process is described below in conjunction with the circuit structure of the charging system shown in fig. 2.
In some embodiments, the charging logic SOC of the terminal device is provided with an initial voltage and an initial current for charging the terminal device, for example, the initial voltage value is 18V and the initial current value is 1A. After the charger is connected with the terminal equipment through a charging interface (Type-C interface) of the terminal equipment, the charging logic SOC can instruct the charger to charge the terminal equipment according to an initial voltage of 18V and an initial current of 1A.
In some embodiments, the charge logic SOC may query the battery voltage during and at the time of charging and determine a charge mode (fast charge mode or normal charge mode) based on the battery voltage. When the battery voltage belongs to a preset voltage range (such as 3.5V-4.6V) corresponding to the fast charge mode, the charging logic SOC determines that the fast charge mode can be used, otherwise, the normal charge mode is used.
In some embodiments, after the charger is connected to the terminal device, the protocol chip may negotiate a fast charging protocol with the charger, i.e. query the fast charging protocol supported by the charger. For example, since different fast charging protocols can support different powers and correspond to different current waveforms (including at least one of a current value corresponding to a high point location, a current value corresponding to a low point location, a current change period, etc.) or pulse signals, the protocol chip can perform fast charging protocol negotiation with the charger by using the current waveforms corresponding to the different fast charging protocols.
In some embodiments, the process of negotiating with the charger the fast charging protocol supported by the charger is a polling process with the charger. Specifically, the protocol chip can sequentially send current waveforms corresponding to different fast charging protocols to the charger; after each current waveform is sent, if the charger does not support a fast charging protocol corresponding to the received current waveform, the charger can not send a feedback signal to the protocol chip aiming at the current waveform, and the protocol chip does not receive current waveform feedback within a preset time period, the charger is confirmed not to support the fast charging protocol corresponding to the current waveform sent currently, and then the current waveform corresponding to the next fast charging protocol can be sent; if the charger supports the fast charging protocol corresponding to the received current waveform, a feedback signal can be sent to the protocol chip according to the current waveform supported by the charger, specifically, the feedback signal sent to the protocol chip by the charger can be the current waveform corresponding to the fast charging protocol supported by the charger, that is, the current waveform identical to the current waveform received at this time. And after the protocol chip receives the current waveform fed back by the charger, confirming a fast charging protocol supported by the charger according to the current waveform fed back by the charger, and charging by using the fast charging protocol supported by the charger when the fast charging is carried out subsequently.
In some embodiments, after the protocol chip negotiates with the charger to obtain the fast charging protocol supported by the charger, the charging logic SOC may perform fast charging protocol priority selection from high power to low power according to the power level supported by the fast charging protocol, and close other fast charging protocols supported by the charger after determining that one fast charging protocol is selected for charging.
When quick charging is performed based on the selected quick charging protocol, the charging logic chip detects whether the state of the terminal equipment side meets a preset index under the output power of the current charger; and if the state of the terminal equipment side does not meet the preset index, negotiating with the charger through the protocol chip, and adjusting the output power of the charger. The state of the terminal device side includes, for example, a battery state including, for example, a battery voltage, a battery temperature, a battery power, a path impedance, and the like, and a hardware path including, for example, a path impedance, and the like. The preset index is, for example, an index corresponding to the battery state, the hardware access and the like during normal fast charging, and can be preset or set according to related standards as required. If the state of the terminal equipment side does not meet the corresponding preset indexes, such as the over-high battery temperature, the over-high hardware path impedance and the like, under the current fast charging voltage and the fast charging flow, the protocol chip negotiates proper output power with the charger on the basis of charging based on the first fast charging protocol. For example, the negotiation process for the output power may be dynamic, for example, when the terminal device detects that the current battery temperature is higher than the corresponding preset threshold value under the current fast charging voltage and the fast charging current of the charger, the charging logic SOC may instruct the charger to charge at a certain lower power, and continuously detect whether the state of the terminal device side meets the corresponding preset index during the charging process, and if so, the battery may be charged at the power later; if not, the protocol module negotiates with the charger to charge with a certain power lower than the current power.
In some embodiments, during charging, the charging logic SOC may be dynamically adjusted based on the current charging voltage and charging current of the battery and the actual output voltage and actual output current of the charger. Illustratively, the dynamic adjustment process may include: (1) The charging logic SOC selects the maximum threshold voltage (i.e. theoretical output voltage) and the maximum threshold current (i.e. theoretical output current) which are required to be output by the charger and are charged at this time according to the current battery voltage; (2) If the current battery voltage is smaller than the maximum threshold voltage, the output voltage of the charger is adjusted upwards by a fixed step value (step) voltage, so that the output current of the charger is synchronously increased; (3) When the current reaches the maximum threshold current, the output voltage of the charger is adjusted downwards step by a fixed step voltage, so that the current of the charger is reduced step by step; (4) And if the current battery voltage reaches the maximum threshold voltage of the current charge, switching to the maximum threshold voltage and the maximum threshold current which correspond to the next battery voltage and are required to be output by the charger, and repeating the processes (2) to (3) until the battery is full of electricity.
In other embodiments, the charge logic SOC may decrease the theoretical output voltage indicated to the charger when the difference between the theoretical output voltage indicated to the charger and the actual output voltage/battery voltage of the charger is greater than a certain value, i.e., even if the charger decreases the output voltage. That is, the theoretical output voltage indicated by the charging logic SOC to the charger and the actual output voltage of the charger can keep a certain step value correspondingly, so that the problem that the charging speed is too slow when the difference value of the theoretical output voltage and the actual output voltage of the charger is too small, or the problem that the terminal equipment heats seriously when the difference value of the theoretical output voltage and the actual output voltage of the charger is too large is avoided.
It is noted that, in dynamically adjusting the output voltage and the output current of the charger, the charging logic SOC needs to acquire the actual output voltage and the actual output current of the charger after setting the theoretical output voltage and the theoretical output current that require the output of the charger. However, in practical applications, since the charger for charging the terminal device is not a standard charger for the terminal device, or the charger itself is provided with features, a problem may occur in that the terminal device cannot query real-time charging parameters such as an actual output current and an actual output voltage of the charger. In order to solve the problem, in the method for controlling charging provided in the embodiment of the present application, the VBUS voltage and IBUS current at the VBUS interface of the terminal device are obtained through the charging logic SOC to replace the actual output voltage and actual output current of the charger. That is, when the charging logic SOC of the terminal device cannot query the actual output voltage and the actual output current of the charger, the VBUS voltage and the IBUS current may be used as alternatives, so as to implement dynamic adjustment of the output voltage and/or the current of the charger in the charging process.
According to the charging control method provided by the embodiment of the application, whether different quick charging protocols are supported or not is polled by the terminal equipment to the charger, and if the charger supports a certain quick charging protocol and when charging is performed based on the quick charging protocol, the preset index is met, then the terminal equipment can perform quick charging based on the quick charging protocol. When the terminal equipment cannot successfully read the actual output current and voltage of the charger, the VBUS interface voltage and current are used as the substitute to dynamically adjust the charging voltage and charging current, so that the battery is charged. The method can avoid the problem of quick charging failure caused by the fact that the terminal equipment cannot acquire a protocol supported by the charger or cannot acquire actual output voltage and current.
For example, the software system of the terminal device 100 may employ a layered architecture, an event driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the invention, taking an Android system with a layered architecture as an example, a software structure of the terminal device 100 is illustrated. Fig. 3 is a software configuration block diagram of the terminal device 100 of the embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages. As shown in fig. 3, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions. As shown in FIG. 3, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the terminal device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the terminal equipment vibrates, and an indicator light blinks.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of obstacle life cycle management, stack management, thread management, security and abnormality management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The kernel layer at least comprises a display driver, a camera driver, an audio driver, a sensor driver, a protocol module, a charging logic SOC and the like.
Exemplary, as shown in fig. 4, a schematic flowchart of a method for controlling charging according to an embodiment of the present application is provided. The execution main body of the process can comprise terminal equipment and a charger, and specifically can comprise the following steps:
s401, detecting the type of the charger after the terminal device is inserted into the charger.
In some embodiments, after the terminal device inserts the charger, if the VBUS voltage of the Type-C interface reaches the highest transmission voltage (e.g. 5V) corresponding to the interface, an interrupt is triggered. And triggering charger type detection after the charging logic SOC of the terminal equipment receives the interrupt.
S402, if the charger type is detected as a special charging port DCP, the terminal equipment negotiates with the charger to acquire a fast charging protocol supported by the charger.
In some embodiments, when the terminal device detects that the charger Type is the corresponding DCP Type, the protocol chip of the terminal device negotiates with the charger through the Type-C interface to obtain the fast charging protocol supported by the charger.
The negotiation process between the terminal device and the charger may be a polling process, which may specifically include: the protocol chip of the terminal equipment can sequentially send current waveforms corresponding to different quick charging protocols to the charger; after each waveform is sent, if the charger does not support a fast charging protocol corresponding to the current waveform, the charger can not send a feedback signal to the protocol chip aiming at the current waveform, and the protocol chip does not receive current waveform feedback within a preset time period, the charger is confirmed not to support the fast charging protocol corresponding to the current waveform which is sent currently, and the next waveform corresponding to the fast charging protocol is sent; if the charger supports a fast charging protocol corresponding to the current waveform, a feedback signal may be sent to the protocol chip for the current waveform supported by the charger, and in particular, the charger may feed back the same current waveform to the protocol chip. And after the protocol chip receives the current waveform fed back by the charger, confirming a fast charging protocol supported by the charger according to the current waveform fed back by the charger, and charging by using the fast charging protocol supported by the charger when the fast charging is carried out subsequently.
S403, after the terminal equipment acquires the fast charging protocol supported by the charger, the priority selection of the fast charging protocol is carried out from high power to low power according to the power supported by different fast charging protocols.
In some embodiments, the protocol chip of the terminal device performs fast charging protocol negotiation with the charger, if a plurality of fast charging protocols supported by the charger are acquired, the charging logic SOC of the terminal device may perform fast charging protocol priority selection from high power to low power according to the power level supported by the fast charging protocol, and close other fast charging protocols supported by the charger after determining that one fast charging protocol is selected for charging.
S404, detecting whether the state of the terminal equipment side meets the preset index or not when the charging is performed based on the selected quick charging protocol.
In some embodiments, the charging module selects one of the fast charging protocols and then turns off the other fast charging protocols supported by the charger. And then detecting the battery state and the hardware access condition (such as battery voltage, battery temperature, battery electric quantity, access impedance and the like) of the terminal equipment, and judging whether the battery state and the hardware access of the terminal equipment meet preset indexes.
The state of the terminal device side includes, for example, a battery state including, for example, a battery voltage, a battery temperature, a battery power, a path impedance, and the like, and a hardware path including, for example, a path impedance, and the like. The preset index is, for example, an index corresponding to the battery state, the hardware access and the like during normal fast charging, and can be preset or set according to related standards as required.
S405, when the state of the terminal device does not meet the preset index, the terminal device and the charger negotiate a suitable output voltage and output current.
In some embodiments, if the state of the terminal device side does not meet the corresponding preset index, such as the battery temperature is too high and the hardware path impedance is too high, under the current fast charging voltage and the fast charging current, the protocol chip negotiates a proper output power with the charger on the basis of charging based on the first fast charging protocol. For example, the negotiation process for the output power may be dynamic, for example, when the terminal device detects that the current battery temperature is higher than the corresponding preset threshold value under the current fast charging voltage and the fast charging current of the charger, the charging logic SOC may instruct the charger to charge at a certain lower power, and continuously detect whether the state of the terminal device side meets the corresponding preset index during the charging process, and if so, the battery may be charged at the power later; if not, the protocol module negotiates with the charger to charge with a certain power lower than the current power.
In some embodiments, during fast charging, the charge logic SOC may dynamically adjust the actual output voltage and output current of the charger by indicating to the charger the charge voltage and charge current that need to be output.
According to the charging control method provided by the embodiment of the application, whether different quick charging protocols are supported or not is polled by the terminal equipment to the charger, and if the charger supports a certain quick charging protocol and when charging is performed based on the quick charging protocol, the preset index is met, then the terminal equipment can perform quick charging based on the quick charging protocol. When the terminal equipment cannot successfully read the actual output current and voltage of the charger, the VBUS interface voltage and current are used as the substitute to dynamically adjust the charging voltage and charging current, so that the battery is charged. The method can avoid the problem of quick charging failure caused by the fact that the terminal equipment cannot acquire a protocol supported by the charger or cannot acquire actual output voltage and current.
For example, as shown in fig. 5, the fast charging voltage and current regulating process performed on the charger may include the following steps:
s501, the charging logic SOC selects the maximum threshold voltage and the maximum threshold current which are required to be output by the charger in the current charging according to the current battery voltage.
The maximum threshold voltage and the maximum threshold current that the charger is required to output in this charging may be determined based on the power of the terminal device and the protocol currently used by the charger. The maximum threshold voltage and the maximum threshold current may correspond to a theoretical output voltage and a theoretical output current, respectively.
In some embodiments, the charging logic SOC sends an indication message to the charger to indicate the maximum threshold voltage and maximum threshold current that the charger needs to output.
S502, if the current battery voltage is smaller than the maximum threshold voltage, the charging logic SOC adjusts the output voltage of the charger upwards by a fixed step value (step) voltage, so that the output current of the charger rises synchronously.
S503, when the current reaches the maximum threshold current, the output voltage of the charger is adjusted downwards by a fixed step value (step) voltage step by step, so that the current of the charger is reduced step by step.
And S504, if the current battery voltage reaches the maximum threshold voltage of the current charge, switching to the maximum threshold voltage and the maximum threshold current which correspond to the next battery voltage and are required to be output by the charger, and repeating the steps S502 to S504 until the battery is full.
In the case of dynamically adjusting the output voltage and the output current of the charger, the charging logic SOC needs to acquire the actual output voltage and the actual output current of the charger after setting the charging voltage and the charging current that need the output of the charger. However, in practical applications, since the charger for charging the terminal device is not a standard charger for the terminal device, or the charger itself is provided with features, a problem may occur in that the terminal device cannot query real-time charging parameters such as an actual output current and voltage of the charger. To address this problem, the charging logic SOC may obtain the VBUS voltage and IBUS current at the terminal device VBUS interface instead of the actual output voltage and current of the charger. That is, when the charging logic SOC of the terminal device cannot query the actual output voltage and current of the charger, the VBUS voltage and IBUS current may be used instead, so as to implement dynamic adjustment of the output voltage and/or current of the charger during charging.
According to the charging control method provided by the embodiment of the application, whether different quick charging protocols are supported or not is polled by the terminal equipment to the charger, and if the charger supports a certain quick charging protocol and when charging is performed based on the quick charging protocol, the preset index is met, then the terminal equipment can perform quick charging based on the quick charging protocol. When the terminal equipment cannot successfully read the actual output current and voltage of the charger, the VBUS interface voltage and current are used as the substitute to dynamically adjust the charging voltage and charging current, so that the battery is charged. The method can avoid the problem of quick charging failure caused by the fact that the terminal equipment cannot acquire a protocol supported by the charger or cannot acquire actual output voltage and current.
Exemplary, as shown in fig. 6, a schematic flow chart of a method of charging control is provided for an embodiment of the present application. The method may be applied to a terminal device supporting at least one fast charging protocol. The method may comprise the steps of:
s601, after the terminal device is plugged into the charger, the type of the charger is detected.
S602, when the type of the charger is a special charging port DCP, the quick charging protocol supported by the charger is polled and acquired by sending waveform information corresponding to the quick charging protocol supported by the terminal equipment to the charger.
In some embodiments, when the charger supports multiple fast charging protocols, the method further comprises: and selecting a first quick charge protocol used by the quick charge from the plurality of quick charge protocols according to the priority of the power supported by the quick charge protocol indicated by the charger.
In some embodiments, the method further comprises: and closing other quick charging protocols except the first quick charging protocol in the plurality of quick charging protocols after the first quick charging protocol used in the quick charging is selected.
S603, obtaining the maximum threshold voltage and the maximum threshold current which are required to be output by the charger, and sending the maximum threshold voltage and the maximum threshold current to the charger.
S604, dynamically adjusting the maximum threshold voltage and the maximum threshold current required to be output by the charger according to the current voltage and the current of the battery and the actual output voltage and the actual output current of the charger, wherein when the terminal equipment cannot inquire the actual output voltage and the actual output current from the charger, the voltage value at the VBUS interface of the terminal equipment is taken as the actual output voltage, and the current value at the VBUS interface of the terminal equipment is taken as the actual output current.
In some embodiments, the obtaining the maximum threshold voltage and the maximum threshold current required for the charger output specifically includes: and determining the maximum threshold voltage and the maximum threshold current required to be output by the charger according to the current voltage of the battery, the state of the battery and the corresponding impedance of a charging circuit.
In some embodiments, the dynamically adjusting the maximum threshold voltage and the maximum threshold current required to be output by the charger according to the present voltage and current of the battery and the actual output voltage and output current of the charger specifically includes: if the current voltage of the battery is smaller than the maximum threshold voltage, the output voltage of the charger is adjusted upwards; when the output current of the charger reaches the maximum threshold current, the output voltage of the charger is downwards adjusted; and if the current voltage of the battery reaches the maximum threshold voltage, switching to the maximum threshold voltage and the maximum threshold current corresponding to the preset next-gear battery voltage.
In some embodiments, the terminal device includes a charging logic module, a protocol negotiation module, the method further includes: after the terminal equipment is inserted into a charger, the charging logic module detects the type of the charger; when the type of the charger is a special charging port DCP, the protocol negotiation module sends waveform information corresponding to a fast charging protocol supported by the terminal equipment to the charger, polls the fast charging protocol supported by the charger and acquires the fast charging protocol supported by the charger; the charging logic module obtains the maximum threshold voltage and the maximum threshold current required to be output by the charger, and sends the maximum threshold voltage and the maximum threshold current to the charger; the charging logic module dynamically adjusts the maximum threshold voltage and the maximum threshold current required to be output by the charger according to the current voltage and the current of the battery and the actual output voltage and the actual output current of the charger, wherein when the terminal equipment cannot inquire the actual output voltage and the actual output current from the charger, the voltage value at the VBUS interface of the terminal equipment is used as the actual output voltage, and the current value at the VBUS interface of the terminal equipment is used as the actual output current.
In some embodiments, the state of the battery includes a temperature of the battery and/or a charge of the battery.
According to the charging control method provided by the embodiment of the application, whether different quick charging protocols are supported or not is polled by the terminal equipment to the charger, and if the charger supports a certain quick charging protocol and when charging is performed based on the quick charging protocol, the preset index is met, then the terminal equipment can perform quick charging based on the quick charging protocol. When the terminal equipment cannot successfully read the actual output current and voltage of the charger, the VBUS interface voltage and current are used as the substitute to dynamically adjust the charging voltage and charging current, so that the battery is charged. The method can avoid the problem of quick charging failure caused by the fact that the terminal equipment cannot acquire a protocol supported by the charger or cannot acquire actual output voltage and current.
Based on the same technical idea, the present application further provides a computer-readable storage medium, in which computer-executable program instructions are stored, which when executed on a computer, cause the computer or processor to perform one or more steps of any one of the methods described above.
Based on the same technical idea, the present application embodiment also provides a computer program product containing instructions, the computer program product comprising computer program code, which when run on a computer, causes the computer or processor to perform one or more steps of any one of the methods described above.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted across a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.
The foregoing is merely a specific implementation of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered by the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A method of charging control, applied to a terminal device, the terminal device supporting at least one fast charging protocol, the method comprising:
detecting the type of the charger after the terminal equipment is inserted into the charger;
when the type of the charger is a special charging port DCP, the quick charging protocol supported by the charger is polled and acquired by sending waveform information corresponding to the quick charging protocol supported by the terminal equipment to the charger;
Detecting whether the state of the terminal equipment meets a preset index under the output power of the charger;
if the state of the terminal equipment does not meet the preset index, adjusting the output power of the charger, wherein the state of the terminal equipment comprises a battery state and a hardware access state;
acquiring a maximum threshold voltage and a maximum threshold current which need to be output by the charger, and sending the maximum threshold voltage and the maximum threshold current to the charger;
when the actual output current of the charger reaches the maximum threshold current, the actual output voltage of the charger is downwards adjusted by a fixed stepping value, so that the actual output current of the charger is gradually reduced;
if the current voltage of the battery reaches the maximum threshold voltage, switching to the maximum threshold voltage and the maximum threshold current corresponding to the preset next-gear battery voltage, detecting whether the state of the terminal equipment meets the corresponding preset index or not under the preset next-gear battery voltage, and if not, repeatedly adjusting the output power of the charger; wherein,
when the terminal equipment cannot inquire the actual output voltage and the actual output current from the charger, the voltage value at the VBUS interface of the terminal equipment is used as the actual output voltage, and the current value at the VBUS interface of the terminal equipment is used as the actual output current.
2. The method of claim 1, wherein when the charger supports a plurality of fast charge protocols, the method further comprises:
and selecting a first quick charge protocol used by the quick charge from the plurality of quick charge protocols according to the priority of the power supported by the quick charge protocol indicated by the charger.
3. The method according to claim 2, wherein the method further comprises:
and closing other quick charging protocols except the first quick charging protocol in the plurality of quick charging protocols after the first quick charging protocol used in the quick charging is selected.
4. A method according to any of claims 1-3, characterized in that said obtaining a maximum threshold voltage and a maximum threshold current requiring the charger output, in particular comprises:
and determining the maximum threshold voltage and the maximum threshold current required to be output by the charger according to the current voltage of the battery, the state of the battery and the corresponding impedance of a charging circuit.
5. A method according to any of claims 1-3, wherein the terminal device comprises a charging logic module, a protocol negotiation module, the method further comprising:
after the terminal equipment is inserted into a charger, the charging logic module detects the type of the charger;
When the type of the charger is a special charging port DCP, the protocol negotiation module sends waveform information corresponding to a fast charging protocol supported by the terminal equipment to the charger, polls the fast charging protocol supported by the charger and acquires the fast charging protocol supported by the charger;
the charging logic module obtains the maximum threshold voltage and the maximum threshold current required to be output by the charger, and sends the maximum threshold voltage and the maximum threshold current to the charger;
the charging logic module dynamically adjusts a maximum threshold voltage and a maximum threshold current required to be output by the charger according to the current voltage and current of the battery and the actual output voltage and actual output current of the charger, wherein when the terminal equipment cannot inquire the actual output voltage and the actual output current from the charger, a voltage value at a VBUS interface of the terminal equipment is used as the actual output voltage, and a current value at the VBUS interface of the terminal equipment is used as the actual output current.
6. The method of claim 4, wherein the state of the battery comprises a temperature of the battery and/or a charge of the battery.
7. A method according to any of claims 1-3, wherein the waveform information comprises a current waveform to which different fast charge protocols are in one-to-one correspondence.
8. A terminal device, comprising:
one or more processors;
one or more memories;
the one or more memories store one or more computer programs comprising instructions that, when executed by the one or more processors, cause the terminal device to perform the method of any of claims 1-7.
9. A computer readable storage medium storing computer executable program instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 7.
CN202210673960.9A 2022-05-30 2022-06-15 Charging control method and terminal equipment Active CN116031964B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210600124 2022-05-30
CN2022106001248 2022-05-30

Publications (2)

Publication Number Publication Date
CN116031964A CN116031964A (en) 2023-04-28
CN116031964B true CN116031964B (en) 2023-12-22

Family

ID=86090079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210673960.9A Active CN116031964B (en) 2022-05-30 2022-06-15 Charging control method and terminal equipment

Country Status (1)

Country Link
CN (1) CN116031964B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117013660B (en) * 2023-09-12 2024-03-08 荣耀终端有限公司 Charging icon display method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105811532A (en) * 2016-05-17 2016-07-27 深圳慧能泰半导体科技有限公司 Charging method, charging control circuit and charger
CN107516919A (en) * 2017-08-25 2017-12-26 维沃移动通信有限公司 A kind of charging method and charger
CN107742912A (en) * 2017-11-08 2018-02-27 深圳天珑无线科技有限公司 Charging method, fast fill device and computer-readable recording medium
CN108270043A (en) * 2017-12-12 2018-07-10 努比亚技术有限公司 A kind of method for charging batteries, terminal and computer readable storage medium
WO2022068802A1 (en) * 2020-09-29 2022-04-07 维沃移动通信有限公司 Charger, and charging control method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105811532A (en) * 2016-05-17 2016-07-27 深圳慧能泰半导体科技有限公司 Charging method, charging control circuit and charger
CN107516919A (en) * 2017-08-25 2017-12-26 维沃移动通信有限公司 A kind of charging method and charger
CN107742912A (en) * 2017-11-08 2018-02-27 深圳天珑无线科技有限公司 Charging method, fast fill device and computer-readable recording medium
CN108270043A (en) * 2017-12-12 2018-07-10 努比亚技术有限公司 A kind of method for charging batteries, terminal and computer readable storage medium
WO2022068802A1 (en) * 2020-09-29 2022-04-07 维沃移动通信有限公司 Charger, and charging control method and apparatus

Also Published As

Publication number Publication date
CN116031964A (en) 2023-04-28

Similar Documents

Publication Publication Date Title
CN108695921B (en) Data backup method, wireless charging device, mobile terminal and storage medium
JP7252331B2 (en) Optional Terminal Charging Methods, Graphical User Interfaces, and Electronic Devices
US11683850B2 (en) Bluetooth reconnection method and related apparatus
CN114079893B (en) Bluetooth communication method, terminal device and computer readable storage medium
CN110636554B (en) Data transmission method and device
EP4350540A1 (en) Account login method and electronic device
CN113973398B (en) Wireless network connection method, electronic equipment and chip system
CN116031964B (en) Charging control method and terminal equipment
CN116114239A (en) Volume management method and electronic equipment
CN115333941B (en) Method for acquiring application running condition and related equipment
WO2022143258A1 (en) Voice interaction processing method and related apparatus
US20230273872A1 (en) Application debuging method and electronic device
CN114123364A (en) Charging method for electronic device, electronic device and medium
CN114828098B (en) Data transmission method and electronic equipment
CN117013660B (en) Charging icon display method and electronic equipment
CN116095223B (en) Notification display method and terminal device
CN116719376B (en) Voltage control method, device, equipment and storage medium
CN115017001B (en) Method for optimizing endurance performance and electronic equipment
CN117154900B (en) Charging control method and electronic equipment
CN115665841B (en) Transmission power determination method, chip, terminal device, and readable storage medium
CN117278372B (en) Signal transmission method and communication device
RU2775835C1 (en) Method for wireless charging and electronic apparatus
CN117880885A (en) Audio playing optimization method and electronic equipment
CN118283763A (en) Transmitting power determining method, chip, terminal equipment and readable storage medium
CN118118876A (en) Communication method, electronic equipment and storage medium

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