# Patent

## Title
Battery charging/discharging apparatus and battery charging/discharging method

## Abstract

When a battery is in standby mode, a microcomputer switches to sleep mode if no charging/discharging current is supplied within a predetermined time, and controls a timer so as to start measuring the standby time of the battery. When a charging/discharging current is supplied, the microcomputer switches to wake-up mode, and controls the timer so as to stop measuring the standby time. Then, the microcomputer reads the measured standby time. Based on the read standby time, the microcomputer calculates the correction value to correct the currently stored remaining battery capacity value.

## Background
This application is a continuation of Ser. No. 09/882,403, filed Jun. 15, 2001 now abandoned.


BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention generally relates to a charging/discharging apparatus, and particularly to a battery charging/discharging apparatus and a battery charging/discharging method in which the remaining capacity of a battery can be determined with high accuracy.
2. Description of the Related Art
FIG. 1 is a block diagram showing an example structure of a conventional battery pack 1.
The battery pack 1 includes cells 12-1 and 12-2 connected in series (hereinafter collectively referred to as “battery 12”, unless the cells 12-1 and 12-2 should be discriminated), which may comprise lithium ion batteries, for powering electronic devices. The positive electrode of the cell 12-1 is connected to a battery terminal 11-1 while the negative electrode of the cell 12-2 is connected to a battery terminal 11-2 via a resistor 13 provided for current detection and a protection device 14. When the battery pack 1 is attached to an electronic device (not shown), the battery terminals 11-1 and 11-2 are connected to connection terminals of the electronic device so that the electronic device can be powered by the battery 12.
A cell voltage detector 15 detects a cell voltage when the cell 12-1 and the cell 12-2 are connected in series, and outputs the detection result to a microcomputer 17. A charging/discharging current detector 16 detects the direction and value of voltage drop due to the current flowing to the resistor 13 in order to detect the existence of a charging current or a discharging current. The result is then output to the microcomputer 17. The protection device 14 protects the battery 12 from being overcharged or overdischarged.
The microcomputer 17 calculates the remaining battery capacity value based on the cell voltage supplied from the cell voltage detector 15, and stores the resulting value in an internal memory 17a. The microcomputer 17 switches to wake-up mode if a charging current or a discharging current is supplied from the charging/discharging current detector 16 or if it receives incoming data from the outside. If no charging/discharging current is supplied within a predetermined time or if no incoming data is received while it is in wake-up mode, the microcomputer 17 switches to sleep mode.
FIG. 2 is a flowchart of the process for calculating the remaining battery capacity value of the battery pack 1 shown in FIG. 1.
At step S1, the microcomputer 17 determines whether or not the battery 12 has been charged, i.e., whether or not a charging current has been supplied from the charging/discharging current detector 16. If it is determined at step S1 that the battery 12 has been charged, the process proceeds to step S2, in which the additional capacity value is calculated by equation (1) as follows:

additional capacity value=charging current value×sampling interval  (1)

After the additional capacity value has been calculated at step S2, at step S3 the microcomputer 17 reads the remaining capacity value stored in the memory 17a, and calculates the up-to-date remaining capacity value by equation (2) as follows:

up-to-date remaining capacity value=remaining capacity value read from the memory 17a+additional capacity value  (2)

At step S3, the microcomputer 17 stores the up-to-date remaining capacity value calculated by equation (2) in the memory 17a or updates the existing remaining capacity value, and the process returns to step S1 to iterate the above-described operation.
If it is determined at step S1 that the battery 12 has not been charged, the process proceeds to step S4, in which the microcomputer 17 further determines whether or not the battery 12 has been discharged, i.e., whether or not a discharging current has been supplied from the charging/discharging current detector 16. If it is determined at step S4 that it has not been discharged, the process returns to step S1 to iterate the above-described operation.
If it is determined at step S4 that the battery 12 has been discharged, the process proceeds to step S5, in which the microcomputer 17 calculates the reduced capacity value by equation (3) as follows:

reduced capacity value=discharging current value×sampling interval  (3)

After the reduced capacity value has been calculated at step S5, at step S6, the microcomputer 17 reads the remaining capacity value stored in the memory 17a, and calculates the up-to-date remaining capacity value by equation (4) as follows:

up-to-date remaining capacity value=remaining capacity value read from the memory 17a−reduced capacity value  (4)

