WO2021238981A1 - 显示电量的确定方法、装置、电子设备及存储介质 - Google Patents

显示电量的确定方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2021238981A1
WO2021238981A1 PCT/CN2021/096046 CN2021096046W WO2021238981A1 WO 2021238981 A1 WO2021238981 A1 WO 2021238981A1 CN 2021096046 W CN2021096046 W CN 2021096046W WO 2021238981 A1 WO2021238981 A1 WO 2021238981A1
Authority
WO
WIPO (PCT)
Prior art keywords
voltage
relationship
pin
battery
power
Prior art date
Application number
PCT/CN2021/096046
Other languages
English (en)
French (fr)
Inventor
刘绍斌
杨镇铭
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2021238981A1 publication Critical patent/WO2021238981A1/zh
Priority to US17/992,539 priority Critical patent/US20230078697A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0047Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with monitoring or indicating devices or circuits
    • H02J7/0048Detection of remaining charge capacity or state of charge [SOC]
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
    • G01R31/371Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC] with remote indication, e.g. on external chargers
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
    • G01R31/385Arrangements for measuring battery or accumulator variables
    • G01R31/387Determining ampere-hour charge capacity or SoC
    • G01R31/388Determining ampere-hour charge capacity or SoC involving voltage measurements
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/48Accumulators combined with arrangements for measuring, testing or indicating the condition of cells, e.g. the level or density of the electrolyte
    • 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/0047Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with monitoring or indicating devices or circuits
    • H02J7/0048Detection of remaining charge capacity or state of charge [SOC]
    • H02J7/0049Detection of fully charged condition
    • 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

