[go: up one dir, main page]

CN114076898B - Earphone battery electric quantity detection method, device, equipment and storage medium - Google Patents

Earphone battery electric quantity detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN114076898B
CN114076898B CN202111332401.3A CN202111332401A CN114076898B CN 114076898 B CN114076898 B CN 114076898B CN 202111332401 A CN202111332401 A CN 202111332401A CN 114076898 B CN114076898 B CN 114076898B
Authority
CN
China
Prior art keywords
battery
charging
earphone
battery capacity
capacity value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111332401.3A
Other languages
Chinese (zh)
Other versions
CN114076898A (en
Inventor
何桂晓
曹磊
郭世文
杨卉
师瑞文
吴海全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Grandsun Electronics Co Ltd
Original Assignee
Shenzhen Grandsun Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Grandsun Electronics Co Ltd filed Critical Shenzhen Grandsun Electronics Co Ltd
Priority to CN202111332401.3A priority Critical patent/CN114076898B/en
Publication of CN114076898A publication Critical patent/CN114076898A/en
Application granted granted Critical
Publication of CN114076898B publication Critical patent/CN114076898B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)
  • Secondary Cells (AREA)

Abstract

The embodiment of the application provides a method, a device, equipment and a storage medium for detecting the electric quantity of a battery of an earphone, and relates to the technical field of earphones, wherein the method comprises the following steps: acquiring a charging start time and a starting battery voltage value of the earphone battery for starting charging, acquiring a charging end time and a terminating battery voltage value of the earphone battery for terminating charging, acquiring a first battery capacity value according to the starting battery voltage value, acquiring a second battery capacity value according to the terminating battery voltage value, acquiring a third battery capacity value according to the first battery capacity value, the charging start time and the charging end time in a preset electric quantity charging time relation table, and acquiring the current battery electric quantity of the earphone according to the second battery capacity value and the third battery capacity value. According to the embodiment, the battery voltage value obtained in the whole charging process is related by utilizing the preset electric quantity voltage relation table and the preset electric quantity charging time relation table, so that the detection accuracy of the battery electric quantity of the wireless earphone can be effectively improved, and the use experience of the wireless earphone is improved.

Description