At step S6, the microcomputer 17 stores the up-to-date remaining capacity value calculated by equation (4) in the memory 17a or updates the existing remaining capacity value, and the process returns to step S1 to iterate the above-described operation.
Accordingly, the calculation process using a charging current or a discharging current is performed to determine the remaining battery capacity.
The microcomputer 17 utilizes the power supplied from the battery 12 in order to determine the remaining battery capacity. Hence, when the battery is in standby mode (when the remaining battery capacity calculation process is not performed), the microcomputer 17 switches to sleep mode in order to reduce the power consumption of the microcomputer 17. This may suppress discharge current (leakage current) of the battery 12 in standby mode.
When the charging/discharging current detector 16 detects a charging current or a discharging current, the microcomputer 17 switches to wake-up mode; however, discharge current (leakage current) when the battery is in standby mode is minute, and thus cannot be detected by the charging/discharging current detector 16.
As a result, when the battery pack 1 is in standby mode, a trace amount of discharge current (leakage current) flows, but the accumulated current (standby current×standby time) cannot be measured or detected because the microcomputer 17 is in sleep mode. Therefore, if the battery pack 1 is in standby mode for a long time, there is a problem in that the remaining capacity value stored in the memory 17a by the microcomputer 17 might be relatively greater than the actual remaining capacity value (actual capacity value).
If the microcomputer 17 is forced not to enter sleep mode and is allowed to detect the standby current, the current will be minute, and will not be able to be precisely detected. There still exists such a problem that an error occurs between the remaining capacity value stored in the memory 17a and the actual capacity value.
SUMMARY OF THE INVENTION
Accordingly, it is an object of the present invention to provide a battery charging/discharging apparatus and a battery charging/discharging method in which the remaining battery capacity can be determined with high accuracy.
To this end, in one aspect of the present invention, a battery charging/discharging apparatus for determining the remaining capacity of a battery includes a measuring unit for measuring a standby time of the battery, a correction value calculating unit for calculating a correction value for the remaining capacity of the battery based on the standby time measured by the measuring unit, and a correcting unit for correcting a current remaining capacity value of the battery based on the correction value calculated by the correction value calculating unit.
The battery charging/discharging apparatus may further include a determining unit for determining whether or not the standby time has reached a predetermined time. The correction value calculating unit may calculate the correction value for the remaining capacity of the battery at a predetermined time interval based on the result of the determining unit.
According to the present invention, a battery charging/discharging method for determining the remaining capacity of a battery includes the steps of measuring a standby time of the battery, calculating a correction value for the remaining capacity of the battery based on the standby time measured in the measuring step, and correcting a current remaining capacity value of the battery based on the correction value calculated in the calculating step.
Accordingly, the correction value is calculated based on the standby time of the battery, and is used to correct currently stored remaining capacity value of the battery. This enables the remaining battery capacity to be determined with high accuracy.
In another aspect of the present invention, a battery charging/discharging apparatus for determining the remaining capacity of a battery includes a detecting unit for detecting a cell voltage, a reading unit for reading an appropriate remaining capacity value based on the cell voltage detected by the detecting unit, a comparing unit for comparing the appropriate remaining capacity value read by the reading unit with a currently stored remaining capacity value, and an updating unit for updating the currently stored remaining capacity value based on the result of the comparing unit.
The battery charging/discharging apparatus may further include a setting unit for setting the appropriate remaining capacity value that is suitable for the cell voltage.
According to the present invention, a battery charging/discharging method for determining the remaining capacity of a battery includes the steps of detecting a cell voltage, reading an appropriate remaining capacity value based on the cell voltage detected in the detecting step, comparing the appropriate remaining capacity value read in the reading step with a currently stored remaining capacity value, and updating the currently stored remaining capacity value based on the result in the comparing step.
Accordingly, based on the cell voltage which is detected, an appropriate remaining capacity value is read. The read remaining capacity value is then compared with a currently stored remaining capacity value to update the currently stored remaining capacity value based on the comparing result. This enables the remaining battery capacity to be determined at low cost with ease.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram showing an example structure of a conventional battery pack;
FIG. 2 is a flowchart of the process for calculating the remaining capacity of the battery pack shown in FIG. 1;
FIG. 3 is a block diagram of a battery pack according to one embodiment of the present invention;
FIG. 4 is a flowchart of the process for correcting the remaining battery capacity value according to one embodiment of the present invention;
FIG. 5 is a flowchart of the process for correcting the remaining battery capacity value according to a modification of the embodiment of the present invention; and
FIG. 6 is a flowchart of the process for correcting the remaining battery capacity value according to another modification of the embodiment of the present invention.