Definitions

  • This application relates to the field of battery technology, and in particular to a method, device, electronic device, and storage medium for determining the display power.
  • embodiments of the present application provide a method, terminal, and storage medium for determining the display power.
  • the embodiment of the present application provides a method for determining the display power, including:
  • the first voltage indicates the voltage of the first pin when the battery is in a fully charged state; the first pin is the battery pin of the charging chip;
  • the first relationship represents the corresponding relationship between the voltage of the first pin and the power of the battery
  • the display power of the battery is determined according to the voltage of the first pin.
  • the embodiment of the present application also provides another method for determining the display power, including:
  • the charging chip When the charging function of the charging chip is enabled, the charging chip is powered on, and the first voltage outside the first pin of the charging chip is collected; when the first voltage is collected, the first voltage The pin is externally open; the first pin is the battery pin of the charging chip;
  • the first relationship is determined according to the first voltage; the first relationship represents the corresponding relationship between the voltage of the first pin and the power of the battery, so that the electronic device determines the battery according to the voltage of the first pin The display battery level.
  • the embodiment of the present application also provides a device for determining the display power, including:
  • the first determining unit is configured to determine the first voltage based on the first pin of the charging chip; the first voltage represents the voltage of the first pin when the battery is in a fully charged state; the first pin is the Battery pin of charging chip;
  • a second determining unit configured to determine a first relationship according to the first voltage; the first relationship represents the corresponding relationship between the voltage of the first pin and the power of the battery;
  • the third determining unit is configured to determine the display power of the battery according to the voltage of the first pin based on the first relationship.
  • the embodiment of the present application also provides another device for determining the display power, including:
  • the first determining unit is configured to power on the charging chip when the charging function of the charging chip is enabled, and collect the first voltage outside the first pin of the charging chip; When the voltage is applied, the first pin is externally open; the first pin is the battery pin of the charging chip;
  • the second determining unit is configured to determine a first relationship based on the first voltage; the first relationship represents the corresponding relationship between the voltage of the first pin and the power of the battery, so that the electronic device is based on the first voltage.
  • the voltage of a pin determines the display capacity of the battery.
  • An embodiment of the present application also provides an electronic device, including: a processor and a memory configured to store a computer program that can run on the processor,
  • the processor is configured to execute the steps of the method for determining the display power when running the computer program.
  • the embodiment of the present application also provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for determining the display power are realized.
  • FIG. 1 is a schematic diagram of the implementation process of a method for determining display power provided by an embodiment of the application
  • FIG. 2 is a schematic diagram of the structure of a charging chip provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram of the connection of each pin of the charging chip provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of the implementation process of a method for determining display power provided by an embodiment of the application
  • FIG. 5 is a schematic diagram of an implementation process of a method for determining display power provided by another embodiment of this application.
  • FIG. 6 is a schematic diagram of the implementation process of a method for determining a display power provided by another embodiment of the application.
  • FIG. 7 is a schematic diagram of an implementation process of a method for determining a display power provided by another embodiment of this application.
  • FIG. 8 is a schematic diagram of an implementation process of a method for determining a display power provided by another embodiment of this application.
  • FIG. 9 is a schematic diagram of an implementation process of a method for determining a display power provided by another embodiment of this application.
  • FIG. 10 is a schematic diagram of an implementation process of a method for determining display power provided by another embodiment of this application.
  • FIG. 11 is a schematic diagram of an implementation process of a method for determining a display power provided by another embodiment of this application.
  • FIG. 12 is a schematic diagram of a true wireless earphone and earphone box provided by an embodiment of this application.
  • FIG. 13 is a schematic structural diagram of a device for determining a display power provided by an embodiment of the application.
  • FIG. 14 is a schematic structural diagram of a device for determining a display power provided by another embodiment of this application.
  • FIG. 15 is a schematic diagram of the hardware composition structure of an electronic device provided by an embodiment of the application.
  • the second method is usually used to determine the battery's display power.
  • the charging chip is calibrated with a charge cut-off voltage. During the charging process, when the battery pin of the charging chip reaches the charge cut-off voltage, the battery is considered to be in a fully charged state at this time.
  • the calibrated charge cut-off voltage is the same In the case of different charging chips, the actual charging cut-off voltage corresponding to different charging chips has an error range of 0.05V.
  • the actual charging cut-off voltage corresponding to different charging chips has an error range of 0.05V.
  • the corresponding relationship between the voltage and power established based on the calibrated charge cut-off voltage is still used to determine the battery’s displayed power level.
  • the display power of the battery is different from the actual power of the battery, so that the power consumption of the battery cannot be accurately judged according to the displayed power, which leads to multiple charging behaviors of the battery, which shortens the battery life of the electronic device and affects the user use.
  • FIG. 1 shows an implementation process of the method for determining a displayed power level provided in an embodiment of the present application. As shown in Figure 1, the method includes:
  • S101 Determine a first voltage based on the first pin of the charging chip; the first voltage represents the voltage of the first pin when the battery is in a fully charged state; the first pin is the battery lead of the charging chip foot.
  • the charging chip is a chip that can control the charging of the battery.
  • the charging chip When the charging chip is charging the battery, the voltage when the battery reaches a fully charged state.
  • the voltage collected at the battery pin of the charging chip is the charging of the charging chip. Cut-off voltage.
  • the first pin is the battery pin of the charging chip.
  • the charging chip is connected to the battery through the first pin to provide charging current and voltage to the battery. By detecting the voltage of the first pin of the charging chip, it can be determined that the battery is full The first voltage of the electrical state.
  • Figure 2 shows a schematic diagram of a charging chip.
  • the BAT pin in Figure 2 is the battery pin of the charging chip, which is the first pin.
  • the voltage of the pin is the first voltage at which the battery is fully charged. For example, when the battery is in a fully charged state, it is detected that the voltage of the first pin of the charging chip is 4.3V, and it can be determined that the first voltage is 4.3V. In practical applications, due to various reasons such as the manufacturing process, the first voltage determined based on the first pin of the charging chip may be different from the charging cut-off voltage calibrated by the charging chip. By detecting that the battery is fully charged The voltage of the first pin of the charging chip in the state can determine the actual cut-off voltage of the charging chip. For example, the charging cut-off voltage calibrated by the charging chip is 4.3V, and the first voltage determined by the first pin of the charging chip is 4.25V.
  • the determining the first voltage based on the first pin of the charging chip includes:
  • the voltage of the first pin is detected, and the detection result is determined to be the first voltage
  • the second pin characterizes the charging state of the battery
  • the determining the first relationship according to the first voltage includes: determining the first relationship according to the first voltage when the first voltage is different from the charging cut-off voltage calibrated by the charging chip.
  • the second pin of the charging chip is an open-drain output charging status indicator terminal, which can indicate the charging status of the battery through the output voltage of the second pin.
  • the second pin indicates that the battery is in a fully charged state, it indicates that the battery is fully charged. It is already in a specific state of being fully charged, and continuing to charge can no longer make the battery charging reaction continue. In practical applications, it can be determined whether the battery is in a fully charged state according to the change in the output voltage of the second pin. For example, in some charging chips, when the battery is fully charged, the voltage of the first pin of the charging chip represents the voltage when the battery is fully charged. The voltage of the first pin of the charging chip is detected, and the detection result is Determined as the first voltage.
  • the first relationship When determining the first relationship based on the first voltage, compare the first voltage with the charging cut-off voltage calibrated by the charging chip. When the first voltage is different from the charging cut-off voltage calibrated by the charging chip, it indicates that the battery is in a fully charged state. At this time, the voltage of the first pin corresponding to the charging chip is the first voltage instead of the charging cut-off voltage calibrated by the charging chip. The first relationship is determined according to the first voltage, so that the display power when the battery is fully charged can be determined.
  • Figure 3 shows a schematic diagram of the connection of each pin of a charging chip, where the BAT pin of the chip is the first pin, and the CHG pin of the chip is the second pin, which can represent the battery
  • the CHG pin of the chip is connected to the processor, and the processor can record the change of the CHG pin of the chip.
  • the processor detects the CHG pin of the chip to indicate that the battery is in a fully charged state, and can detect the BAT of the chip.
  • the output voltage of the pin thereby determining the first voltage. For example, when the output voltage of the BAT pin of the detection chip is 4.25V, it can be determined that the first voltage is 4.25V.
  • the output voltage of the second pin when the output voltage of the second pin is high, it means that the battery is in a charging state.
  • the output voltage of the second pin When the output voltage of the second pin is low, When the battery is in a fully charged state, when the second pin changes from high level to low level, when the second pin is fully charged, the voltage of the first pin is detected; there is another situation, when the second pin is fully charged.
  • the output voltage of the pin When the output voltage of the pin is low, it means that the battery is in a charged state.
  • the output voltage of the second pin When the output voltage of the second pin is high, it means that the battery is in a fully charged state. It is converted to a high level, and when it is in a fully charged state, the voltage of the first pin is detected.
  • the determining the first voltage based on the first pin of the charging chip includes:
  • the battery charging process is divided into three stages, namely the pre-charge stage, the constant current stage and the constant voltage stage.
  • the voltage of the first pin of the charging chip will change.
  • the voltage of the pin gets the corresponding test result.
  • the final stage is the constant voltage stage.
  • the battery charging voltage is kept constant, and the battery charging voltage in the constant voltage stage can usually be regarded as charging The charge cut-off voltage of the chip.
  • analyze the detected voltage When the detection result shows that the first pin is in a constant voltage state, it indicates that the battery is in the constant voltage stage during the charging process.
  • the voltage corresponding to the constant voltage state is determined as the first voltage, that is, the cut-off voltage of the charging chip, where the constant voltage state can be determined by the detected result, specifically, when the first pin at different times is continuously detected When the voltages are the same, the first pin can be considered to be in a constant voltage state.
  • the first voltage of the battery chip when it is detected that the voltages of the first pin at different moments are 3.5V, 4.0V, 4.25V, 4.25V, 4.25V, Since the voltage value of 4.25V appears multiple times in the detection result and remains unchanged for a period of time, it can be determined that the first pin has been in a constant voltage state, and 4.25V is the first voltage.
  • you can set the time period for detecting the first pin during the charging process such as detecting the voltage of the first pin every 30s.
  • S102 Determine a first relationship according to the first voltage; the first relationship represents a corresponding relationship between the voltage of the first pin and the power of the battery.
  • the first relationship is determined according to the first voltage.
  • the first relationship can be expressed in the form of a first relationship table.
  • the first relationship table records the relationship between the voltage of the first pin and the power of the battery.
  • the corresponding relationship may also be expressed in the form of a calculation formula, and the battery power corresponding to the voltage of the first pin is calculated by the first relationship formula. For example, when the determined first voltage is 4.25V, since the first voltage corresponds to the voltage when the battery is fully charged, when the relationship table is established, it can be determined that the battery power corresponding to the voltage of 4.25V is 100 %, and according to the first voltage, determine the voltage corresponding to the battery in different power levels, so as to establish the first relationship table.
  • the method when the first relationship is determined according to the first voltage, the method includes:
  • S501 Determine a first difference; the first difference represents the difference between the first voltage and the second voltage; the second voltage represents the minimum power required by the battery to maintain the electronic device in normal operation Corresponding to the voltage of the first pin.
  • the electronic device may refer to a device powered by a battery, where the battery may be a rechargeable battery.
  • the battery may be a rechargeable battery.
  • the second voltage refers to the first lead corresponding to the minimum power required to maintain the normal operation of the electronic device.
  • the voltage of the pin for example, the second voltage may be the voltage of the first pin of the battery chip when the battery display capacity is 0%.
  • the minimum power required to maintain the normal operation of the electronic device can be set so that the power displayed by the electronic device reaches 0% At the time, the battery of the electronic device still has some power left. It can be shown that when the battery is in a fully charged state, the voltage corresponding to the first pin of the power chip is the first voltage, and when the battery’s display capacity is 0%, the voltage corresponding to the first pin of the power chip is the first voltage.
  • the second voltage for example, when the battery is in a fully charged state, the corresponding first voltage is 4.25V, and when the battery display capacity is 0%, the corresponding second voltage is 3.3V, and the first difference can be determined to be 0.95V.
  • S502 Determine a second difference; the second difference represents the difference between the voltage of the first pin and the second voltage.
  • the voltage of the first pin represents the actual measured voltage corresponding to the battery, and it is determined that the difference between the voltage of the first pin and the second voltage is the second difference.
  • the first voltage is the voltage of the first pin when the battery is fully charged
  • the second voltage is the voltage of the first pin when the battery is exhausted.
  • the first voltage and the second voltage determine the voltage in the first relationship. Therefore, the voltage of the first pin corresponding to the battery under different power levels falls within the voltage range determined by the first voltage and the second voltage.
  • the first voltage is 4.25V
  • the second voltage is 3.3V.
  • the first voltage and the second voltage determine that the voltage range in the first relationship is [3.3V, 4.25V], and the value of the first pin can be determined
  • the voltage is a voltage value in the range of [3.3V, 4.25V].
  • the voltage of the first pin is 3.4V
  • the second difference corresponding to the second voltage of 3.3V and the voltage of the first pin of 3.4V can be determined 0.1V.
  • S503 According to the proportional relationship between the first difference value and the second difference value, determine the corresponding relationship between the voltage of the first pin and the power amount in the first relationship.
  • the battery capacity corresponding to the voltage of the first pin within the voltage range determined by the first voltage and the second voltage can be determined, thereby determining the first relationship.
  • the first relationship can be the first relationship table or the first relationship, as long as it can characterize the relationship between the voltage of the first pin and the display power.
  • the first relationship for obtaining the display power can be Expressed as: Among them, P represents the amount of electricity corresponding to the voltage of the first pin, and represents the amount of electricity in the form of a percentage, D 1 represents the first difference, and D 2 represents the second difference. Through the algorithm expression of the electricity, the first difference can be determined.
  • the amount of electricity corresponding to the voltage of the pin can thereby determine the corresponding relationship between the amount of electricity and the voltage in the first relationship. For example, if the first voltage is 4.25V, the second voltage is 3.3V, and the voltage of the first pin is 3.4V, it can be determined that the first difference is 0.95V and the second difference is 0.1V. It can be determined that when the voltage of the first pin is 3.4V, the corresponding power is 11%.
  • it is also possible to determine the amount of electricity corresponding to the voltages of different first pins by detecting the voltages of different first pins according to the above relational expressions, and generate a first relational table. Table 1 is based on the difference between the first and the second The first relationship table established by the proportional relationship of the difference.
  • the determining the first relationship according to the first voltage includes:
  • S601 Determine the set second relationship; the voltage corresponding to the first power in the second relationship is the third voltage; the first power represents the full power of the battery; the third voltage represents the charging The charge cut-off voltage calibrated by the chip.
  • the second relationship is the corresponding relationship between the voltage and the power determined based on the third voltage.
  • the third voltage represents the cut-off voltage calibrated by the charging chip.
  • the difference of charging chip mainly includes the different charging cut-off voltage calibrated by the charging chip.
  • the electronic device can be configured with the corresponding relationship between the voltage and the power based on the calibrated charge-off voltage before leaving the factory, that is, the second relationship, so as to display the battery's corresponding relationship based on the corresponding relationship between the voltage and the power in the second relationship.
  • Power The second relationship can be in the form of a second relationship table, or in the form of a second relationship expression, etc.
  • Table 2 shows the setting Set the second relationship table. In Table 2, the voltage corresponding to the full capacity of the battery is the third voltage.
  • S602 Based on the second relationship, determine the first relationship according to the first voltage.
  • the corresponding relationship between the voltage and the power amount in the second relationship is adjusted according to the first voltage, so that the first relationship is determined on the basis of the second relationship.
  • the first relationship can be determined based on the second relationship based on the first voltage, that is, the actual charging cut-off voltage of the charging chip and the charging cut-off voltage calibrated by the charging chip If they are not the same, according to the actual charging cut-off voltage of the charging chip, the corresponding relationship between the voltage and the power is determined, and the first relationship is generated, so that the display power of the display battery can be determined.
  • the determining the first relationship according to the first voltage based on the second relationship includes:
  • the voltage corresponding to the first amount of electricity in the second relationship is updated to the first voltage to obtain the first relationship.
  • the voltage corresponding to the first power in the second relationship is modified to the first voltage, so that the voltage can be dynamically adjusted according to the actual charging cut-off voltage of the charging chip
  • the corresponding relationship between the battery and the battery's full charge can accurately show that the battery's charge is in a fully charged state when the battery's charge is displayed. For example, taking the form of the second relationship table as the second relationship, when the first voltage is 4.25V and the third voltage is 4.3V, if the relationship between voltage and power is not adjusted, when determining the battery’s display power, Determine the corresponding relationship between the battery power and voltage in the second relationship table set.
  • the first voltage is 4.25V
  • the battery is full Electricity status
  • the battery capacity is 100%.
  • the voltage is 4.25V
  • the corresponding battery capacity is 95%, that is, it is determined that the battery’s display capacity is 95%, resulting in the displayed capacity It is 95%, and it can’t accurately display the battery’s power
  • the charging cut-off voltage of the charging chip is 4.25V
  • the battery will stop charging when the voltage reaches 4.25V, so the voltage of the first pin of the charging chip is If it cannot reach 4.3V, when the battery display power is determined according to the set second relationship table, there will be no situation where the display battery power is 100%, which will make the user mistakenly think that there is a problem with the battery.
  • the battery can be accurately displayed based on the determined battery power. Shows the full charge of the battery.
  • the determining the first relationship according to the first voltage based on the second relationship includes:
  • S701 Determine a third difference value; the third difference value represents a difference value between the first voltage and the third voltage.
  • the third difference value is determined based on the first voltage and the third voltage.
  • the third difference is zero.
  • the third difference can be determined to be a value greater than zero. For example, when the first voltage is 4.25V and the third voltage is 4.3V, the third difference can be determined to be 0.05V .
  • the part of the electric quantity includes the first electric quantity.
  • the voltage corresponding to each power in the second relationship table is adjusted according to the third difference, and the adjusted voltage corresponds to the power
  • the relationship is determined as the first relationship table.
  • adjusting the voltage corresponding to each electric quantity in the second relationship table is mainly to lower the voltage corresponding to each electric quantity in the second relationship table, and the magnitude of the decrease is the third difference.
  • the voltage corresponding to 0% of the electricity in the second relationship table is set to 3.3V.
  • the voltage corresponding to the third difference is 3.3V.
  • the updated electricity is 0% and the corresponding voltage is 3.25V.
  • the first relationship table can be obtained.
  • Table 3 is a first relationship table generated based on the set second relationship table according to the third difference.
  • the voltage corresponding to each power in the first relationship table is obtained by lowering the voltage corresponding to each power in the second relationship table set by the third difference.
  • the voltage corresponding to some of the electric quantities in all the electric quantities in the second relationship table can also be updated to obtain the first relationship table, where When updating the voltage corresponding to part of the power, at least the voltage corresponding to the first power is updated to ensure that the battery power is fully charged.
  • the second relationship table For example, only the full power (the power is 100%) in the second relationship table is updated.
  • the third difference is zero. Since the voltage corresponding to each amount of electricity after adjustment according to the third difference is the same as the second relationship table, on this basis, There is no need to adjust the second relationship table to generate the first relationship table, and the display power of the battery can be determined directly according to the second relationship table, thereby saving processing time and power consumption of the terminal.
  • the second relationship can also exist in the form of a second relationship, so that the corresponding display power can be calculated according to the third difference after the voltage of the first pin is measured, without looking up the table to obtain, the calculation principle is the same as that of the second
  • the way of the relationship table is the same, so I won't repeat it here.
  • S103 Based on the first relationship, determine the display power of the battery according to the voltage of the first pin.
  • the display power of the battery is determined according to the voltage of the first pin.
  • the first relationship accurately records the corresponding relationship between the voltage of the first pin of the charging chip and the power of the battery. After the voltage of the first pin of the charging chip is determined, the first relationship is used to determine the voltage of the charging chip.
  • the power corresponding to the voltage of the first pin is determined, and the power corresponding to the voltage of the first pin of the charging chip is determined as the display power of the battery, and the electronic device can display the displayed power on the corresponding interface. For example, taking the first relationship represented by the first relationship table as an example, when it is detected that the voltage of the first pin of the charging chip is 4.25V, the power corresponding to the voltage value of 4.25V is searched in the first relationship table.
  • the display power of the battery is 100%. According to the display power of the battery, the current battery power is displayed as 100%.
  • the power level of the true wireless (TWS, True wireless Stereo) headset is determined.
  • TWS True wireless Stereo
  • the power level of the wireless mouse is displayed as 100%.
  • a pair of TWS earphones are equipped with TWS earphones for the left ear and TWS earphones for the right ear, and each one is displayed on mobile terminals (such as mobile phones, tablets, smart watches, and other devices that can be connected to the earphones).
  • the TWS headset determines the power corresponding to the voltage of the first pin of the charging chip of the TWS headset according to the first relationship table, that is, the display power of the TWS headset, and sends the corresponding power to Mobile terminal (usually the main headset in the TWS headset communicates with the mobile terminal, and uploads data from the headset to the mobile terminal through the main headset).
  • Mobile terminal usually the main headset in the TWS headset communicates with the mobile terminal, and uploads data from the headset to the mobile terminal through the main headset.
  • the mobile terminal displays the TWS headset in real time on the battery level display interface of the mobile terminal Battery level.
  • the battery level of the TWS headset can also be displayed on the charging box.
  • the TWS headset determines the power level corresponding to the voltage of the first pin of the charging chip of the TWS headset, and transfers the power through wireless communication methods such as Bluetooth or contacts, The interface and other wired methods are sent to the charging box. After the charging box receives the relevant data, it displays the battery level of the TWS headset.
  • the first voltage is determined based on the first pin of the charging chip.
  • the first voltage represents the voltage of the first pin when the battery is in a fully charged state.
  • the first pin is the battery pin of the charging chip.
  • a voltage determines a first relationship, and the first relationship represents the corresponding relationship between the voltage of the first pin and the power of the battery. Based on the first relationship, the display power of the battery is determined according to the voltage of the first pin.
  • TWS earphones When in a fully charged state, the voltage of the first pin of the charging chip determines the corresponding relationship between the voltage and the battery, so that the battery display capacity can be determined, the battery capacity can be accurately displayed, and the battery capacity can be accurately judged according to the displayed battery capacity
  • the use of TWS earphones can reduce the following impacts that may be caused to users when the left and right earphones use charging ICs with different calibrated charging cut-off voltages (that is, the third voltage): 1.
  • the power of the left and right earphones after being fully charged It is not the same. For example, under extreme conditions, one earphone is fully charged, but the other earphone is only charged to 95%; 2.
  • the power of the earphone is different when the earphone is fully charged, the two earphones are used at the same time, and the remaining power of the left and right ears is also displayed. It is different. This will cause the user to consume a headset quickly and a headset slowly, and the user may think that the headset is broken; 3. Due to the inaccurate display of the battery, the user may charge more frequently, which affects the battery. life. Therefore, the user experience can be improved through this embodiment.
  • the foregoing embodiment shows that the electronic device is calibrated during use of the battery power display after leaving the factory.
  • the embodiment of the present application also provides a setting method for completing the calibration of the battery power display before leaving the factory.
  • the above post-factory and the following pre-factory solutions can be applied together, that is, the following pre-factory solutions are used at the factory to ensure the accuracy of the battery level display when the user starts to use; in actual use after the factory, follow the above
  • the program after leaving the factory guarantees the accuracy of the battery power display during each charge and discharge process.
  • the determination of the displayed power includes:
  • S801 When the charging function of the charging chip is enabled, power on the charging chip, and collect the first voltage outside the first pin of the charging chip; when collecting the first voltage, the The first pin is externally open; the first pin is the battery pin of the charging chip.
  • the charging function of the charging chip is controlled by the enable terminal of the charging chip, so that the charging chip can turn off the charging function or turn on the charging function.
  • the charging chip is given an external power source.
  • the first pin is externally open, the voltage of the first pin of the charging chip is collected. Since the first pin is in an open state, The voltage of the first pin collected at this time can be regarded as the charging cut-off voltage of the charging chip, where the first pin is the battery pin of the charging chip and is connected to the battery terminal.
  • the EN pin of the charging chip controls the charging function of the charging chip. When the EN pin inputs a high level, the charging function of the charging chip is turned off.
  • the charging function of the charging chip is enabled.
  • it is necessary to input a low level to the EN pin of the charging chip connect an external power supply to the VIN pin of the charging chip, and make the BAT pin of the charging chip in an open state to charge
  • the voltage of the BAT pin of the charging chip is collected, and the collected voltage of the BAT pin of the charging chip is determined as the first voltage, so that the first voltage can be quickly obtained.
  • the printed circuit board (PCBA, printed circuit board assembly) end test is performed on the charging chip, the voltage of the BAT pin of the charging chip in the open state can be collected in the above-mentioned manner.
  • S802 Determine a first relationship according to the first voltage; the first relationship represents the corresponding relationship between the voltage of the first pin and the power of the battery, so that the electronic device is based on the voltage of the first pin Determine the battery level displayed.
  • the first relationship is determined according to the first voltage.
  • the first relationship represents the corresponding relationship between the voltage of the first pin and the power of the battery.
  • the first relationship may be in the form of the first relationship table.
  • the form may also be the form of the first relational expression.
  • the electronic device can determine the display power of the battery according to the voltage of the first pin. Specifically, the corresponding relationship between the first voltage and the power of the battery at 100% is generated, and after determining the corresponding relationship between the first voltage and the power at 100%, the voltages of the first pins corresponding to other powers can be determined.
  • the voltage of the first pin corresponding to a 10% interval of power is determined, for example, after determining the voltage of the first pin corresponding to 100% of the power .
  • the voltage of the first pin corresponding to 90% of the power is determined, so that the first relationship table can be determined.
  • the first relationship table is stored, so that the electronic device can determine the display power of the battery according to the voltage of the first pin based on the stored first relationship table.
  • the method when the first relationship is determined according to the first voltage value, the method includes:
  • S901 Determine a first difference; the first difference represents the difference between the first voltage and the second voltage; the second voltage represents the minimum power required by the battery to maintain the normal operation of the electronic device Corresponding to the voltage of the first pin.
  • the second voltage refers to the voltage of the first pin corresponding to the minimum power required by the battery to maintain the normal operation of the electronic device.
  • the second voltage can be It is the voltage of the first pin of the battery chip when the battery level is 0%.
  • the minimum power required to maintain the normal operation of the electronic device can be set so that the display power of the electronic device reaches 0% At the time, the battery of the electronic device still has some power left. It can be shown that when the battery is in a fully charged state, the voltage corresponding to the first pin of the power chip is the first voltage, and when the battery’s display capacity is 0%, the voltage corresponding to the first pin of the power chip is the first voltage.
  • the second voltage for example, when the battery is in a fully charged state, the first voltage is 4.25V, and the display capacity of the power supply is 0%, and the second voltage is 3.3V, then the first difference is 0.95V.
  • S902 Determine a second difference; the second difference represents the difference between the voltage of the first pin and the second voltage.
  • the second difference is determined, and the second difference is determined by the difference between the voltage of the first pin and the second voltage, and the voltage of the first pin represents the actual measured voltage corresponding to the battery.
  • the voltage range determined by the first voltage and the second voltage is the value range of the voltage corresponding to the different electric quantities in the first relationship, and the voltage of the first pin falls into the first Within a voltage range determined by the first voltage and the second voltage. For example, when the first voltage is 4.25V and the second voltage is 3.3V, the voltage of the first pin can be a value in the range of [3.3, 4.25]. For example, if 3.6V is selected as the voltage of the first pin, you can The second difference is determined to be 0.3.
  • S903 According to the proportional relationship between the first difference and the second difference, determine the corresponding relationship between the voltage of the first pin and the power amount in the first relationship.
  • the amount of electricity corresponding to the voltage of the first pin can be determined, so that the first relationship can be determined.
  • the proportional relationship between the first difference and the second difference is Among them, P represents the amount of electricity corresponding to the voltage of the first pin, and represents the amount of electricity in the form of a percentage, D 1 represents the first difference, and D 2 represents the second difference.
  • the difference between the first difference and the second difference is The proportional relationship can determine the amount of electricity corresponding to the voltage of the first pin.
  • the first voltage is 4.25V
  • the second voltage is 3.3V
  • the voltage of the first pin is 3.6V
  • the first difference is 0.95
  • the second difference is 0.3. ratio
  • the first relationship can also be expressed in the form of a first relationship table. For example, according to the above formula, by determining the amount of electricity corresponding to the voltage of the first pin within the voltage range determined by the first voltage and the second voltage, the first relationship can be determined.
  • a relationship table so that the displayed power corresponding to the voltage of the first pin can be determined by looking up the table.
  • the determining the first relationship according to the first voltage includes:
  • S1001 Determine the set second relationship; the voltage corresponding to the first power in the second relationship is the third voltage; the first power represents the full power of the battery; the third voltage represents the charging The charge cut-off voltage calibrated by the chip.
  • the set second relationship is determined.
  • the second relationship is the corresponding relationship between the voltage and the power determined based on the third voltage.
  • the third voltage represents the cut-off voltage calibrated by the charging chip.
  • the third voltage can be determined by the specifications of the charging chip.
  • the voltage corresponding to the first power is the third voltage
  • the first power refers to the full power of the battery, that is, when the battery power is 100%
  • the corresponding voltage is the third voltage.
  • the electronic device may have been configured with the corresponding relationship between the voltage and the power based on the calibrated charge cut-off voltage before leaving the factory, that is, the second relationship, so as to determine the battery's corresponding relationship based on the corresponding relationship between the voltage and the power in the second relationship. Display battery level.
  • the second relationship may be in the form of a second relationship table, or may be in the form of a second relationship expression.
  • S1002 Based on the second relationship, determine the first relationship according to the first voltage.
  • the corresponding relationship between the voltage and the power amount in the second relationship is adjusted according to the first voltage, so that the first relationship is determined on the basis of the second relationship.
  • the first relationship can be determined based on the second relationship based on the first voltage, that is, the actual charging cut-off voltage of the charging chip and the charging cut-off voltage calibrated by the charging chip
  • the corresponding relationship between the voltage and the power is determined, and the first relationship is generated, so that the display power of the battery can be determined and the power of the battery can be displayed more accurately.
  • the determining the first relationship according to the first voltage based on the second relationship includes:
  • the voltage corresponding to the first amount of electricity in the second relationship is updated to the first voltage to obtain the first relationship.
  • the voltage corresponding to the first power in the second relationship table is modified to the first voltage, so as to be able to be based on the charging chip
  • the actual charge cut-off voltage dynamically adjust the corresponding relationship between the voltage and the battery's full charge, when displaying the battery's charge, it can accurately show that the battery's charge is in a fully charged state.
  • the second relational expression can be determined first, and the first voltage of the first pin corresponds to the first power (full charge power), and the other voltages of the first pin still use the second relational expression to determine the corresponding display Electricity is fine.
  • the determining the first relationship according to the first voltage based on the second relationship includes:
  • S1101 Determine a third difference value; the third difference value represents a difference value between the first voltage and the third voltage.
  • the part of the electric quantity includes the first electric quantity.
  • the voltage corresponding to each power in the second relationship table is adjusted according to the third difference, and the corresponding relationship between the adjusted voltage and the power is determined as the first A relationship table.
  • adjusting the voltage corresponding to each electric quantity in the second relationship table is mainly to lower the voltage corresponding to each electric quantity in the second relationship table, and the magnitude of the decrease is the third difference.
  • the voltage corresponding to 0% of the electricity in the second relationship table is set to 3.3V.
  • the voltage corresponding to the third difference is 3.3V.
  • the updated electricity is 0% and the corresponding voltage is 3.25V.
  • the first relationship table After the voltage corresponding to each amount of electricity in the second relationship table is adjusted, the first relationship table can be obtained. In actual applications, when the first voltage is the same as the third voltage, the third difference is zero, and the battery power can be directly displayed according to the second relationship table, thereby saving processing time and power consumption of the terminal.
  • the voltage corresponding to some of the electric quantities in all the electric quantities in the second relationship table can also be updated to obtain the first relationship table, where When updating the voltage corresponding to part of the power, at least the voltage corresponding to the first power is updated, so as to ensure that the display power of the battery is 100%, and the battery power is fully charged. For example, only the full power in the second relationship table is updated.
  • the voltage corresponding to the power amount (the power is 100%) and the voltage corresponding to the power that the electronic device cannot maintain normal operation.
  • the second relationship exists in the form of a second relationship, and the first relationship is obtained according to the second relationship. There is no need to generate a corresponding relationship table, but a corresponding relationship. After the voltage of the pin, call the corresponding relational expression to calculate the corresponding display power.
  • FIG. 12 shows a schematic diagram of a true wireless (TWS, Stereo) headset and a headset box.
  • TWS true wireless
  • each TWS headset has two metal pins at the bottom, which are used for the headset box to charge or communicate with the TWS headset.
  • the location of the metal pins can be set on the TWS headset.
  • the bottom of the earphone stem can also be arranged under the earplug of the TWS earphone.
  • Figure 12 shows the metal pin located under the earplug of the TWS earphone.
  • the charging box matched with TWS earphones can store TWS earphones. There are two charging copper columns for each TWS earphone in the charging box.
  • FIG 12 shows the two charging copper columns at the bottom of the charging box, and the earphones of the TWS earphones After the two metal pins at the bottom of the pole are in contact, the TWS headset can be charged through wireless charging.
  • the TWS headset When the TWS headset is placed in the headset box for charging, it can detect the output voltage of the first pin of the corresponding charging chip when the TWS headset is fully charged to obtain the first voltage, and determine the actual The first relationship between the power and the voltage of the charging chip, by detecting the voltage of the first pin of the charging chip, determine the power corresponding to the voltage of the first pin in the first relationship, and display the power of the TWS headset in real time.
  • the power of the TWS headset can be displayed on the charging box, or on the device connected to the TWS headset.
  • the charging box can display the power of the TWS headset during the charging process.
  • the charging box can also display the power of other electronic devices, for example, the power of a Bluetooth watch.
  • Applying to TWS earphones can reduce the following impacts that may be caused to users when the left and right earphones use charging ICs with different calibrated charging cut-off voltages (that is, the third voltage): 1.
  • the power of the left and right earphones is different after being fully charged, for example , Under extreme conditions, one earphone is fully charged, but the other earphone is only charged to 95%; 2.
  • the two earphones are used at the same time, and the remaining power of the left and right ears is different. It will cause the user to consume a headset quickly and a headset slowly, and the user may think that the headset is broken; 3. The inaccurate display power may cause the user to charge more frequently, which affects the battery life. Therefore, the user experience can be improved through this embodiment.
  • the embodiment of the present application also provides a device for determining the displayed power amount.
  • the device for determining the displayed power amount includes:
  • the first determining unit 1301 is configured to determine a first voltage based on the first pin of the charging chip; the first voltage represents the voltage of the first pin when the battery is in a fully charged state; the first pin is State the battery pin of the charging chip;
  • the second determining unit 1302 is configured to determine a first relationship according to the first voltage; the first relationship represents the corresponding relationship between the voltage of the first pin and the power of the battery;
  • the third determining unit 1303 is configured to determine the display power of the battery according to the voltage of the first pin based on the first relationship.
  • the second determining unit 1302 determines the first relationship according to the first voltage, it is configured to:
  • the first difference represents the difference between the first voltage and the second voltage
  • the second voltage represents the minimum power required by the battery to maintain the normal operation of the electronic device The voltage of the first pin
  • the second difference represents the difference between the voltage of the first pin and the second voltage
  • the corresponding relationship between the voltage of the first pin and the power amount in the first relationship is determined.
  • the second determining unit 1302 determines the first relationship according to the first voltage, and is configured to:
  • the voltage corresponding to the first power in the second relationship is the third voltage;
  • the first power represents the full power of the battery;
  • the third voltage represents the calibration of the charging chip Charge cut-off voltage;
  • the first relationship is determined based on the first voltage.
  • the second determining unit 1302 determines the first relationship according to the first voltage based on the second relationship, and is configured to:
  • the voltage corresponding to the first power amount in the second relationship is updated to the first voltage to obtain the first relationship.
  • the second determining unit 1302 determines the first relationship according to the first voltage based on the second relationship, and is configured to:
  • the third difference represents the difference between the first voltage and the third voltage
  • the part of the electric quantity includes the first electric quantity.
  • the first determining unit 1301 determines the first voltage based on the first pin of the charging chip, and is configured to:
  • the voltage of the first pin is detected, and the detection result is determined to be the first voltage
  • the second pin characterizes the charging state of the battery
  • the second determining unit 1302 determines the first relationship according to the first voltage, and is configured to determine according to the first voltage when the first voltage is different from the charging cut-off voltage calibrated by the charging chip The first relationship.
  • the first determining unit 1301 determines the first voltage based on the first pin of the charging chip, and is configured to:
  • the voltage corresponding to the constant voltage state is determined as the first voltage.
  • the device for determining the display power provided in the embodiment of FIG. 13 may be any one of TWS earphones, TWS speakers, or other devices.
  • the first determining unit 1301, the second determining unit 1302, and the third determining unit 1303 may be implemented by the processor in the device for determining the power display.
  • the processor needs to run the programs stored in the memory to realize the functions of the above-mentioned program modules.
  • the device for determining the display power provided by the embodiment of FIG. 13 determines the display power
  • the above processing can be allocated according to needs. Different program modules are completed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above.
  • the device for determining the display power provided by the above-mentioned embodiment belongs to the same concept as the embodiment of the method for determining the display power. For the specific implementation process, please refer to the method embodiment, which will not be repeated here.
  • the device for determining power display includes:
  • the first determining unit 1401 is configured to power on the charging chip when the charging function of the charging chip is enabled, and collect the first voltage outside the first pin of the charging chip; At a voltage, the first pin is externally open; the first pin is the battery pin of the charging chip;
  • the second determining unit 1402 is configured to determine a first relationship according to the first voltage; the first relationship represents the corresponding relationship between the voltage of the first pin and the power of the battery, so that the electronic device can be based on the The voltage of the first pin determines the display capacity of the battery.
  • the second determining unit 1402 determines the first relationship according to the first voltage, it is configured to:
  • the first difference represents the difference between the first voltage and the second voltage
  • the second voltage represents the minimum power required by the battery to maintain the normal operation of the electronic device The voltage of the first pin
  • the second difference represents the difference between the voltage of the first pin and the second voltage
  • the corresponding relationship between the voltage of the first pin and the power amount in the first relationship is determined.
  • the second determining unit 1402 determines the first relationship according to the first voltage, it is configured to:
  • the voltage corresponding to the first power in the second relationship is the third voltage;
  • the first power represents the full power of the battery;
  • the third voltage represents the calibration of the charging chip Charge cut-off voltage;
  • the first relationship is determined based on the first voltage.
  • the second determining unit 1402 determines the first relationship according to the first voltage based on the second relationship, and is configured to:
  • the voltage corresponding to the first amount of electricity in the second relationship is updated to the first voltage to obtain the first relationship.
  • the second determining unit 1402 determines the first relationship according to the first voltage based on the second relationship, and is configured to:
  • the third difference represents the difference between the first voltage and the third voltage
  • the part of the electric quantity includes the first electric quantity.
  • the first determining unit 1401 and the second determining unit 1402 may be implemented by a processor in a device for determining the power display.
  • the processor needs to run the programs stored in the memory to realize the functions of the above-mentioned program modules.
  • the device for determining display power provided by the embodiment of FIG. 14 determines the displayed power
  • only the division of the above-mentioned program modules is used as an example.
  • the above-mentioned processing can be allocated according to needs. Different program modules are completed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above.
  • the device for determining the display power provided by the above-mentioned embodiment belongs to the same concept as the embodiment of the method for determining the display power. For the specific implementation process, please refer to the method embodiment, which will not be repeated here.
  • the first relationship and the second relationship may exist in the form of a relationship table, that is, corresponding to the first relationship table and the second relationship table, or may be in the form of a relationship table.
  • a relationship table that is, corresponding to the first relationship table and the second relationship table, or may be in the form of a relationship table.
  • FIG. 15 is a schematic diagram of the hardware composition structure of the electronic device of the embodiment of the application, as shown in FIG. 15 , Electronic equipment includes:
  • Communication interface 1 which can exchange information with other equipment such as network equipment;
  • the processor 2 is connected to the communication interface 1 to implement information interaction with other devices, and is configured to execute the method for determining the display power provided by one or more technical solutions when running a computer program.
  • the computer program is stored in the memory 3.
  • bus system 4 is configured to implement connection and communication between these components.
  • bus system 4 also includes a power bus, a control bus, and a status signal bus.
  • various buses are marked as the bus system 4 in FIG. 15.
  • the memory 3 in the embodiment of the present application is configured to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program configured to operate on an electronic device. It can be understood that the memory 3 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memory.
  • the non-volatile memory can be a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read-Only Memory), an erasable programmable read-only memory (EPROM, Erasable Programmable Read- Only Memory, Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Read-Only Memory), magnetic random access memory (FRAM, ferromagnetic random access memory), flash memory (Flash Memory), magnetic surface memory , CD-ROM, or CD-ROM (Compact Disc Read-Only Memory); magnetic surface memory can be magnetic disk storage or tape storage.
  • the volatile memory may be a random access memory (RAM, Random Access Memory), which is used as an external cache.
  • RAM static random access memory
  • SRAM Static Random Access Memory
  • SSRAM synchronous static random access memory
  • DRAM Dynamic Random Access Memory
  • SDRAM Synchronous Dynamic Random Access Memory
  • DDRSDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • ESDRAM enhanced -Type synchronous dynamic random access memory
  • SLDRAM SyncLink Dynamic Random Access Memory
  • DRAM direct memory bus random access memory
  • DRRAM Direct Rambus Random Access Memory
  • the method disclosed in the foregoing embodiment of the present application may be applied to the processor 2 or implemented by the processor 2.
  • the processor 2 may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method can be completed by an integrated logic circuit of hardware in the processor 2 or instructions in the form of software.
  • the aforementioned processor 2 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and the like.
  • the processor 2 may implement or execute the methods, steps, and logical block diagrams disclosed in the embodiments of the present application.
  • the general-purpose processor may be a microprocessor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a storage medium, and the storage medium is located in the memory 3, and the processor 2 reads the program in the memory 3, and completes the steps of the foregoing method in combination with its hardware.
  • the electronic device includes a wireless headset.
  • the wireless headset can be a TWS headset as shown in FIG.
  • the embodiment of the present application also provides a storage medium, that is, a computer storage medium, specifically a computer-readable storage medium, such as a memory 3 storing a computer program, which can be executed by the processor 2.
  • a storage medium that is, a computer storage medium, specifically a computer-readable storage medium, such as a memory 3 storing a computer program, which can be executed by the processor 2.
  • the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk, or CD-ROM.
  • the disclosed device, terminal, and method may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, such as: multiple units or components can be combined, or It can be integrated into another system, or some features can be ignored or not implemented.
  • the coupling, or direct coupling, or communication connection between the components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • the functional units in the embodiments of the present application may all be integrated into one processing unit, or each unit may be individually used as a unit, or two or more units may be integrated into one unit; the above-mentioned integration
  • the unit of can be implemented in the form of hardware, or in the form of hardware plus software functional units.
  • the foregoing program can be stored in a computer readable storage medium.
  • the program is executed, the program is executed.
  • Including the steps of the foregoing method embodiment; and the foregoing storage medium includes: various media that can store program codes, such as a mobile storage device, ROM, RAM, magnetic disk, or optical disk.
  • the aforementioned integrated unit of this application is implemented in the form of a software function module and sold or used as an independent product, it may also be stored in a computer readable storage medium.
  • the computer software product is stored in a storage medium and includes several instructions for A terminal (which may be a personal computer, a server, or a network device, etc.) is allowed to execute all or part of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: removable storage devices, ROM, RAM, magnetic disks, or optical disks and other media that can store program codes.