Earphone battery electric quantity detection method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of earphones, in particular to an earphone battery electric quantity detection method, device and equipment and a storage medium.
Background
With the continuous improvement of the living standard of people and the daily and monthly variation of technological development, the entertainment lives of people are more and more abundant, and the earphone is more and more widely applied to audio and video entertainment activities. The earphone is divided into a wireless earphone and a wired earphone, the wired earphone is generally passive, charging is not needed, the wireless earphone is connected with the playing device through a connecting wire, and the wireless earphone is provided with a battery, so that charging equipment matched with the wireless earphone is needed to charge the wireless earphone. Common wireless headphones include bluetooth headphones, which, as the name implies, are audio devices that utilize bluetooth transmission technology to communicate, where a user receives voice signals (e.g., answer a call, listen to music, etc.) within a bluetooth wireless transmission range (e.g., 10 meters), and when the battery level of the headphone is low, the bluetooth headphones display or prompt the user to charge through sound. However, in the related art, when the wireless earphone detects the battery power, the corresponding relation between the voltage and the battery capacity is mostly adopted, and the current battery power is deduced by detecting the current voltage value of the earphone battery.
Disclosure of Invention
The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
The embodiment of the application provides a method, a device, equipment and a storage medium for detecting the battery power of an earphone, which can effectively improve the detection accuracy of the battery power of a wireless earphone and improve the use experience of the wireless earphone.
In a first aspect, an embodiment of the present application provides a method for detecting an electric quantity of a battery of an earphone, including:
acquiring charging starting time and starting battery voltage value of the earphone battery to start charging;
acquiring the charging termination time and the battery voltage value of the earphone battery for terminating charging;
acquiring a first battery capacity value according to the initial battery voltage value in a preset electric quantity voltage relation table;
acquiring a second battery capacity value according to the termination battery voltage value in a preset electric quantity voltage relation table;
acquiring a third battery capacity value according to the first battery capacity value, the charging start time and the charging end time in a preset electric quantity charging time relation table;
and obtaining the current battery electric quantity of the earphone according to the second battery capacity value and the third battery capacity value.
In an optional implementation manner, the obtaining, in the preset electric quantity charging time relationship table, a third battery capacity value according to the first battery capacity value, the charging start time and the charging end time includes:
calculating a charging time according to the charging start time and the charging end time;
acquiring a first charging time according to the first battery capacity value in a preset electric quantity charging time relation table;
obtaining a second charging time according to the charging time and the first charging time;
and acquiring the third battery capacity value according to the second charging time in a preset electric quantity charging time relation table.
In an optional implementation manner, the obtaining the second charging time according to the charging time and the first charging time includes:
and summing the charging time and the first charging time to obtain the second charging time.
In an optional implementation manner, the obtaining the current battery power of the earphone according to the second battery capacity value and the third battery capacity value includes:
comparing the second battery capacity value with the third battery capacity value;
and selecting a smaller value as the current battery level of the earphone.
In an optional implementation manner, before the obtaining the first battery capacity value according to the initial battery voltage value in the preset electric quantity voltage relation table, the method further includes:
acquiring the working average current of the earphone;
discharging the earphone battery according to the working average current;
recording a first relation curve between the change of the battery capacity and the change of the voltage of the earphone battery in the discharging operation process;
and quantifying the first relation curve to obtain the preset electric quantity voltage relation table.
In an alternative implementation manner, the obtaining the working average current of the earphone includes:
selecting test audio;
playing the test audio in a preset test time;
and calculating the average value of the earphone current in the preset test time to be used as the working average current of the earphone.
In an optional implementation manner, before the obtaining the third battery capacity value according to the first battery capacity value in the preset electric quantity charging time relation table, the method further includes:
charging the earphone battery;
recording a second relation curve between battery power change and charging time change in the middle battery during the charging operation process;
and quantifying the second relation curve to obtain the preset electric quantity charging time relation table.
In a second aspect, an embodiment of the present application provides an apparatus for detecting a battery power of an earphone, including:
the initial charge control module is used for acquiring charge initial time and initial battery voltage value of the earphone battery;
the charging termination control module is used for acquiring the charging termination time and the battery voltage value of the earphone battery for terminating charging;
the first battery capacity value acquisition module is used for acquiring a first battery capacity value according to the initial battery voltage value in a preset electric quantity voltage relation table;
the second battery capacity value acquisition module is used for acquiring a second battery capacity value according to the termination battery voltage value in a preset electric quantity voltage relation table;
the third battery capacity value obtaining module is used for obtaining a third battery capacity value according to the first battery capacity value, the charging start time and the charging end time in a preset electric quantity charging time relation table;
and the current battery capacity acquisition module is used for acquiring the current battery capacity of the earphone according to the second battery capacity value and the third battery capacity value.
In a third aspect, an electronic device includes a processor and a memory;
the memory is used for storing programs;
the processor is configured to execute the earphone battery power detection method according to any one of the first aspects according to the program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for performing the method for detecting a headset battery level according to any one of the first aspects.
Compared with the related art, the method for detecting the electric quantity of the earphone battery provided by the first aspect of the embodiment of the application acquires the charging start time and the initial battery voltage value of the earphone battery for starting charging, acquires the charging end time and the terminating battery voltage value of the earphone battery for terminating charging, acquires the first battery capacity value according to the initial battery voltage value in a preset electric quantity voltage relation table, acquires the second battery capacity value according to the terminating battery voltage value in the preset electric quantity voltage relation table, acquires the third battery capacity value according to the first battery capacity value, the charging start time and the charging end time in a preset electric quantity charging time relation table, and acquires the current battery electric quantity of the earphone according to the second battery capacity value and the third battery capacity value. According to the method, the corresponding relation between the voltage and the battery capacity is avoided, the battery voltage value obtained in the whole charging process is related by utilizing the preset electric quantity voltage relation table and the preset electric quantity charging time relation table, the current battery electric quantity of the earphone is finally obtained, the detection accuracy of the battery electric quantity of the wireless earphone can be effectively improved, and the use experience of the wireless earphone is improved.
It is to be understood that the advantages of the second to fourth aspects compared with the related art are the same as those of the first aspect compared with the related art, and reference may be made to the related description in the first aspect, which is not repeated herein.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the related technical descriptions will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an exemplary wireless headset architecture provided by one embodiment of the present application;
fig. 2 is a flowchart of a method for detecting battery power of an earphone according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for detecting battery power of an earphone according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for detecting battery power of an earphone according to an embodiment of the present application;
FIG. 5 is a flowchart of a method for detecting battery power of an earphone according to an embodiment of the present application;
FIG. 6 is a flowchart of a method for detecting battery power of an earphone according to an embodiment of the present application;
fig. 7 is a block diagram of a device for detecting battery power of an earphone according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that embodiments of the application may be practiced in other embodiments, which depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the embodiments of the present application with unnecessary detail.
It should be noted that although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different from that in the flowchart. The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
It should also be appreciated that references to "one embodiment" or "some embodiments" or the like described in the specification of an embodiment of the present application mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
With the continuous improvement of the living standard of people and the daily and monthly variation of technological development, the entertainment lives of people are more and more abundant, and the earphone is more and more widely applied to audio and video entertainment activities. The earphone is divided into a wireless earphone and a wired earphone, the wired earphone is generally passive, charging is not needed, the wireless earphone is connected with the playing device through a connecting wire, and the wireless earphone is provided with a battery, so that charging equipment matched with the wireless earphone is needed to charge the wireless earphone. Common wireless headphones include bluetooth headphones, which, as the name implies, are audio devices that utilize bluetooth transmission technology to communicate, where a user receives voice signals (e.g., answer a call, listen to music, etc.) within a bluetooth wireless transmission range (e.g., 10 meters), and when the battery level of the headphone is low, the bluetooth headphones display or prompt the user to charge through sound.
However, in the related art, when the bluetooth headset detects the battery power, the corresponding relation between the voltage and the battery capacity is mostly adopted, and the current battery power is deduced by detecting the current voltage value of the headset battery, so that the mode of judging the power according to the voltage is rough. Especially when the earphone just charges under the condition of ending, when the state of charge, detect that there is the virtual high phenomenon in earphone battery's voltage, stop when charging, also can appear the virtual high phenomenon in voltage in certain time, if at this moment directly adopt the relation between battery voltage and the electric quantity to carry out earphone battery electric quantity detection, the difference between the battery electric quantity value that this kind of mode judgement obtained and the battery electric quantity true value is great.
Therefore, compared with the related art, the embodiment of the application provides a method for detecting the battery capacity of an earphone, which is characterized in that the charging start time and the starting battery voltage value of the earphone battery for starting charging are obtained, the charging end time and the ending battery voltage value of the earphone battery for ending charging are obtained, the first battery capacity value is obtained according to the starting battery voltage value in a preset electric quantity voltage relation table, the second battery capacity value is obtained according to the ending battery voltage value in the preset electric quantity voltage relation table, the third battery capacity value is obtained according to the first battery capacity value, the charging start time and the charging end time in a preset electric quantity charging time relation table, and the current battery capacity of the earphone is obtained according to the second battery capacity value and the third battery capacity value. According to the method, the corresponding relation between the voltage and the battery capacity is avoided, the battery voltage value obtained in the whole charging process is related by utilizing the preset electric quantity voltage relation table and the preset electric quantity charging time relation table, the current battery electric quantity of the earphone is finally obtained, the detection accuracy of the battery electric quantity of the wireless earphone can be effectively improved, and the use experience of the wireless earphone is improved.
Embodiments of the present application will be further described below with reference to the accompanying drawings.
The embodiment of the application can be applied to wireless headphones, such as a common Bluetooth headphone. Fig. 1 shows a schematic diagram of an exemplary wireless headset architecture to which the technical solution of the embodiments of the application may be applied.
As shown in fig. 1, the wireless headset architecture 100 may include: the wireless earphone 110 and the power supply 120, wherein the power supply 120 is used for providing a charging voltage for the wireless earphone 110, the power supply 120 can be implemented by adopting a direct current power supply, the voltage value of the power supply 120 can be 12v,24v, and the power supply can be specifically set according to the type of the wireless earphone 110, and the method is not limited herein.
The wireless headset 110 may be a bluetooth headset, and the wireless headset 110 includes at least: the earphone battery 101, the control unit 102 and the memory 103, the earphone battery 101 may be a lithium battery, which is connected with the control unit 102 and the power supply 120, and stores electric energy according to a charging signal sent by the control unit 102 and the power supply 120 through a charging link, so that the wireless earphone 110 can work normally. The control unit 102 may be implemented by a microprocessor such as a single-chip microcomputer, a DSP, and an FPGA, and those skilled in the art can implement charge or discharge control of the earphone battery 101 by integrating some hardware circuits and software programs or algorithms in the control unit 102. The memory 103 is connected to the control unit 102 for storing a control program associated with the control unit 102.
Wireless headset 110 may also include: the wireless transmission unit 104 is connected to the control unit 102, for example, a bluetooth transmission unit, for communicating with the terminal device by using a bluetooth transmission technology, and receives the voice signal transmitted by the terminal device within a bluetooth wireless transmission range (for example, 10 meters).
In one embodiment of the present application, the control unit 102 detects the current battery power of the earphone battery 101 according to the power request information by using a related program stored in the memory 103, obtains the charge termination time and the termination battery voltage value for terminating the charge of the earphone battery by obtaining the charge start time and the start battery voltage value for starting the charge of the earphone battery, obtains the first battery capacity value according to the start battery voltage value in a preset power voltage relationship table, obtains the second battery capacity value according to the termination battery voltage value in a preset power voltage relationship table, obtains the third battery capacity value according to the first battery capacity value, the charge start time and the charge termination time in a preset power charge time relationship table, and obtains the current battery power of the earphone according to the second battery capacity value and the third battery capacity value. The corresponding relation between the voltage and the battery capacity is avoided, the battery voltage value obtained in the whole charging process is related by utilizing the preset electric quantity voltage relation table and the preset electric quantity charging time relation table, the current battery electric quantity of the earphone is finally obtained, the detection accuracy of the battery electric quantity of the wireless earphone can be effectively improved, and the use experience of the wireless earphone is improved.
It should be noted that, the method for detecting the battery power of the earphone according to the embodiment of the present application is generally executed by the control unit 102, and accordingly, the device for detecting the battery power of the earphone is generally disposed in the control unit 102.
The wireless earphone architecture and the application scenario described in the embodiments of the present application are for more clearly describing the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided by the embodiments of the present application, and those skilled in the art can know that, with the evolution of the wireless earphone architecture and the appearance of the new application scenario, the technical solution provided by the embodiments of the present application is also applicable to similar technical problems. It will be appreciated by those skilled in the art that the wireless headset architecture shown in fig. 1 is not limiting on the embodiments of the application, and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
Based on the above wireless earphone architecture, various embodiments of the earphone battery power detection method according to the embodiments of the present application are provided.
As shown in fig. 2, fig. 2 is a flowchart of a method for detecting battery power of an earphone according to an embodiment of the present application, including but not limited to step S110 and step S160.
Step S110, a charging start time and a starting battery voltage value for starting charging the earphone battery are obtained.
Step S120, a charging termination time and a termination battery voltage value for terminating the charging of the earphone battery are obtained.
In an embodiment, when the battery power of the earphone needs to be measured, for example, whether the battery of the earphone is fully charged after the charging process needs to be judged, the charging start time and the starting battery voltage value of the battery of the earphone starting to charge and the charging end time and the ending battery voltage value of the battery of the earphone ending to charge are obtained in the whole process from the beginning of the charging of the battery of the earphone to the completion of the charging, and are used for the subsequent battery power estimation.
Step S130, a first battery capacity value is obtained according to the initial battery voltage value in a preset electric quantity voltage relation table.
Step S140, obtaining a second battery capacity value according to the terminated battery voltage value in the preset battery voltage relation table.
In one embodiment, referring to fig. 3, obtaining the preset charge-voltage relationship table includes, but is not limited to, the following steps:
step S310, obtaining the working average current of the earphone.
In an embodiment, the working average current of the earphone may be a statistical value, that is, the working average current is obtained by performing statistical averaging on the working current for a period of time, for example, the working average current is obtained by calculating through the steps in the following embodiments:
step S311, selecting test audio.
In one embodiment, a plurality of different types of audio may be selected as test audio, and a related test audio database may be established, from which one or more related test audio may be selected as desired.
Step S312, play the test audio within the preset test time.
In an embodiment, in order to obtain the working average current of the earphone through statistics, after the test audio is selected, playing the selected test audio within a preset test time, and if more than one test audio exists, storing playing process data of each test audio. The preset test time may be selected according to actual requirements, for example, may be 0.5h or 1h, which is not limited herein.
In step S313, an average value of the earphone current in the preset test time is calculated as the working average current of the earphone.
In an embodiment, a change value of earphone current is obtained from playing process data of playing test audio in a preset test time, sampling quantization is performed on the earphone current data, and average is performed to obtain working average current of the earphone. For example, the change value of the earphone current is sampled in units of seconds, and the average value is obtained. It will be appreciated that if more than one test audio is selected, the corresponding earphone working average currents are calculated according to the method of the embodiment, and the obtained working average currents are averaged again to be used as the working average currents for detecting the battery power of the earphone.
Step S320, discharging the earphone battery according to the working average current.
In an embodiment, the working average current obtained by statistics in step S310 is used to perform a discharging operation on the earphone battery, which can avoid errors caused by fluctuation of the working current due to various factors.
Step S330, record the first relation between the battery power change and the voltage change of the earphone during the discharging operation.
In an embodiment, the change of the battery power and the change of the voltage of the earphone are recorded during the whole discharging operation from the beginning of discharging to the end of discharging, so as to obtain a first relation curve about the change of the battery power and the change of the voltage of the earphone.
Step S340, quantifying the first relation curve to obtain a preset electric quantity voltage relation table.
In an embodiment, the obtained first relation curve is sampled and quantized according to the required quantization precision, for example, the voltage of the first relation curve is sampled with 0.01V as the quantization precision, the corresponding earphone battery electric quantity is obtained, the quantization relation between the first relation curve and the second relation curve is expressed in a form of a preset electric quantity voltage relation table, and the relation between the earphone battery electric quantity and the voltage change obtained in the mode is closest to real measurement data.
In one embodiment, the preset electric quantity voltage relation table may be represented as [ V1-C1, V2-C2, …, vn-Cn ], where the voltage is represented by V, the battery electric quantity is represented by C, and the electric quantity of the battery is measured by directly looking up a table in the subsequent process, so as to improve the efficiency of detecting the electric quantity of the battery.
After the preset electric quantity voltage relation table is obtained in the above embodiment, the first battery capacity value is obtained by looking up a table according to the initial battery voltage value, or the second battery capacity value is obtained by looking up a table according to the final battery voltage value.
In addition, it can be understood that the corresponding first battery capacity value is obtained in the preset electric quantity voltage relation table according to the initial battery voltage value, or the corresponding second battery capacity value is obtained in the preset electric quantity voltage relation table according to the final battery voltage value, and if the preset electric quantity voltage relation table does not have a completely consistent corresponding relation, the closest corresponding relation is selected.
For example, in step S130, if a corresponding first battery capacity value is required to be obtained from the preset battery capacity voltage relation table according to the initial battery voltage value, for example, the initial battery voltage value is 0.36V, but the corresponding relation between the battery capacity and the voltage in the preset battery capacity voltage relation table is: 0.3-200mAh and 0.4-300mAh, the first battery capacity value corresponding to the initial battery voltage value is 300mAh according to the closest corresponding relation, which is only shown and not specifically limited.
Step S150, a third battery capacity value is obtained according to the first battery capacity value, the charging start time and the charging end time in a preset electric quantity charging time relation table.
In one embodiment, referring to fig. 4, obtaining the preset charge schedule includes, but is not limited to, the following steps:
in step S410, the earphone battery is charged.
Step S420, recording a second relationship between battery charge change and charge time change in the battery during the charging operation.
In an embodiment, due to the internal characteristics of the lithium battery, the battery voltage is fast flown when the wireless earphone is charged, so that the earphone battery can generate a virtual electricity phenomenon when being charged, namely, the displayed battery electric quantity is very high, the actual battery electric quantity is relatively low, especially when the earphone is just charged, the voltage of the earphone battery is detected to have a virtual high phenomenon when in a charging state, and the voltage virtual high phenomenon can also occur in a certain time when the charging is stopped, so that the difference between the battery electric quantity value and the battery electric quantity true value is larger. Therefore, in this embodiment, in the process of charging the earphone battery from the start of charging to the end of charging (for example, by the battery power not changing steadily for a preset change time as a sign) in a state where the battery power of the earphone battery is 0 or near 0, the change of the battery power of the earphone battery and the change of the charging time are recorded, so as to obtain the second relationship curve between the two.
Step S430, quantifying the second relation curve to obtain a preset electric quantity charging time relation table.
In an embodiment, the obtained second relation curve is sampled and quantized according to the required quantization precision, for example, 1s is used as the quantization precision, the charging time of the second relation curve is sampled to obtain the corresponding battery capacity of the earphone, the quantization relation between the two is represented as a form of a preset electric quantity charging time relation table, and the form of the preset electric quantity charging time relation table is prestored, for example, the preset electric quantity charging time relation table can be represented as [ T1-C1, T2-C2, …, tn-Cn ], wherein the charging time is represented by T, the battery capacity is represented by C, and the battery capacity is directly checked when the battery capacity is measured later, so that the efficiency of detecting the battery capacity is improved.
It can be understood that the obtained first relationship curve or the second relationship curve is sampled and quantized according to a required quantization precision, wherein the quantization precision can also be calculated according to the electric quantity of the earphone battery, for example, the electric quantity of the earphone battery is changed by 1%, and 1% of the total electric quantity of the earphone battery is used as the quantization precision.
In one embodiment, referring to fig. 5, step S150 includes, but is not limited to, the following steps:
step S510, calculating the charging time according to the charging start time and the charging end time.
In one embodiment, the charging time is the difference between the charging end time and the charging start time.
Step S520, a first charging time is obtained according to the first battery capacity value in the preset charge time table.
In an embodiment, the first battery capacity value is checked in a preset electric quantity charging time relation table to obtain the first charging time, and similarly, if the preset electric quantity charging time relation table does not have a completely consistent corresponding relation, the closest corresponding relation is selected.
In step S530, a second charging time is obtained according to the charging time and the first charging time.
In one embodiment, the charging time and the first charging time are summed to obtain a second charging time.
Step S540, a third battery capacity value is obtained according to the second charging time in the preset electric quantity charging time relation table.
In an embodiment, according to the second charging time, a table is checked in a preset electric quantity charging time relation table to obtain a corresponding third battery capacity value, and if the preset electric quantity charging time relation table does not have a completely consistent corresponding relation, the closest corresponding relation is selected.
Step S160, the current battery capacity of the earphone is obtained according to the second battery capacity value and the third battery capacity value.
In one embodiment, referring to fig. 6, step S160 includes, but is not limited to, the following steps:
step S161, comparing the second battery capacity value with the third battery capacity value.
Step S162, selecting the smaller value as the current battery power of the earphone.
In an embodiment, the second battery capacity value and the third battery capacity value are compared, and the smaller one is selected as the current battery capacity of the earphone. And the battery voltage value obtained in the whole charging process is correlated by utilizing the preset electric quantity voltage relation table and the preset electric quantity charging time relation table, so that the current battery electric quantity of the earphone is finally obtained, the detection accuracy of the battery electric quantity of the wireless earphone is effectively improved, and the use experience of the wireless earphone is improved.
In addition, in an embodiment, the flow of detecting the current power of the earphone battery is as follows:
1) And starting to charge the earphone battery until the charging is finished, and recording the whole charging process to obtain a charging starting time T0, a starting battery voltage value V0, a charging finishing time Tt and a finishing battery voltage value Vt.
2) The first battery capacity value C1' is obtained from the initial battery voltage value V0 in a preset battery voltage relation table, wherein the preset battery voltage relation table can be expressed as [ V1-C1, V2-C2, …, vn-Cn ].
3) The second battery capacity value C2' is obtained from the terminating battery voltage value Vt in the preset charge-voltage relationship table.
4) The charging time T is calculated from the charging start time and the charging end time, expressed as: t=tt-T0.
5) The first charging time T1 'is obtained according to the first battery capacity value C1' in a preset charge-level charging time relation table, wherein the preset charge-level charging time relation table can be expressed as [ T1-C1, T2-C2, …, tn-Cn ].
6) The second charging time Tk is obtained by summing the charging time T and the first charging time T1', and is expressed as: tk=t1' +t.
7) Acquiring a third battery capacity value C3 'according to the second charging time Tk in a preset electric quantity charging time relation table'
8) And obtaining the current battery capacity of the earphone according to the second battery capacity value C2 'and the third battery capacity value C3', specifically comparing the sizes of the second battery capacity value C2 'and the third battery capacity value C3', and selecting the smaller one as the current battery capacity of the earphone.
Compared with the related art, the embodiment of the application provides a method for detecting the electric quantity of a battery of an earphone, which comprises the steps of obtaining the charging start time and the initial battery voltage value of the battery of the earphone for starting charging, obtaining the charging end time and the end battery voltage value of the battery of the earphone for stopping charging, obtaining a first battery capacity value according to the initial battery voltage value in a preset electric quantity voltage relation table, obtaining a second battery capacity value according to the end battery voltage value in the preset electric quantity voltage relation table, obtaining a third battery capacity value according to the first battery capacity value, the charging start time and the charging end time in a preset electric quantity charging time relation table, and obtaining the current battery electric quantity of the earphone according to the second battery capacity value and the third battery capacity value. According to the method, the corresponding relation between the voltage and the battery capacity is avoided, the battery voltage value obtained in the whole charging process is related by utilizing the preset electric quantity voltage relation table and the preset electric quantity charging time relation table, the current battery electric quantity of the earphone is finally obtained, the detection accuracy of the battery electric quantity of the wireless earphone can be effectively improved, and the use experience of the wireless earphone is improved.
In addition, an embodiment of the present application further provides a device for detecting battery power of an earphone, referring to fig. 7, the device includes:
the initial charge control module 710 is configured to obtain a charge initial time and an initial battery voltage value for starting charging of the earphone battery;
a termination charge control module 720, configured to obtain a charge termination time and a termination battery voltage value for terminating charging of the earphone battery;
a first battery capacity value obtaining module 730, configured to obtain a first battery capacity value according to a starting battery voltage value in a preset electric quantity voltage relationship table;
a second battery capacity value obtaining module 740, configured to obtain a second battery capacity value according to the termination battery voltage value in the preset electric quantity voltage relationship table;
a third battery capacity value obtaining module 750, configured to obtain a third battery capacity value according to the first battery capacity value, the charging start time and the charging end time in a preset electric quantity charging time relationship table;
the current battery power obtaining module 760 is configured to obtain the current battery power of the earphone according to the second battery capacity value and the third battery capacity value.
The above described apparatus embodiments are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
It should be noted that, the earphone battery power detection device in the present embodiment may perform the earphone battery power detection method in the embodiment shown in fig. 2. That is, the earphone battery power detection device in the present embodiment and the earphone battery power detection method in the embodiment shown in fig. 2 are both of the same inventive concept, so that these embodiments have the same implementation principle and technical effect, and will not be described in detail herein.
In addition, an embodiment of the present application further provides an electronic device, which may be a wireless earphone, including: memory, a processor, and a computer program stored on the memory and executable on the processor.
The processor and the memory may be connected by a bus or other means.
The memory, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The non-transitory software program and instructions required to implement the earphone battery level detection method of the above-described embodiments are stored in the memory, and when executed by the processor, the earphone battery level detection method of the above-described embodiments is performed, for example, the method steps S110 to S130 in fig. 2, the method steps S311 to S313 in fig. 3, the method steps S510 to S540 in fig. 5, and the like described above are performed.
Furthermore, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions that are executed by a processor or a controller, for example, by one of the processors in the above-described electronic device embodiment, and that may cause the processor to perform the earphone battery power detection method in the above-described embodiment, for example, to perform the method steps S110 to S130 in fig. 2, the method steps S311 to S313 in fig. 3, the method steps S510 to S540 in fig. 5, and so on described above.
As another example, execution by one processor in the above-described electronic device embodiment may cause the above-described processor to execute the earphone battery power detection method in the above-described embodiment, for example, execute the method steps S110 to S130 in fig. 2, the method steps S311 to S313 in fig. 3, the method steps S510 to S540 in fig. 5, and so on described above.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
While the preferred embodiment of the present application has been described in detail, the embodiment of the present application is not limited to the above-described embodiment, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the embodiment of the present application, and these equivalent modifications or substitutions are included in the scope of the embodiment of the present application as defined in the appended claims.