DESCRIPTION OF THE PREFERRED EMBODIMENT
FIG. 3 is a block diagram of a battery pack 1 according to one embodiment of the present invention. The same reference numerals are assigned to the parts corresponding to those in the conventional one shown in FIG. 1, and a description thereof is thus omitted as appropriate.
Referring to FIG. 3, the battery pack 1 includes cell voltage detectors 15-1 and 15-2 coupled to the cells 12-1 and 12-2, respectively, to detect cell voltages with higher accuracy, and further includes a timer 21. Other parts are constructed in the same manner as those in the conventional one shown in FIG. 1.
The cell voltage detector 15-1 detects the cell voltage of the cell 12-1, and outputs the detection result to the microcomputer 17. The cell voltage detector 15-2 detects the cell voltage of the cell 12-2, and outputs the detection result to the microcomputer 17.
The microcomputer 17 calculates the remaining battery capacity value based on the cell voltages supplied from the cell voltage detectors 15-1 and 15-2, and stores the resulting value in the internal memory 17a. 
If no charging current or no discharging current is detected or supplied within a predetermined time, the microcomputer 17 switches to sleep mode. Then, the microcomputer 17 controls the timer 21 so as to start measuring the standby time. If a charging current or a discharging current is detected, the microcomputer 17 switches to wake-up mode. Then, the microcomputer 17 controls the timer 21 so as to stop measuring the standby time, and reads the measured standby time. Based on the standby time read, the microcomputer 17 calculates the correction value using a calculation process, as will be described, to correct the remaining battery capacity value.
In response to the instruction from the microcomputer 17, the timer 21 starts measuring the standby time. The timer 21 also stops measuring the standby time in response to the instruction of the microcomputer 17.
FIG. 4 is a flowchart of the process which is performed by the microcomputer 17 for correcting the remaining battery capacity value of the battery pack 1 shown in FIG. 3.
At step S11, the microcomputer 17 determines whether or not the battery 12 has been discharged or charged, i.e., whether or not a discharging current or a charging current has been detected by the charging/discharging current detector 16 within a predetermined time, e.g., 10 seconds. If it is determined at step S11 that the battery 12 has not been discharged or charged within the predetermined time, the process proceeds to step S12.
At steps S12 and S13, the microcomputer 17 controls the timer 21 so as to start measuring the standby time, before switching to sleep mode. At step S14, the microcomputer 17 determines whether or not the battery 12 has been discharged or charged, i.e., whether or not a discharging current or a charging current has been detected by the charging/discharging current detector 16. If it is determined at step S14 that the battery 12 has not been discharged or charged, the process returns to step S13, in which the microcomputer 17 waits while it remains in sleep mode. If it is determined at step S14 that the battery 12 has been discharged or charged, the process proceeds to step S15.
Following step S14, or if it is determined at step S11 that the battery 12 has been charged or discharged within the predetermined time, the microcomputer 17 switches to wake-up mode at step S15. At steps S16 and S17, the microcomputer 17 controls the timer 21 so as to stop measuring the standby time, and reads the measured standby time. The microcomputer 17 then resets the timer 21.
At step S18, the microcomputer 17 calculates the correction value from the standby time read at step S17 by equation (5) as follows:

correction value=(standby current value+battery self-discharge current value)×standby time  (5)

where the standby current and the self-discharge current which flow per unit time are measured in advance and stored in the memory 17a. 

Following step S18, at step S19, the microcomputer 17 reads the remaining capacity-value stored in the memory 17a, and calculates the up-to-date remaining capacity value by equation (6) as follows.

up-to-date remaining capacity value=remaining capacity value read from the memory 17a−correction value  (6)

