Abstract:
A battery voltage detecting device has a circuit for separately detecting the time it takes for a capacitor to be charged to a second reference voltage, in response to the application of a battery voltage and a first reference voltage to the capacitor. A calculating circuit determines the battery voltage from the charging times of the capacitor and the values of the reference voltages.

Description:
FIELD OF THE INVENTION 
     The present invention relates to a battery voltage detecting device. 
     BACKGROUND OF THE INVENTION 
     Conventionally, the terminal voltage of a battery has been detected by comparing it with a reference voltage. 
     The above detecting method fails to accurately detect the terminal voltage of the battery, however, due to the fact that the terminal voltage fluctuates when the load is alternatingly driven. 
     Further, it has also been difficult to detect the absolute value of the terminal voltage. 
     SUMMARY OF THE INVENTION 
     An object of the present invention is to provide a battery voltage detecting device which is capable of accurately detecting the terminal voltage of a battery even when the load is alternatingly driven. 
     Another object of the present invention is to provide a battery voltage detecting device capable of detecting the absolute value of the terminal voltage of a battery. 
     According to the present invention, a reference voltage section for generating a reference voltage is connected to an integration circuit; the length of a time &#34;Tbs&#34; elapsed from that connection to the coincidence of the out-put of the integrating circuit with a predetermined voltage &#34;Vrf&#34; and the length of a time &#34;Tbt&#34; elapsed from the connection of a battery with the integration circuit to the coincidence of the output of the integration circuit with the predetermined voltage &#34;Vrf&#34; are measured; and the terminal voltage of the battery is calculated from the times &#34;Tbs&#34; and &#34;Tbt&#34;, for example, from the ratio between these two times. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     One embodiment of the present invention will now be described with reference to the accompanying drawings, wherein: 
     FIG. 1 is an electrical circuit diagram representing one embodiment of the present invention; 
     FIG. 2 is a table showing the relationships between the terminal voltage &#34;Vbt&#34; and the time ratio of &#34;Tbs/Tbt&#34;; 
     FIG. 3 is a table illustrating the stored contents of a memory circuit; and 
     FIG. 4 is a flow chart illustrating the operation of the embodiment of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Referring now to FIG. 1, reference numeral 11 represents a battery whose terminal voltage is designated by &#34;Vbt&#34;. 
     Reference numeral 12 designates a reference voltage section which generates a reference voltage &#34;Vbs&#34;. 
     Reference numeral 13 designates an integration circuit comprising a resistor 13a and a capacitor 13b. 
     Reference numeral 14 designates changeover means comprising analog switches 14a and 14b. 
     Reference numeral 15 designates a transistor which discharges an electric charge stored in the capacitor 13b. 
     Reference numeral 16 designates a comparator circuit which compares the output voltage of the integration circuit 13 with a reference voltage &#34;Vrf&#34; to be described later. 
     Reference numeral 17 designates a reference voltage section which generates the reference voltage &#34;Vrf&#34; to be input to the comparator circuit 16. 
     Reference numeral 18 designates a clock generating circuit which generates a clock pulse. 
     Reference numeral 19 designates measuring means comprising a counter circuit. 
     Reference numeral 20 designates an AND gate. 
     Reference numeral 21 designates a control circuit adapted to perform various kinds of control operations and constitutes operating means for operating the terminal voltage &#34;Vbt&#34; of the battery 11. The control means 21 comprises a microprocessor. 
     Reference 22 designates a memory circuit in which data is stored for calculating the terminal voltage &#34;Vbt&#34; of the battery 11 and which comprises a ROM (read only memory). 
     Reference numeral 23 designates setting means which establishes correcting conditions in calculating the terminal voltage of the battery 11. 
     Power supplied to the above-mentioned elements is provided by the battery 11. 
     The operation of the embodiment shown in FIG. 1 will now be described. 
     After the electric charge of the capacitor 13b has been completely discharged through the transistor 15, the transistor 15 is turned OFF by the control circuit 21. During the discharge, the analog switches 14a and 14b are OFF and the counter circuit 19 is in a reset state. 
     Then the control circuit controls the analog switch 14a to go ON and simultaneously therewith, the counter circuit 19 is released from the reset state. At this time, the output of the comparator circuit 16 is &#34;1&#34; so that the counter circuit 19 counts up in response to each clock signal from the clock generating circuit 18. The capacitor 13b now begins to be charged with an electrical current from the reference voltage section 12 As the charging progresses, the output voltage of the integration circuit 13, that is, the voltage at the point &#34;a&#34; of FIG. 1 increases gradually and when the output voltage of the circuit 13 exceeds the reference voltage &#34;Vrf&#34;, the output of the comparator circuit 16 is reversed from &#34;1&#34; to &#34;0&#34;. As a result, the gate circuit 20 is closed and the inputting of clocks of the counter circuit 19 is inhibited. At this point of time, the counting of the counter circuit represents the time &#34;Tbs&#34; elapsed from the time of turning ON of the analog switch 14a to the time the output voltage of the integrating circuit 13 exceeds the reference voltage &#34;Vrf&#34;. This time &#34;Tbs&#34; is stored in the control circuit 21. 
     Upon completion of the above operation, the transistor 15 is turned ON and the electric charge stored in the capacitor 13b is discharged. After the capacitor 13b has been completely discharged, the transistor 15 is turned OFF. During the discharge, the analog switches 14a and 14b are OFF and the counter circuit 19 is held in a reset state. 
     Following the above operation, the analog switch 14b is turned ON and simultaneously therewith, the counter circuit 19 is released from the reset state. At this time, the output of the comparator circuit 16 is &#34;1&#34; so that the counter circuit 19 counts up in response to the clock signal from the clock generating circuit 18. The capacitor 13b now begins to be charged by an electric current from the battery 11 and with the charging of the electric current to the capacitor 13b, the output voltage of the integration circuit 13 increases gradually. When the output voltage of the integration circuit 13 exceeds the reference voltage &#34;Vrf&#34;, the output of the comparator circuit 16 is reversed from &#34;1&#34; to &#34;0&#34; and the inputting of clocks to the counter circuit 19 is inhibited. At this time, the counting of the counter circuit 19 represents the time &#34;Tbt&#34; elapsed from the time of turning ON of the analog switch 14b to the time the output voltage of the integrating circuit 13 exceeds the reference voltage &#34;Vrf&#34; and this time &#34;Tbt&#34; is stored in the control circuit 21. 
     With the above operation, the control circuit 21 will have the time &#34;Tbs&#34; and the time &#34;Tbt&#34; stored therein. 
     The times &#34;Tbs&#34; and &#34;Tbt&#34; may be expressed by the following equations by using the time constant RC of the integration circuit 13. 
     
         Tbs=-RC·1n(1-Vrf/Vbs)                             (1) 
    
     
         Tbt=-RC·1n(1-Vrf/Vbt)                             (2) 
    
     where 1n is a natural logarithm, R is the value of the resistor 13a, C is the value of the capacitor 13b, Vrf is the reference voltage, Vbs is the reference voltage of the reference voltage section 12 and Vbt is the terminal voltage of the battery 11. 
     The ratio &#34;A&#34; between the above two equations is equal to: ##EQU1## 
     Since the values for &#34;Vrf&#34; and &#34;Vbs&#34; are known and the value for &#34;A&#34; can be obtained by calculating the value for &#34;Tbs/Tbt&#34;, the value for &#34;Vbt&#34;, i.e., the terminal voltage of the battery 11, can be obtained therefrom. 
     Further, if the times &#34;Tbs&#34; and &#34;Tbt&#34; are measured a plurality of times to obtain the average times &#34;Tbs&#39;&#34; and &#34;Tbt&#39;&#34; thereof, then the following equation may be established: ##EQU2## 
     Accordingly, the value for &#34;Vbt&#34;, i.e., the terminal voltage of the battery 11, may thus be obtained. 
     Similarly, if the times &#34;Tbs&#34; and &#34;Tbt&#34; are measured a plurality of times and the value for &#34;A&#34; is calculated for every measurement to obtain the average value &#34;A&#34;&#34;, the following equation may be established: 
     
         A&#34;=1n(1-Vrf/Vbs)/1n(1-Vrf/Vbt)                             (3&#34;) 
    
     Therefore, the value for &#34;Vbt&#34;, i.e., the terminal voltage of the battery 11, may be obtained in this manner. 
     The value of the terminal voltage &#34;Vbt&#34; of the battery 11 may well be obtained by calculating the equation (3), (3&#39;) or (3&#34;) by the control circuit 21, but it may also be obtained by the following method. 
     For example, if between the time &#34;Vbt&#34; and the average value &#34;A&#34; was obtained from equation (3) on the assumption that Vrf=1.5 volts and Vbs=5.0 volts, the result will be as shown in FIG. 2. Therefore, if the relationship is stored in the memory circuit 22 as shown in FIG. 3, the value for the terminal voltage &#34;Vbt&#34; of the battery 11 may be obtained according to the procedures shown in FIG. 4. 
     First, (a) calculate the ratio &#34;Ax&#34; of the time &#34;Tbs&#34; with respect to the time &#34;Tbt&#34; by the control circuit 21. Assume, for example, that the value for &#34;Ax&#34; is &#34;0.250&#34;; (b) specify the address &#34;0&#34; of the memory circuit 22; (c) read Data &#34;Am&#34; stored at the specified address &#34;0&#34; ; to compare the data &#34;Am&#34; (0.229 in FIG. 3) to the calculated value &#34;Ax&#34; (0.250); and (e) add &#34;+1&#34; to the address value since Am&lt;Ax. The stored data &#34;Am&#34; is then read out in sequence until Am=Ax or Am&gt;Ax is obtained and compared to the calculated value &#34;Ax&#34; (0.250). That is, when the data &#34;Am&#34; (0.257) stored at the address &#34;2&#34; is read out (the above step (c)) and compared to the calculated value &#34;Ax&#34; (0.250) (the above step (d)), it will be found that the relationship of Am&gt;Ax is established. Therefore, the stored data &#34;Am&#34; (0.257) is deemed to be the calculated value &#34;Ax&#34; and the subsequent processing is performed accordingly. 
     Next, (f) add &#34;+10&#34; to the resultant address value; and (g) read out data &#34;Vm&#34; (2.00 in FIG. 3) stored at the specified address, i.e., &#34;12&#34;. As will be clear from FIG. 3, at the address &#34;n&#34; (n=0, 1, . . .) there is stored the value for the ratio &#34;A&#34; of FIG. 2 and corresponding thereto, there is stored the value for the terminal voltage &#34;Vbt&#34; of FIG. 2 at the address &#34;n+10&#34;. Accordingly, the data &#34;2.00&#34; stored at the address &#34;12&#34; is determined to be the terminal voltage &#34;Vbt&#34; of the battery 11. Then, subsequent to these operations (h) perform a data processing step such as converting the above data &#34;2.00&#34; to display data. 
     Thus, by the above procedures, it is possible to obtain the value for the terminal voltage &#34;Vbt&#34; of the battery 11. 
     When the circuit of FIG. 1 is mounted on a printed circuit board, an error sometimes takes place in the measurement of the terminal voltage &#34;Vbt&#34; of the battery 11 due to the influence of the wiring resistance and further, sometimes the reference voltage &#34;Vbs&#34; generated from the reference voltage section 12 deviates. In such cases, a proper correcting value may be added to, or deducted from, the calculated value &#34;Ax&#34; thereby obtaining the reference voltage value &#34;Vbs&#34; by the same procedures as described above. For example, the setting means 23 of FIG. 1 may comprise a manual switch such that when the terminal &#34;+&#34; is made active, a correcting value is added while when the terminal &#34;-&#34; is made active, the correcting value is deducted. Alternatively, the setting means 23 may comprise an E 2  -PROM (electrical erasable--programmable ROM) to store finely graduated correcting values. 
     According to the present invention, the time &#34;Tbs&#34; elapsed from the connection of the reference voltage section with the integration circuit to the coincidence of the output voltage of the integration circuit to the predetermined voltage &#34;Vrf&#34; and the time &#34;Tbt&#34; elapsed from the connection of the battery to the integration circuit to the coincidence of the output of the integration circuit with the predetermined value &#34;Vrf&#34; are measured and the terminal voltage of the battery is calculated from the measured values for the times &#34;Tbs&#34; and &#34;Tbt&#34;. Accordingly, the absolute value for the terminal voltage of the battery can be detected, and the terminal voltage can be detected accurately even when the load is alternatingly driven.