Claims (5)

1. A method for detecting the battery power of an earphone, comprising:
acquiring charging starting time and starting battery voltage value of the earphone battery to start charging;
acquiring the charging termination time and the battery voltage value of the earphone battery for terminating charging;
acquiring a first battery capacity value according to the initial battery voltage value in a preset electric quantity voltage relation table;
acquiring a second battery capacity value according to the termination battery voltage value in a preset electric quantity voltage relation table;
acquiring a third battery capacity value according to the first battery capacity value, the charging start time and the charging end time in a preset electric quantity charging time relation table;
obtaining the current battery capacity of the earphone according to the second battery capacity value and the third battery capacity value;
the obtaining a third battery capacity value according to the first battery capacity value, the charging start time and the charging end time in a preset electric quantity charging time relation table includes:
calculating a charging time according to the charging start time and the charging end time;
acquiring a first charging time according to the first battery capacity value in a preset electric quantity charging time relation table;
obtaining a second charging time according to the charging time and the first charging time;
acquiring the third battery capacity value according to the second charging time in a preset electric quantity charging time relation table;
the obtaining a second charging time according to the charging time and the first charging time includes:
summing the charging time and the first charging time to obtain the second charging time;
before the first battery capacity value is obtained according to the initial battery voltage value in the preset electric quantity voltage relation table, the method further comprises the following steps:
acquiring the working average current of the earphone;
discharging the earphone battery according to the working average current;
recording a first relation curve between the change of the battery capacity and the change of the voltage of the earphone battery in the discharging operation process;
quantifying the first relation curve to obtain the preset electric quantity voltage relation table;
the obtaining the current battery power of the earphone according to the second battery capacity value and the third battery capacity value includes:
comparing the second battery capacity value with the third battery capacity value;
selecting a smaller value as the current battery power of the earphone;
before the third battery capacity value is obtained according to the first battery capacity value in the preset electric quantity charging time relation table, the method further comprises the following steps:
charging the earphone battery;
recording a second relation curve between battery power change and charging time change in the middle battery during the charging operation process;
and quantifying the second relation curve to obtain the preset electric quantity charging time relation table.
2. The method for detecting the battery power of the earphone according to claim 1, wherein the obtaining the working average current of the earphone comprises:
selecting test audio;
playing the test audio in a preset test time;
and calculating the average value of the earphone current in the preset test time to be used as the working average current of the earphone.
3. An earphone battery power detection device, characterized by comprising:
the initial charge control module is used for acquiring charge initial time and initial battery voltage value of the earphone battery;
the charging termination control module is used for acquiring the charging termination time and the battery voltage value of the earphone battery for terminating charging;
the first battery capacity value acquisition module is used for acquiring a first battery capacity value according to the initial battery voltage value in a preset electric quantity voltage relation table;
the second battery capacity value acquisition module is used for acquiring a second battery capacity value according to the termination battery voltage value in a preset electric quantity voltage relation table;
the third battery capacity value obtaining module is used for obtaining a third battery capacity value according to the first battery capacity value, the charging start time and the charging end time in a preset electric quantity charging time relation table;
the current battery capacity acquisition module is used for acquiring the current battery capacity of the earphone according to the second battery capacity value and the third battery capacity value;
the obtaining a third battery capacity value according to the first battery capacity value, the charging start time and the charging end time in a preset electric quantity charging time relation table includes:
calculating a charging time according to the charging start time and the charging end time;
acquiring a first charging time according to the first battery capacity value in a preset electric quantity charging time relation table;
obtaining a second charging time according to the charging time and the first charging time;
acquiring the third battery capacity value according to the second charging time in a preset electric quantity charging time relation table;
the obtaining a second charging time according to the charging time and the first charging time includes:
summing the charging time and the first charging time to obtain the second charging time;
before the first battery capacity value is obtained according to the initial battery voltage value in the preset electric quantity voltage relation table, the method further comprises the following steps:
acquiring the working average current of the earphone;
discharging the earphone battery according to the working average current;
recording a first relation curve between the change of the battery capacity and the change of the voltage of the earphone battery in the discharging operation process;
quantifying the first relation curve to obtain the preset electric quantity voltage relation table;
the obtaining the current battery power of the earphone according to the second battery capacity value and the third battery capacity value includes:
comparing the second battery capacity value with the third battery capacity value;
selecting a smaller value as the current battery power of the earphone;
before the third battery capacity value is obtained according to the first battery capacity value in the preset electric quantity charging time relation table, the method further comprises the following steps:
charging the earphone battery;
recording a second relation curve between battery power change and charging time change in the middle battery during the charging operation process;
and quantifying the second relation curve to obtain the preset electric quantity charging time relation table.
4. An electronic device comprising a processor and a memory;
the memory is used for storing programs;
the processor is configured to execute the earphone battery power detection method according to any one of claims 1 to 2 according to the program.
5. A computer-readable storage medium storing computer-executable instructions for performing the earphone battery level detection method according to any one of claims 1 to 2.
CN202111332401.3A 2021-11-11 2021-11-11 Earphone battery electric quantity detection method, device, equipment and storage medium Active CN114076898B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111332401.3A CN114076898B (en) 2021-11-11 2021-11-11 Earphone battery electric quantity detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111332401.3A CN114076898B (en) 2021-11-11 2021-11-11 Earphone battery electric quantity detection method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114076898A CN114076898A (en) 2022-02-22
CN114076898B true CN114076898B (en) 2023-09-08

