CN105425166B - Battery electric quantity detection method and device - Google Patents

Battery electric quantity detection method and device Download PDF

Info

Publication number
CN105425166B
CN105425166B CN201511030373.4A CN201511030373A CN105425166B CN 105425166 B CN105425166 B CN 105425166B CN 201511030373 A CN201511030373 A CN 201511030373A CN 105425166 B CN105425166 B CN 105425166B
Authority
CN
China
Prior art keywords
battery
battery power
voltage
power level
level
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
CN201511030373.4A
Other languages
Chinese (zh)
Other versions
CN105425166A (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.)
Shanghai Pateo Network Technology Service Co Ltd
Original Assignee
Shanghai Pateo Network Technology Service 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 Shanghai Pateo Network Technology Service Co Ltd filed Critical Shanghai Pateo Network Technology Service Co Ltd
Priority to CN201511030373.4A priority Critical patent/CN105425166B/en
Publication of CN105425166A publication Critical patent/CN105425166A/en
Application granted granted Critical
Publication of CN105425166B publication Critical patent/CN105425166B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/165Indicating that current or voltage is either above or below a predetermined value or within or outside a predetermined range of values
    • G01R19/16533Indicating that current or voltage is either above or below a predetermined value or within or outside a predetermined range of values characterised by the application
    • G01R19/16538Indicating that current or voltage is either above or below a predetermined value or within or outside a predetermined range of values characterised by the application in AC or DC supplies
    • G01R19/16542Indicating that current or voltage is either above or below a predetermined value or within or outside a predetermined range of values characterised by the application in AC or DC supplies for batteries
    • 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/382Arrangements for monitoring battery or accumulator variables, e.g. SoC
    • G01R31/3835Arrangements for monitoring battery or accumulator variables, e.g. SoC involving only voltage measurements

Abstract

A battery electric quantity detection method and a device thereof are provided, the method comprises the following steps: detecting and storing the output voltage of the battery at a fixed period; when a request for acquiring the electric quantity of the battery is received, calculating one or more monitoring voltages according to a plurality of output voltages which are stored latest; determining an output battery charge level based on the one or more monitored voltages. The scheme can improve the accuracy of detecting the actual battery power level.

Description