At step S19, the microcomputer 17 stores the up-to-date remaining capacity value calculated by equation (6) in the memory 17a or updates the existing remaining capacity value, and the process returns to step S11 to iterate the above-described operation.
The standby current, the battery self-discharge current, and the standby time are used to calculate the correction value in this way, and the remaining battery capacity can therefore be corrected with high accuracy.
However, if an overflow of the timer 21 occurs during the process for correcting the remaining battery capacity value according to the flowchart illustrated in FIG. 4, an accurate correction of the remaining battery capacity value may not be performed from the time point of the overflow.
In order to address this circumstance, the correction process is performed at fixed time intervals while the microcomputer 17 is in wake-up mode, thus the remaining battery capacity value can be more accurately corrected.
FIG. 5 is a flowchart of the process for correcting the remaining battery capacity value according to a modification of the embodiment of the present invention, in which the remaining battery capacity value is corrected at a fixed time interval.
At step S31, the microcomputer 17 determines whether or not the battery 12 has been discharged or charged within a predetermined time. If it is determined at step S31 that it has not been discharged or charged within the predetermined time, the process proceeds to step S32.
At steps S32 and S33, the microcomputer 17 controls the timer 21 so as to start measuring the standby time, before switching to sleep mode. At step S34, the microcomputer 17 determines whether or not a preset time has elapsed. The period in which an overflow does not occur is set in advance as the preset time, and when the preset time has elapsed, the timer 21 notifies the microcomputer 17 of the elapse of the preset time. That is, the microcomputer 17 determines whether or not it receives a command from the timer 21 indicating that the preset time has elapsed.
If it is determined at step S34 that the preset time has elapsed, the process proceeds to step S35, in which the microcomputer 17 switches to wake-up mode in response to the command from the timer 21. At step S36, the microcomputer 17 resets the timer 21.
At steps S37 and S38, the microcomputer 17 calculates the correction value from equation (5), and further calculates the up-to-date remaining capacity value from equation (6). Then, the microcomputer 17 stores the up-to-date remaining capacity value in the memory 17a or updates the existing remaining capacity value, and the process returns to step S31 to iterate the above-described operation.
If it is determined at step S31 that the battery 12 has been discharged or charged within the predetermined time, or if it is determined at step S14 that the preset time has not elapsed, the process proceeds to step S39.
The operation at steps S39 to S44 is the same as that of steps S14 to S19 as previously described with reference to FIG. 4, and a description thereof is thus omitted.
Accordingly, the standby current, the battery self-discharge current, and the standby time are used to calculate the correction value at fixed time intervals, thus the remaining battery capacity may be corrected with high accuracy even when the battery pack 1 is in standby mode for a long time.
Now, the operation for calculating the correction value of the remaining battery capacity is described using specific values as an example.
If the standby current which flows when the battery pack 1 is in standby mode is 40 μA, the self-discharge current is 10 μA, and the standby time is 100 hours, then the correction value is found as follows from equation (5):

correction value=(40 μA+10 μA)×100 h=5000 μAh=5 mAh.

If the correction value is calculated taking an overflow of the timer 21 into consideration, and when the correction process is performed, for example, at an interval of 20 hours, then the correction value is found as follows from equation (5):

correction value=(40 μA+10 μA)×20 h=1000 μAh=1 mAh.

This enables the remaining battery capacity value to be corrected with high accuracy even if the battery pack 1 is in standby mode for a long time.

As described above, the timer 21 is used to measure the standby time, and the remaining battery capacity value is corrected based on the resulting standby time. Instead, cell voltages may be detected to correct the remaining battery capacity value at low cost with ease although the correction accuracy is not higher than that when an additional timer is provided.
FIG. 6 is a flowchart of the process for correcting the remaining battery capacity value according to another modification of the embodiment of the present invention, in which the remaining battery capacity value is corrected based on cell voltages.
At step S51, the microcomputer 17 determines whether or not the battery 12 has been discharged or charged within a predetermined time. If it is determined at step S51 that it has not been discharged or charged within the predetermined time, the process proceeds to step S52, in which the microcomputer 17 switches to sleep mode.
If it is determined at step S51 that the battery 12 has been discharged or charged, the process proceeds to step S53, in which the microcomputer 17 switches to wake-up mode. At step S54, the microcomputer 17 detects the cell voltages supplied by the cell voltage detectors 15-1 and 15-2.
At step S55, the microcomputer 17 reads appropriate remaining capacity value from the memory 17a based on the cell voltages detected at step S54. In this case, the remaining battery capacity value suitable for each cell voltage is set and is stored in the memory 17a. 
At step S56, the microcomputer 17 reads the current remaining capacity value stored in the memory 17a, and determines whether or not it is greater than the remaining capacity value which is read based on the cell voltages at step S55.
If it is determined at step S56 that the current remaining capacity value stored in the memory 17a is greater than the remaining capacity value which is read based on the cell voltages, the process proceeds step S57, in which the microcomputer 17 stores the remaining capacity value which is read based on the cell voltages as the current remaining capacity value in the memory 17a or updates the current remaining capacity value. Then, the process returns to step S51 to iterate the above-described operation.
If it is determined at step S56 that the current remaining capacity value stored in the memory 17a is not greater than, i.e., equal to, the remaining capacity value which is read based on the cell voltages, the process skips step S57 (without updating the current remaining capacity value) back to step S51 to iterate the above-described operation.
Accordingly, if it is determined that the remaining capacity value is not appropriate, the current remaining capacity value is updated with the remaining capacity value which is read based on the cell voltages. This allows significant deviations of the remaining capacity value to be corrected even when no timer is used.