Family

ID=80283784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111332401.3A Active CN114076898B (en) 2021-11-11 2021-11-11 Earphone battery electric quantity detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114076898B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0464748A2 (en) * 1990-07-02 1992-01-08 Nippondenso Co., Ltd. Battery condition detecting apparatus and charge control apparatus for automobile
JP2009065347A (en) * 2007-09-05 2009-03-26 Funai Electric Co Ltd Wireless headphone system
CN102478637A (en) * 2010-11-25 2012-05-30 财团法人工业技术研究院 Method for detecting and controlling capacity and power through battery charging and discharging characteristics
CN102830361A (en) * 2012-08-24 2012-12-19 海能达通信股份有限公司 Battery capacity quick detection method and battery capacity quick detection system
CN104297689A (en) * 2014-09-04 2015-01-21 中兴通讯股份有限公司 Method and device for displaying electricity amount of battery and electronic device
CN108020790A (en) * 2017-11-08 2018-05-11 潍坊歌尔电子有限公司 A kind of method and apparatus for detecting electricity after battery charges
JP2018159572A (en) * 2017-03-22 2018-10-11 三菱自動車工業株式会社 Battery state estimation device
CN111555389A (en) * 2020-05-15 2020-08-18 歌尔智能科技有限公司 Method, device and equipment for calculating battery electric quantity and computer readable storage medium
CN111929596A (en) * 2020-07-31 2020-11-13 蜂巢能源科技有限公司 Method and device for acquiring battery capacity, storage medium and electronic equipment
CN112014749A (en) * 2020-09-01 2020-12-01 珠海艾派克微电子有限公司 Method and device for determining battery display electric quantity, chip and storage medium
JP2021016248A (en) * 2019-07-12 2021-02-12 株式会社豊田自動織機 Charging system
CN112865248A (en) * 2021-02-09 2021-05-28 深圳市冠旭电子股份有限公司 Box-entering detection method and device of wireless earphone, charging box and readable storage medium
CN113049974A (en) * 2021-02-02 2021-06-29 欣旺达电动汽车电池有限公司 Battery capacity prediction method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4161854B2 (en) * 2003-09-02 2008-10-08 ソニー株式会社 Battery remaining capacity calculation method, battery remaining capacity calculation device, and battery remaining capacity calculation program

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0464748A2 (en) * 1990-07-02 1992-01-08 Nippondenso Co., Ltd. Battery condition detecting apparatus and charge control apparatus for automobile
JP2009065347A (en) * 2007-09-05 2009-03-26 Funai Electric Co Ltd Wireless headphone system
CN102478637A (en) * 2010-11-25 2012-05-30 财团法人工业技术研究院 Method for detecting and controlling capacity and power through battery charging and discharging characteristics
CN102830361A (en) * 2012-08-24 2012-12-19 海能达通信股份有限公司 Battery capacity quick detection method and battery capacity quick detection system
CN104297689A (en) * 2014-09-04 2015-01-21 中兴通讯股份有限公司 Method and device for displaying electricity amount of battery and electronic device
JP2018159572A (en) * 2017-03-22 2018-10-11 三菱自動車工業株式会社 Battery state estimation device
CN108020790A (en) * 2017-11-08 2018-05-11 潍坊歌尔电子有限公司 A kind of method and apparatus for detecting electricity after battery charges
JP2021016248A (en) * 2019-07-12 2021-02-12 株式会社豊田自動織機 Charging system
CN111555389A (en) * 2020-05-15 2020-08-18 歌尔智能科技有限公司 Method, device and equipment for calculating battery electric quantity and computer readable storage medium
CN111929596A (en) * 2020-07-31 2020-11-13 蜂巢能源科技有限公司 Method and device for acquiring battery capacity, storage medium and electronic equipment
CN112014749A (en) * 2020-09-01 2020-12-01 珠海艾派克微电子有限公司 Method and device for determining battery display electric quantity, chip and storage medium
CN113049974A (en) * 2021-02-02 2021-06-29 欣旺达电动汽车电池有限公司 Battery capacity prediction method, device, equipment and storage medium
CN112865248A (en) * 2021-02-09 2021-05-28 深圳市冠旭电子股份有限公司 Box-entering detection method and device of wireless earphone, charging box and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
锂电池电量检测系统设计;程宇菥;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》(第03期);C042-1832 *

