CN116742761A - Charging method, charging device, electronic equipment and storage medium - Google Patents

Charging method, charging device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116742761A
CN116742761A CN202311000968.XA CN202311000968A CN116742761A CN 116742761 A CN116742761 A CN 116742761A CN 202311000968 A CN202311000968 A CN 202311000968A CN 116742761 A CN116742761 A CN 116742761A
Authority
CN
China
Prior art keywords
charging
voltage
charger
electronic equipment
protocol
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
CN202311000968.XA
Other languages
Chinese (zh)
Other versions
CN116742761B (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202311000968.XA priority Critical patent/CN116742761B/en
Publication of CN116742761A publication Critical patent/CN116742761A/en
Application granted granted Critical
Publication of CN116742761B publication Critical patent/CN116742761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00045Authentication, i.e. circuits for checking compatibility between one component, e.g. a battery or a battery charger, and another component, e.g. a power source
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • H02J7/00712Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters
    • 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)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The disclosure relates to a charging method, a charging device, electronic equipment and a storage medium, and belongs to the technical field of charging. The method comprises the following steps: responding to connection of a charger and a charging interface of the electronic equipment, and determining that the first protocol is a charging protocol of the electronic equipment; acquiring an impedance value between a first pin and a second pin of a charging interface of electronic equipment; based on the impedance value, charging of the electronic device is controlled. Therefore, when the first pin and the second pin of the charging interface of the electronic equipment are in short circuit, the impedance value between the first pin and the second pin can be considered, the electronic equipment can be controlled to be charged, the problems of intermittent charging, failure charging and the like of the electronic equipment caused by short circuit faults can be avoided, and the charging continuity and reliability of the electronic equipment are improved.

Description

Charging method, charging device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of charging technologies, and in particular, to a charging method, a charging device, an electronic device and a storage medium.
Background
At present, when an electronic device is charged, communication between the electronic device and a charger is mostly needed based on a charging protocol, so as to determine a charging voltage and realize processes such as data transmission in a charging process. However, the charging method in the related art has problems of intermittent charging, failure of charging, and the like.
Disclosure of Invention
The present disclosure provides a charging method, apparatus, electronic device, and computer readable storage medium, to at least solve the problems of intermittent charging and failure charging in the charging method in the related art. The technical scheme of the present disclosure is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided a charging method, including: determining a first protocol as a charging protocol of the electronic equipment in response to connection of the charger and a charging interface of the electronic equipment; acquiring an impedance value between a first pin and a second pin of a charging interface of the electronic equipment; and controlling to charge the electronic equipment based on the impedance value.
In one embodiment of the disclosure, the controlling the charging of the electronic device based on the impedance value includes: determining a state of charge of the charger based on the impedance value; and controlling to charge the electronic equipment based on the charging state of the charger.
In one embodiment of the disclosure, the controlling the charging of the electronic device based on the charging state of the charger includes: and if the first protocol communication between the charger and the electronic equipment fails, controlling to stop charging the electronic equipment.
In one embodiment of the disclosure, the controlling the charging of the electronic device based on the charging state of the charger includes: if the charger fails to request the charging voltage to be the first voltage and the charger is in charging interruption, updating the charging voltage of the electronic equipment to be the second voltage; controlling the electronic equipment to be charged according to the second voltage; the first voltage and the second voltage are in a value range of charging voltage configured by the first protocol, and the second voltage is smaller than the first voltage.
In one embodiment of the disclosure, the controlling the charging of the electronic device based on the charging state of the charger includes: if the charger request charging voltage is the first voltage and the charger request charging voltage is the third voltage and the charger fails, the charger does not generate charging interruption, and the charging voltage of the electronic equipment is updated to be the first voltage; controlling the electronic equipment to be charged according to the first voltage; the first voltage and the third voltage are in a value range of charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.
In one embodiment of the disclosure, the controlling the charging of the electronic device based on the charging state of the charger includes: if the charger request charging voltage is the first voltage and the charger request charging voltage is the third voltage and the charger fails, the charger is interrupted in charging, and the charging protocol of the electronic equipment is updated from the first protocol to the second protocol; according to the second protocol, controlling the electronic equipment to be charged; the first voltage and the third voltage are in a value range of charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.
In one embodiment of the disclosure, the controlling the charging of the electronic device based on the charging state of the charger includes: and if the first protocol between the charger and the electronic equipment is successful, the charger requests that the charging voltage is not abnormal, the temperature of a charging interface of the electronic equipment is greater than a set threshold, and the electronic equipment is controlled to be charged according to the first protocol.
In one embodiment of the disclosure, after the obtaining the impedance value between the first pin and the second pin of the charging interface of the electronic device, the method further includes: and generating reminding information for indicating that the charging interface of the electronic equipment has short circuit fault.
In one embodiment of the present disclosure, the first pin is a power supply pin and the second pin is a communication pin.
According to a second aspect of embodiments of the present disclosure, there is provided a charging device including: a determination module configured to perform determining that a first protocol is a charging protocol of an electronic device in response to a charger interfacing with the charging of the electronic device; an acquisition module configured to perform acquiring an impedance value between a first pin and a second pin of a charging interface of the electronic device; and a control module configured to perform control of charging the electronic device based on the impedance value.
In one embodiment of the present disclosure, the control module is further configured to perform: determining a state of charge of the charger based on the impedance value; and controlling to charge the electronic equipment based on the charging state of the charger.
In one embodiment of the present disclosure, the control module is further configured to perform: and if the first protocol communication between the charger and the electronic equipment fails, controlling to stop charging the electronic equipment.
In one embodiment of the present disclosure, the control module is further configured to perform: if the charger fails to request the charging voltage to be the first voltage and the charger is in charging interruption, updating the charging voltage of the electronic equipment to be the second voltage; controlling the electronic equipment to be charged according to the second voltage; the first voltage and the second voltage are in a value range of charging voltage configured by the first protocol, and the second voltage is smaller than the first voltage.
In one embodiment of the present disclosure, the control module is further configured to perform: if the charger request charging voltage is the first voltage and the charger request charging voltage is the third voltage and the charger fails, the charger does not generate charging interruption, and the charging voltage of the electronic equipment is updated to be the first voltage; controlling the electronic equipment to be charged according to the first voltage; the first voltage and the third voltage are in a value range of charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.
In one embodiment of the present disclosure, the control module is further configured to perform: if the charger request charging voltage is the first voltage and the charger request charging voltage is the third voltage and the charger fails, the charger is interrupted in charging, and the charging protocol of the electronic equipment is updated from the first protocol to the second protocol; according to the second protocol, controlling the electronic equipment to be charged; the first voltage and the third voltage are in a value range of charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.
In one embodiment of the present disclosure, the control module is further configured to perform: and if the first protocol between the charger and the electronic equipment is successful, the charger requests that the charging voltage is not abnormal, the temperature of a charging interface of the electronic equipment is greater than a set threshold, and the electronic equipment is controlled to be charged according to the first protocol.
In one embodiment of the disclosure, after the obtaining the impedance value between the first pin and the second pin of the charging interface of the electronic device, the control module is further configured to perform: and generating reminding information for indicating that the charging interface of the electronic equipment has short circuit fault.
In one embodiment of the present disclosure, the first pin is a power supply pin and the second pin is a communication pin.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device comprising a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the steps of the method according to the first aspect of the embodiments of the present disclosure.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the method of the first aspect of embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: and responding to connection of the charger and the charging interface of the electronic equipment, determining that the first protocol is the charging protocol of the electronic equipment, acquiring an impedance value between a first pin and a second pin of the charging interface of the electronic equipment, and controlling the electronic equipment to be charged based on the impedance value. Therefore, when the first pin and the second pin of the charging interface of the electronic equipment are in short circuit, the impedance value between the first pin and the second pin can be considered, the electronic equipment can be controlled to be charged, the problems of intermittent charging, failure charging and the like of the electronic equipment caused by short circuit faults can be avoided, and the charging continuity and reliability of the electronic equipment are improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
Fig. 1 is a flow chart illustrating a charging method according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating a charging method according to another exemplary embodiment.
Fig. 3 is a flowchart illustrating a charging method according to another exemplary embodiment.
Fig. 4 is a flowchart illustrating a charging method according to another exemplary embodiment.
Fig. 5 is a block diagram illustrating a charging device according to an exemplary embodiment.
Fig. 6 is a block diagram of an electronic device, according to an example embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The data acquisition, storage, use, processing and the like in the technical scheme of the present disclosure all conform to the relevant regulations of the national laws and regulations.
Fig. 1 is a flowchart illustrating a charging method according to an exemplary embodiment, and as shown in fig. 1, the charging method of the embodiment of the present disclosure includes the following steps.
S101, determining that the first protocol is a charging protocol of the electronic equipment in response to connection of the charger and a charging interface of the electronic equipment.
It should be noted that, the main implementation body of the charging method in the embodiment of the disclosure is an electronic device, and the electronic device includes a mobile phone, a notebook computer, a desktop computer, a vehicle-mounted terminal, an intelligent household appliance, a wearable device, and the like. The wearable device may include, among other things, a wrist-worn device (such as a smart watch, a smart bracelet), a head-worn device, a foot-worn device, and the like. The charging method of the embodiment of the present disclosure may be performed by the charging apparatus of the embodiment of the present disclosure, and the charging apparatus of the embodiment of the present disclosure may be configured in any electronic device to perform the charging method of the embodiment of the present disclosure.
It should be noted that, the charging interface and the charger of the electronic device both support the first protocol. Under the condition that the charging interface and the charger of the electronic equipment support the first protocol, the first protocol is defaulted to be the charging protocol of the electronic equipment.
It should be noted that, neither the charging interface nor the first protocol of the electronic device is excessively limited. The first protocol may be a fast charge protocol or a slow charge protocol.
For example, the charging interface of the electronic device is an USB (Universal Serial Bus ) Type-C interface, where the USB Type-C interface is smaller than the USB Type-a interface and the USB Type-B interface, and the USB Type-a interface, the USB Type-B interface and the USB Type-C interface are all USB interfaces.
For example, the first protocol is a USB PD (Power Delivery) protocol, hereinafter abbreviated as PD protocol. The PD protocol is a fast charging protocol based on a USB interface.
S102, obtaining an impedance value between a first pin and a second pin of a charging interface of the electronic device.
It will be appreciated that, in the normal case, an open circuit exists between the first pin and the second pin, i.e. the impedance value between the first pin and the second pin is infinite, however, if the charging interface of the electronic device is exposed, impurities, moisture, etc. easily enter the charging interface of the electronic device, which results in a short circuit between the first pin and the second pin, i.e. the impedance value between the first pin and the second pin can be measured or calculated.
It should be noted that, the first pin and the second pin are both pins in the charging interface of the electronic device, and the first pin and the second pin are different pins. The first pin and the second pin are not excessively limited. For example, the first pin is a power supply pin and the second pin is a communication pin. Wherein the power pin may comprise a VBUS pin and the communication pin may comprise a CC (Configuration Channel ) pin.
It should be noted that, the method for obtaining the impedance value between the first pin and the second pin of the charging interface of the electronic device may be implemented by any method for obtaining the impedance value in the related art, which is not limited herein.
In one embodiment, as shown in fig. 2, the electronic device includes a PMIC (Power Management Integrated Circuit ) including a voltage acquisition circuit enabling a pull-down resistor Rd and a second pin, the first pin being connected to a first terminal of the charger, the second pin being connected to a second terminal of the charger, the voltage acquisition circuit enabling the first terminal of the pull-down resistor Rd, the second pin, respectively, and the second terminal of the pull-down resistor Rd being grounded.
If an open circuit exists between the first pin and the second pin, that is, the impedance value R between the first pin and the second pin is infinity, the voltage of the second pin is zero.
If the first pin and the second pin are short-circuited, the voltage V of the first pin o At the impedance value R, the enable pull-down resistor Rd divides the voltage, the impedance value R is calculated as follows:
R =(V o -Vcc)/(Vcc/Rd)
wherein ,Vo The voltage of the first pin is also the output voltage of the charger, and Vcc is the voltage of the second pin.
For example, in V o For example, =5v (volts), vcc=3v, rd=5.1kΩ (kiloohm), the impedance value R is calculated as follows:
R = (5-3)/(3/5.1)= 3.4KΩ
in one embodiment, after the impedance value between the first pin and the second pin of the charging interface of the electronic device is obtained, the method further comprises generating reminding information for indicating that the charging interface of the electronic device has a short circuit fault, and timely informing a user that the charging interface of the electronic device has the short circuit fault, so that a user can timely repair or replace the charging interface of the electronic device, and charging safety of the electronic device is improved.
In some examples, the method further comprises controlling to display on the electronic device a reminder for indicating that the charging interface of the electronic device has a short circuit fault, and/or sending to the electronic device a reminder for indicating that the charging interface of the electronic device has a short circuit fault.
And S103, controlling the electronic equipment to be charged based on the impedance value.
In one embodiment, controlling charging of the electronic device based on the impedance value includes determining a charging policy of the electronic device based on the impedance value, and controlling charging of the electronic device in accordance with the charging policy of the electronic device.
For example, a mapping relationship between the impedance value and the charging policy of the electronic device may be established in advance, and after the impedance value is obtained, the charging policy mapped by the impedance value may be determined as the charging policy of the electronic device based on the impedance value and the mapping relationship. It will be appreciated that different impedance values may map to different charging strategies, or may map to the same charging strategy.
In one embodiment, controlling charging of the electronic device based on the impedance value includes determining a state of charge of the charger based on the impedance value, and controlling charging of the electronic device based on the state of charge of the charger. Therefore, the method can determine the charging state of the charger based on the impedance value, and control the charging of the electronic equipment by taking the charging state of the charger into consideration, so that the charging reliability of the electronic equipment is improved.
It should be noted that, the charging state of the charger is not limited too much, for example, taking the first protocol as the PD protocol, the charging state of the charger may include success of PD protocol identification, failure of PD protocol communication, success of charging voltage request, failure of charging voltage request, success of voltage boost request, failure of voltage boost request, whether charging interruption (such as hard reset) occurs, whether normal charging is possible, whether short-circuit heating occurs, and so on.
For example, a mapping relationship between the impedance value and the charging state of the charger may be established in advance, and after the impedance value is acquired, the charging state mapped by the impedance value may be determined as the charging state of the charger based on the impedance value and the mapping relationship. It will be appreciated that different impedance values may map to different states of charge, or may map to the same state of charge.
In one embodiment, the mapping relationship among the impedance value R, the charging state of the charger, and the user experience is shown in table 1.
TABLE 1 mapping relationship between impedance value R, charger state of charge, user experience
In some examples, controlling charging of the electronic device based on the state of charge of the charger includes determining a charging policy of the electronic device based on the state of charge of the charger, and controlling charging of the electronic device in accordance with the charging policy of the electronic device.
For example, a mapping relationship between the charging state of the charger and the charging policy of the electronic device may be established in advance, and after the charging state of the charger is obtained, the charging policy mapped by the charging state of the charger may be determined as the charging policy of the electronic device based on the charging state of the charger. It will be appreciated that the states of charge of different chargers may map to different charging strategies, or may map to the same charging strategy.
According to the charging method provided by the embodiment of the disclosure, the charging interface of the charger and the electronic equipment is connected, the first protocol is determined to be the charging protocol of the electronic equipment, the impedance value between the first pin and the second pin of the charging interface of the electronic equipment is obtained, and the electronic equipment is controlled to be charged based on the impedance value. Therefore, when the first pin and the second pin of the charging interface of the electronic equipment are in short circuit, the impedance value between the first pin and the second pin can be considered, the electronic equipment can be controlled to be charged, the problems of intermittent charging, failure charging and the like of the electronic equipment caused by short circuit faults can be avoided, and the charging continuity and reliability of the electronic equipment are improved.
Fig. 3 is a flowchart illustrating a charging method according to another exemplary embodiment, and as shown in fig. 3, the charging method of the embodiment of the present disclosure includes the following steps.
S301, determining that the first protocol is a charging protocol of the electronic device in response to connection of the charger and a charging interface of the electronic device.
S302, obtaining an impedance value between a first pin and a second pin of a charging interface of the electronic device.
S303, determining the charging state of the charger based on the impedance value.
For the relevant content of steps S301-S303, refer to the above embodiments, and are not repeated here.
And S304, if the first protocol communication between the charger and the electronic equipment fails, controlling to stop charging the electronic equipment.
It should be noted that the first protocol communication failure between the charger and the electronic device is the first charging state of the charger. It can be appreciated that if the first protocol communication between the charger and the electronic device fails, and the electronic device cannot be controlled to be charged according to the first protocol, the charging of the electronic device can be controlled to be stopped.
For example, continuing to take table 1 as an example, the first protocol is a PD protocol, if the impedance value R <35kΩ, it may be determined that the charging state of the charger is a PD protocol communication failure between the charger and the electronic device, and control to stop charging the electronic device.
S305, if the charger fails to request the charging voltage to be the first voltage and the charger is interrupted, the charging voltage of the electronic device is updated to be the second voltage.
And S306, controlling the electronic equipment to be charged according to the second voltage.
It should be noted that, the charger fails to request the charging voltage to be the first voltage, and the charger is interrupted to be in the second charging state. It can be understood that if the charger fails to request the charging voltage to be the first voltage and the charger is interrupted, in order to avoid the problems of intermittent charging and failure charging of the electronic device, the charging voltage of the electronic device can be updated to be the second voltage, that is, the charging voltage of the electronic device is updated to be the fixed charging voltage, and the electronic device is controlled to be charged according to the fixed charging voltage.
The first voltage and the second voltage are in the range of the charging voltage configured by the first protocol, and the second voltage is smaller than the first voltage. The first voltage and the second voltage are not limited too much, for example, the first voltage is 9V, and the second voltage is 5V.
For example, taking table 1 as an example, the first protocol is a PD protocol, the first voltage is 9V, the second voltage is 5V, if the impedance value R of 35kΩ is less than or equal to 77kΩ, it may be determined that the charging state of the charger is that the charger requests the charging voltage to be 9V, and the charger fails to charge, the charging voltage of the electronic device is updated to be 5V, and charging of the electronic device is controlled according to the charging voltage of 5V.
S307, if the charger request charging voltage is the first voltage successfully, the charger request charging voltage is the third voltage successfully, and the charger is not interrupted, the charging voltage of the electronic equipment is updated to the first voltage.
And S308, controlling the electronic equipment to be charged according to the first voltage.
It should be noted that, the charger request charging voltage is the first voltage successfully, the charger request charging voltage is the third voltage successfully, and the charger is not in the third charging state of the charger when the charging interruption occurs. It can be understood that if the charger is successful in requesting the charging voltage to be the first voltage, the charger is failed in requesting the charging voltage to be the third voltage, and the charger is not interrupted in charging, in order to avoid the problem of the charging failure of the electronic device, the charging voltage of the electronic device can be updated to be the first voltage, that is, the charging voltage of the electronic device is updated to be the fixed charging voltage, and the electronic device is controlled to be charged according to the fixed charging voltage.
The first voltage and the third voltage are in the range of the charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage. The first voltage and the third voltage are not limited too much, for example, the first voltage is 9V, and the third voltage is 10V.
For example, taking table 1 as an example, the first protocol is a PD protocol, the first voltage is 9V, the third voltage is 10V, if the resistance value R of 77kΩ is less than or equal to 82kΩ, it can be determined that the charging state of the charger is that the charging voltage requested by the charger is 9V, the charging voltage requested by the charger is 10V failure, and the charging interruption does not occur in the charger, the charging voltage of the electronic device is updated to 9V, and the electronic device is controlled to be charged according to the charging voltage of 9V.
S309, if the charger request charging voltage is the first voltage and the charger request charging voltage is the third voltage and the charger fails, the charger is interrupted, and the charging protocol of the electronic device is updated from the first protocol to the second protocol.
And S310, controlling the electronic equipment to be charged according to a second protocol.
It should be noted that, the charger requests the charging voltage to be the first voltage successfully, and the charger requests the charging voltage to be the third voltage successfully, and the charger is in the fourth charging state when the charging is interrupted. It can be understood that if the charger requests the charging voltage to be the first voltage successfully and the charger requests the charging voltage to be the third voltage successfully, and the charger fails to charge, in order to avoid the problems of intermittent charging and failure charging of the electronic device, the charging protocol of the electronic device can be updated from the first protocol to the second protocol, and the electronic device is controlled to be charged according to the second protocol.
The content of the first voltage and the third voltage may be referred to the above embodiments, and will not be described herein.
It should be noted that the second protocol is not limited too much, for example, the second protocol is a USB QC (Quick Charge) protocol, hereinafter referred to as QC protocol.
For example, taking table 1 as an example, the first protocol is PD protocol, the second protocol is QC protocol, the first voltage is 9V, the third voltage is 10V, if 82kΩ is less than or equal to the resistance value R <166kΩ, it can be determined that the charging state of the charger is 9V success when the charger requests the charging voltage, the charger fails to request the charging voltage to be 10V, and the charger fails to charge, the charging protocol of the electronic device is updated from PD protocol to QC protocol, and the electronic device is charged according to the QC protocol.
And S311, if the first protocol communication between the charger and the electronic equipment is successful, the charging voltage requested by the charger is not abnormal, the temperature of a charging interface of the electronic equipment is greater than a set threshold value, and the electronic equipment is controlled to be charged according to the first protocol.
It should be noted that, the first protocol communication between the charger and the electronic device is successful, no abnormality occurs in the charging voltage requested by the charger, and the temperature of the charging interface of the electronic device is greater than the set threshold value to be the fifth charging state of the charger. It can be understood that if the first protocol between the charger and the electronic device is successful, the charging voltage requested by the charger is not abnormal, and the temperature of the charging interface of the electronic device is greater than the set threshold, which indicates that the charger can normally charge the electronic device at this time, only the problem of short circuit and heat generation exists, and the charging of the electronic device can be controlled continuously according to the first protocol.
The set threshold value is not limited too much.
For example, taking table 1 as an example, the first protocol is a PD protocol, if 166K Ω is less than or equal to the impedance value R, it may be determined that the charging state of the charger is successful in PD protocol communication between the charger and the electronic device, no abnormality occurs in the charging voltage requested by the charger, and the temperature of the charging interface of the electronic device is greater than the set threshold, and charging is controlled to be performed on the electronic device according to the PD protocol.
In one embodiment, according to the first protocol, the method further includes detecting a change trend and a change speed of a temperature of a charging interface of the electronic device in a process of charging the electronic device, and if the change trend of the temperature of the charging interface of the electronic device is an ascending trend, and the change speed of the temperature of the charging interface of the electronic device is greater than or equal to a set threshold, the method indicates that the temperature of the charging interface of the electronic device is fast to ascend, generating reminding information for indicating that a short circuit fault exists in the charging interface of the electronic device, and/or generating reminding information for indicating that the temperature of the charging interface of the electronic device is fast to ascend.
In this embodiment, the charging states of the charger include 5 charging states, and the charging states of the charger may include other embodiments besides the 5 charging states described above, which are not limited herein.
According to the charging method provided by the embodiment of the disclosure, the charging state of the charger can be divided into five states in advance, and the charging strategy of the corresponding electronic equipment is configured for each state in advance so as to control the charging of the electronic equipment, so that the problems of intermittent charging, failure charging and the like of the electronic equipment caused by short circuit faults can be avoided, and the charging continuity and reliability of the electronic equipment are improved.
For the person skilled in the art to more clearly understand the present disclosure, fig. 4 is a flowchart illustrating a charging method according to another exemplary embodiment, and the charging method of the embodiment of the present disclosure includes the following steps as shown in fig. 4.
S401, determining that the first protocol is a charging protocol of the electronic device in response to connection of the charger and a charging interface of the electronic device.
S402, obtaining an impedance value between a power supply pin and a communication pin of a charging interface of the electronic device.
For example, an impedance value between a VBUS pin and a CC pin of a charging interface of an electronic device may be obtained.
S403, it is identified whether the impedance value is less than 35K Ω.
If yes, i.e. the impedance value R <35kΩ, step S404 is performed; if not, i.e. the resistance value R is not less than 35K omega, step S405 is performed.
S404, control stops charging the electronic device.
S405, it is identified whether the impedance value is smaller than 77kΩ.
If yes, that is, 35KΩ less than or equal to the impedance value R <77KΩ, then step S406 is performed; if not, i.e. the impedance value R is equal to or greater than 77K Ω, step S407 is performed.
And S406, updating the charging voltage of the electronic equipment to be 5V, and controlling the electronic equipment to be charged according to the charging voltage of 5V.
S407, it is identified whether the impedance value is less than 82kΩ.
If yes, that is, 77kΩ is equal to or less than the impedance value R <82kΩ, step S408 is performed; if not, i.e. the impedance value R is not less than 82KΩ, step S409 is performed.
And S408, updating the charging voltage of the electronic equipment to 9V, and controlling the electronic equipment to be charged according to the charging voltage of 9V.
S409, identifying whether the impedance value is less than 166KΩ.
If yes, that is, 82kΩ less than or equal to the impedance value R <166kΩ, step S410 is performed; if not, i.e. the resistance value R is not less than 166KΩ, step S411 is performed.
And S410, updating the charging protocol of the electronic equipment from the first protocol to the second protocol, and controlling the electronic equipment to be charged according to the second protocol.
And S411, controlling the electronic equipment to be charged according to the first protocol.
S412, generating reminding information for indicating that the charging interface of the electronic equipment has short circuit fault.
For the relevant content of steps S401 to S412, refer to the above embodiment, and are not repeated here.
Fig. 5 is a block diagram illustrating a charging device according to an exemplary embodiment. Referring to fig. 5, a charging device 100 of an embodiment of the present disclosure includes: a determination module 110, an acquisition module 120, and a control module 130.
The determination module 110 is configured to perform determining that the first protocol is a charging protocol of the electronic device in response to the charger interfacing with the charging of the electronic device;
the obtaining module 120 is configured to perform obtaining an impedance value between a first pin and a second pin of a charging interface of the electronic device;
the control module 130 is configured to perform controlling charging of the electronic device based on the impedance value.
In one embodiment of the present disclosure, the control module 130 is further configured to perform: determining a state of charge of the charger based on the impedance value; and controlling to charge the electronic equipment based on the charging state of the charger.
In one embodiment of the present disclosure, the control module 130 is further configured to perform: and if the first protocol communication between the charger and the electronic equipment fails, controlling to stop charging the electronic equipment.
In one embodiment of the present disclosure, the control module 130 is further configured to perform: if the charger fails to request the charging voltage to be the first voltage and the charger is in charging interruption, updating the charging voltage of the electronic equipment to be the second voltage; controlling the electronic equipment to be charged according to the second voltage; the first voltage and the second voltage are in a value range of charging voltage configured by the first protocol, and the second voltage is smaller than the first voltage.
In one embodiment of the present disclosure, the control module 130 is further configured to perform: if the charger request charging voltage is the first voltage and the charger request charging voltage is the third voltage and the charger fails, the charger does not generate charging interruption, and the charging voltage of the electronic equipment is updated to be the first voltage; controlling the electronic equipment to be charged according to the first voltage; the first voltage and the third voltage are in a value range of charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.
In one embodiment of the present disclosure, the control module 130 is further configured to perform: if the charger request charging voltage is the first voltage and the charger request charging voltage is the third voltage and the charger fails, the charger is interrupted in charging, and the charging protocol of the electronic equipment is updated from the first protocol to the second protocol; according to the second protocol, controlling the electronic equipment to be charged; the first voltage and the third voltage are in a value range of charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.
In one embodiment of the present disclosure, the control module 130 is further configured to perform: and if the first protocol between the charger and the electronic equipment is successful, the charger requests that the charging voltage is not abnormal, the temperature of a charging interface of the electronic equipment is greater than a set threshold, and the electronic equipment is controlled to be charged according to the first protocol.
In one embodiment of the present disclosure, after the obtaining the impedance value between the first pin and the second pin of the charging interface of the electronic device, the control module 130 is further configured to perform: and generating reminding information for indicating that the charging interface of the electronic equipment has short circuit fault.
In one embodiment of the present disclosure, the first pin is a power supply pin and the second pin is a communication pin.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
According to the charging device provided by the embodiment of the disclosure, the charging interface of the charger and the electronic equipment is connected, the first protocol is determined to be the charging protocol of the electronic equipment, the impedance value between the first pin and the second pin of the charging interface of the electronic equipment is obtained, and the electronic equipment is controlled to be charged based on the impedance value. Therefore, when the first pin and the second pin of the charging interface of the electronic equipment are in short circuit, the impedance value between the first pin and the second pin can be considered, the electronic equipment can be controlled to be charged, the problems of intermittent charging, failure charging and the like of the electronic equipment caused by short circuit faults can be avoided, and the charging continuity and reliability of the electronic equipment are improved.
Fig. 6 is a block diagram of an electronic device 200, shown in accordance with an exemplary embodiment.
As shown in fig. 6, the electronic device 200 includes:
a memory 210 and a processor 220, a bus 230 connecting the different components (including the memory 210 and the processor 220), the memory 210 storing a computer program that when executed by the processor 220 implements the charging method described in the embodiments of the present disclosure.
Bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 200 typically includes a variety of electronic device readable media. Such media can be any available media that is accessible by electronic device 200 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 210 may also include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 240 and/or cache memory 250. The electronic device 200 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 260 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard disk drive"). Although not shown in fig. 6, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 230 via one or more data medium interfaces. Memory 210 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the various embodiments of the disclosure.
Program/utility 280 having a set (at least one) of program modules 270 may be stored in, for example, memory 210, such program modules 270 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 270 generally perform the functions and/or methods in the embodiments described in this disclosure.
The electronic device 200 may also communicate with one or more external devices 290 (e.g., keyboard, pointing device, display 291, etc.), one or more devices that enable a user to interact with the electronic device 200, and/or any device (e.g., network card, modem, etc.) that enables the electronic device 200 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 292. Also, electronic device 200 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 293. As shown in fig. 6, the network adapter 293 communicates with other modules of the electronic device 200 over the bus 230. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 200, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processor 220 executes various functional applications and data processing by running programs stored in the memory 210.
It should be noted that, the implementation process and the technical principle of the electronic device in this embodiment refer to the foregoing explanation of the charging method in the embodiment of the disclosure, and are not repeated herein.
The electronic device provided by the embodiment of the disclosure may execute the charging method, determine that the first protocol is the charging protocol of the electronic device in response to connection of the charger and the charging interface of the electronic device, obtain an impedance value between the first pin and the second pin of the charging interface of the electronic device, and control charging of the electronic device based on the impedance value. Therefore, when the first pin and the second pin of the charging interface of the electronic equipment are in short circuit, the impedance value between the first pin and the second pin can be considered, the electronic equipment can be controlled to be charged, the problems of intermittent charging, failure charging and the like of the electronic equipment caused by short circuit faults can be avoided, and the charging continuity and reliability of the electronic equipment are improved.
To achieve the above-described embodiments, the present disclosure also proposes a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the charging method provided by the present disclosure.
Alternatively, the computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

1. A charging method, comprising:
determining a first protocol as a charging protocol of the electronic equipment in response to connection of the charger and a charging interface of the electronic equipment;
acquiring an impedance value between a first pin and a second pin of a charging interface of the electronic equipment;
and controlling to charge the electronic equipment based on the impedance value.
2. The method of claim 1, wherein controlling charging the electronic device based on the impedance value comprises:
determining a state of charge of the charger based on the impedance value;
and controlling to charge the electronic equipment based on the charging state of the charger.
3. The method of claim 2, wherein the controlling the charging of the electronic device based on the state of charge of the charger comprises:
and if the first protocol communication between the charger and the electronic equipment fails, controlling to stop charging the electronic equipment.
4. The method of claim 2, wherein the controlling the charging of the electronic device based on the state of charge of the charger comprises:
if the charger fails to request the charging voltage to be the first voltage and the charger is in charging interruption, updating the charging voltage of the electronic equipment to be the second voltage;
controlling the electronic equipment to be charged according to the second voltage; wherein,
the first voltage and the second voltage are in the range of the charging voltage configured by the first protocol, and the second voltage is smaller than the first voltage.
5. The method of claim 2, wherein the controlling the charging of the electronic device based on the state of charge of the charger comprises:
if the charger request charging voltage is the first voltage and the charger request charging voltage is the third voltage and the charger fails, the charger does not generate charging interruption, and the charging voltage of the electronic equipment is updated to be the first voltage;
controlling the electronic equipment to be charged according to the first voltage; wherein,
the first voltage and the third voltage are in the range of the charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.
6. The method of claim 2, wherein the controlling the charging of the electronic device based on the state of charge of the charger comprises:
if the charger request charging voltage is the first voltage and the charger request charging voltage is the third voltage and the charger fails, the charger is interrupted in charging, and the charging protocol of the electronic equipment is updated from the first protocol to the second protocol;
according to the second protocol, controlling the electronic equipment to be charged; wherein,
The first voltage and the third voltage are in the range of the charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.
7. The method of claim 2, wherein the controlling the charging of the electronic device based on the state of charge of the charger comprises:
and if the first protocol between the charger and the electronic equipment is successful, the charger requests that the charging voltage is not abnormal, the temperature of a charging interface of the electronic equipment is greater than a set threshold, and the electronic equipment is controlled to be charged according to the first protocol.
8. The method of any of claims 1-7, wherein after the obtaining the impedance value between the first pin and the second pin of the charging interface of the electronic device, further comprising:
and generating reminding information for indicating that the charging interface of the electronic equipment has short circuit fault.
9. The method of any of claims 1-7, wherein the first pin is a power pin and the second pin is a communication pin.
10. A charging device, characterized by comprising:
A determination module configured to perform determining that a first protocol is a charging protocol of an electronic device in response to a charger interfacing with the charging of the electronic device;
an acquisition module configured to perform acquiring an impedance value between a first pin and a second pin of a charging interface of the electronic device;
and a control module configured to perform control of charging the electronic device based on the impedance value.
11. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
the steps of carrying out the method of any one of claims 1-9.
12. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the steps of the method of any of claims 1-9.
CN202311000968.XA 2023-08-10 2023-08-10 Charging method, charging device, electronic equipment and storage medium Active CN116742761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311000968.XA CN116742761B (en) 2023-08-10 2023-08-10 Charging method, charging device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311000968.XA CN116742761B (en) 2023-08-10 2023-08-10 Charging method, charging device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116742761A true CN116742761A (en) 2023-09-12
CN116742761B CN116742761B (en) 2023-11-17

Family

ID=87909912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311000968.XA Active CN116742761B (en) 2023-08-10 2023-08-10 Charging method, charging device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116742761B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040019810A1 (en) * 2002-07-26 2004-01-29 Microsoft Corporation Capacitive sensing employing a repeatable offset charge
CN102243618A (en) * 2010-05-11 2011-11-16 联发科技股份有限公司 Universal serial bus device, bus interfacing device and related method
CN106199731A (en) * 2016-08-18 2016-12-07 乐视控股(北京)有限公司 A kind of detection method, device and charger
CN107359663A (en) * 2017-08-04 2017-11-17 芯海科技(深圳)股份有限公司 One kind is based on fast charge agreement MCU control regulators and pressure regulation method
CN108599281A (en) * 2017-09-11 2018-09-28 青岛海信移动通信技术股份有限公司 a kind of mobile terminal and charging method
CN109245195A (en) * 2018-08-20 2019-01-18 奇酷互联网络科技(深圳)有限公司 The method, apparatus and storage device of mobile terminal and charging process
CN109862457A (en) * 2018-12-25 2019-06-07 维沃移动通信有限公司 Terminal device, adapter and charging method
CN110492575A (en) * 2019-09-05 2019-11-22 深圳传音控股股份有限公司 For the quick charging system and method for handheld device, handheld device
CN111201689A (en) * 2017-12-11 2020-05-26 深圳市柔宇科技有限公司 Electronic equipment and charging control method
CN111900781A (en) * 2020-09-29 2020-11-06 深圳英集芯科技有限公司 Charging method, charging equipment and charging control chip
CN112510271A (en) * 2020-11-27 2021-03-16 郑州大学 Lithium ion battery real-time overcharge and thermal runaway prediction method based on dynamic impedance
CN113241822A (en) * 2021-05-17 2021-08-10 广东小天才科技有限公司 A fill device soon for wearable equipment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040019810A1 (en) * 2002-07-26 2004-01-29 Microsoft Corporation Capacitive sensing employing a repeatable offset charge
CN102243618A (en) * 2010-05-11 2011-11-16 联发科技股份有限公司 Universal serial bus device, bus interfacing device and related method
CN106199731A (en) * 2016-08-18 2016-12-07 乐视控股(北京)有限公司 A kind of detection method, device and charger
CN107359663A (en) * 2017-08-04 2017-11-17 芯海科技(深圳)股份有限公司 One kind is based on fast charge agreement MCU control regulators and pressure regulation method
CN108599281A (en) * 2017-09-11 2018-09-28 青岛海信移动通信技术股份有限公司 a kind of mobile terminal and charging method
CN111201689A (en) * 2017-12-11 2020-05-26 深圳市柔宇科技有限公司 Electronic equipment and charging control method
CN109245195A (en) * 2018-08-20 2019-01-18 奇酷互联网络科技(深圳)有限公司 The method, apparatus and storage device of mobile terminal and charging process
CN109862457A (en) * 2018-12-25 2019-06-07 维沃移动通信有限公司 Terminal device, adapter and charging method
CN110492575A (en) * 2019-09-05 2019-11-22 深圳传音控股股份有限公司 For the quick charging system and method for handheld device, handheld device
CN111900781A (en) * 2020-09-29 2020-11-06 深圳英集芯科技有限公司 Charging method, charging equipment and charging control chip
CN112510271A (en) * 2020-11-27 2021-03-16 郑州大学 Lithium ion battery real-time overcharge and thermal runaway prediction method based on dynamic impedance
CN113241822A (en) * 2021-05-17 2021-08-10 广东小天才科技有限公司 A fill device soon for wearable equipment

Also Published As

Publication number Publication date
CN116742761B (en) 2023-11-17

Similar Documents

Publication Publication Date Title
CN108376077A (en) The upgrade method and device of control unit
CN108845655B (en) Electronic equipment control method and device, control circuit and electronic equipment
CN104067184A (en) Apparatuses, systems, and methods for detecting and reacting to exposure of an electronic device to moisture
JPS63184124A (en) Job rescue system during suspension of power supply
CN112799985B (en) USB interface control method, USB control circuit and intelligent networking equipment mainboard
CN109884427A (en) Electrostatic detection methods and relevant apparatus
CN104914815A (en) Processor monitoring method, device and system
CN109411009A (en) A kind of Flash device erasing and writing life testing system device
CN106575140A (en) Apparatuses, methods, and systems for enabling higher current charging of universal serial bus (usb) specification revision 2.0 (usb 2.0) portable electronic devices from usb 3.x hosts
CN116742761B (en) Charging method, charging device, electronic equipment and storage medium
CN112187252A (en) Interface identification circuit, method, equipment and electronic equipment
CN116315185B (en) Electronic device and battery management method
CN117667901A (en) CEPH parameter recommendation method, device, equipment and storage medium
CN112783721A (en) Method, device and system for monitoring I2C bus and storage medium
CN116539992A (en) Storage device in-place stable state detection device, method, logic module and medium
US20030140262A1 (en) Switching power planes of external device interfaces in a computing system in response to connection status
CN106300252A (en) A kind of electrical leakage detecting method, device and terminal unit
US11906560B2 (en) System and method of measuring fuse resistance and non-transitory computer readable medium
JP2024526996A (en) Device control method and apparatus, electronic device and storage medium
CN113872303A (en) Charging control method and device, electronic equipment and storage medium
CN114238019A (en) Hard disk display method, device, equipment and medium
CN114546899A (en) USB device connection method, system and computer readable storage medium
CN111176563A (en) Method for bypass access to storage data, storage device and bypass access storage system
CN108346878B (en) Connector, server and server power supply switching method
CN111124804B (en) Test method and device

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