Battery electric quantity detection method and device
Technical Field
The invention relates to the technical field of batteries, in particular to a battery electric quantity detection method and device.
Background
Batteries or rechargeable batteries are widely used in real life, particularly in the times of more and more popular portable electronic devices, portable devices are more and more personalized and diversified, the portable devices are powered by the batteries, and the residual battery capacity of the electronic devices needs to be accurately mastered in order to prevent serious consequences such as communication interruption, data loss and the like caused by sudden power failure of the portable electronic devices in the using process.
A common method for measuring the battery capacity is to detect the output voltage across the battery, and when the output voltage reaches a certain threshold, it is determined that the current remaining capacity is at a certain level. However, since the output voltage may vary with actual conditions such as variation of an actual load of the external circuit and a disturbance signal, the level of the remaining power detected by the measuring method is not accurate.
Disclosure of Invention
The invention aims to provide a method and a device for detecting the electric quantity of a battery so as to improve the accuracy of detecting the electric quantity level of the battery.
In order to solve the above technical problem, an embodiment of the present invention provides a method for detecting battery power, where the method includes:
detecting and storing the output voltage of the battery at a fixed period;
when a request for acquiring the electric quantity of the battery is received, calculating one or more monitoring voltages according to a plurality of output voltages which are stored latest;
determining an output battery charge level based on the one or more monitored voltages.
Optionally, the calculating the monitor voltage from the most recently stored plurality of output voltage values comprises:
according to the sequence of the battery electric quantity grade from high to low, sequentially trying to take out the latest stored output voltage values of the target voltage detection times, wherein the target voltage detection times correspond to the battery electric quantity grade;
if the attempt to extract is successful, calculating the monitoring voltage;
and if the attempt of taking out fails, continuing to attempt according to the target voltage detection times corresponding to the next lower battery power level until all the battery power levels are traversed.
Optionally, the determining an output battery power level according to the one or more monitored voltages comprises:
judging whether the monitoring voltage is within a voltage value range corresponding to the level of the battery electric quantity tried at present;
when the monitoring voltage is within a voltage value range corresponding to the current attempted battery power level, determining the current attempted battery power level as the output battery power level;
and when the monitoring voltage is not in the voltage value range corresponding to the current attempted battery power level, continuing to calculate the monitoring voltage according to the next lower battery power level and making a judgment until all the battery power levels are traversed.
Optionally, the calculating the monitor voltage from the most recently stored plurality of output voltage values comprises:
sequentially trying to take out the latest stored output voltage values of the target voltage detection times according to the sequence of the battery power level from low to high, wherein the target voltage detection times correspond to the battery power level;
if the attempt to extract is successful, calculating the monitoring voltage;
and if the attempt of taking out fails, continuing to attempt according to the target voltage detection times corresponding to the next higher battery power level until all the battery power levels are traversed.
Optionally, the determining an output battery power level according to the one or more monitored voltages comprises:
judging whether the monitoring voltage is within a voltage value range corresponding to the level of the battery electric quantity tried at present;
when the monitoring voltage is within a voltage value range corresponding to the current attempted battery power level, determining the current attempted battery power level as the output battery power level;
and when the monitoring voltage is not in the voltage value range corresponding to the current attempted battery power level, continuing to judge the detection voltage of the next higher power level until all the battery power levels are traversed.
Optionally, the calculating the monitoring voltage includes: and calculating the average value of the latest stored output voltage values of the target voltage detection times, and taking the average value as the monitoring voltage.
Optionally, the number of target voltage detections corresponding to a lower battery power level is greater than the number of target voltage detections corresponding to a higher battery power level.
Optionally, the battery power detection method further includes: and determining the battery power according to the output battery power level.
An embodiment of the present invention further provides a device for detecting battery power, including:
an output voltage detection unit adapted to detect an output voltage of the battery at a fixed period and store the detected output voltage;
a monitoring voltage calculation unit adapted to calculate one or more monitoring voltages according to a plurality of output voltages newly stored when a request for acquiring a battery power is received;
a battery power level determination unit adapted to determine an output battery power level from the one or more monitored voltages.
Optionally, the monitoring voltage calculating unit includes:
the first output voltage value acquisition subunit is suitable for sequentially trying to take out the latest stored output voltage values of the target voltage detection times from high to low according to the order of the battery electric quantity grades, and the target voltage detection times correspond to the current battery electric quantity grade;
a first monitoring voltage calculating subunit adapted to perform calculation of the monitoring voltage when the attempt to take out is successful;
and the first output voltage value cyclic acquisition subunit is suitable for controlling the first output voltage value acquisition subunit to continuously try according to the target voltage detection times corresponding to the next lower battery power level when the attempt of taking out fails until all the battery power levels are traversed.
Optionally, the battery power level determining unit includes:
the first judgment unit is suitable for judging whether the monitoring voltage is in a voltage value range corresponding to the current attempted battery electric quantity grade;
a first output battery power level determining subunit adapted to determine, when the monitored voltage is within a voltage value range corresponding to a currently attempted battery power level, that the currently attempted battery power level is the output battery power level;
and the first cycle control subunit is adapted to control the monitoring voltage calculation unit, the first judgment unit and the first output battery power level determination subunit to continue to judge the monitoring voltage of the next lower power level when the monitoring voltage is not within the voltage value range corresponding to the currently attempted battery power level until all the battery power levels are traversed.
Optionally, the monitoring voltage calculating unit includes:
the second output voltage value acquisition subunit is suitable for sequentially trying to take out the latest stored output voltage values of the target voltage detection times in the sequence from low battery electric quantity grade to high battery electric quantity grade, and the target voltage detection times correspond to the current battery electric quantity grade;
a second monitoring voltage calculation subunit adapted to calculate the monitoring voltage if the attempt to extract the voltage is successful;
and the second output voltage value cyclic acquisition subunit is suitable for controlling the second output voltage value acquisition subunit to continuously try according to the target voltage detection times corresponding to the next higher battery power level when the attempt of taking out fails until all the battery power levels are traversed.
Optionally, the battery power level determining unit includes:
the second judgment unit is suitable for judging whether the monitoring voltage is in a voltage value range corresponding to the level of the battery electric quantity tried currently;
a second output battery power level determining subunit, adapted to determine, when the monitored voltage is within a voltage value range corresponding to a currently attempted battery power level, that the currently attempted battery power level is the output battery power level;
and the second cycle control subunit is adapted to control the monitoring voltage calculation unit, the first judgment unit and the first output battery power level determination subunit to continue to judge the monitoring voltage of the next higher power level until all the battery power levels are traversed when the monitoring voltage is not within the voltage value range corresponding to the currently attempted battery power level.
Optionally, the calculating the monitoring voltage includes: and calculating the average value of the latest stored output voltage values of the target voltage detection times, and taking the average value as the monitoring voltage.
Optionally, the number of target voltage detections corresponding to a lower battery power level is greater than the number of target voltage detections corresponding to a higher battery power level.
Optionally, the battery power detection apparatus further includes: and the battery electric quantity determining unit is suitable for determining the battery electric quantity according to the output battery electric quantity grade.
Compared with the prior art, the technical scheme of the embodiment of the invention has the following beneficial effects:
the technical scheme of the embodiment of the invention detects and stores the output voltage of the battery in a fixed period, and when receiving the request of acquiring the electric quantity value, compared with the prior art which adopts the method of measuring the output voltage once, when the load of the external circuit changes or interference signals exist to influence the change of the single output voltage value, the technical proposal of the embodiment of the invention is that because the battery electric quantity corresponding to the output battery electric quantity grade is determined according to one or more monitoring voltages, and the monitoring voltages are obtained by calculating a plurality of output voltage values which are stored latest, therefore, the detected battery power is closer to the actual battery residual power, and the accuracy of detecting the battery power level is improved.
Furthermore, because the output voltage has a high change frequency when the battery is in a low electric quantity, the technical scheme of the embodiment of the invention sets the target voltage detection times corresponding to the battery electric quantity grade with a low electric quantity to be greater than the target voltage detection times corresponding to the battery electric quantity grade with a high electric quantity, so that the battery electric quantity grade determined by the monitoring voltage calculated by a plurality of output voltages is more accurate.
Drawings
Fig. 1 is a flow chart of a battery charge detection method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for detecting battery charge in an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a battery power detection apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another battery level detection apparatus according to an embodiment of the present invention.
Detailed Description
As known in the art, a common method for measuring the battery capacity is to detect the output voltage across the battery, and determine that the current remaining capacity is at a certain level when the output voltage reaches a certain threshold. However, since the output voltage may vary with actual conditions such as variation of an actual load of the external circuit and a disturbance signal, the level of the remaining power detected by the measuring method is not accurate.
The technical scheme of the embodiment of the invention detects and stores the output voltage of the battery in a fixed period, and when receiving the request of acquiring the electric quantity value, compared with the prior art which adopts the method of measuring the output voltage once, when the load of the external circuit changes or interference signals exist to influence the change of the single output voltage value, the technical proposal of the embodiment of the invention is that because the battery electric quantity corresponding to the output battery electric quantity grade is determined according to one or more monitoring voltages, and the monitoring voltages are obtained by calculating a plurality of output voltage values which are stored latest, therefore, the detected battery power is closer to the actual battery residual power, and the accuracy of detecting the battery power level is improved.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Fig. 1 is a flowchart of a battery power detection method according to an embodiment of the present invention. Referring to fig. 1, the steps of the battery charge detection method will be described in detail.
Step S101: the output voltage of the battery is detected at a fixed period and stored.
In specific implementation, the fixed period may be set differently as needed, the output voltage of the battery is detected at fixed intervals, and the detected output voltage is stored.
In a specific implementation, the number of output voltages stored in the storage unit for storing the output voltages may be set, for example, a storage buffer pool may be provided, the newly obtained 20 output voltages are fixedly stored, when the 21 st output voltage is detected, the oldest stored first stored output voltage is discarded, and so on, so that the storage buffer pool may store the latest 20 output voltages.
Step S102: when a request for obtaining the electric quantity value is received, one or more monitoring voltages are calculated based on the plurality of output voltages that are newly stored.
In a specific implementation, a plurality of different battery power levels may be preset, each battery power level corresponding to a different battery power range, and a specific number of output voltages to be detected for each battery power level is set, which is referred to herein as a target voltage detection number. For example, 5 of the battery charge levels are preset, namely a 100% charge level, an 80% charge level, a 60% charge level, a 40% charge level, and a 20% charge level. In an embodiment, the number of target voltage detections for each battery power level may be the same, for example, the number of target voltage detections required to be detected for each battery power level is set to 5. In another embodiment, the target voltage detection times set for each battery charge level may be different, for example, assuming that the target voltage detection times for the 100% charge level stage is 3, the target voltage detection times for the 80% charge level stage is 4, the target voltage detection times for the 60% charge level stage is 5, the target voltage detection times for the 40% charge level stage is 6, and the target voltage detection times for the 20% charge level stage is 7.
In a specific implementation, the latest stored output voltage value of the target voltage detection times corresponding to the current trial level may be tried to be extracted at each level in turn according to a fixed level sequence, and then the extracted output voltage value may be used for the calculation of the monitoring voltage.
In an embodiment of the present invention, in order from the highest battery power level to the lowest battery power level, the latest stored output voltage values of the target voltage detection times are tried to be taken out in sequence, and the target voltage detection times correspond to the battery power level;
if the attempt to extract is successful, calculating the monitoring voltage;
and if the attempt of taking out fails, continuing to attempt according to the target voltage detection times corresponding to the next lower battery power level until all the battery power levels are traversed.
In a specific implementation, when the monitoring voltage is calculated, an average value of output voltage values stored latest at the target voltage detection times is calculated, and the average value is used as the monitoring voltage.
In another embodiment of the present invention, the latest stored output voltage values of the target voltage detection times corresponding to the battery power level may be sequentially tried to be taken out in the order from the low battery power level to the high battery power level;
if the attempt to extract is successful, calculating the monitoring voltage;
and if the attempt of taking out fails, continuing to attempt according to the target voltage detection times corresponding to the next higher battery power level until all the battery power levels are traversed.
An embodiment of step S102 is described below using an example.
For example, the preset battery power level is 5 steps, the target voltage detection number of 100% power level steps is 3, the target voltage detection number of 80% power level steps is 4, the target voltage detection number of 60% power level steps is 5, the target voltage detection number of 40% power level steps is 6, and the target voltage detection number of 20% power level steps is 7. For convenience of implementation, the storage buffer pool for storing the output voltage value can store 7 output voltage values at most.
When a request for obtaining the electric quantity value is received, and the current battery electric quantity is unknown at which level of the preset 5-level battery electric quantity levels, output voltages of the target voltage detection times are tried at each battery electric quantity level in sequence according to the sequence from the 100% electric quantity level to the 20% electric quantity level, if the attempt of taking out is successful, the calculation of the monitoring voltage is carried out, and if the attempt of taking out is failed, the attempt of taking out a plurality of output voltages according to the target voltage detection times corresponding to the next lower electric quantity level is continuously carried out.
Assuming that first an attempt is made to fetch the 3 most recently stored output voltage values at the 100% charge level, if the attempt to fetch is successful, a calculation of the monitored voltage is made; if the attempted retrieval fails, e.g., less than 3 output voltage values in the buffer storing the output voltage values, the attempt continues until all of the battery charge levels are traversed, in this example, because the target voltage detection times for the lower charge levels are greater, the attempt may not continue.
Alternatively, in another example, the output voltages of the target voltage detection times may be tried in sequence from the 20% power level to the 100% power level for each battery power level, the monitoring voltage may be calculated if the trial extraction is successful, and the trial extraction may be continued to try to extract the plurality of output voltages according to the target voltage detection times corresponding to the next lower power level if the trial extraction is failed. More specifically, assuming that an attempt is first made to fetch 7 newly stored output voltage values at the 20% charge level, if the attempt to fetch is successful, the calculation of the monitoring voltage is performed; if the attempt to retrieve fails, for example, less than 7 output voltage values in the buffer storing the output voltage values, the attempt to retrieve the next higher level, i.e., the 40% charge level, continues, i.e., the attempt to retrieve the 6 most recently stored output voltage values, until the full battery charge level is traversed.
It should be noted that, in other embodiments of the present invention, the number of times of detecting the target voltage, which is set to be required to be detected for each preset battery level, may be the same or different, and is not limited herein.
It should also be noted that, in other embodiments of the present invention, the preset number of battery power levels may be set according to needs, and is not limited herein.
In order to make the implementation result more accurate, in an embodiment of the present invention, the number of times of detecting the target voltage corresponding to the battery power level with lower power is greater than the number of times of detecting the target voltage corresponding to the battery power level with higher power. For example, the 80% charge level requires a number of target voltage detections greater than the 100% charge level requires, the 60% charge level requires a number of target voltage detections greater than the 80% charge level requires, and so on. The assumption of the above example is that the number of times of target voltage detection of the 100% level stage is 3, the number of times of target voltage detection of the 80% level stage is 4, the number of times of target voltage detection of the 60% level stage is 5, the number of times of target voltage detection of the 40% level stage is 6, and the number of times of target voltage detection of the 20% level stage is 7.
Step S103: determining an output battery charge level based on the one or more monitored voltages.
In a specific implementation, determining the output battery power level according to the monitoring voltage calculated in step S102 means determining which level the current battery power is actually at from preset battery power levels. Each preset battery power level sets a corresponding voltage value range, for example: 100% power level corresponds to 5V-4.5V, 80% power level corresponds to 4.5V-4V, 80% power level corresponds to 4V-3.5V, 600% power level corresponds to 3.5V-3V, 40% power level corresponds to 3V-2.5V, and 20% power level corresponds to 2.5V-2V.
In an embodiment of the present invention, in step S102, in order from the high battery level to the low battery level, the latest stored output voltage value of the target voltage detection times is tried to be extracted, and then the output battery level is determined in step S103, which may be as follows:
judging whether the monitoring voltage is within a voltage value range corresponding to the level of the battery electric quantity tried at present;
when the monitoring voltage is within a voltage value range corresponding to the current attempted battery power level, determining the current attempted battery power level as the output battery power level;
and when the monitoring voltage is not in the voltage value range corresponding to the current attempted battery power level, continuing to calculate the monitoring voltage according to the next lower battery power level and making a judgment until all the battery power levels are traversed.
The description is continued with an example in step S102.
In step S102, assuming that after the current attempt level (100% level) successfully attempts to extract 3 output voltage values, an average value of the 3 output voltage values is calculated to obtain a monitored voltage of 4.6V for the current attempt level, and then the current attempt level, i.e., the 100% level, is determined as the output battery level; otherwise, assuming that the monitoring voltage calculated by the 100% power level is 4.3V, it may be determined that it is not within the voltage value range 5V-4.5V corresponding to the current attempt level (100% power level), the determination of the monitoring voltage of the next lower power level (80% power level) is continued, that is, an attempt is continued to take out the newly stored 4 output voltage values corresponding to the 80% power level, and the monitoring voltage is calculated to be 4.2V, and it is determined that the current attempt level, that is, the 80% power level, is the output battery power level. In another embodiment of the present invention, if the output battery power level cannot be determined after traversing all the battery power levels, it may be displayed that the battery power is too low.
It should be noted that, as those skilled in the art can understand, when attempting to extract the output voltage for calculation in the order from the low power level to the high power level in step S102, the determination of the output battery power level in step S103 is performed, and details thereof are not repeated herein.
The embodiment of the present invention detects the output voltage of the battery at a fixed period and stores the detected output voltage, and when a request for obtaining the electric quantity value is received, compared with the prior art which adopts the method of measuring the output voltage once, when the load of the external circuit changes or interference signals exist to influence the change of the single output voltage value, the technical proposal of the embodiment of the invention is that because the battery electric quantity corresponding to the output battery electric quantity grade is determined according to one or more monitoring voltages, and the monitoring voltages are obtained by calculating a plurality of output voltage values which are stored latest, therefore, the detected battery power is closer to the actual battery residual power, and the accuracy of detecting the battery power level is improved.
Furthermore, because the output voltage has a high change frequency when the battery is in a low electric quantity, the technical scheme of the embodiment of the invention sets the target voltage detection times corresponding to the battery electric quantity grade with a low electric quantity to be greater than the target voltage detection times corresponding to the battery electric quantity grade with a high electric quantity, so that the battery electric quantity grade determined by the monitoring voltage calculated by a plurality of output voltages is more accurate.
Fig. 2 is a flowchart of a battery power detection method according to an embodiment of the present invention. The battery level detection method as shown in fig. 2 may include the steps of:
step S201: detecting and storing the output voltage of the battery at a fixed period;
step S202: when a request for acquiring the electric quantity of the battery is received, calculating one or more monitoring voltages according to a plurality of output voltages which are stored latest;
step S203: determining an output battery charge level based on the one or more monitored voltages
Step S204: and determining the battery power according to the output battery power level.
In this embodiment, the descriptions of step S201 to step S203 may refer to the descriptions of step S101 to step S103 in fig. 1, and are not repeated herein.
In this embodiment, the description of the output power level may be different from the description of the battery power, for example, the description is as follows: the first level, the second level, the third level, the fourth level and the fifth level are sequentially arranged from the higher electric quantity level to the lower electric quantity level, the first level corresponds to a 100% electric quantity level, the second level corresponds to an 80% electric quantity level, the third level corresponds to a 60% electric quantity level, the fourth level corresponds to a 40% electric quantity level, and the fifth level corresponds to a 40% electric quantity level, so that the step S204 is implemented to determine the electric quantity of the battery according to the electric quantity level of the output battery. For example, the output battery level is two, the battery level is determined to be 80%. Those skilled in the art will appreciate that this is related to the form of the final output battery power and will not be described further herein.
The embodiment of the present invention detects the output voltage of the battery at a fixed period and stores the detected output voltage, and when a request for obtaining the electric quantity value is received, compared with the prior art which adopts the method of measuring the output voltage once, when the load of the external circuit changes or interference signals exist to influence the change of the single output voltage value, the technical proposal of the embodiment of the invention is that because the battery electric quantity corresponding to the output battery electric quantity grade is determined according to one or more monitoring voltages, and the monitoring voltages are obtained by calculating a plurality of output voltage values which are stored latest, therefore, the detected battery power is closer to the actual battery residual power, and the accuracy of detecting the battery power level is improved.
Furthermore, because the output voltage has a high change frequency when the battery is in a low electric quantity, the technical scheme of the embodiment of the invention sets the target voltage detection times corresponding to the battery electric quantity grade with a low electric quantity to be greater than the target voltage detection times corresponding to the battery electric quantity grade with a high electric quantity, so that the battery electric quantity grade determined by the monitoring voltage calculated by a plurality of output voltages is more accurate.
Fig. 3 is a schematic structural diagram of a battery power detection apparatus according to an embodiment of the present invention. The battery level detection apparatus 30 shown in fig. 3 may include: an output voltage detection unit 301, a monitor voltage calculation unit 302, and a battery power level determination unit 304. Wherein:
the output voltage detection unit 301 is adapted to detect the output voltage of the battery at a fixed period and store the output voltage;
the monitoring voltage calculation unit 302 is adapted to calculate one or more monitoring voltages according to a plurality of output voltages stored latest when a request for acquiring the battery power is received;
the battery power level determining unit 303 is adapted to determine an output battery power level based on the one or more monitored voltages.
In specific implementation, the target voltage detection times corresponding to the battery power level with lower power may be set to be greater than the target voltage detection times corresponding to the battery power level with higher power.
In particular implementations, the battery charge may be determined based on the output battery charge level.
In an embodiment of the present invention, the monitoring voltage calculating unit 302 may include:
the first output voltage value acquisition subunit is suitable for sequentially trying to take out the latest stored output voltage values of the target voltage detection times from high to low according to the order of the battery electric quantity grades, and the target voltage detection times correspond to the current battery electric quantity grade;
a first monitoring voltage calculating subunit adapted to perform calculation of the monitoring voltage when the attempt to take out is successful;
and the first output voltage value cyclic acquisition subunit is suitable for controlling the first output voltage value acquisition subunit to continuously try according to the target voltage detection times corresponding to the next lower battery power level when the attempt of taking out fails until all the battery power levels are traversed.
The battery power level determination unit 303 may include:
the first judgment subunit is suitable for judging whether the monitoring voltage is within a voltage value range corresponding to the current attempted battery power level;
a first output battery power level determining subunit adapted to determine, when the monitored voltage is within a voltage value range corresponding to a currently attempted battery power level, that the currently attempted battery power level is the output battery power level;
and the first cycle control subunit is adapted to control the monitoring voltage calculation unit, the first judgment unit and the first output battery power level determination subunit to continue to judge the monitoring voltage of the next lower power level when the monitoring voltage is not within the voltage value range corresponding to the currently attempted battery power level until all the battery power levels are traversed.
In another embodiment of the present invention, the monitoring voltage calculating unit 302 may further include:
the second output voltage value acquisition subunit is suitable for sequentially trying to take out the latest stored output voltage values of the target voltage detection times in the sequence from low battery electric quantity grade to high battery electric quantity grade, and the target voltage detection times correspond to the current battery electric quantity grade;
a second monitoring voltage calculation subunit adapted to calculate the monitoring voltage if the attempt to extract the voltage is successful;
and the second output voltage value cyclic acquisition subunit is suitable for controlling the second output voltage value acquisition subunit to continuously try according to the target voltage detection times corresponding to the next higher battery power level when the attempt of taking out fails until all the battery power levels are traversed.
The battery power level determination unit 303 may further include:
the second judgment unit is suitable for judging whether the monitoring voltage is in a voltage value range corresponding to the level of the battery electric quantity tried currently;
a second output battery power level determining subunit, adapted to determine, when the monitored voltage is within a voltage value range corresponding to a currently attempted battery power level, that the currently attempted battery power level is the output battery power level;
and the second cycle control subunit is adapted to control the monitoring voltage calculation unit, the first judgment unit and the first output battery power level determination subunit to continue to judge the monitoring voltage of the next higher power level until all the battery power levels are traversed when the monitoring voltage is not within the voltage value range corresponding to the currently attempted battery power level.
In a specific implementation, the performing the calculation of the monitoring voltage includes: and calculating the average value of the latest stored output voltage values of the target voltage detection times, and taking the average value as the monitoring voltage.
In specific implementation, the number of times of target voltage detection corresponding to a lower battery power level is greater than the number of times of target voltage detection corresponding to a higher battery power level.
The embodiment of the present invention detects the output voltage of the battery at a fixed period and stores the detected output voltage, and when a request for obtaining the electric quantity value is received, compared with the prior art which adopts the method of measuring the output voltage once, when the load of the external circuit changes or interference signals exist to influence the change of the single output voltage value, the technical proposal of the embodiment of the invention is that because the battery electric quantity corresponding to the output battery electric quantity grade is determined according to one or more monitoring voltages, and the monitoring voltages are obtained by calculating a plurality of output voltage values which are stored latest, therefore, the detected battery power is closer to the actual battery residual power, and the accuracy of detecting the battery power level is improved.
Furthermore, because the output voltage has a high change frequency when the battery is in a low electric quantity, the technical scheme of the embodiment of the invention sets the target voltage detection times corresponding to the battery electric quantity grade with a low electric quantity to be greater than the target voltage detection times corresponding to the battery electric quantity grade with a high electric quantity, so that the battery electric quantity grade determined by the monitoring voltage calculated by a plurality of output voltages is more accurate.
Fig. 4 is a schematic structural diagram of another battery level detection apparatus according to an embodiment of the present invention, and the battery level detection apparatus 40 shown in fig. 4 may include: an output voltage detection unit 401, a monitor voltage calculation unit 402, a battery level determination unit 403, and a battery level determination unit 404. Wherein:
the output voltage detection unit 401, the monitor voltage calculation unit 402, and the battery power level determination unit 404 may correspond to the descriptions of the output voltage detection unit 301, the monitor voltage calculation unit 302, and the battery power level determination unit 304 in fig. 3, and are not described herein again.
The battery level determining unit 404 is adapted to determine the battery level according to the output battery level.
The embodiment of the present invention detects the output voltage of the battery at a fixed period and stores the detected output voltage, and when a request for obtaining the electric quantity value is received, compared with the prior art which adopts the method of measuring the output voltage once, when the load of the external circuit changes or interference signals exist to influence the change of the single output voltage value, the technical proposal of the embodiment of the invention is that because the battery electric quantity corresponding to the output battery electric quantity grade is determined according to one or more monitoring voltages, and the monitoring voltages are obtained by calculating a plurality of output voltage values which are stored latest, therefore, the detected battery power is closer to the actual battery residual power, and the accuracy of detecting the battery power level is improved.
Furthermore, because the output voltage has a high change frequency when the battery is in a low electric quantity, the technical scheme of the embodiment of the invention sets the target voltage detection times corresponding to the battery electric quantity grade with a low electric quantity to be greater than the target voltage detection times corresponding to the battery electric quantity grade with a high electric quantity, so that the battery electric quantity grade determined by the monitoring voltage calculated by a plurality of output voltages is more accurate.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by instructions associated with hardware via a program, which may be stored in a computer-readable storage medium, and the storage medium may include: ROM, RAM, magnetic or optical disks, and the like.
The method and system of the embodiments of the present invention have been described in detail, but the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (12)