Also Published As

Publication number Publication date
CN114076898A (en) 2022-02-22

Similar Documents

Publication Publication Date Title
CN106655396B (en) Charging control method and device and terminal
WO2021259153A1 (en) Battery test method and apparatus
CN106125009B (en) Battery performance detection method and battery performance detection device
CN104281513B (en) Application power consumption detection method and system
CN107241513B (en) Charging reminding method and device, storage medium and electronic equipment
CN110492190A (en) Battery management method, system and computer readable storage medium
CN103097169A (en) Charging method and charging system
CN112541260A (en) Battery equalization control method and system, storage medium and electronic equipment
CN108810696A (en) A kind of electric quantity reminding method, TWS earphones and earphone charging equipment
CN111555389A (en) Method, device and equipment for calculating battery electric quantity and computer readable storage medium
CN112290620A (en) Charging method and device of wireless earphone, charging box and storage medium
CN110277817A (en) Electricity acquisition methods, device, equipment and the storage medium of a kind of electronic equipment
CN114076898B (en) Earphone battery electric quantity detection method, device, equipment and storage medium
CN110687458A (en) Terminal battery electric quantity determination method and device
CN112566228A (en) Method and system for reducing equipment power consumption in network video conference
CN113580981A (en) Charging detection method, terminal and system
US20160105041A1 (en) Method and system for charging a battery
CN110901472A (en) Battery management system balancing capability matching method and device and computer equipment
CN112887171B (en) Response rate testing method and device of electric energy meter operating system and computer equipment
EP4478067A1 (en) Management method and management system of secondary battery
WO2021031779A1 (en) Charging method, terminal, and computer readable storage medium
CN113125981A (en) Battery standing method and device, electronic equipment and storage medium
CN111934369B (en) Charging method and device, equipment and storage medium
CN104360270A (en) Battery charging curve acquiring device and method of portable electronic equipment
CN116184231A (en) Method and device for detecting CB value of lithium ion battery cell and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant