Method and apparatus for controlling power supply

Abstract: When an AC adapter (29) and a battery (48) are connected to a system, trickle charge is performed with respect to the battery (48) through a trickle charge resistor (66). During the trickle charging of the battery (48), the adapter voltage of the AC adapter (29) and the battery voltage of the battery (48) are detected by voltage detectors (61, 62), respectively. On the basis of a differential voltage representing a difference between the two detected voltages, a power source controller (50) controls the start and stop of the trickle charge at predetermined timings in such a manner that a trickle charge current does not exceed a predetermined value even when the differential voltage increases.

Description: The present invention relates to a method and apparatus for controlling power supply. In general, many electronic apparatuses, such as lap-top personal computers or word processors, are operated by an AC adapter and/or an incorporated chargeable battery. The battery is charged, with a current (i.e., a charge current) supplied from the AC adapter. Even after the battery is in the full charge state, the battery charge is performed by supplying a trickle charge current, the amount of which is smaller than that of the normal charge current. This battery charge is generally referred to as "trickle charge." For the trickle charge, a fixed resistor having a constant resistance is used, and the trickle charge current is supplied through this resistor to the battery. In general, the trickle charge current supplied to the battery is about 1/3 of the capacity of the battery. When the battery has a capacity of 2,100 mAh, the trickle charge current is about 70 mA. In this type of electronic apparatus, a diode for preventing back flow of a charge current and a fixed resistor for controlling a trickle charge current are arranged between an AC adapter and a battery, and the trickle charge is performed when the AC adapter is electrically connected to the electronic apparatus. In the case where the operating voltage of the electronic apparatus is high, it is likely that the battery will be in an over discharge state. Even when the voltage of the battery becomes OV, the elements located around the trickle charge resistor must not be adversely affected by the heat which the resistor generates. Therefore, the wattage of the resistor has to be as large as possible. However, a resistor having a large wattage is inevitably large in size, and is not suitable for incorporation in an electronic apparatus which should be small in size and light in weight, like a lap-top type personal computer. Under the circumstances mentioned above, there is a demand for a power source control apparatus which controls a trickle charge current such that the trickle charge can be efficiently performed by use of a small-sized and small-wattage resistor element. Prior art document EP-A-0 005 841 discloses an apparatus and a method of fast charging batteries by means of precise analysis of the profile of the variation with time of a characteristic of the battery which is indicative of the variation in stored chemical energy as the battery is charged. The method specifically comprises analyzing the profile for the occurrence of a particular series of events preferably including one or more inflection points which precisely identify the point in time at which the application of a fast charge rate should be discontinued. Additional methods of analysis provide for termination or control of the charging current upon the occurrence of the other events such as limiting values on time, voltage or voltage slope or a negative change in the level of stored energy. It is an object of the present invention to provide an apparatus and a method for controlling power supply. To solve this object the present invention provides a power supply control apparatus and method as specified in claims 1 and 6, respectively. This invention can be more fully understood from the following detailed description when taken in conjunction with the accompanying drawings, in which: Fig. 1 is a block circuit diagram showing a computer system used in an embodiment of the present invention; Fig. 2 is a block circuit diagram showing a power source circuit used in the embodiment of the present invention; Fig. 3 is a graph explaining a change of a trickle charge current during the trickle charge according to the present invention and during the trickle charge according to the conventional case; Figs. 4A and 4B are flowcharts of the trickle charge control in a CPU of a power source controller according to the embodiment; Fig. 5 is a flowchart of timer interrupt processing in the CPU of the power source controller according to the embodiment; and Fig. 6 is a diagram explaining a change of a count value and a duty register value during the trickle charge control. A preferred embodiment of the present invention will now be described referring to the accompanying drawings. Fig. 1 shows a block diagram illustrating the configuration of a computer system used in one embodiment of the present invention. As shown in Fig. 1, this computer system comprises a system bus 10, a main CPU (Central Processing Unit) 11 for controlling the entire system, a ROM (Read Only Memory) 12 for storing a control program inherent to the system, etc., a RAM (Random Access Memory) 13, a direct memory access controller (DMAC) 14 for performing the direct memory access control, a programmable interrupt controller (PIC) 15 settable by a program, a programmable interval timer (PIT) 16 settable by a program, a real time clock (RTC) 17 as a timer module with a drive battery 17a, an expansion RAM 18 with a large capacity and connectable to a special card slot, and a backup RAM 19 for storing backup data, etc. to implement a resume function. The computer system also includes a floppy disk controller (FDC) 20. Floppy disk drives (FDDs) 32 and 33 are connected to the floppy disk controller 20 which controls these disk drives. Further, the computer system comprises a printer controller (PRT-CONT) 21, a universal asynchronous receiver/transmitter (UART) 22 as an input/output interface, a keyboard controller (KBC) 23, a display controller (DISP-CONT) 24, a video RAM (VRAM) 25, a power supply interface (PS-IF) 28, an AC adapter 29, a power supply circuit 30 having a power controller (PC-CPU) 50, a keyboard 36, an LCD (Liquid Crystal Display) 37, an expansion bus connector (EBK) 40, a hard disk drive interface (HDD-IF) 41, a hard disk drive (HDD) 42, a power supply switch 45, and a battery 48. A printer 34 or the like is selectively connected to the printer controller 21. An RS-232C interface unit 35 is connected to the universal asynchronous receiver/transmitter 22 as needed. The keyboard controller 23 controls a key input through the keyboard 36. The display controller 24 controls the LCD 37 which is attached swingable to the computer body, or a CRT (Cathode Ray Tube) display 38 which is selectively connected to the computer. The power supply interface 28 receives and transfers serial data from and to the power supply controller 50 in the power supply circuit 30. The AC adapter 29, connectable to the computer system, is connected to an external power supply (not shown), and rectifies/smooths an AC voltage from the external power supply to output a DC voltage. If the AC adapter 29 is connected to the computer system to activate the system, the voltage is supplied from the AC adapter 29 through the power supply circuit 30 to each component of the computer system. A backup voltage V BK is supplied to each of the RAMs 13 and 18, the backup RAM 19 and the VRAM 25. The expansion bus connector 40 is used for functional expansion of the system. For example, an external hard disk drive is selectively connected to the expansion bus connector 40. An expansion unit (not shown) having various components, such as a keyboard, a CRT display, a memory, a connector to the body of the computer system, can also be selectively connected to the expansion bus connector 40. The power supply switch 45 is used to activate this computer system, and has a momentary switch. When the DC voltage is not yet supplied to the individual components from the power supply circuit 30, or when the power supply is off, depression of the power supply switch 45 activates the power supply. When the DC voltage is supplied to the individual components from the power supply circuit 30 and the system is operated, or when the power supply is on, depression of the power supply switch 45 deactivates the power supply. The battery 48 can be recharged or rapidly charged and built in the computer system. If the AC adapter 29 is not connected to the computer system and the battery 48 is built therein instead, a DC voltage is supplied from the battery 48 through the power supply circuit 30 to the individual components of the computer system in order to activate the computer system. A nickel-hydrogen battery is used as the battery 48, for example. The power supply circuit 30 will now be described. Fig. 2 is a structural block diagram illustrating the power supply circuit according to the embodiment of the prevent invention. The power supply circuit 30 includes the power supply controller 50, a DC/DC converter 60, voltage detectors 61 and 62, resistors 65 and 66, and FET switches 70, 71, 72 and 73. The AC adapter 29 has a constant-voltage output terminal 29a, a control-signal input terminal 29b, and a constant-current output terminal 29c. A constant voltage of 18V is output from the constant-voltage output terminal 29a. A constant current of 2.2A is output from the constant-current output terminal 29c. A control signal from the power supply controller 50 is supplied to the control signal input terminal 29b. In response to the control signal, the AC adapter 29 outputs either the constant voltage or constant current. The DC/DC converter 60 generates a DC voltage of a predetermined level based on the DC voltage supplied from either the AC adapter 29 or the battery 48, and supplies the generated DC voltage of the predetermined level to the individual components of the computer system. Since the DC voltage from the AC adapter 29 or the battery 48 is 18V, DC voltages of +5V, +12V and -9V are actually supplied to predetermined components. The voltage detector 61 detects an adapter voltage of the AC adapter 29, i.e., the constant voltage output from the constant-voltage output terminal 29a. The voltage detector 62 detects the battery voltage of the battery 48. Based on these detected voltages, it is determined whether the AC adapter 29 or the battery 48 is connected to the computer system. The FET switch 70 is used to supply or stop supplying the DC voltage to the DC/DC converter 60 from the AC adapter 29 or the battery 48. When the FET switch 70 is on, the DC voltage is supplied to the DC/DC converter 60. Therefore, the DC/DC converter 60 can supply the above-described voltage of the predetermined level to each component. The FET switch 71 is used to supply the DC voltage from the battery 48 through the FET switch 70 to the DC/DC converter 60. When the FET switch 71 is turned on, the DC voltage can be supplied to the DC/DC converter 60 from the battery 48. The FET switch 72 is utilized to supply the constant current from the constant-current output terminal 29c of the AC adapter 29 to the battery 48. When the FET switch 72 is on, the constant current is supplied to the battery 48 for rapid charge. The FET switch 73 is used to supply the constant voltage from the constant-voltage output terminal 29a of the Ac adapter 29 to the battery 48. When the FET switch 73 is on, the constant voltage is supplied to the battery 48 through the resistor 66 for trickle charge. The trickle charge represents that a rechargeable battery, even after fully charged by an AC adapter, continues to be charged all the time with a current smaller than a rapid charge current. The resistor 65 as a current limiting resistor, used to inhibit supplying of a large current to the battery 48, has usually a high resistance. The resistor 66, used for trickle charge, has usually a low resistance, for example, several tens Ω. The power supply controller 50 has a CPU 51, a RAM 52, a ROM 53, a timer 54, an output port 55, an A/D converter 56 and an input port 57. The CPU 51, constituted by one chip, controls a voltage supply to the individual component, and rapid charge/trickle charge to the battery 48. In the present invention, the trickle charge is executed. The ROM 53 stores control programs, etc. to be used for the voltage supply control and the rapid charge/trickle charge control. The RAM 52 is used as the main memory of the CPU 51. Assigned to the RAM 52 are various memory areas, as a flag, a counter and the like, used to the voltage supply control and the rapid charge/trickle charge control. In this embodiment, part of RAM 52 is used as a duty register, a timer interruption flag, and a counter, as described later. The timer 54 outputs a timer value to the CPU 51 by a predetermined cycle. In the embodiment, the timer value is utilized for executing the trickle charge control at predetermined periods of time, e.g. 65 ms. The output port 55 outputs a control signal individually to the control-signal input terminal 29b of the AC adapter 29, and the FET switches 70, 71, 72 and 73, and transmits data to the power supply interface 28. In response to the control signal at the control-signal input terminal 29b, the AC adapter 29 outputs the constant current or the constant voltage. The FET switches 70, 71, 72 and 73 are turned on or off depending on the received control signals at each FET switch. To control the charging of the battery 48, a control signal used to turn on/off the FET switch 72 is output from the output port 55. The A/D converter 56 converts analog voltages output respectively from the voltage detectors 61 and 62 into digital voltages. The input port 57 receives a signal indicating whether the power supply switch 45 is depressed. As shown in Fig. 2, the level of a voltage to the input port 57 is Vcc as long as the power supply switch 45 is not depressed. Since the power supply switch 45 is a momentary switch as described above, however, the level of the received voltage at the input port 57 is "0" during a predetermined period of time upon each depression of the power supply switch 45. By detecting a change in voltage level, therefore, it can be determined whether the power supply switch 45 is depressed. A description will now be given, with reference to the flowcharts shown in Fig. 3, Figs. 4A and 4B and Fig. 5, in the trickle charge control for the battery 48 in the CPU 51 of the power supply controller 50. Fig. 3 is a graph explaining a change of a trickle charge current during the trickle charge according to the present invention and during the trickle charge according to the conventional case. In Fig. 3, the axis of ordinates represents a differential voltage representing a difference between the voltage of the AC adapter 29 and the battery voltage of the battery 48, and the axis of abscissas represents a trickle charge current. Symbol "It" denotes a desirable trickle charge current value, symbol "Vd" denotes a differential voltage (about 3V) in a normal operating state, and the "1W, 2W, ..." denote the wattage of the trickle charge resistor. The wattage indicated in Fig. 3 is a value necessary to prevent the elements located around the resistor from being adversely affected by heat produced during the trickle charge current flows into the resistor. For example, when the trickle charge current is 200 mA, the trickle charge resistor must have a wattage equal to or larger than 2W. If the resistor has a wattage smaller than 2W, the elements located around the resistor will be adversely affected by the heat produced in the resistor. In Fig. 3, linear line B including solid and broken lines represents a change of the trickle charge current during the trickle charge according to the conventional case, and bent line A (as a solid line) represents a change of the trickle charge current during the trickle charge according to the present invention. Figs. 4A and 4B are flowcharts showing the trickle charge control performed by the CPU 51 of the power source controller 50, and Fig. 5 is a flowchart showing the timer interruption processing executed by the CPU 51. The CPU 51 of the power supply controller 50 executes the trickle charge control program stored in ROM 53. The timer interruption processing is performed by the timer interruption cycle set by the execution of the trickle charge control program. In the trickle charge control, contents of a memory area in the RAM 52 assigned as a flag area are referred to. A timer interrupt flag indicates whether or not the trickle charge control is executed. As will be described later, the timer interruption processing is executed every the predetermined time of 65 ms, and the timer interrupt flag is set to be "1" in each timer interruption processing. In other words, the trickle charge control is executed every 65 ms. Also, a count value corresponding to a content of memory area in the RAM 52 assigned as a counter is referred to. The count value of the counter is one of "0," "1," "2" and "3." The count value is repeatedly counted up in the order of "0," "1," "2" and "3." The count value is incremented by 1 every 65 ms. Therefore, an execution period of the trickle charge is set every period of 260 ms (65 ms × 4). Further, contents of a memory area in RAM 52 assigned as the register are referred to. A duty register is a 4 bit register representing an execution period of the trickle charge at periods of 260 ms. When the register value (in a hexadecimal number) of the duty register is "0" (corresponding to "0000" in a binary number), no trickle charge is executed during the period of 260 ms. When the register value of the duty register is "1" (corresponding to "0001" in a binary number), the trickle charge is executed for about 65 ms from the start of the period of 260 ms. When the register value of the duty register is "3" (corresponding to "0011" in a binary number), the trickle charge is executed for about 130 ms (65 ms × 2) from the start of the period of 260 ms. When the register value of the duty register is "F" (corresponding to "1111" in a binary number), the trickle charge is executed during the period of 260 ms. In step S1, it is determined whether or not the FET switch 70 is on, i.e., whether or not a voltage is supplied to each component of the computer system by either the AD adapter 29 or the battery 48. If the FET switch 70 is on, the timer interrupt cycle is set to be 65 ms, for example, in step S2. Further, in step S3, the count value of the counter is set to be "0." In step S4, it is determined whether or not the timer interrupt flag is "1." Since the timer interrupt cycle is set to be 65 ms in step S2, the timer interruption processing shown in Fig. 5 is executed at periods of 65 ms. In the timer interruption processing, the timer interrupt flag is set to be "1" in step F1. Therefore, the processing step S4 and sequent steps are not carried out until the processing of step F1 is executed. In step S4, if the timer interrupt flag is "1," the timer interrupt flag is set to be "0" in step S5. In subsequent step S6, it is determined whether or not the count value of the counter is "0." In step S6, if the count value of the counter is "0," it is determined that the present time corresponds to the start time of the period of 260 ms. Hence, processes of steps 7-16 are executed so as to set the execution period of the trickle charge. In step S7, it is determined whether or not the AC adapter 29 is connected to the computer system. In step S8, it is determined whether or not the battery 48 is incorporated in the computer system. If the AC adapter 29 is not connected to the computer system in step S7 or if the battery 48 is not incorporated in the computer system in step S8, the duty register value of the duty register is set to be "0" (step S9). That is, the trickle charge is not performed. If the AC adapter 29 is connected to the computer system and the battery 48 is incorporated therein, it is determined that trickle charge can be started. In step S10, an adapter voltage value representing the adapter voltage of the AC adapter 29 output from the voltage detector 61 to the A/D converter 56 is read. In step S11, a battery voltage value representing the battery voltage of the battery 48 output from the voltage detector 62 to the A/D converter 56 is read. In step S12, a differential voltage value representing a difference between the adapter voltage value and the battery voltage value (adapter voltage value - battery voltage value) is compared with a reference voltage value of e.g., 6V. As is seen from Fig. 3, the reference voltage value of 6V corresponds to the upper limit value of the trickle charge resistor which has a wattage of 1. If the differential voltage value is equal to or smaller than 6V in step S12, the duty register value is set to be "F," i.e., "1111" in step S13. This represents that the trickle charge is executed during the period of 260 ms. If the differential voltage value is larger than 6V in step S12, it is determined whether or not the differential voltage value is larger than 9V (step S14). If the differential voltage value is equal to or smaller than 9V in step S14, the duty register value is set to be "3," i.e., "0011" in step S15. If, on the other hand, the differential voltage value is larger than 9V in step S14, the duty register value is set to be "1," i.e., "0001" in step S16. If the count value is not "0" in step S6 or if the processing of steps S9, S13, S15 or S16 has completed, then processing of step S17 is executed. In step S17, it is determined whether or not the least significant bit (LSB) of the duty register is "1." If the least significant bit is "1" in step S17, a control signal to execute the trickle charge is produced in step S19. The control signal used for turning on the FET switch 73 is output from the output port 55 to the FET switch 73. Accordingly, a trickle charge current is supplied from the AC adapter 29 to the battery 48 through the trickle charge resistor 66, thus starting the trickle charge. If the least significant bit of the duty register is not "1" but "0" in step S17, a control signal to stop the trickle charge is produced in step S18. The control signal for turning off the FET switch 73 is supplied from the output port 55 to the FET switch 73. Accordingly, the AC adapter 29 is prevented from supplying the trickle charge current to the battery 48, thus stopping the trickle charge. In step S20, one bit rotation is executed for the duty register, so that the duty register value of the duty register is rotated to the right by one bit. In step S21, the count value of the counter is incremented by 1. As mentioned above, the count value is repeatedly counted up in the order of "0," "1," "2" and "3." Therefore, if the counter value is "3," it is set to be "0" in step S21. Thereafter, the processing flow returns to step S3, so that the trickle charge control mentioned above is performed every period of 65 ms. A description will now be given, with reference to Fig. 6, in changes of a count value and a duty register value during the trickle charge control. Fig. 6 shows the case where a hexadecimal number of "3" (i.e., "0011") is set as the duty register value. It should be noted that the count value is incremented by 1 every the period of 65 ms. As may be understood from Fig. 6, when the count value of the counter is "0," it is determined in step S17 that the least significant bit of the duty register is "1." Therefore, the trickle charge is continued (step S19). In step S20, the duty register value "0011" is changed to "1001" by one bit rotation to the right, and in step S21, the count value "0" is incremented by 1, thereby to obtain "1." After 65 ms elapses, the count value of the counter is "1," it is determined in step S17 that the least significant bit of the duty register is "1." In this case, the trickle charge is continued (step S19). The duty register value "1001" is changed to "1100" by one bit rotation to the right, and the count value "1" is incremented by 1, thereby to obtain "2." After further 65 ms elapses (i.e., after 130 ms elapses from the start of the trickle charge control), the count value of the counter is "2," it is determined in step S17 that the least significant bit of the duty register is "0." In this case, the trickle charge is stopped (step S18). The duty register value "1100" is changed to "0110" by one bit rotation to the right, and the count value "2" is incremented by 1, thereby to obtain "3." After further 65 ms elapses (i.e., after 195 ms elapses from the start of the trickle charge control), the count value of the counter is "3," it is determined in step S17 that the least significant bit of the duty register is "0". In this case, stopping of the trickle charge is continued (step S18). The duty register value "0110" is changed to "0011" by one bit rotation to the right, and the count value "3" is changed to "0" by increment of the count value. After further 65 ms elapses (i.e., after 260 ms elapses from the start of the trickle charge control), it is determined in step S6 that the count value of the counter is "0." Therefore, steps S7-S16 are executed, wherein a new duty register value is set in the register and the trickle charge control is executed in accordance with the new duty register value. According to the present invention, when the AC adapter is connected to the computer system, trickle charge is started or stopped at the predetermined timings based on a differential voltage. Even when the differential voltage increases, a trickle charge current is close to the desirable value "It" at all times, as is indicated by the bent line A in Fig. 3. Since the wattage of the trickle charge resistor 66 need not be large (1W in the case of the present embodiment), the resistor 66 of a small size can be used. In the above embodiment, the trickle charge is started or stopped at intervals set on the basis of the differential voltage representing the difference between the adapter voltage and the battery voltage. However, the present invention is not limited to this. The trickle charge can be started or stopped either in multi-steps or linearly on the basis of the differential voltage.

