Electronic device with battery capacity detecting function and battery capacity detecting method thereof
AssigneeHon Hai Precision Industry Co., Ltd.
InventorMIN-CHANG CHANG
Life of this patent
Estimating the term…
Abstract
An electronic device with a battery capacity detecting function is provided. The electronic device detects an actual voltage of the battery every first preset time interval, calculates a weighted average voltage within a second preset time interval according to all the detected actual voltages within the second preset time interval, and determines a battery capacity according to the calculated weighted average voltage. A method for detecting a battery capacity of an electronic device is also provided.
Claims6
An electronic device comprising:
- a display unit;
- a battery to supply power to the electronic device;
- a storage storing a first relationship between work modes of the electronic device and offset values, a second relationship between offset voltages and their weights, and a third relationship between weighted average voltages and battery capacities;
- and
- a processing unit to detect the work mode of the electronic device and the actual voltage V every first preset time interval, determine an offset value corresponding to the detected work mode according to the first relationship, and add the determined offset value to the detected actual voltage V to obtain an offset voltage V1, calculate an average voltage V2 of N offset voltages V1 within a second preset time interval;
- the processing unit further to determine an offset voltage V1 after the second preset time interval and determine a weight X1 of the offset voltage V1 determined after the second preset time interval, calculate a weighted average voltage V3 according to a formula V3=V1*X1/N+V2*(N−X1)/N, wherein V1 is the offset voltage V1 obtained after the second preset time interval, X1 is the weight X1 of the offset voltage V1 determined after the second preset time interval, V2 is the average voltage V2 of N offset voltage V1 within the second preset time interval, and determine a battery capacity according to the third relationship, and further display the battery capacity on the display unit.
A method for detecting a battery capacity of an electronic device, wherein the electronic device comprises a battery, and a storage storing a first relationship between work modes of the electronic device and offset values, a second relationship between offset voltages and their weights, and a third relationship between weighted average voltages and battery capacities, the method comprising:
- detecting an actual voltage V of the battery and the work mode of the electronic device every a first preset time interval;
- determining an offset value corresponding to the first relationship, and adds the determined offset value to the actual voltage V to get an offset voltage V1;
- calculating an average voltage V2 of N offset voltages V1 obtained within a second preset time interval;
- determining further determines one offset voltage V1 after the second preset time interval, and a weight X1 of the offset voltage V1 according to a second relationship;
- calculating a weighted average voltage V3 according to a formula V3=V1*X1/N+V2*(N−X1)/N, wherein V1 is the offset voltage V1 obtained after the second preset time interval, X1 is the weight X1 of the offset voltage V1, V2 is the average voltage V2 of N offset voltage V1 within the second preset time interval;
- determining a battery capacity corresponding to the weighted average voltage V3 according to the third relationship;
- displaying the battery capacity on the display unit.
Dependencies are inferred from the claim text.