A method for detecting and displaying the battery level of earphones
By integrating the ADC channel and sliding window mean filtering algorithm in the headset, combined with the voltage-voltage mapping table and multi-protocol transmission, the problem of inaccurate power detection of traditional headsets is solved, and the accurate display and real-time monitoring of the headset power is realized, which improves user experience and device reliability.
Patent Information
- Application Number
- CN202510308409.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-03-17
AI Technical Summary
Traditional headphone power detection methods rely on simple battery voltage estimation, resulting in inaccurate battery power display, making it difficult for users to arrange their use reasonably, affecting the user experience.
The ADC channel is used to collect battery voltage signals in real time, combine the sliding window mean filtering algorithm and voltage-voltage mapping table to dynamically adjust the voltage threshold, and transmit accurate power information to mobile terminals through various Bluetooth protocols, including sliding window mean filtering, deviation comparison and emergency protection procedures.
It realizes the accuracy and real-time performance of headphone power detection, ensures the stability and user experience of power display, and realizes cross-platform compatible display through multiple protocols, improving user convenience and device reliability.
Smart Images

Figure CN119828011B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic devices, and particularly to a method for detecting and displaying the battery power of earphones. Background Art
[0002] Wireless earphones are a type of earphones that connect to audio source devices (such as smartphones, tablets, music players, etc.) wirelessly. They break free from the constraints of traditional wired earphones and provide greater freedom and convenience. The working principle of wireless earphones mainly relies on Bluetooth technology. When a mobile phone or other audio device plays audio, it compresses the audio data and sends it through the Bluetooth channel to the earphones. After receiving the data, the earphones decompress it and convert it into an analog electrical wave, which then drives the speaker to produce sound.
[0003] With the popularization of wireless earphones, users' demand for real-time monitoring of the battery power of earphones is increasing day by day. However, the traditional battery power detection and display methods have the problem of lack of accurate monitoring. Traditional earphones usually rely on simple battery voltage estimation for battery power detection, resulting in inaccurate battery power display. It is difficult for users to reasonably arrange usage based on the displayed battery power, which may lead to sudden power outage during use and affect the user experience. Therefore, there is an urgent need for a method for detecting and displaying the battery power of earphones. Summary of the Invention
[0004] The purpose of the present invention is to solve the deficiencies existing in the prior art and propose a method for detecting and displaying the battery power of earphones to solve the problem of lack of accurate monitoring in the traditional battery power detection and display methods in the above technical solutions. Traditional earphones usually rely on simple battery voltage estimation for battery power detection, resulting in inaccurate battery power display. It is difficult for users to reasonably arrange usage based on the displayed battery power, which may lead to sudden power outage during use and affect the user experience.
[0005] To achieve the above purpose, the present invention adopts the following technical solutions: An earphone battery power detection method includes the following steps:
[0006] S1: When the earphone is in the working state, obtain the analog signal of the battery voltage through the ADC channel and convert it into a digital signal;
[0007] S2: Perform digital filtering processing on the collected signal. Adopt the sliding window mean filtering algorithm, with the window time length of 5 - 15 seconds, and calculate the average value or the maximum value within the preset time window to eliminate the influence of instantaneous fluctuations on the detection result;
[0008] S3: Compare the obtained average value or maximum value with the previous voltage value. Set the deviation threshold at ±5%, and determine whether the deviation between the two is greater than ±5%. If the deviation is less than ±5%, the process ends, the original voltage value is maintained, and no subsequent operations are performed. If the deviation is greater than ±5%, it indicates that the battery voltage has changed significantly. At this time, update the battery voltage.
[0009] S4: Match the updated battery voltage value with the preset voltage - power mapping table to determine the current power level. The power levels include four states: fully charged, normal voltage, low power, and shutdown due to low power.
[0010] As a preferred embodiment, the voltage - power mapping table includes four preset levels, specifically:
[0011] Fully charged state: voltage value ≥ V1, corresponding power percentage is 100% - 81%;
[0012] Normal voltage: V2 ≤ voltage value < V1, corresponding power percentage is 80% - 20%;
[0013] Low - power state: V3 ≤ voltage value < V2, corresponding power percentage is 20% - 5%;
[0014] Shutdown threshold: voltage value < V3, corresponding power percentage is less than 5%;
[0015] Among them, V1, V2, and V3 are preset voltage thresholds and V1 > V2 > V3. The thresholds are dynamically adjusted according to the battery type and usage environment.
[0016] As a preferred embodiment, the environment dynamic adjustment module can automatically correct the values of V1, V2, and V3 according to the battery usage duration. The correction formula is: Vx' = Vx×(1 - α×t), where α is the attenuation coefficient and t is the cumulative usage hours.
[0017] As a preferred embodiment, it also includes an exception handling mechanism: when it is detected that the voltage value drops at a rate exceeding the preset safety threshold (such as more than 5% per minute) within a unit time, trigger an emergency protection program.
[0018] A method for earphone power display includes the following steps:
[0019] S5: Send the first power information to the mobile terminal through the HFP protocol to trigger the display of the system - level icon. The first power information includes the power percentage and the battery status identifier.
[0020] S6: Transmit the second power information to the Android application side through the SPP protocol to achieve in - application visual display. The second power information includes the power percentage, the estimated remaining usage time, and the battery health status.
[0021] S7: Transmit the third battery information to the iOS application end via the BLE protocol to complete cross-platform battery synchronization. The third battery information includes the battery percentage, the battery status characteristic value, and the estimated remaining battery life.
[0022] As a preferred implementation, in step S5, the HFP protocol transmission uses the AT+XAPL instruction set, and the battery information is encoded as a 4-bit data field.
[0023] As a preferred implementation, in step S6, the SPP protocol transmission includes the battery percentage value and the estimated remaining usage time. The time calculation model is:
[0024] T_remain = (Current_Level / Discharge_Rate)×k
[0025] where Discharge_Rate is the historical average discharge rate and k is the correction factor.
[0026] As a preferred implementation, in step S7, the BLE protocol uses a custom GATT service, including:
[0027] Battery percentage characteristic value;
[0028] Battery status characteristic value;
[0029] Estimated remaining battery life characteristic value.
[0030] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0031] First, in the present invention, the battery voltage signal is collected in real time through the ADC (analog-to-digital converter) channel integrated in the headphone main control chip. The ADC module adopts a differential input mode, with a reference voltage of 1.2V, capable of detecting a voltage range of 0 - 4.2V, suitable for the voltage detection of lithium batteries. The sampling frequency of the ADC is set to 100 - 500Hz, and the sampling accuracy is 10 - 12 bits to ensure that small changes in the battery voltage can be accurately captured. At the same time, a low-pass filter circuit is added at the ADC input end to filter out high-frequency noise and ensure the stability of the collected signal, providing a reliable data basis for subsequent power calculation. Then, the sliding window mean filtering algorithm is used to process the collected voltage signal. The time length of the sliding window is set to 5 - 15 seconds, and the window contains 500 - 1500 sampling points (the specific number depends on the sampling frequency). Then, the average value or maximum value of the sampling data within the window is calculated as the representative value of the current voltage. The window slides with time, and the data within the window is updated each time to ensure that the filtering result can reflect the latest voltage state in real time. Through this method, the instantaneous fluctuations and noise interference of the voltage signal are effectively eliminated, improving the stability and accuracy of power detection. Then, the filtered voltage value is compared with the previously recorded voltage value, the deviation percentage is calculated, and it is judged whether the deviation exceeds the set threshold (±5%). If the deviation is within the threshold range, it means that the battery voltage change is small and there is no need to update the voltage value; if the deviation exceeds the threshold, the voltage update operation is triggered, and the current voltage value is stored as the new historical voltage value. This deviation comparison and update mechanism can dynamically track the change of the battery voltage, avoid misjudgment caused by voltage fluctuations, and ensure the accuracy of the power detection result. Then, according to the updated voltage value, the preset voltage-power mapping table is matched to determine the current power level. The mapping table divides the voltage range into four levels: full charge, normal voltage, low power, and low power shutdown, and each level corresponds to a different power percentage range. At the same time, according to the battery usage duration and ambient temperature, the thresholds V1, V2, and V3 in the mapping table are dynamically adjusted to ensure the accuracy of the mapping table. By looking up the mapping table, the power level and the corresponding power percentage can be determined, helping the user to accurately understand the headphone power status.
[0032] Second, in the present invention, when it is detected that the voltage value drops at a rate exceeding the preset safety threshold (such as more than 5% per minute) within a unit time, an emergency protection program is triggered. The protection measures include sending a low-power warning signal to all connected devices, automatically reducing the audio output power to a safe level, and starting a backup power management scheme to extend the battery life. Through this mechanism, we can effectively respond to the sudden drop in power, improving the user experience and device reliability.
[0033] Thirdly, in the present invention, the detected battery power is sent to the mobile terminal as earphone battery power information by adopting the HFP (Hands-Free Profile) protocol. As a communication protocol widely used in Bluetooth devices, the HFP protocol supports audio transmission and the interaction of device status information. In this solution, by utilizing this feature of the HFP protocol, the first battery power information is transmitted through the AT+XAPL instruction set. The AT+XAPL instruction set is the standard instruction in the HFP protocol for transmitting device status information. The battery power information is encoded as a 4-bit data field, and each field represents a different battery power percentage range. For example, 0000 indicates that the battery power is unknown, 0001 indicates that the battery power is between 0% and 10%, and so on until 1010 indicates that the battery power is between 90% and 100%. After receiving this information, the mobile terminal can display the battery power icon and percentage in the status bar or notification center, enabling the user to understand the earphone battery power status in real time without opening a specific application. This implementation method not only improves the transmission efficiency of the battery power information but also ensures the compatibility and real-time performance of the system-level battery power display. The second battery power information is transmitted to the Android application side through the SPP (Serial Port Profile) protocol. By utilizing the feature of the SPP protocol that supports large data transmission, detailed information including the battery power percentage, estimated remaining usage time, and battery health status is sent to the Android application side. The estimated remaining usage time is calculated by the formula T_remain = (Current_Level / Discharge_Rate) × k, where Current_Level is the current battery power percentage, Discharge_Rate is the historical average discharge rate, and k is a correction factor. After receiving this information, the Android application side will display the battery power percentage, remaining time, and battery health status in the application interface, thereby helping the user to reasonably arrange the usage time and charging plan. The third battery power information is transmitted to the iOS application side by adopting the BLE (Bluetooth Low Energy) protocol. By designing a custom GATT (Generic Attribute Profile) service, characteristic values such as the battery power percentage characteristic value, battery status characteristic value, and estimated battery life characteristic value are defined. The battery power percentage characteristic value represents the current battery power percentage with an 8-bit unsigned integer, the battery status characteristic value represents the current status of the battery with a 2-bit status code, and the estimated battery life characteristic value represents the estimated remaining usage time in the current usage mode with a 16-bit time in minutes. Through the BLE protocol, this battery power information is sent to the iOS application side at a transmission interval of 1 - 5 seconds to ensure the real-time performance of the battery power information. After receiving this information, the iOS application side will display the battery power percentage, battery status, and estimated battery life time in the application interface, thus achieving the compatible display of accurate earphone battery power information on different mobile terminals through multiple Bluetooth protocols to enhance the user's usage convenience and experience. Description of the Drawings
[0034] Figure 1 is an overall flowchart of an earphone power detection method;
[0035] Figure 2 is an overall flowchart of an earphone power display method;
[0036] Figure 3 is a schematic block diagram of power information of an earphone power detection method;
[0037] Figure 4 is a flowchart of signal filtering processing of an earphone power detection method;
[0038] Figure 5 is a flowchart of power display of an earphone power detection method;
[0039] Figure 6 is an abnormal handling block diagram of an earphone power detection method;
[0040] Figure 7 is a voltage - power mapping block diagram of an earphone power detection method. Detailed Embodiments
[0041] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0042] Embodiment:
[0043] As Figure 1 、 Figure 2 、 Figure 3 、 Figure 4 、 Figure 5 、 Figure 6 and Figure 7 shown, the present invention provides a technical solution: an earphone power detection method, including the following steps:
[0044] S1: When the earphone is in the working state, obtain the analog signal of the battery voltage through the ADC (analog - to - digital converter) channel and convert it into a digital signal;
[0045] S2: Perform digital filtering processing on the collected signal, adopt the sliding window mean filtering algorithm, the window time length is 5 - 15 seconds, calculate the average value or the maximum value within the preset time window to eliminate the influence of instantaneous fluctuations on the detection result;
[0046] S3: Compare the obtained average value or maximum value with the previous voltage value. Set the deviation threshold at ±5%, and determine whether the deviation between the two is greater than ±5%. If the deviation is less than ±5%, end the process, maintain the original voltage value, and do not perform subsequent operations. If the deviation is greater than ±5%, it indicates that there is a significant change in the battery voltage. At this time, update the battery voltage.
[0047] S4: Match the updated battery voltage value with the preset voltage - power mapping table to determine the current power level. The power level includes four states: fully charged, normal voltage, low power, and low - power shutdown.
[0048] The voltage - power mapping table contains four preset levels, specifically:
[0049] Fully charged state: voltage value ≥ V1, corresponding power percentage is 100% - 81%;
[0050] Normal voltage: V2 ≤ voltage value < V1, corresponding power percentage is 80% - 20%;
[0051] Low - power state: V3 ≤ voltage value < V2, corresponding power percentage is 20% - 5%;
[0052] Shutdown threshold: voltage value < V3, corresponding power percentage is less than 5%;
[0053] Among them, V1, V2, and V3 are preset voltage thresholds and V1 > V2 > V3. The thresholds are dynamically adjusted according to the battery type and usage environment.
[0054] Through the mapping table, the headphone system can convert the actual voltage value of the battery into a power percentage or power level that is easy for users to understand. In this way, users can intuitively understand the remaining power of the headphones, and thus reasonably arrange the usage time and charging plan.
[0055] The environment dynamic adjustment module can automatically correct the values of V1, V2, and V3 according to the battery usage duration. The correction formula is: Vx' = Vx×(1 - α×t), where α is the attenuation coefficient (0.0001 - 0.0005 / h), and t is the cumulative usage hours.
[0056] This module can set the attenuation coefficient α (0.0001 - 0.0005 / h) according to the battery usage duration to reflect the impact of battery aging on voltage. At the same time, set the temperature compensation coefficient β (0.01 - 0.05 / ℃) to reflect the impact of temperature change on voltage. Through the correction formula Vx' = Vx×(1 - α×t)+β×ΔT (where t is the cumulative usage hours, and ΔT is the difference between the current temperature and the standard temperature of 25℃), the voltage - power mapping table can be dynamically optimized to improve the long - term accuracy of power detection.
[0057] It also includes an exception handling mechanism: when it is detected that the rate of voltage value drop within a unit time exceeds a preset safety threshold (such as more than 5% drop per minute), an emergency protection program is triggered.
[0058] When it is detected that the rate of voltage value drop within a unit time exceeds a preset safety threshold (such as more than 5% drop per minute), an emergency protection program is triggered. The protection measures include sending a low power warning signal to all connected devices, automatically reducing the audio output power to a safe level, and starting a backup power management scheme to extend the battery life. Through this mechanism, we can effectively cope with sudden power drops, improving the user experience and device reliability.
[0059] Working principle: The battery voltage signal is collected in real time through the ADC (Analog-to-Digital Converter) channel integrated in the headphone main control chip. This ADC module adopts a differential input mode with a reference voltage of 1.2V, capable of detecting a voltage range of 0 - 4.2V, suitable for the voltage detection of lithium batteries. The sampling frequency of the ADC is set to 100 - 500Hz, and the sampling accuracy is 10 - 12 bits to ensure that small changes in the battery voltage can be accurately captured. At the same time, a low-pass filter circuit is added at the ADC input to filter out high-frequency noise and ensure the stability of the collected signal, providing a reliable data basis for subsequent power calculation. Then, the sliding window mean filtering algorithm is used to process the collected voltage signal. The time length of the sliding window is set to 5 - 15 seconds, and the window contains 500 - 1500 sampling points (the specific number depends on the sampling frequency). Then, the average value or maximum value of the sampling data within the window is calculated as the representative value of the current voltage. The window slides with time, and the data within the window is updated each time to ensure that the filtering result can reflect the latest voltage state in real time. Through this method, the instantaneous fluctuations and noise interference of the voltage signal can be effectively eliminated, improving the stability and accuracy of power detection. Then, the filtered voltage value is compared with the previously recorded voltage value, the deviation percentage is calculated, and it is judged whether the deviation exceeds the set threshold (±5%). If the deviation is within the threshold range, it means that the change in the battery voltage is small and there is no need to update the voltage value; if the deviation exceeds the threshold, a voltage update operation is triggered, and the current voltage value is stored as the new historical voltage value. This deviation comparison and update mechanism can dynamically track the change of the battery voltage, avoid misjudgment caused by voltage fluctuations, and ensure the accuracy of the power detection result. Then, according to the updated voltage value, a preset voltage - power mapping table is matched to determine the current power level. The mapping table divides the voltage range into four levels: full charge, normal voltage, low power, and low power shutdown, and each level corresponds to a different power percentage range. At the same time, according to the battery usage duration and ambient temperature, the thresholds V1, V2, and V3 in the mapping table are dynamically adjusted to ensure the accuracy of the mapping table. By looking up the mapping table, the power level and the corresponding power percentage can be determined, helping users accurately understand the headphone power status.
[0060] A method for displaying the earphone battery level, comprising the following steps:
[0061] S5: Sending first battery level information to a mobile terminal via the HFP protocol to trigger the display of a system-level icon, where the first battery level information includes a battery percentage and a battery status identifier;
[0062] S6: Transmitting second battery level information to an Android application side via the SPP protocol to achieve in-application visual display, where the second battery level information includes a battery percentage, an estimated remaining usage time, and a battery health status;
[0063] S7: Transmitting third battery level information to an iOS application side via the BLE protocol to complete cross-platform battery synchronization, where the third battery level information includes a battery percentage, a battery status characteristic value, and an estimated battery life.
[0064] In step S5, the HFP protocol transmission uses the AT+XAPL instruction set, and the battery level information is encoded as a 4-bit data field.
[0065] In step S6, the SPP protocol transmission includes a battery percentage value and an estimated remaining usage time, and the time calculation model is:
[0066] T_remain = (Current_Level / Discharge_Rate)×k
[0067] where Discharge_Rate is the historical average discharge rate, and k is a correction factor (0.8 - 1.2).
[0068] In step S7, the BLE protocol uses a custom GATT service, including:
[0069] A battery percentage characteristic value (8-bit unsigned integer);
[0070] A battery status characteristic value (2-bit status code);
[0071] An estimated battery life characteristic value (16-bit time in minutes).
[0072] Working principle: By adopting the HFP (Hands-Free Profile) protocol, the detected battery level is sent to the mobile terminal as earphone battery level information. The HFP protocol, as a communication protocol widely used in Bluetooth devices, supports audio transmission and the interaction of device status information. In this solution, taking advantage of this feature of the HFP protocol, the first battery level information is transmitted through the AT+XAPL instruction set. The AT+XAPL instruction set is the standard instruction in the HFP protocol for transmitting device status information. The battery level information is encoded as a 4-bit data field, and each field represents a different battery percentage range. For example, 0000 indicates that the battery level is unknown, 0001 indicates that the battery level is between 0% - 10%, and so on until 1010 indicates that the battery level is between 90% - 100%. After the mobile terminal receives this information, it can display the battery level icon and percentage in the status bar or notification center, enabling users to understand the earphone battery level in real time without opening a specific application. This implementation method not only improves the transmission efficiency of the battery level information but also ensures the compatibility and real-time nature of the system-level battery display. The second battery level information is transmitted to the Android application end through the SPP (Serial Port Profile) protocol. Utilizing the feature of the SPP protocol that supports large data volume transmission, detailed information including the battery percentage, estimated remaining usage time, and battery health status is sent to the Android application end. The estimated remaining usage time is calculated by the formula T_remain = (Current_Level / Discharge_Rate) × k, where Current_Level is the current battery percentage, Discharge_Rate is the historical average discharge rate, and k is a correction factor.After the Android application receives these messages, it will display the battery percentage, remaining time, and battery health status in the application interface, thereby helping users reasonably arrange their usage time and charging plans. It uses the BLE (Bluetooth Low Energy) protocol to transmit the third battery information to the iOS application. By designing a custom GATT (Generic Attribute Profile) service and defining characteristic values such as the battery percentage characteristic value, battery status characteristic value, and estimated battery life characteristic value. The battery percentage characteristic value uses an 8-bit unsigned integer to represent the current battery percentage. The battery status characteristic value uses a 2-bit status code to represent the current status of the battery. The estimated battery life characteristic value uses a 16-bit time in minutes to represent the estimated remaining usage time in the current usage mode. Through the BLE protocol, we send these battery messages to the iOS application at a transmission interval of 1-5 seconds to ensure the real-time nature of the battery information. After the iOS application receives these messages, it will display the battery percentage, battery status, and estimated battery life in the application interface, thus achieving the compatible display of accurate battery information of the earphones on different mobile terminals through multiple Bluetooth protocols, ensuring that the battery information seen by users on different devices is up-to-date. By using different protocols to display the battery information on different types of mobile phones and APPs, whether it is the Android system or the IOS system, the battery display can be realized, meeting the needs of different user groups and improving the versatility and compatibility of the product.,
[0073] The above is only a preferred embodiment of the present invention and is not a limitation of the present invention in other forms. Any person skilled in the art may use the disclosed technical content to make changes or modifications into equivalent embodiments with equivalent changes and apply them to other fields. However, as long as it does not depart from the technical solution content of the present invention, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention still fall within the protection scope of the technical solution of the present invention.
Claims
1. A method for detecting the battery level of an earphone, characterized in that: It includes the following steps: S1: When the earphone is in the working state, obtain the analog signal of the battery voltage through the ADC channel and convert it into a digital signal; S2: Perform digital filtering on the collected signal. Adopt the sliding window mean filtering algorithm with a window time length of 5 - 15 seconds, and calculate the average value or maximum value within the preset time window to eliminate the influence of instantaneous fluctuations on the detection result; S3: Compare the obtained average value or maximum value with the previous voltage value. Set the deviation threshold to ±5%, and judge whether the deviation between the two is greater than ±5%. If the deviation is less than ±5%, the process ends, maintaining the original voltage value without subsequent operations; if the deviation is greater than ±5%, it indicates that the battery voltage has changed significantly, and at this time, update the battery voltage; S4: Match the updated battery voltage value with the preset voltage - power mapping table to determine the current power level, and the power level includes four states: full charge, normal voltage, low power, and low - power shutdown; The voltage - power mapping table contains four preset levels, specifically: Full - charge state: voltage value ≥ V1, corresponding power percentage is 100% - 81%; Normal voltage: V2 ≤ voltage value < V1, corresponding power percentage is 80% - 20%; Low - power state: V3 ≤ voltage value < V2, corresponding power percentage is 20% - 5%; Shutdown threshold: voltage value < V3, corresponding power percentage is less than 5%; Where V1, V2, and V3 are preset voltage thresholds and V1 > V2 > V3; It also includes an exception handling mechanism: when it is detected that the voltage value drops at a rate exceeding the preset safety threshold within a unit time, trigger an emergency protection program; It also includes an environmental dynamic adjustment module. The environmental dynamic adjustment module can automatically correct the values of V1, V2, and V3 according to the battery usage duration and environmental temperature values. The correction formula is: Vx' = Vx×(1 - α×t) + β×ΔT; Where α is the battery usage duration attenuation coefficient, used to reflect the influence of battery aging on voltage; the optional range is 0.0001 - 0.0005 / h; β is the temperature compensation coefficient, and the optional range is 0.01 - 0.05 / ℃, used to reflect the influence of temperature change on voltage; t is the cumulative usage hours, and ΔT is the difference between the current temperature and the standard temperature of 25℃, which can dynamically optimize the voltage - power mapping table and improve the long - term accuracy of power detection.
2. A method for displaying the battery level of an earphone, which adopts the method for detecting the battery level of an earphone described in claim 1, and is characterized in that: It includes the following steps: S5: Send the first power information to the mobile terminal through the HFP protocol to trigger the display of the system - level icon. The first power information includes the power percentage and the battery status identifier; S6: Transmit the second power information to the Android application side through the SPP protocol to achieve in - application visual display. The second power information includes the power percentage, the estimated remaining usage time, and the battery health status; S7: Transmit the third power information to the iOS application side through the BLE protocol to complete cross - platform power synchronization. The third power information includes the power percentage, the battery status characteristic value, and the estimated battery life; 3. The method for displaying the earphone power according to claim 2, wherein: In step S5, the HFP protocol transmission uses the AT + XAPL instruction set, and the power information is encoded as a 4 - bit data field.
4. A method for earphone power display according to claim 2, characterized in that: In step S6, the SPP protocol transmits the battery percentage value and the estimated remaining usage time. The time calculation model is as follows: T_remain = (Current_Level / Discharge_Rate)×k where Discharge_Rate is the historical average discharge rate, Current_Level is the current battery percentage, and k is a correction factor with an optional range of 0.8 - 1.
2.
5. A method for displaying the battery level of an earphone according to claim 2, characterized in that: In step S7, the BLE protocol uses a custom GATT service, including: The battery percentage characteristic value, which is an 8-bit unsigned integer; The battery status characteristic value, which is a 2-bit status code; The estimated battery life characteristic value, which is a 16-bit time in minutes.
Citation Information
Patent Citations
Battery power display device and method
CN102298119A
Battery electric quantity processing method and device
CN106501730A
Analysis method for calculating battery health through DC charging big data
CN117092541A
System and method for displaying electric quantity of bluetooth earphone on portable electronic equipment
US20120184210A1