Landscapes

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

Abstract

提供了一种显示电量的确定方法、装置、电子设备及存储介质。其中,方法包括:基于充电芯片的第一引脚确定第一电压;第一电压表征电池处于满电状态时第一引脚的电压;第一引脚为充电芯片的电池引脚;根据第一电压确定第一关系;第一关系表征第一引脚的电压与电池的电量的对应关系;基于第一关系,根据第一引脚的电压确定电池的显示电量。

Description

显示电量的确定方法、装置、电子设备及存储介质
相关申请的交叉引用
本申请基于申请号为202010454412.8,申请日为2020年5月26日的中国专利申请提出,并要求上述中国专利申请的优先权,上述中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请涉及电池技术领域,尤其涉及一种显示电量的确定方法、装置、电子设备及存储介质。
背景技术
目前,在电子设备中显示电池的电量时,存在显示的电量与电池的实际电量不相符的现象,可能导致电池充满电,但无法显示充满电的情况,影响用户体验。
发明内容
为解决相关技术问题,本申请实施例提供了一种显示电量的确定方法、终端及存储介质。
本申请实施例提供了一种显示电量的确定方法,包括:
基于充电芯片的第一引脚确定第一电压;所述第一电压征电池处于满电状态时所述第一引脚的电压;所述第一引脚为所述充电芯片的电池引脚;
根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系;
基于所述第一关系,根据所述第一引脚的电压确定电池的显示电量。
本申请实施例还提供了另一种显示电量的确定方法,包括:
在充电芯片的充电功能使能的情况下,对所述充电芯片上电,并采集所述充电芯片的第一引脚外部的第一电压;在采集所述第一电压时,所述第一引脚外部开路;所述第一引脚为所述充电芯片的电池引脚;
根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系,以使电子设备根据所述第一引脚的电压确定电池的显示电量。
本申请实施例还提供了一种显示电量的确定装置,包括:
第一确定单元,配置为基于充电芯片的第一引脚确定第一电压;所述第一电压表征电池处于满电状态时所述第一引脚的电压;所述第一引脚为所述充电芯片的电池引脚;
第二确定单元,配置为根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系;
第三确定单元,配置为基于所述第一关系,根据所述第一引脚的电压确定电池的显示电量。
本申请实施例还提供了另一种显示电量的确定装置,包括:
第一确定单元,配置为在充电芯片的充电功能使能的情况下,对所述充电芯片上电,并采集所述充电芯片的第一引脚外部的第一电压;在采集所述第一电压时,所述第一引脚外部开路;所述第一引脚为所述充电芯片的电池引脚;
第二确定单元,配置为根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系,以使电子设备根据所述第一引脚的电压确定电池的显示电量。
本申请实施例还提供了一种电子设备,包括:处理器和配置为存储能够在处理器上运行的计算机程序的存储器,
其中,所述处理器配置为运行所述计算机程序时,执行上述显示电量的确定方法的步骤。
本申请实施例还提供了一种存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述显示电量的确定方法的步骤。
附图说明
图1为本申请一实施例提供的显示电量的确定方法的实现流程示意图;
图2为本申请一实施例提供的充电芯片的结构示意图;
图3为本申请一实施例提供的充电芯片的各个引脚的连接示意图;
图4为本申请一实施例提供的显示电量的确定方法的实现流程示意图;
图5为本申请又一实施例提供的显示电量的确定方法的实现流程示意图;
图6为本申请又一实施例提供的显示电量的确定方法的实现流程示意图;
图7为本申请又一实施例提供的显示电量的确定方法的实现流程示意图;
图8为本申请又一实施例提供的显示电量的确定方法的实现流程示意图;
图9为本申请又一实施例提供的显示电量的确定方法的实现流程示意图;
图10为本申请又一实施例提供的显示电量的确定方法的实现流程示意图;
图11为本申请又一实施例提供的显示电量的确定方法的实现流程示意图;
图12为本申请一实施例提供的真无线耳机与耳机盒的示意图;
图13为本申请一实施例提供的显示电量的确定装置的结构示意图;
图14为本申请又一实施例提供的显示电量的确定装置的结构示意图;
图15为本申请一实施例提供电子设备的硬件组成结构示意图。
具体实施方式
相关技术中,通常有两种方法确定电池的显示电量,并将确定的显示电量进行显示,第一种是通过电量计,准确地统计电池的电量,根据统计结果,确定电池的显示电量,从而显示电池的电量。第二种是根据充放电曲线,确定在充电和放电时不同电压对应的电量。在实际应用中,通常采用第二种方法确定电池的显示电量。充电芯片中均标定有充电截止电压,在充电过程中,当充电芯片的电池引脚达到充电截止电压的时候,认定此时电池处于满电状态,由于各种原因,在标定的充电截止电压相同的情况下,不同的充电芯片对应的实际充电截止电压有0.05V的误差范围,例如,在显示无线耳机的电量的时候,由于无线耳机的制造厂商比较多,不同的制造厂商之间制造的无线耳机中配置的充电芯片不同,不同的充电芯片对应的充电截止电压不相同,可能导致一对TWS耳机左右耳机显示的电量存在差异。当出现充电芯片对应的实际充电截止电压与标定的充电截止电压不同的情况下,仍使用基于标定的充电截止电压建立的电压与电量的对应关 系来确定电池的显示电量的时候,会出现确定的电池的显示电量与电池的实际电量不同的情况,从而不能根据显示的电量准确地判断电池的用电量,导致对电池进行多次的充电行为,从而缩短电子设备的电池的使用寿命,影响用户使用。
基于此,本申请实施例提供了一种显示电量的确定方法,图1示出了本申请实施例提供的显示电量的确定方法的实现流程。如图1所示,所述方法包括:
S101:基于充电芯片的第一引脚确定第一电压;所述第一电压表征电池处于满电状态时所述第一引脚的电压;所述第一引脚为所述充电芯片的电池引脚。
这里,充电芯片是可以对电池进行充电控制的芯片,在充电芯片对电池进行充电的时候,当电池达到满电状态时的电压,在充电芯片的电池引脚采集到的电压是充电芯片的充电截止电压。第一引脚为充电芯片的电池引脚,充电芯片是通过第一引脚与电池进行连接,向电池提供充电电流和电压,通过检测充电芯片的第一引脚的电压,能够确定电池处于满电状态的第一电压。如图2所示,图2示出了一种充电芯片的示意图,图2中的BAT引脚是充电芯片的电池引脚,也就是第一引脚,在电池达到满电的状态时,BAT引脚的电压是电池处于满电状态的第一电压。例如,在电池处于满电状态时,检测到充电芯片的第一引脚的电压为4.3V,可以确定第一电压为4.3V。在实际应用中,由于制造的工艺等各种原因,可能会出现基于充电芯片的第一引脚确定的第一电压,与充电芯片标定的充电截止电压出现不同的情况,通过检测电池处于满电状态时充电芯片的第一引脚的电压,能够确定充电芯片的实际截止电压。例如,充电芯片标定的充电截止电压为4.3V,通过充电芯片的第一引脚确定的第一电压为4.25V。
在一个实施例中,所述基于充电芯片的第一引脚确定第一电压,包括:
在所述充电芯片的第二引脚表征所述电池处于完全充电状态时,检测所述第一引脚的电压,并将检测结果确定为所述第一电压;其中,
所述第二引脚表征所述电池的充电状态;
所述根据所述第一电压确定第一关系,包括:在所述第一电压与所述充电芯片标定的充电截止电压不相同的情况下,根据所述第一电压确定第一关系。
这里,充电芯片的第二引脚是漏极开路输出的充电状态指示端,能够通过第二引脚的输出电压表示电池的充电状态,当第二引脚表征电池处于完全充电状态时,表示电池已经处于充满电的特定状态,继续充电已不能使电池充电反应持续进行,在实际应用中,可以根据第二引脚输出电压的变化而确定电池是否处于完全充电状态。例如,在某些充电芯片中,电池处于完全充电状态时,充电芯片的第一引脚的电压代表着电池处于满电状态时的电压,检测充电芯片的第一引脚的电压,将检测结果确定为第一电压。在根据第一电压确定第一关系的时候,将第一电压与充电芯片标定的充电截止电压进行比较,在第一电压与充电芯片标定的充电截止电压不相同的时候,说明电池处于满电状态时,充电芯片对应的第一引脚的电压为第一电压,而不是充电芯片标定的充电截止电压,根据第一电压确定第一关系,从而能够确定电池处于满电状态时的显示电量。如图3所示,图3示出了一种充电芯片的各个引脚的连接示意图,其中,芯片的BAT引脚为第一引脚,芯片的CHG引脚为第二引脚,能够表示电池的充电状态,芯片的CHG引脚与处理器连接,处理器能够记录芯片的CHG引脚的变化情况,处理器在检测到芯片的CHG引脚表征电池处于完全充电状态,能够检测芯片的BAT引脚的输出电压,从而确定第一电压。例如,当检测芯片的BAT引脚的输出电压为4.25V,可以确定第一电压为4.25V。在实际应用中,根据充电芯片的种类、制造商等的原因,当第二引脚的输出电压为高电平时,代表着电池处于充电状态,当第二引脚的输出电压为低电平的时候表征电池处于完全充电的状态,在第二引脚由高电平转换为低电平,处于完全充电状态的时候,检测第一引脚的电压;还存在着另一种情况,当第二引脚的输出电压为低电平时,代表着电 池处于充电状态,当第二引脚的输出电压为高电平的时候,代表着电池已经处于完全充电状态,在第二引脚由低电平转换为高电平,处于完全充电状态的时候,检测第一引脚的电压。
在一个实施例中,如图4所示,所述基于充电芯片的第一引脚确定第一电压,包括:
S401:在所述电池的充电过程中,检测所述第一引脚的电压,得到检测结果。
这里,在电池的充电过程中,分为三个阶段,分别为预充阶段、恒流阶段和恒压阶段,在不同阶段中,充电芯片的第一引脚的电压会发生变化,检测第一引脚的电压,得到对应的检测结果。
S402:在所述检测结果表征所述第一引脚处于恒压状态的情况下,将所述恒压状态对应的电压确定为所述第一电压。
这里,在电池的充电过程中,最后阶段为恒压阶段,当进入到恒压阶段的时候,电池的充电电压是保持恒定的,并且,在恒压阶段的电池的充电电压通常可以看作为充电芯片的充电截止电压。在得到电池的充电过程中第一引脚的检测结果后,对检测得到的电压进行分析,当检测结果表明第一引脚处于恒压状态的情况下,说明电池处于充电过程中的恒压阶段,将恒压状态对应的电压确定为第一电压,也就是充电芯片的截止电压,其中,恒压状态可以通过检测到的结果进行确定,具体地,当连续检测到不同时刻的第一引脚的电压都相同的情况下,可以认为第一引脚处于恒压状态,例如,当检测到不同时刻的第一引脚的电压分别为3.5V,4.0V,4.25V,4.25V,4.25V,由于在检测结果中多次出现4.25V的电压值,并且在一段时间内保持不变,可以确定第一引脚已经处于恒压状态,且4.25V为第一电压。在实际应用中,可以在充电的过程中,设置检测第一引脚的时间周期,例如每30s检测第一引脚的电压,当出现不同时刻的第一引脚的电压相同的时候,可以在一段时间内观察第一引脚的电压是否保持不变,例如,可以设置观察2min内的第一引脚的电压。通过在电池处于充电过程中的恒压阶段,确定电池芯片的第一电压,从而不用在电池完成充电的时候才能确定电池芯片的第一电压,能够快速地确定电池芯片的第一电压。
S102:根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系。
这里,在确定第一电压之后,根据第一电压确定第一关系,第一关系可以是以第一关系表的形式进行表示,通过第一关系表记录第一引脚的电压与电池的电量的对应关系,也可以是以计算公式的形式进行表示,通过第一关系式计算第一引脚的电压对应的电池的电量。例如,当确定的第一电压为4.25V的时候,由于第一电压对应的是电池处于满电状态时的电压,在建立关系表的时候,可以确定4.25V的电压对应的电池的电量为100%,并根据第一电压,确定电池在不同电量对应的电压,从而建立第一关系表。
在一个实施例中,如图5所示,所述根据所述第一电压确定第一关系时,所述方法包括:
S501:确定第一差值;所述第一差值表征所述第一电压与第二电压之间的差值;所述第二电压表征所述电池维持电子设备正常工作时所需的最小电量对应的所述第一引脚的电压。
这里,电子设备可以是指通过电池供电的设备,其中电池可以是可充电电池。例如无线耳机、音箱、手机、平板电脑、笔记本电脑等设备。在确定第一电压之后,确定第一电压与第二电压之间的差值,得到第一差值,第二电压是指维持电子设备正常工作时所需的最小电量对应的所述第一引脚的电压,例如,第二电压可以是电池的显示电量为0%的时候,电池芯片的第一引脚的电压。当电子设备的电池的剩余电量达到维持电子设备正常工作所需的最小电量时,设置电子设备停止工作,且电子设备停止工作时刻显 示的电量为0%。为了避免因电池电量反复耗尽而可能对电池使用寿命带来的负面影响,在实际应用中,可以对维持电子设备正常工作所需的最小电量进行设置,以使得电子设备显示的电量达到0%的时候,电子设备的电池还存余一些电量。可示的,当电池处于满电状态时,电源芯片的第一引脚对应的电压为第一电压,当电池的显示电量为0%的时候,电源芯片的第一引脚对应的电压为第二电压,例如,当电池处于满电状态时,对应的第一电压为4.25V,电池的显示电量为0%时,对应的第二电压为3.3V,可以确定第一差值为0.95V。
S502:确定第二差值;所述第二差值表征所述第一引脚的电压与所述第二电压的差值。
这里,第一引脚的电压表征电池对应的实测电压,确定第一引脚的电压与第二电压的差值为第二差值。第一电压为电池处于满电状态时第一引脚的电压,第二电压为电池的电量耗尽时第一引脚的电压,第一电压与第二电压确定了第一关系中的电压取值范围,因此,电池在不同电量下对应的第一引脚的电压都落入到第一电压与第二电压确定的电压范围内。例如,第一电压为4.25V,第二电压为3.3V,第一电压和第二电压确定了第一关系中的电压取值范围为[3.3V,4.25V],可以确定第一引脚的电压为[3.3V,4.25V]范围内的电压值,例如第一引脚的电压为3.4V,那么可以确定第二电压3.3V和第一引脚的电压3.4V对应的第二差值为0.1V。
S503:根据第一差值与所述第二差值的比例关系,确定所述第一关系中所述第一引脚的电压与电量的对应关系。
这里,根据第一差值与第二差值的比例关系,能够确定在第一电压和第二电压确定的电压范围内的第一引脚的电压对应的电池的电量,从而确定第一关系。在实际应用中,第一关系可以是第一关系表,也可以是第一关系式,只要能表征第一引脚的电压与显示电量的关系即可,例如获取显示电量的第一关系式可以表示为:
Figure PCTCN2021096046-appb-000001
其中,P表示第一引脚的电压对应的电量,通过百分数的形式表示电量的大小,D 1表示第一差值,D 2表示第二差值,通过电量的算法表达式,能够确定第一引脚的电压对应的电量,从而能够确定第一关系中电量与电压的对应关系。例如,第一电压为4.25V,第二电压为3.3V,第一引脚的电压为3.4V,可以确定第一差值为0.95V,第二差值为0.1V,根据
Figure PCTCN2021096046-appb-000002
能够确定第一引脚的电压为3.4V时,对应的电量为11%。当然,也可以根据上述关系式,通过检测不同的第一引脚的电压,能够确定不同第一引脚的电压对应的电量,生成第一关系表,表1为根据第一差值与第二差值的比例关系建立的第一关系表。
表1
电压(V) 电量
4.25 100%
4.2 95%
4.1 84%
4 74%
3.9 63%
3.8 53%
3.7 42%
3.6 32%
3.5 21%
3.4 11%
3.3 0%
在一个实施例中,如图6所示,所述根据所述第一电压确定第一关系,包括:
S601:确定设定的第二关系;所述第二关系中第一电量对应的电压为第三电压;所述第一电量表征所述电池的满电电量;所述第三电压表征所述充电芯片标定的充电截止电压。
这里,确定设定的第二关系,第二关系是基于第三电压确定的电压与电量的对应关系,第三电压代表充电芯片标定的截止电压,在实际应用中,存在着不同规格的充电芯片,充电芯片的不同主要包括充电芯片标定的充电截止电压不同,在选择充电芯片的时候,通常根据电池的种类和电池的参数,选择合适的标定的充电截止电压的充电芯片,从而能够更好地管理电池。在第二关系中,第一电量对应的电压为第三电压,第一电量是指电池的满电电量,也就是说,电池电量为100%时对应的电压为第三电压。在实际应用中,电子设备可以在出厂前已经配置了基于标定的充电截止电压确定的电压与电量的对应关系,即第二关系,从而根据第二关系中电压与电量的对应关系,显示电池的电量。第二关系可以是第二关系表的形式,也可以是第二关系式的形式等,例如,以第二关系表为例,当充电芯片标定的截止电压为4.3V,表2示出了设定的第二关系表。在表2中,电池的满电电量对应的电压为第三电压。
表2
电压(V) 电量
4.3 100%
4.2 90%
4.1 80%
4 70%
3.9 60%
3.8 50%
3.7 40%
3.6 30%
3.5 20%
3.4 10%
3.3 0%
S602:基于所述第二关系,根据所述第一电压确定所述第一关系。
这里,在确定设定的第二关系之后,基于第二关系,根据第一电压,调整第二关系中的电压与电量的对应关系,从而在第二关系的基础上确定第一关系。在实际应用中,可以在第一电压与第二电压不相同的情况下,基于第二关系,根据第一电压确定第一关系,即充电芯片实际的充电截止电压与充电芯片标定的充电截止电压不相同的情况下,根据充电芯片实际的充电截止电压,确定电压与电量的对应关系,生成第一关系,从而能够确定显示电池的显示电量。
在一个实施例中,所述基于所述第二关系,根据所述第一电压确定所述第一关系,包括:
将所述第二关系中第一电量对应的电压更新为所述第一电压,得到所述第一关系。
这里,在基于第二关系,根据第一电压确定第一关系的时候,将第二关系中第一电量对应的电压修改为第一电压,从而能够根据充电芯片实际的充电截止电压,动态调整电压与电池满电电量之间的对应关系,在显示电池的电量的时候,能够准确显示出电池的电量处于满电的状态。例如,以第二关系为第二关系表的形式为例,当第一电压为4.25V,第三电压为4.3V的时候,如果没有调整电压与电量的关系,在确定电池的显示电量时,在设定的第二关系表中确定电池的电量与电压之间的对应关系,由于第一电压为4.25V,代表着当充电芯片的第一引脚的电压为4.25V的时候,电池处于满电状态,电池的电量为100%,在设定的第二关系表中可以确定电压为4.25V时,对应的电池的电量为95%,即确定电池的显示电量为95%,导致显示的电量为95%,并不能准确地显示电池的电量,并且,由于充电芯片的充电截止电压为4.25V,在电压达到4.25V的时候停止对电池进行充电,从而充电芯片的第一引脚的电压是不能达到4.3V的,根据设定的第二关系表确定电池的显示电量的时候,是不会出现显示电池的电量为100%的情况,会让用户误以为电池出现问题。将设定的第二关系表中第一电量对应的电压修改为第一电压,使电量100%时对应的电压为4.25V,在这种情况下,能够根据确定的电池的显示电量,准确地显示电池的满电电量。在实际应用中,可以先确定第一电压与第三电压是否相同,在第一电压与第三电压不相同的情况下,将第二关系中第一电量对应的电压更新为第一电压,得到第一关系,如果第一电压与第三电压相同时,不需要更新第二关系中第一电量对应的电压,可直接根据第二关系确定电池的显示电量。
在一个实施例中,如图7所示,所述基于所述第二关系,根据所述第一电压确定所述第一关系,包括:
S701:确定第三差值;所述第三差值表征所述第一电压与所述第三电压之间的差值。
这里,根据第一电压与第三电压,确定第三差值。当第一电压与第三电压相同时,第三差值为零。当第一电压与第三电压不相同时,可以确定第三差值为大于零的数值,例如,当第一电压为4.25V,第三电压为4.3V,可以确定第三差值为0.05V。
S702:根据所述第三差值,更新所述第二关系内所有电量中的全部或部分电量对应的电压,得到所述第一关系;其中,
所述部分电量包括第一电量。
这里,以第二关系表的形式为例,在确定第三差值之后,根据第三差值,将第二关系表内每个电量对应的电压进行调整,将调整后的电压与电量的对应关系确定为第一关系表。在实际应用中,将第二关系表内每个电量对应的电压进行调整主要是将第二关系表内每个电量对应的电压下调,下调的幅度为第三差值。例如,在设定的第二关系表内电量为0%对应的电压为3.3V,根据第三差值将3.3V下调,更新后的电量为0%对应的电压为3.25V,将设定的第二关系表中每个电量对应的电压进行调整之后,能够得到第一关系表。表3为根据第三差值,基于设定的第二关系表生成的第一关系表。在表3中,在第一关系表中每个电量对应的电压是将设定的第二关系表中的每个电量对应的电压下调第三差值得到的。除了对第二关系表内所有电量中每个电量对应的电压进行更新之外,还可以将第二关系表内所有电量中的部分电量对应的电压进行更新,得到第一关系表,其中,在对部分电量对应的电压进行更新时,至少更新第一电量对应的电压,从而保证能够显示电池电量处于满电的状态,例如,只更新第二关系表中满电电量(电量为100%)对应的电压以及电子设备不能维持正常工作的电量对应的电压。在实际应用中,当第一电压与第三电压相同时,第三差值为零,由于根据第三差值进行调整后每个电量 对应的电压与第二关系表相同,在此基础上,不需要对第二关系表进行调整生成第一关系表,可直接根据第二关系表确定电池的显示电量,从而能够节省处理时间与终端的功耗。当然,第二关系也可以以第二关系式的形式存在,从而可以在测得第一引脚的电压后根据第三差值计算出对应的显示电量,无需查表获得,计算原理与第二关系表的方式相同,在此不再赘述。
表3
电压(V) 电量
4.25 100%
4.15 90%
4.05 80%
3.95 70%
3.85 60%
3.75 50%
3.65 40%
3.55 30%
3.45 20%
3.35 10%
3.25 0%
S103:基于所述第一关系,根据所述第一引脚的电压确定电池的显示电量。
这里,通过第一关系,根据第一引脚的电压确定电池的显示电量。第一关系中准确地记录了充电芯片的第一引脚的电压与电池的电量之间的对应关系,当确定了充电芯片的第一引脚的电压之后,通过第一关系,确定充电芯片的第一引脚的电压对应的电量,并将充电芯片的第一引脚的电压对应的电量确定为电池的显示电量,电子设备能够在相应的界面上将显示电量进行显示。例如,以第一关系通过第一关系表进行表征为例,当检测到充电芯片的第一引脚的电压为4.25V,在第一关系表中搜索电压值为4.25V对应的电量,在第一关系表中确定4.25V的电压对应的电量为100%时,可以确定电池的显示电量为100%,根据电池的显示电量,显示当前的电池电量为100%。在实际应用中,可以确定真无线(TWS,True wireless Stereo)耳机的电量、无线鼠标的电量等其他无线设备的电池的显示电量。例如,在实际应用中,一双TWS耳机配备了左耳使用的TWS耳机和右耳使用的TWS耳机,在移动终端(例如手机、平板电脑、智能手表等可与耳机连接的设备)上显示每只TWS耳机的电池电量的时候,TWS耳机根据第一关系表确定TWS耳机的充电芯片的第一引脚电压对应的电量,即TWS耳机的显示电量,通过蓝牙等通信方式,将对应的电量发送到移动终端(一般是TWS耳机中的主耳机与移动终端进行通信,从耳机通过主耳机上传数据给移动终端),移动终端接收相关信息后,在移动终端的电池电量显示界面上,实时显示TWS耳机的电池电量。TWS耳机的电池电量也可以在充电盒上显示,TWS耳机根据第一关系表,确定TWS耳机的充电芯片的第一引脚的电压对应的电量,将电量通过蓝牙等无线通信方式或触点、接口等有线方式发送到充电盒,充电盒接收到相关数据后,显示TWS耳机电池电量。
本申请实施例中,基于充电芯片的第一引脚确定第一电压,第一电压表征电池处于满电状态时第一引脚的电压,第一引脚为充电芯片的电池引脚,根据第一电压确定第一 关系,第一关系表征第一引脚的电压与电池的电量的对应关系,基于所述第一关系,根据所述第一引脚的电压确定电池的显示电量,能够根据电池处于满电状态时,充电芯片的第一引脚的电压确定电压与电池的对应关系,从而能够确定电池的显示电量,准确地显示电池的电量,能够根据显示的电池的电量准确判断电池的电量的使用情况,应用在TWS耳机上可以减少当左右耳耳机采用了标定充电截止电压(即第三电压)不一样的充电IC时,可能给用户造成的以下影响:1、左右耳机充满后的电量不一样,例如,极限条件下一只耳机充满了,但是另外一只耳机只充到95%情况;2、由于耳机充满时的电量不一样,两只耳机同时使用,显示左右耳剩余的电量也不一样,这样会给用户造成一只耳机耗电快,一只耳机耗电慢的情况,用户可能会以为耳机坏了;3、由于显示电量不准确可能导致用户更频繁的充电,从而影响电池寿命。因此,通过本实施例可以提高用户的体验。
上述实施例示出了电子设备在出厂后,在使用过程中对电池电量显示进行校准,本申请实施例还提供了在出厂前对完成对电池电量显示进行校正的设置方法。需要说明的是,上述出厂后和下述出厂前的方案可以一起应用,即在出厂时按照以下出厂前的方案,保障用户开始使用时电池电量显示的准确性;出厂后实际使用中,按照上述出厂后的方案,保障每次充放电过程中电池电量显示的准确性。
在一个实施例中,如图8所示,所述显示电量的确定包括:
S801:在充电芯片的充电功能使能的情况下,对所述充电芯片上电,并采集所述充电芯片的第一引脚外部的第一电压;在采集所述第一电压时,所述第一引脚外部开路;所述第一引脚为所述充电芯片的电池引脚。
这里,充电芯片的充电功能通过充电芯片的使能端控制,使充电芯片可以关闭充电功能,也可以打开充电功能。在充电芯片的充电功能使能的情况下,给予充电芯片外部电源,在第一引脚外部开路的状态下,采集充电芯片的第一引脚的电压,由于第一引脚处于开路的状态,此时采集到的第一引脚的电压可以视作是充电芯片的充电截止电压,其中,第一引脚为充电芯片的电池引脚,与电池端连接的引脚。以图3的充电芯片的示意图为例,充电芯片的EN引脚,是控制充电芯片的充电功能,当EN引脚输入高电平的时候,充电芯片的充电功能关闭,当EN引脚输入低电平的时候,充电芯片的充电功能使能。在测量充电芯片的充电截止电压的时候,需要向充电芯片的EN引脚输入低电平,向充电芯片的VIN引脚接入外部电源,并使充电芯片的BAT引脚处于开路状态,对充电芯片上电之后,采集充电芯片的BAT引脚的电压,将采集到的充电芯片的BAT引脚的电压确定为第一电压,从而能够快速得到第一电压。在实际应用中,在对充电芯片进行装配印刷电路板(PCBA,printed circuit board assembly)端测试的时候,可以通过上述方式采集到充电芯片的BAT引脚在开路状态下的电压。
S802:根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系,以使电子设备根据所述第一引脚的电压确定电池的显示电量。
这里,在确定了第一电压之后,根据第一电压确定第一关系,第一关系表征第一引脚的电压与电池的电量之间的对应关系,第一关系可以是以第一关系表的形式,也可以是第一关系式的形式,通过第一关系,能够使电子设备可以根据第一引脚的电压确定电池的显示电量。具体地,将第一电压与电池的电量为100%生成对应关系,在确定第一电压与电量为100%的对应关系,可以确定其他电量对应的第一引脚的电压。以第一关系表为例,在实际应用中,为了避免误差,通常确定电量相隔10%时所对应的第一引脚的电压,例如,确定电量为100%对应的第一引脚的电压之后,确定电量为90%对应的第一引脚的电压,从而能够确定第一关系表。对第一关系表进行存储,使电子设备能够 基于存储的第一关系表,根据第一引脚的电压,确定电池的显示电量。
在一个实施例中,如图9所示,所述根据所述第一电压值确定第一关系时,所述方法包括:
S901:确定第一差值;所述第一差值表征所述第一电压与第二电压之间的差值;所述第二电压表征所述电池维持电子设备正常工作时所需的最小电量对应的所述第一引脚的电压。
这里,确定第一电压与第二电压之间的第一差值,第二电压是指电池维持电子设备正常工作时所需的最小电量对应的所述第一引脚的电压,第二电压可以是电池显示的电量为0%的时候,电池芯片的第一引脚的电压。当电子设备的电池的剩余电量达到维持电子设备正常工作所需的最小电量时,设置电子设备停止工作,且电子设备停止工作时刻显示的电量为0%。为了避免因电池电量反复耗尽而可能对电池使用寿命带来的负面影响,在实际应用中,可以对维持电子设备正常工作所需的最小电量进行设置,以使得电子设备的显示电量达到0%的时候,电子设备的电池还存余一些电量。可示的,当电池处于满电状态时,电源芯片的第一引脚对应的电压为第一电压,当电池的显示电量为0%的时候,电源芯片的第一引脚对应的电压为第二电压,例如,当电池处于满电状态时,第一电压为4.25V,电源的显示电量为0%时,第二电压为3.3V,那么第一差值为0.95V。
S902:确定第二差值;所述第二差值表征所述第一引脚的电压与所述第二电压的差值。
这里,确定第二差值,第二差值通过第一引脚的电压与第二电压的差值确定,第一引脚的电压表征电池对应的实测电压。在确定了第一电压与第二电压之后,由第一电压与第二电压确定的电压范围是第一关系中不同电量对应的电压的取值范围,第一引脚的电压均落入由第一电压与第二电压确定的电压范围内。例如,当第一电压为4.25V,第二电压为3.3V,第一引脚的电压可以为[3.3,4.25]范围内的一个数值,例如,选择3.6V作为第一引脚的电压,可以确定第二差值为0.3。
S903:根据第一差值与所述第二差值的比例关系,确定所述第一关系中第一引脚的电压与电量的对应关系。
这里,在确定第一差值与第二差值之后,根据第一差值与第二差值的比例关系,能够确定第一引脚的电压对应的电量,从而能够确定第一关系。以第一关系式为例,第一差值与第二差值的比例关系为
Figure PCTCN2021096046-appb-000003
其中,P表示第一引脚的电压对应的电量,通过百分数的形式表示电量的大小,D 1表示第一差值,D 2表示第二差值,通过第一差值与第二差值的比例关系,能够确定第一引脚的电压对应的电量。例如,第一电压为4.25V,第二电压为3.3V,第一引脚的电压为3.6V,第一差值为0.95,第二差值0.3,通过第一差值与第二差值的比例关系
Figure PCTCN2021096046-appb-000004
能够得到第一引脚的电压为3.6V对应的电量为32%,也就是说当检测到充电芯片的第一引脚的电压为3.6V的时候,显示的电池电量为32%。当然,也可以通过第一关系表的形式表示第一关系,例如根据上述公式,通过确定在第一电压与第二电压确定的电压范围内的第一引脚的电压对应的电量,能够确定第一关系表,从而可以通过查表的方式确定第一引脚的电压所对应的显示电量。
在一个实施例中,如图10所示,所述根据所述第一电压确定第一关系,包括:
S1001:确定设定的第二关系;所述第二关系中第一电量对应的电压为第三电压;所述第一电量表征所述电池的满电电量;所述第三电压表征所述充电芯片标定的充电截止电压。
这里,确定设定的第二关系,第二关系是基于第三电压确定的电压与电量的对应关 系,第三电压代表充电芯片标定的截止电压,可以通过充电芯片的规格确定第三电压。在第二关系中,第一电量对应的电压为第三电压,第一电量是指电池的满电电量,也就是说,电池电量为100%时对应的电压为第三电压。在实际应用中,电子设备可能在出厂前已经配置了基于标定的充电截止电压确定的电压与电量的对应关系,即第二关系,从而根据第二关系中电压与电量的对应关系,确定电池的显示电量。第二关系可以是第二关系表的形式,也可以是第二关系式的形式。
S1002:基于所述第二关系,根据所述第一电压确定所述第一关系。
这里,在确定设定的第二关系之后,基于第二关系,根据第一电压,调整第二关系中的电压与电量的对应关系,从而在第二关系的基础上确定第一关系。在实际应用中,可以在第一电压与第二电压不相同的情况下,基于第二关系,根据第一电压确定第一关系,即充电芯片实际的充电截止电压与充电芯片标定的充电截止电压不相同的情况下,根据充电芯片实际的充电截止电压,确定电压与电量的对应关系,生成第一关系,从而能够确定电池的显示电量,更准确地显示电池的电量。
在一个实施例中,所述基于所述第二关系,根据所述第一电压确定所述第一关系,包括:
将所述第二关系中第一电量对应的电压更新为所述第一电压,得到所述第一关系。
这里,以关系表为例,在基于第二关系表,根据第一电压确定第一关系表的时候,将第二关系表中第一电量对应的电压修改为第一电压,从而能够根据充电芯片实际的充电截止电压,动态调整电压与电池满电电量之间的对应关系,在显示电池的电量的时候,能够准确显示出电池的电量处于满电的状态。对于关系式的情况,可以先确定第二关系式,将第一引脚的第一电压对应第一电量(满电电量),第一引脚的其他电压仍然采用第二关系式确定对应的显示电量即可。在实际应用中,可以先确定第一电压与第三电压是否相同,在第一电压与第三电压不相同的情况下,将第二关系中第一电量对应的电压更新为第一电压,得到第一关系,如果第一电压与第三电压相同时,不需要更新第二关系中第一电量对应的电压,可直接根据第二关系确定电池的显示电量。在其他实施例中,也可以先判断第一电压与第三电压是否相同,相同就不用更新对应的关系表,不同才需要根据对应的实施例提供的方案进行更新,得到第一关系表。
在一个实施例中,如图11所示,所述基于所述第二关系,根据所述第一电压确定所述第一关系,包括:
S1101:确定第三差值;所述第三差值表征所述第一电压与所述第三电压之间的差值。
这里,根据第一电压与第三电压,确定第三差值,第三差值是指充电芯片实际的截止电压与充电芯片标定的截止电压之间的差值。当第一电压与第三电压相同时,第三差值为零。当第一电压与第三电压不相同时,例如,当第一电压为4.25V,第三电压为4.3V,可以确定第三差值为0.05V。
S1102:根据所述第三差值,更新所述第二关系内所有电量中的全部或部分电量对应的电压,得到所述第一关系;其中,
所述部分电量包括第一电量。
这里,以关系表为例,在确定第三差值之后,根据第三差值,将第二关系表内每个电量对应的电压进行调整,将调整后的电压与电量的对应关系确定为第一关系表。在实际应用中,将第二关系表内每个电量对应的电压进行调整主要是将第二关系表内每个电量对应的电压下调,下调的幅度为第三差值。例如,在设定的第二关系表内电量为0%对应的电压为3.3V,根据第三差值将3.3V下调,更新后的电量为0%对应的电压为3.25V,将设定的第二关系表中每个电量对应的电压进行调整之后,能够得到第一关系表。在实 际应用中,当第一电压与第三电压相同时,第三差值为零,可直接根据第二关系表显示电池的电量,从而能够节省处理时间与终端的功耗。除了对第二关系表内所有电量中每个电量对应的电压进行更新之外,还可以将第二关系表内所有电量中的部分电量对应的电压进行更新,得到第一关系表,其中,在对部分电量对应的电压进行更新时,至少更新第一电量对应的电压,从而保证能够确定电池的显示电量为100%,显示电池电量处于满电的状态,例如,只更新第二关系表中满电电量(电量为100%)对应的电压以及电子设备不能维持正常工作的电量对应的电压。此外,另一种方案中,第二关系以第二关系式的形式存在,根据第二关系式得到第一关系式,无需生成相应的关系表,而是生成相应的关系式,在检测第一引脚的电压后调用相应的关系式计算出对应的显示电量。
本申请还提供了一个应用实施例。如图12所示,图12示出了真无线(TWS,True wireless Stereo)耳机以及耳机盒的示意图。在实际应用中,一对TWS耳机中,每只TWS耳机的底部均设置有两个金属引脚,用于耳机盒给TWS耳机进行充电或者通讯使用,金属引脚的位置可以设置于TWS耳机的耳机杆的底部,也可以设置于TWS耳机的耳塞的下方,图12示出了位于TWS耳机的耳塞下方的金属引脚。与TWS耳机配套的充电盒可以收纳TWS耳机,充电盒里针对每只TWS耳机设置了两个充电铜柱,图12示出了在充电盒的底部含有两个充电铜柱,与TWS耳机的耳机杆底部的两个金属引脚接触之后,可以通过无线充电的方式为TWS耳机进行充电。在将TWS耳机放置在耳机盒内进行充电的时候,能够在TWS耳机处于满电的状态时,检测对应的充电芯片的第一引脚的输出电压,得到第一电压,根据第一电压确定实际的电量与电压的第一关系,通过检测充电芯片的第一引脚的电压,在第一关系中确定第一引脚的电压对应的电量,实时地显示TWS耳机的电量。TWS耳机的电量可以显示在充电盒上,也可以在与TWS耳机连接的设备上显示TWS耳机的电量。例如,当TWS耳机的电量耗尽的情况下,放进充电盒进行充电,此时,充电盒可以显示TWS耳机在充电过程中的电量。在实际应用中,除了可以显示TWS耳机的电量,还可以显示其他电子设备的电量,例如,显示蓝牙手表的电量。应用在TWS耳机上可以减少当左右耳耳机采用了标定充电截止电压(即第三电压)不一样的充电IC时,可能给用户造成的以下影响:1、左右耳机充满后的电量不一样,例如,极限条件下一只耳机充满了,但是另外一只耳机只充到95%情况;2、由于耳机充满时的电量不一样,两只耳机同时使用,显示左右耳剩余的电量也不一样,这样会给用户造成一只耳机耗电快,一只耳机耗电慢的情况,用户可能会以为耳机坏了;3、由于显示电量不准确可能导致用户更频繁的充电,从而影响电池寿命。因此,通过本实施例可以提高用户的体验。
为实现本申请实施例的显示电量的确定方法,本申请实施例还提供了一种显示电量的确定装置,如图13所示,该显示电量的确定装置包括:
第一确定单元1301,配置为基于充电芯片的第一引脚确定第一电压;所述第一电压表征电池处于满电状态时所述第一引脚的电压;所述第一引脚为所述充电芯片的电池引脚;
第二确定单元1302,配置为根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系;
第三确定单元1303,配置为基于所述第一关系,根据所述第一引脚的电压确定电池的显示电量。
一实施例中,所述第二确定单元1302根据所述第一电压确定第一关系时,配置为:
确定第一差值;所述第一差值表征所述第一电压与第二电压之间的差值;所述第二电压表征所述电池维持电子设备正常工作时所需的最小电量对应的所述第一引脚的电压;
确定第二差值;所述第二差值表征所述第一引脚的电压与所述第二电压的差值;
根据第一差值与所述第二差值的比例关系,确定所述第一关系中第一引脚的电压与电量的对应关系。
一实施例中,所述第二确定单元1302根据所述第一电压确定第一关系,配置为:
确定设定的第二关系;所述第二关系中第一电量对应的电压为第三电压;所述第一电量表征所述电池的满电电量;所述第三电压表征所述充电芯片标定的充电截止电压;
基于所述第二关系,根据所述第一电压确定所述第一关系。
一实施例中,所述第二确定单元1302基于所述第二关系,根据所述第一电压确定所述第一关系,配置为:
将所述第二关系中第一电量对应的电压更新为所述第一电压,得到第一关系。
在一实施例中,所述第二确定单元1302基于所述第二关系,根据所述第一电压确定所述第一关系,配置为:
确定第三差值;所述第三差值表征所述第一电压与所述第三电压之间的差值;
根据所述第三差值,更新所述第二关系内所有电量中的全部或部分电量对应的电压,得到所述第一关系;其中,
所述部分电量包括第一电量。
在一实施例中,所述第一确定单元1301基于充电芯片的第一引脚确定第一电压,配置为:
在所述充电芯片的第二引脚表征所述电池处于完全充电状态时,检测所述第一引脚的电压,并将检测结果确定为所述第一电压;其中,
所述第二引脚表征所述电池的充电状态;
所述第二确定单元1302根据所述第一电压确定第一关系,配置为:在所述第一电压与所述充电芯片标定的充电截止电压不相同的情况下,根据所述第一电压确定第一关系。
在一实施例中,所述第一确定单元1301基于充电芯片的第一引脚确定第一电压,配置为:
在所述电池的充电过程中,检测所述第一引脚的电压,得到检测结果;
在所述检测结果表征所述第一引脚处于恒压状态的情况下,将所述恒压状态对应的电压确定为所述第一电压。
实际应用时,上述图13实施例提供的显示电量的确定装置可以为TWS耳机或TWS音箱等或其他设备中的任一个。
实际应用时,第一确定单元1301、第二确定单元1302、第三确定单元1303可由显示电量的确定装置中的处理器来实现。当然,处理器需要运行存储器中存储的程序来实现上述各程序模块的功能。
需要说明的是,上述图13实施例提供的显示电量的确定装置在进行显示电量的确定时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的显示电量的确定装置与显示电量的确定方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
本申请实施例还提供了另一种显示电量的确定装置,如图14所示,该显示电量的确定装置包括:
第一确定单元1401,配置为在充电芯片的充电功能使能的情况下,对所述充电芯片上电,并采集所述充电芯片的第一引脚外部的第一电压;在采集所述第一电压时,所述第一引脚外部开路;所述第一引脚为所述充电芯片的电池引脚;
第二确定单元1402,配置为根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系,以使电子设备根据所述第一引脚的电压确定电池的显示电量。
在一实施例中,所述第二确定单元1402根据所述第一电压确定第一关系时,配置为:
确定第一差值;所述第一差值表征所述第一电压与第二电压之间的差值;所述第二电压表征所述电池维持电子设备正常工作时所需的最小电量对应的所述第一引脚的电压;
确定第二差值;所述第二差值表征所述第一引脚的电压与所述第二电压的差值;
根据第一差值与所述第二差值的比例关系,确定所述第一关系中所述第一引脚的电压与电量的对应关系。
在一实施例中,所述第二确定单元1402根据所述第一电压确定第一关系时,配置为:
确定设定的第二关系;所述第二关系中第一电量对应的电压为第三电压;所述第一电量表征所述电池的满电电量;所述第三电压表征所述充电芯片标定的充电截止电压;
基于所述第二关系,根据所述第一电压确定所述第一关系。
在一实施例中,所述第二确定单元1402基于所述第二关系,根据所述第一电压确定所述第一关系,配置为:
将所述第二关系中第一电量对应的电压更新为所述第一电压,得到所述第一关系。
在一实施例中,所述第二确定单元1402基于所述第二关系,根据所述第一电压确定所述第一关系,配置为:
确定第三差值;所述第三差值表征所述第一电压与所述第三电压之间的差值;
根据所述第三差值,更新所述第二关系内所有电量中的全部或部分电量对应的电压,得到所述第一关系;其中,
所述部分电量包括第一电量。
实际应用时,第一确定单元1401、第二确定单元1402可由显示电量的确定装置中的处理器来实现。当然,处理器需要运行存储器中存储的程序来实现上述各程序模块的功能。
需要说明的是,上述图14实施例提供的显示电量的确定装置在进行显示电量的确定时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的显示电量的确定装置与显示电量的确定方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
上述图13、图14实施例提供的显示电量的确定装置,其中的第一关系和第二关系可以以关系表的形式存在,即对应第一关系表和第二关系表,也可以以关系式的形式存在,即对应第一关系式和第二关系式,从而可以通过查表的方式确定第一引脚的电压与显示电量的对应关系,也可以以计算的方式根据测得的第一引脚的电压计算出对应的显示电量。
基于上述程序模块的硬件实现,且为了实现本申请实施例的方法,本申请实施例还提供了一种电子设备,图15为本申请实施例电子设备的硬件组成结构示意图,如图15所示,电子设备包括:
通信接口1,能够与其它设备比如网络设备等进行信息交互;
处理器2,与通信接口1连接,以实现与其它设备进行信息交互,配置为运行计算机程序时,执行上述一个或多个技术方案提供的显示电量的确定方法。而所述计算机程 序存储在存储器3上。
当然,实际应用时,电子设备中的各个组件通过总线系统4耦合在一起。可理解,总线系统4配置为实现这些组件之间的连接通信。总线系统4除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图15中将各种总线都标为总线系统4。
本申请实施例中的存储器3配置为存储各种类型的数据以支持电子设备的操作。这些数据的示例包括:配置为在电子设备上操作的任何计算机程序。可以理解,存储器3可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random Access Memory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,Synchronous Dynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus RandomAccess Memory)。本申请实施例描述的存储器3旨在包括但不限于这些和任意其它适合类型的存储器。
上述本申请实施例揭示的方法可以应用于处理器2中,或者由处理器2实现。处理器2可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器2中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器2可以是通用处理器、DSP,或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器2可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器3,处理器2读取存储器3中的程序,结合其硬件完成前述方法的步骤。
处理器2执行所述程序时实现本申请实施例的各个方法中的相应流程,为了简洁,在此不再赘述。
在本申请实施例中所述电子设备包括无线耳机,无线耳机可以为如图12所示的TWS耳机,TWS耳机中的每只TWS耳机均能通过本申请实施例的各个方法显示电量。
在示例性实施例中,本申请实施例还提供了一种存储介质,即计算机存储介质,具体为计算机可读存储介质,例如包括存储计算机程序的存储器3,上述计算机程序可由处理器2执行,以完成前述方法所述步骤。计算机可读存储介质可以是FRAM、ROM、PROM、EPROM、EEPROM、Flash Memory、磁表面存储器、光盘、或CD-ROM等存储器。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置、终端和方法,可以通过其它的方式实现。以上所描述的设备实施例仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。
另外,在本申请各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
或者,本申请上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台终端(可以是个人计算机、服务器、或者网络设备等)执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
需要说明的是:“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
另外,本申请实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (20)

  1. 一种显示电量的确定方法,包括:
    基于充电芯片的第一引脚确定第一电压;所述第一电压表征电池处于满电状态时所述第一引脚的电压;所述第一引脚为所述充电芯片的电池引脚;
    根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系;
    基于所述第一关系,根据所述第一引脚的电压确定电池的显示电量。
  2. 根据权利要求1所述的显示电量的确定方法,其中,所述根据所述第一电压确定第一关系时,所述方法包括:
    确定第一差值;所述第一差值表征所述第一电压与第二电压之间的差值;所述第二电压表征所述电池维持电子设备正常工作时所需的最小电量对应的所述第一引脚的电压;
    确定第二差值;所述第二差值表征所述第一引脚的电压与所述第二电压的差值;
    根据第一差值与所述第二差值的比例关系,确定所述第一关系中所述第一引脚的电压与电量的对应关系。
  3. 根据权利要求1所述的显示电量的确定方法,其中,所述根据所述第一电压确定第一关系,包括:
    确定设定的第二关系;所述第二关系中第一电量对应的电压为第三电压;所述第一电量表征所述电池的满电电量;所述第三电压表征所述充电芯片标定的充电截止电压;
    基于所述第二关系,根据所述第一电压确定所述第一关系。
  4. 根据权利要求3所述的显示电量的确定方法,其中,所述基于所述第二关系,根据所述第一电压确定所述第一关系,包括:
    将所述第二关系中第一电量对应的电压更新为所述第一电压,得到所述第一关系。
  5. 根据权利要求3所述的显示电量的确定方法,其中,所述基于所述第二关系,根据所述第一电压确定所述第一关系,包括:
    确定第三差值;所述第三差值表征所述第一电压与所述第三电压之间的差值;
    根据所述第三差值,更新所述第二关系内所有电量中的全部或部分电量对应的电压,得到所述第一关系;其中,
    所述部分电量包括第一电量。
  6. 根据权利要求1所述的显示电量的确定方法,其中,所述基于充电芯片的第一引脚确定第一电压,包括:
    在所述充电芯片的第二引脚表征所述电池处于完全充电状态时,检测所述第一引脚的电压,并将检测结果确定为所述第一电压;其中,
    所述第二引脚表征所述电池的充电状态;
    所述根据所述第一电压确定第一关系,包括:在所述第一电压与所述充电芯片标定的充电截止电压不相同的情况下,根据所述第一电压确定所述第一关系。
  7. 根据权利要求1所述的显示电量的确定方法,其中,所述基于充电芯片的第一引脚确定第一电压,包括:
    在所述电池的充电过程中,检测所述第一引脚的电压,得到检测结果;
    在所述检测结果表征所述第一引脚处于恒压状态的情况下,将所述恒压状态对应的电压确定为所述第一电压。
  8. 一种显示电量的确定方法,包括:
    在充电芯片的充电功能使能的情况下,对所述充电芯片上电,并采集所述充电芯片的第一引脚外部的第一电压;在采集所述第一电压时,所述第一引脚外部开路;所述第一引脚为所述充电芯片的电池引脚;
    根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系,以使电子设备根据所述第一引脚的电压确定电池的显示电量。
  9. 根据权利要求8所述的显示电量的确定方法,其中,所述根据所述第一电压值确定第一关系时,所述方法包括:
    确定第一差值;所述第一差值表征所述第一电压与第二电压之间的差值;所述第二电压表征所述电池维持电子设备正常工作时所需的最小电量对应的所述第一引脚的电压;
    确定第二差值;所述第二差值表征所述第一引脚的电压与所述第二电压的差值;
    根据第一差值与所述第二差值的比例关系,确定所述第一关系中所述第一引脚的电压与电量的对应关系。
  10. 根据权利要求8所述的显示电量的确定方法,其中,所述根据所述第一电压确定第一关系,包括:
    确定设定的第二关系;所述第二关系中第一电量对应的电压为第三电压;所述第一电量表征所述电池的满电电量;所述第三电压表征所述充电芯片标定的充电截止电压;
    基于所述第二关系,根据所述第一电压确定所述第一关系。
  11. 根据权利要求10所述的显示电量的确定方法,其中,所述基于所述第二关系,根据所述第一电压确定所述第一关系,包括:
    将所述第二关系中第一电量对应的电压更新为所述第一电压,得到所述第一关系。
  12. 根据权利要求10所述的显示电量的确定方法,其中,所述基于所述第二关系,根据所述第一电压确定所述第一关系,包括:
    确定第三差值;所述第三差值表征所述第一电压与所述第三电压之间的差值;
    根据所述第三差值,更新所述第二关系内所有电量中的全部或部分电量对应的电压,得到所述第一关系;其中,
    所述部分电量包括第一电量。
  13. 一种显示电量的确定装置,包括:
    第一确定单元,配置为基于充电芯片的第一引脚确定第一电压;所述第一电压表征电池处于满电状态时所述第一引脚的电压;所述第一引脚为所述充电芯片的电池引脚;
    第二确定单元,配置为根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系;
    第三确定单元,配置为基于所述第一关系,根据所述第一引脚的电压确定电池的显示电量。
  14. 一种显示电量的确定装置,包括:
    第一确定单元,配置为在充电芯片的充电功能使能的情况下,对所述充电芯片上电,并采集所述充电芯片的第一引脚外部的第一电压;在采集所述第一电压时,所述第一引脚外部开路;所述第一引脚为所述充电芯片的电池引脚;
    第二确定单元,配置为根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系,以使电子设备根据所述第一引脚的电压确定电池的显示电量。
  15. 一种电子设备,包括:处理器和配置为存储能够在处理器上运行的计算机程序的存储器,
    其中,所述处理器配置为运行所述计算机程序时,执行以下步骤:
    基于充电芯片的第一引脚确定第一电压;所述第一电压表征电池处于满电状态时所述第一引脚的电压;所述第一引脚为所述充电芯片的电池引脚;
    根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系;
    基于所述第一关系,根据所述第一引脚的电压确定电池的显示电量。
  16. 根据权利要求15所述的一种电子设备,其中,所述电子设备包括无线耳机。
  17. 一种电子设备,包括:处理器和配置为存储能够在处理器上运行的计算机程序的存储器,
    其中,所述处理器配置为运行所述计算机程序时,执行以下步骤:
    在充电芯片的充电功能使能的情况下,对所述充电芯片上电,并采集所述充电芯片的第一引脚外部的第一电压;在采集所述第一电压时,所述第一引脚外部开路;所述第一引脚为所述充电芯片的电池引脚;
    根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系,以使电子设备根据所述第一引脚的电压确定电池的显示电量。
  18. 根据权利要求17所述的一种电子设备,其中,所述电子设备包括无线耳机。
  19. 一种存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:
    基于充电芯片的第一引脚确定第一电压;所述第一电压表征电池处于满电状态时所述第一引脚的电压;所述第一引脚为所述充电芯片的电池引脚;
    根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系;
    基于所述第一关系,根据所述第一引脚的电压确定电池的显示电量。
  20. 一种存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:
    在充电芯片的充电功能使能的情况下,对所述充电芯片上电,并采集所述充电芯片的第一引脚外部的第一电压;在采集所述第一电压时,所述第一引脚外部开路;所述第一引脚为所述充电芯片的电池引脚;
    根据所述第一电压确定第一关系;所述第一关系表征所述第一引脚的电压与所述电池的电量的对应关系,以使电子设备根据所述第一引脚的电压确定电池的显示电量。