## Claims

1. A battery charging/discharging apparatus for determining an actual remaining capacity of a battery, comprising:
a detecting unit for detecting a cell voltage;
a calculating unit for calculating a remaining capacity value based on the cell voltage detected by said detecting unit;
a memory for storing the remaining capacity value calculated by said calculating unit;
a measuring unit for measuring a standby time during which the battery is in a standby mode;
a correction value calculating unit for calculating a correction value for the remaining capacity of the battery based on the standby time measured by said measuring unit; and
a correcting unit for updating the remaining capacity value stored in said memory based on the correction value calculated by said correction value calculating unit, wherein said measuring unit determines whether the measured standby time has reached a predetermined time, and
wherein said correcting unit updates the remaining capacity value stored in said memory at a predetermined time interval based on a determination result of said measuring unit.

2. A battery pack comprising;
a battery cell;
terminals connected to said battery cell for providing power from said battery cell;
a detecting unit for detecting a cell voltage of said battery cell;
calculating unit for calculating a remaining capacity value based on the cell voltage detected by said detecting unit;
a memory for storing the remaining capacity value calculated by said calculating unit;
a measuring unit for measuring a standby time during which the battery is in a standby mode;
a correction value calculating unit for calculating a correction value for the remaining capacity of the battery based on the standby time measured by said measuring unit; and
a correcting unit for updating the remaining capacity value stored in said memory based on the correction value calculated by said correction value calculating unit,
wherein said measuring unit determines whether the measured standby time has reached a predetermined time, and
wherein said correcting unit updates the remaining capacity value stored in said memory at a predetermined time interval based on a determination result of said measuring unit.

3. A battery pack for providing power comprising:
a battery cell;
terminals connected to said battery cell for providing power from said battery cell;
a detecting unit for detecting a cell voltage of said battery cell;
a calculating unit for calculating a remaining capacity value based on the cell voltage detected by said detecting unit;
a memory for storing the remaining capacity value calculated by said calculating unit;
a measuring unit for measuring a standby time during which the battery is in a standby mode;
a correction value calculating unit for calculating a correction value for the remaining capacity of the battery based on the standby time measured by said measuring unit; and
a correcting unit for updating the remaining capacity value stored in said memory based on the correction value calculated by said correction value calculating unit,
wherein said measuring unit determines whether the standby time has reached a predetermined time, and
wherein said correcting unit updates the remaining capacity value stored in said memory at a predetermined time interval based on a determination result of said measuring unit.

4. A method for determining an actual remaining capacity of a battery, comprising:
detecting a battery cell voltage;
calculating a remaining capacity value based on the cell voltage detected by said detecting step;
storing the remaining capacity value calculated by said calculating step;
measuring a standby time during which the battery is in a standby mode;
calculating a correction value for the remaining capacity of the battery based on the standby time measured in said measuring step; and
updating the remaining capacity value stored in said storing step based on the correction value calculated by said calculating step,
wherein said step of measuring includes determining whether the standby time has reached a predetermined time, and
wherein said correcting step updates the remaining capacity value stored in said memory at a predetermined time interval based on a determination result of said determining step.

5. A method for providing power comprising the steps of:
providing a battery cell;
connecting terminals to said battery cell so as to obtain power from said battery cell
detecting a cell voltage of said battery cell;
calculating a remaining capacity value based on the cell voltage detected by said detecting step;
storing the remaining capacity value calculated by said calculating step;
measuring a standby time during which the battery is in a standby mode;
calculating a correction value for the remaining capacity battery based on the standby time measured by said measuring unit; and
updating the remaining capacity value stored in said memory based on the correction value calculated by said calculating step,
wherein said step of measuring includes determining whether the standby time has reached a predetermined time, and
wherein said correcting unit updates the remaining capacity value stored in said memory at a predetermined time interval based on a determination result of said determining step.