Claims: A power supply control apparatus comprising a rechargeable battery (48), supply means (29) and a resistor (66) between the supply means (29) and the battery (48), for supplying a trickle charge current through the resistor (66) to the battery (48), and control means (50, 61, 62, 73) for sampling voltages of the battery (48) at predetermined times during charging of the battery (48), characterized in that the control means (50, 61, 62, 73) is further adapted for sampling voltages of the supply means (29) at predetermined times and for forming a voltage difference between the respective sampled voltages of the supply means (29) and the battery (48), that the thus formed voltage difference corresponds to a trickle charge current value, and that the control means (50, 61, 62, 73) reduces or stops the trickle charge current when the voltage difference is above a predetermined value corresponding to the upper limit value of the trickle charge resistor (66) with respect to its wattage. The apparatus according to claim 1, characterized in that said control means (50, 61, 62, 73) set a trickle charge execution period and a trickle charge stop period within a predetermined period on the basis of the voltage difference value. The apparatus according to claim 2, characterized in that when the voltage difference value is equal to or smaller than a first set value, only the trickle charge execution period is set within the predetermined period, the trickle charge is continued during the predetermined period. The apparatus according to claim 2, characterized in that when the voltage difference value is larger than a first set value and equal to or smaller than a second set value, the trickle charge execution period set within the predetermined period coincides with the trickle charge stop period set within the predetermined period. The apparatus according to claim 2, characterized in that when the voltage difference value is larger than a second set value, the trickle charge execution period set within the predetermined period is 1/3 of the trickle charge stop period set within the predetermined period. A power supply control method comprising the steps of determining whether or not a rechargeable battery (48) is incorporated and whether or not an adapter (29) for supplying a trickle charge current is connected; starting trickle charge of the battery (48) through a resistor (66) connected between the adapter (29) and the battery (48) when the battery (48) is incorporated and the adapter (29) is connected; sampling voltages of the battery (48) and the adapter (29) at predetermined times during the trickle charge of the battery (48); forming a voltage difference between the respective sampled voltages of the adapter (29) and the battery (48) which voltage difference corresponds to the trickle charge current value; and reducing or stopping the trickle charge when the voltage difference is above a predetermined value corresponding to the upper limit of the trickle charge resistor (66) with respect to its wattage. The method according to claim 6, characterized in that a trickle charge execution period and a trickle charge stop period are set within a predetermined period on the basis of the voltage difference. The method according to claim 7, characterized in that when the voltage difference value is equal to or smaller than a first set value, only the trickle charge execution period is set within the predetermined period, the trickle charge is continued during the predetermined period. The method according to claim 7, characterized in that when the voltage difference value is larger than a first set value and equal to or smaller than a second set value, the trickle charge execution period set within the predetermined period coincides with the trickle charge stop period set within the predetermined period. The method according to claim 7, characterized in that when the voltage difference value is larger than a second set value, the trickle charge execution period set within the predetermined period is 1/3 of the trickle charge stop period set within the predetermined period.

Inventors: NINOMIYA RYOZI C O INTELLECTUA, NINOMIYA, RYOZI, C/O INTELLECTUAL PROP. DIV.
Applicants: TOSHIBA KK, KABUSHIKI KAISHA TOSHIBA
Application year: 1991
Main classification: H02J7
IPC codes: H02J7