1. A battery power detection method is characterized by comprising the following steps:
presetting a plurality of different battery electric quantity grades and target voltage detection times required to be detected by each battery electric quantity grade, wherein the target voltage detection times corresponding to the lower battery electric quantity grade are greater than the target voltage detection times corresponding to the higher battery electric quantity grade; each battery power level corresponds to a different battery power range;
detecting and storing the output voltage of the battery at a fixed period;
when a request for acquiring the electric quantity of the battery is received, sequentially trying to extract the latest stored output voltage values of the target voltage detection times corresponding to the current trial grade at each grade according to a fixed grade sequence, and calculating one or more monitoring voltages based on the extracted output voltage values;
determining an output battery power level from the one or more monitored voltages;
and determining the battery power according to the output battery power level.
2. The battery level detection method according to claim 1, wherein the attempting to take out a latest stored output voltage value of the target voltage detection times corresponding to a current attempt level at each level in turn in a fixed order of levels, and calculating one or more monitoring voltages based on the taken out output voltage values comprises:
according to the sequence of the battery electric quantity grade from high to low, sequentially trying to take out the latest stored output voltage values of the target voltage detection times, wherein the target voltage detection times correspond to the battery electric quantity grade;
if the attempt to extract is successful, calculating the monitoring voltage;
and if the attempt of taking out fails, continuing to attempt according to the target voltage detection times corresponding to the next lower battery power level until all the battery power levels are traversed.
3. The battery charge level detection method of claim 2, wherein said determining an output battery charge level from said one or more monitored voltages comprises:
judging whether the monitoring voltage is within a voltage value range corresponding to the level of the battery electric quantity tried at present;
when the monitoring voltage is within a voltage value range corresponding to the current attempted battery power level, determining the current attempted battery power level as the output battery power level;
and when the monitoring voltage is not in the voltage value range corresponding to the current attempted battery power level, continuing to calculate the monitoring voltage according to the next lower battery power level and making a judgment until all the battery power levels are traversed.
4. The battery level detection method according to claim 1, wherein the attempting to take out a latest stored output voltage value of the target voltage detection times corresponding to a current attempt level at each level in turn in a fixed order of levels, and calculating one or more monitoring voltages based on the taken out output voltage values comprises:
sequentially trying to take out the latest stored output voltage values of the target voltage detection times according to the sequence of the battery power level from low to high, wherein the target voltage detection times correspond to the battery power level;
if the attempt to extract is successful, calculating the monitoring voltage;
and if the attempt of taking out fails, continuing to attempt according to the target voltage detection times corresponding to the next higher battery power level until all the battery power levels are traversed.
5. The battery charge level detection method of claim 4, wherein said determining an output battery charge level from said one or more monitored voltages comprises:
judging whether the monitoring voltage is within a voltage value range corresponding to the level of the battery electric quantity tried at present;
when the monitoring voltage is within a voltage value range corresponding to the current attempted battery power level, determining the current attempted battery power level as the output battery power level;
and when the monitoring voltage is not in the voltage value range corresponding to the current attempted battery power level, continuing to judge the detection voltage of the next higher power level until all the battery power levels are traversed.
6. The battery level detection method according to any one of claims 2 to 5, wherein the performing of the calculation of the monitoring voltage includes: and calculating the average value of the latest stored output voltage values of the target voltage detection times, and taking the average value as the monitoring voltage.
7. A battery level detection apparatus, comprising:
the output voltage detection unit is suitable for presetting a plurality of different battery electric quantity grades and target voltage detection times required to be detected by each battery electric quantity grade, wherein the target voltage detection times corresponding to the lower battery electric quantity grade are greater than the target voltage detection times corresponding to the higher battery electric quantity grade; detecting and storing the output voltage of the battery at a fixed period; each battery power level corresponds to a different battery power range;
a monitoring voltage calculation unit adapted to, when receiving a request for acquiring a battery capacity, try to take out, at each level, a latest stored output voltage value of a target voltage detection number of times corresponding to a current level of try in turn in a fixed level order, and calculate one or more monitoring voltages based on the taken out output voltage values;
a battery power level determination unit adapted to determine an output battery power level from the one or more monitored voltages;
and the battery electric quantity determining unit is suitable for determining the battery electric quantity according to the output battery electric quantity grade.
8. The battery level detection device according to claim 7, wherein the monitor voltage calculation unit includes:
the first output voltage value acquisition subunit is suitable for sequentially trying to take out the latest stored output voltage values of the target voltage detection times from high to low according to the order of the battery electric quantity grades, and the target voltage detection times correspond to the current battery electric quantity grade;
a first monitoring voltage calculating subunit adapted to perform calculation of the monitoring voltage when the attempt to take out is successful;
and the first output voltage value cyclic acquisition subunit is suitable for controlling the first output voltage value acquisition subunit to continuously try according to the target voltage detection times corresponding to the next lower battery power level when the attempt of taking out fails until all the battery power levels are traversed.
9. The battery charge level detecting apparatus according to claim 8, wherein the battery charge level determining unit includes:
the first judgment unit is suitable for judging whether the monitoring voltage is in a voltage value range corresponding to the current attempted battery electric quantity grade;
a first output battery power level determining subunit adapted to determine, when the monitored voltage is within a voltage value range corresponding to a currently attempted battery power level, that the currently attempted battery power level is the output battery power level;
and the first cycle control subunit is adapted to control the monitoring voltage calculation unit, the first judgment unit and the first output battery power level determination subunit to continue to judge the monitoring voltage of the next lower power level when the monitoring voltage is not within the voltage value range corresponding to the currently attempted battery power level until all the battery power levels are traversed.
10. The battery level detection device according to claim 7, wherein the monitor voltage calculation unit includes:
the second output voltage value acquisition subunit is suitable for sequentially trying to take out the latest stored output voltage values of the target voltage detection times in the sequence from low battery electric quantity grade to high battery electric quantity grade, and the target voltage detection times correspond to the current battery electric quantity grade;
a second monitoring voltage calculation subunit adapted to calculate the monitoring voltage if the attempt to extract the voltage is successful;
and the second output voltage value cyclic acquisition subunit is suitable for controlling the second output voltage value acquisition subunit to continuously try according to the target voltage detection times corresponding to the next higher battery power level when the attempt of taking out fails until all the battery power levels are traversed.
11. The battery charge level detecting apparatus according to claim 10, wherein the battery charge level determining unit includes:
the second judgment unit is suitable for judging whether the monitoring voltage is in a voltage value range corresponding to the level of the battery electric quantity tried currently;
a second output battery power level determining subunit, adapted to determine, when the monitored voltage is within a voltage value range corresponding to a currently attempted battery power level, that the currently attempted battery power level is the output battery power level;
and the second cycle control subunit is adapted to control the monitoring voltage calculation unit, the first judgment unit and the first output battery power level determination subunit to continue to judge the monitoring voltage of the next higher power level until all the battery power levels are traversed when the monitoring voltage is not within the voltage value range corresponding to the currently attempted battery power level.
12. The battery level detection apparatus according to any one of claims 8 to 11, wherein the performing of the calculation of the monitoring voltage includes: and calculating the average value of the latest stored output voltage values of the target voltage detection times, and taking the average value as the monitoring voltage.
CN201511030373.4A 2015-12-31 2015-12-31 Battery electric quantity detection method and device Active CN105425166B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511030373.4A CN105425166B (en) 2015-12-31 2015-12-31 Battery electric quantity detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511030373.4A CN105425166B (en) 2015-12-31 2015-12-31 Battery electric quantity detection method and device

Publications (2)

Publication Number Publication Date
CN105425166A CN105425166A (en) 2016-03-23
CN105425166B true CN105425166B (en) 2020-08-28

Family

ID=55503497

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511030373.4A Active CN105425166B (en) 2015-12-31 2015-12-31 Battery electric quantity detection method and device

Country Status (1)

Country Link
CN (1) CN105425166B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371323A (en) * 2016-08-17 2017-02-01 西安交通大学 Cloud sensor for built-in energy conservation module
CN109683097A (en) * 2018-12-21 2019-04-26 广东浪潮大数据研究有限公司 A kind of BBU capacity method of calibration, device and relevant device
CN110632522B (en) * 2019-10-09 2022-06-24 赣州得辉达科技有限公司 Sound box electric quantity display method
CN114819539A (en) * 2022-04-06 2022-07-29 安徽碳鑫科技有限公司 Detection system of fine coal gasification coal type based on data analysis

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102298119A (en) * 2011-05-24 2011-12-28 惠州Tcl移动通信有限公司 Device and method for displaying battery power
CN102680897A (en) * 2011-03-15 2012-09-19 联芯科技有限公司 Battery capacity management method and device
CN102914744A (en) * 2012-06-29 2013-02-06 惠州Tcl移动通信有限公司 Mobile terminal, battery power display system of mobile terminal, and method for acquiring battery power
CN102946479A (en) * 2012-11-02 2013-02-27 惠州Tcl移动通信有限公司 Method for mobile terminal to update electric quantity of battery and mobile terminal
CN103064025A (en) * 2011-10-19 2013-04-24 北京谊安医疗系统股份有限公司 Battery electric quantity detection method and device using the same
CN103913705A (en) * 2012-12-31 2014-07-09 比亚迪股份有限公司 Calculation method and device for battery electricity quantity of battery system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101728588B (en) * 2008-10-10 2012-01-25 鸿富锦精密工业(深圳)有限公司 Wireless communication terminal and method for determining battery electric quantity thereof
CN105021962B (en) * 2015-07-22 2018-12-18 杰华特微电子(杭州)有限公司 Battery capacity method of setting display and initialization circuit

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102680897A (en) * 2011-03-15 2012-09-19 联芯科技有限公司 Battery capacity management method and device
CN102298119A (en) * 2011-05-24 2011-12-28 惠州Tcl移动通信有限公司 Device and method for displaying battery power
CN103064025A (en) * 2011-10-19 2013-04-24 北京谊安医疗系统股份有限公司 Battery electric quantity detection method and device using the same
CN102914744A (en) * 2012-06-29 2013-02-06 惠州Tcl移动通信有限公司 Mobile terminal, battery power display system of mobile terminal, and method for acquiring battery power
CN102946479A (en) * 2012-11-02 2013-02-27 惠州Tcl移动通信有限公司 Method for mobile terminal to update electric quantity of battery and mobile terminal
CN103913705A (en) * 2012-12-31 2014-07-09 比亚迪股份有限公司 Calculation method and device for battery electricity quantity of battery system

Also Published As

Publication number Publication date
CN105425166A (en) 2016-03-23

Similar Documents

Publication Publication Date Title
CN105425166B (en) Battery electric quantity detection method and device
EP3832328B1 (en) Method and apparatus for detecting micro short circuit of battery
US10386420B2 (en) Secondary battery degradation determination method and secondary battery degradation determination device
CN108572325B (en) Detection method, device and test equipment for lithium separation of battery
EP2851700B1 (en) Method and terminal for displaying capacity of battery
CN104656021B (en) The predictor method and device of a kind of remaining battery capacity
CN106546921B (en) Method and device for updating battery capacity of storage battery
CN106249168B (en) A kind of battery curve modification method and device
CN110888065B (en) Battery pack state of charge correction method and device
CN104297692A (en) Method for detecting service life of battery
CN102540092A (en) Method and device for monitoring the maximum available capacity of battery
CN102914744B (en) Mobile terminal, battery power display system of mobile terminal, and method for acquiring battery power
JP2016508014A5 (en)
CN104749528B (en) Dynamic lithium battery capacity determining methods
CN110244233A (en) A kind of detection method of battery, electronic equipment and computer storage medium
CN104795864B (en) A kind of mobile terminal and charged state detection method of accurate detection charged state
US20150309122A1 (en) Battery state estimation method
CN110687458A (en) Terminal battery electric quantity determination method and device
US20160146894A1 (en) Method for measuring electric capacity of cell module
CN104166097B (en) The electricity method for measurement of battery
CN107219404B (en) Frequency adjusting method and device
CN115436827A (en) Insulation resistance detection method, device and equipment
JP6283952B2 (en) Battery remaining amount detection device, battery system, battery remaining amount detection method, and program
CN110994709B (en) Battery charging capacity control method and controller
CN111157907B (en) Detection method and device, charging method and device, electronic device and storage medium

Legal Events

Date Code Title Description
C06 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