PCT/CN2021/096046 2020-05-26 2021-05-26 显示电量的确定方法、装置、电子设备及存储介质 WO2021238981A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/992,539 US20230078697A1 (en) 2020-05-26 2022-11-22 Method and apparatus for determining display power, electronic device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010454412.8A CN113725934A (zh) 2020-05-26 2020-05-26 显示电量的确定方法、装置、电子设备及存储介质
CN202010454412.8 2020-05-26

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/992,539 Continuation US20230078697A1 (en) 2020-05-26 2022-11-22 Method and apparatus for determining display power, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021238981A1 true WO2021238981A1 (zh) 2021-12-02

Family

ID=78671997

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/096046 WO2021238981A1 (zh) 2020-05-26 2021-05-26 显示电量的确定方法、装置、电子设备及存储介质

Country Status (3)

Country Link
US (1) US20230078697A1 (zh)
CN (1) CN113725934A (zh)
WO (1) WO2021238981A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116430255B (zh) * 2023-03-27 2024-02-09 广州通则康威科技股份有限公司 一种电池电量自适应显示方法、装置、存储介质以及系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011053088A (ja) * 2009-09-02 2011-03-17 Sanyo Electric Co Ltd 二次電池の残容量演算方法および二次電池装置
CN103035968A (zh) * 2012-12-14 2013-04-10 广东欧珀移动通信有限公司 一种移动终端充电方法及系统
CN103235264A (zh) * 2012-11-09 2013-08-07 湖南工业大学 一种电池剩余容量测量方法及装置
CN103884993A (zh) * 2014-03-03 2014-06-25 中国东方电气集团有限公司 锂离子电池在充电过程中的soc在线检测与修正方法
CN106483462A (zh) * 2015-08-28 2017-03-08 炬芯(珠海)科技有限公司 一种电池充电电量的测量方法和装置
CN106814317A (zh) * 2015-11-27 2017-06-09 西安中兴新软件有限责任公司 一种移动终端和基于充电习惯的移动终端电量显示方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111142032B (zh) * 2019-12-31 2021-12-07 深圳移航通信技术有限公司 电池电量的确定方法、装置、设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011053088A (ja) * 2009-09-02 2011-03-17 Sanyo Electric Co Ltd 二次電池の残容量演算方法および二次電池装置
CN103235264A (zh) * 2012-11-09 2013-08-07 湖南工业大学 一种电池剩余容量测量方法及装置
CN103035968A (zh) * 2012-12-14 2013-04-10 广东欧珀移动通信有限公司 一种移动终端充电方法及系统
CN103884993A (zh) * 2014-03-03 2014-06-25 中国东方电气集团有限公司 锂离子电池在充电过程中的soc在线检测与修正方法
CN106483462A (zh) * 2015-08-28 2017-03-08 炬芯(珠海)科技有限公司 一种电池充电电量的测量方法和装置
CN106814317A (zh) * 2015-11-27 2017-06-09 西安中兴新软件有限责任公司 一种移动终端和基于充电习惯的移动终端电量显示方法

Also Published As

Publication number Publication date
CN113725934A (zh) 2021-11-30
US20230078697A1 (en) 2023-03-16

Similar Documents

Publication Publication Date Title
US11056905B2 (en) Battery charging management method and terminal
EP2851700B1 (en) Method and terminal for displaying capacity of battery
KR102537607B1 (ko) 배터리의 퇴화도를 결정하기 위한 장치, 방법 및 배터리 팩
KR20060043670A (ko) 배터리 장치 및 배터리 장치의 방전 제어 방법
JP2001309568A (ja) 充電システム、充電制御装置、充電制御方法及びコンピュータ
US9236754B2 (en) Battery module
KR20160081993A (ko) 휴대용 전자 디바이스 내의 배터리 모니터링
WO2021238981A1 (zh) 显示电量的确定方法、装置、电子设备及存储介质
CN111562505B (zh) 一种电池识别方法及电子设备、存储介质
CN111555389A (zh) 电池电量的计算方法、装置、设备及计算机可读存储介质
CN105006871A (zh) 一种用于模拟真实电池充电过程的方法及装置
CN116184235B (zh) 电池自放电性能的检测方法和装置
KR20200123658A (ko) 배터리의 미분 전압 커브를 결정하기 위한 장치 및 방법과, 상기 장치를 포함하는 배터리 팩
KR102547282B1 (ko) 배터리 충방전 시간에 기반하여 충전을 제어하는 장치 및 방법
JP2011238570A (ja) バッテリパック、電子機器及びバッテリパックの検査方法
KR102561395B1 (ko) 배터리 셀의 전압을 측정하기 위한 경로를 선택하는 배터리 팩 및 전자 장치
US10908221B2 (en) Battery power estimating method and electronic device
CN112531822B (zh) 一种电池均衡方法和装置
JP2018119839A (ja) 蓄電制御装置、サーバ、蓄電制御方法及びプログラム
JP5601214B2 (ja) 電池容量補正装置及び電池容量補正方法
US11973360B2 (en) Battery protection charging method and system thereof
CN213398860U (zh) 一种电池充电的模拟系统及测试系统
JP2001095159A (ja) 2次電池ユニット及び2次電池ユニットにおける電気容量の測定方法
WO2018068329A1 (zh) 一种电量值计算方法、电子设备及存储介质
KR20190069894A (ko) 이차 전지 셀의 soc 재조정 장치 및 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21813732

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21813732

Country of ref document: EP

Kind code of ref document: A1