Abstract:
An overcurrent detection circuit comprises: a switch provided between a power supply and a load for switching connection on/off between the power supply and the load; a current detector for detecting a load current flowing in the load; a reference value generator which outputs a reference value of a predetermined first level at the ON-time of the switch means and reduces the level of the reference value with passage of time from the ON-time so as to converge the level of the reference value to a predetermined second level; and an overcurrent signal generator which compares the detected load current with the reference value and outputs an overcurrent signal when the load current reaches or exceeds the reference value.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to an overcurrent detection circuit for suitably detecting an overcurrent in a power supply circuit for supplying electric power from a power supply to a load in which a rush current may be generated. 
     Conventionally, in a power supply circuit for supplying electric power from a battery to a load such as an electric equipment installed in a car, a protection means has been used for protecting the load or electric wires from an overcurrent. For example, Postexamined Japanese Patent Publication 8-14598 discloses a protection means, in which two stages of overcurrent detection lines are provided by use of a semiconductor switch with an electric current detection function (Intelligent Power Switch) or the like, so that a load such as a lamp in which a rush current may be generated can be protected from an overcurrent. 
     Generally, a conductor of an electric wire is formed by twisting strands. In the case of investigation on the detection of an overcurrent in such an electric wire, it is necessary to investigate not only the case where the twisted wire without fraying is coated with insulating coating resin entirely, but also the case where the insulating coating is broken partially and the strands fray partially so as to appear outside so that the strands may come into contact with other conductors such as a grounded line, etc. 
     In the case where a coating is broken as mentioned above, a current is concentrated on fewer strands in the conductor, so that the temperature rising of the conductor becomes larger than that in the above-mentioned case where the coating is complete even if an overcurrent is at the same level. Accordingly, because of heating of the conductor, the coating overheats in a shorter time so that the heat-aging of the coating resin is accelerated. 
     In the worst case, only one of the strands constituting the twisted wire frays and comes outside so as to be in contact with a grounded line. FIG. 6 shows the heat-aging characteristic of an electric wire. The heat-aging characteristic indicates a conduction time taken for heat-aging of coating resin to begin to progress suddenly when a certain value of current is being applied to an electric wire. The heat-aging characteristic A1 at the time of one strand short-circuits is shifted to the lower current side than the heat-aging characteristic A2 in the condition of complete coating. 
     In such a case, it is difficult to cope with the one-strand heat-aging characteristic A1 only by two-stage overcurrent detection based on detection characteristic A3 shown by one-dot chain line in FIG. 6 as disclosed in the above-mentioned JP 8-14598. 
     In order to perform two-stage overcurrent detection, therefore, it is necessary to shorten the initial detection time T for large current detection in view of the one-strand heat-aging characteristic A1 and normal load current characteristic A4. Alternatively, it will go well if the detection characteristic has a number of stages such as three-stage detection characteristic A5 shown by broken line in FIG. 6. 
     In order to shorten the detection time T for large current detection, however, it is necessary to count the detection time T with high accuracy. On the other hand, in order to perform multi-stage overcurrent detection, there is a problem that the number of parts constituting the circuit increases so that the circuit becomes large in size. 
     SUMMARY OF THE INVENTION 
     The present invention is intended to solve the foregoing problems, and it is an object thereof to provide an overcurrent detection circuit in which an overcurrent of a load in which a rush current may be generated can be detected suitably with a simple circuit configuration. 
     According to an aspect of the present invention, provided is an overcurrent detection circuit comprising: a switch means provided between a power supply and a load for switching connection on/off between the power supply and the load; a current detection means for detecting a load current flowing in the load; a reference value output means which outputs a reference value of a predetermined first level at the ON-time of the switch means and reduces the level of the reference value with passage of time from the ON-time so as to converge the level of the reference value to a predetermined second level; and an overcurrent signal output means which compares the detected load current with the reference value and outputs an overcurrent signal when the load current reaches or exceeds the reference value. 
     According to this configuration, when the connection between the power supply and the load is turned on, a load current flowing in the load is detected, and the detected load current is compared with a reference value. If the load current becomes not smaller than the reference value, an overcurrent signal is outputted. The reference value is at a predetermined first level at the ON-time of the switch means. The level of the reference value is reduced with passage of time from the ON-time so as to be converged to a predetermined second level. As a result, an overcurrent in the load in which a rush current may be generated is detected suitably. 
     In the above overcurrent detection circuit, preferably, the current detection means is constituted by a voltage converting circuit for converting the load current into a voltage of a level proportional to the load current; and the reference value output means is constituted by a reference voltage generating circuit for generating a reference voltage of the second level, and a charge/discharge circuit which outputs a charge voltage charged from the second level to the first level when the switch means is turned off, and which discharges the charged voltage at a predetermined time constant when the switch means is turned on. 
     According to this configuration, the reference voltage of the second level is generated. When the switch means is in the off-state, a charged voltage charged from the second level to the first level is outputted. When the switch means is turned on, the charged voltage is discharged at a predetermined time constant. As a result, a voltage of the first level is outputted as the reference value at the ON-time of the switch means. The level of the voltage is reduced with passage of time from the ON-time so as to be converged to the second level. This reference value and the voltage of the level proportional to the load current are compared with each other, so that an overcurrent is detected properly. 
     In the above overcurrent detection circuit, preferably, there are further provided an overcurrent judgement means for making a judgment as to whether the overcurrent signal is outputted or not, and an overcurrent control means for turning the switch means off when the judgment proves that the overcurrent signal is outputted. 
     According to this configuration, it is judged whether the overcurrent signal is outputted or not. The switch means is turned off in response to the conclusion that the overcurrent signal is outputted. Accordingly, the state of overcurrent is prevented from continuing. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a circuit diagram of an embodiment of the overcurrent detection circuit according to the present invention; 
     FIG. 2 is a graph showing an example of a change in voltage; 
     FIG. 3 is a graph showing a change in current in the case of FIG. 2; 
     FIG. 4 is a circuit diagram showing a modification of the reference voltage generating circuit; 
     FIG. 5 is a circuit diagram showing another modification of the reference voltage generating circuit; and 
     FIG. 6 is a diagram for explaining problems in prior art. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1 is a circuit diagram showing an embodiment of the overcurrent detection circuit according to the present invention. 
     This embodiment is applied to a car lamp control circuit for controlling power supply from a battery (power supply) B to a lamp (load) L in a car. The lamp control circuit is constituted by an FET 11, a power supply circuit 12, a lamp switch 13, a driving circuit 14, a voltage converting circuit 15, a charge/discharge circuit 16, a reference voltage generating circuit 17, a control portion 18, a comparator OP2, and so on. 
     The battery B is a power supply which outputs a constant voltage V B  of about DC 12V. The power supply circuit 12 uses a not-shown three-terminal regulator so as to output a predetermined voltage V DD  (DC 5V in this embodiment). 
     The lamp switch 13 is operated from the outside so as to be turned on/off to thereby output an on/off signal which is an instruction to turn on/off the lamp L. The on/off signal is supplied to the control portion 18. The driving circuit 14 is constituted by a transistor, and so on, so as to apply a gate voltage to the FET 11 to turn the FET 11 on in response to a control signal supplied from the control portion 18. 
     The voltage converting circuit 15 is constituted by an operational amplifier OP1, a shunt resistor Rs, and resistors R1, R2, R3 and Rf, and acts to convert a load current I L  flowing in the lamp L into a voltage in proportion to the load current I L . 
     The FET 11 and the shunt resistor Rs are connected in series between the battery B and the lamp L. More in detail, in the FET 11, the drain is connected to the positive pole of the battery B, the source is connected to one end of the shunt resistor Rs, and the gate is connected to the output terminal of the control portion 18 through the driving circuit 14. The other end of the shunt resistor Rs is grounded through an electric wire W and the lamp L. With such a configuration, electric power is supplied to the lamp L from the battery B through the shunt resistor Rs and the electric wire W when the FET 11 is turned on. 
     The shunt resistor Rs is low in resistance and acts to detect the load current I L . The resistor R1 is connected at its one end to the one end of the shunt resistor Rs. The other end of the resistor R1 is connected to the not-inverted input terminal of the operational amplifier OP1, and, at the same time, grounded through the resistor R3. On the other hand, the resistor R2 is connected at its one end to the other end of the shunt resistor Rs. The other end of the resistor R2 is connected to the inverted input terminal of the operational amplifier OP1, and, at the same time, connected to the output terminal of the operational amplifier OP1 through the feedback resistor Rf. The output terminal (hereinafter referred to as &#34;a point P&#34;) of the operational amplifier OP1 is connected to the not-inverted input terminal of the comparator OP2. 
     The charge/discharge circuit 16 is constituted by resistors R11, R12 and R13, a capacitor C1 and a transistor Q1. In the transistor Q1, the emitter is connected to the output terminal of the power supply circuit 12, the base is connected to the output terminal of the control portion 18, and the collector is connected to the inverted input terminal (hereinafter referred to as &#34;a point Q&#34;) of the comparator OP2 through the resistor R11. The output terminal of the comparator OP2 is connected to the input terminal of the control portion 18. 
     One end of a parallel circuit constituted by the resistor 12 and the capacitor C1 is connected to the inverted input terminal of the comparator OP2, and the other end of this parallel circuit is connected to one end of the resistor R13. The other end of the resistor R13 is grounded. 
     The reference voltage generating circuit 17 is constituted by an operational amplifier OP3, a resistor R14 and a Zener diode ZD1 so that the circuit 17 generates a reference voltage V ref  (a reference voltage of a second level). The power supply terminal of the operational amplifier OP3 is connected to the positive pole of the battery B, and, at the same time, grounded through a series circuit constituted by the resistor R14 and the Zener diode ZD1. In the operational amplifier OP3, the output terminal is connected to the junction point between the resistors R12 and R13, the inverting input terminal is connected directly to the output terminal of the operational amplifier OP3, and the not-inverted input terminal is connected to the junction point between the resistor R14 and the Zener diode ZD1. 
     The comparator OP2 has a function to act as an overcurrent signal output means. That is, the comparator OP2 compares the voltage V P  at the point P which is proportional to the load current I L  with the voltage V Q  at the point Q as a reference value, and supplies a low-level signal to the control portion 18 when V P  &lt;V Q  while it supplies an overcurrent signal of a high level to the control portion 18 when V P  &gt;V Q . 
     The control portion 18 is constituted by a CPU, and so on, so as to control the operation of the lamp control circuit. The control portion 18 has functions (1) to (4) as follows. 
     (1) It controls on/off of the FET 11 through the driving circuit 14 in response to on/off of the lamp switch 13 to thereby control the turn-on/turn-off of the lamp L. 
     (2) It supplies a low-level signal to the base of the transistor Q1 to thereby turn the transistor Q1 on when the lamp switch 13 is turned off, and supplies a high-level signal to thereby turn the transistor Q1 off when the lamp switch 13 is turned on. 
     (3) It acts as an overcurrent judging means for making a judgment as to whether the load current I L  is an overcurrent or not on the basis of a signal level supplied from the comparator OP2. 
     (4) It acts as an overcurrent control means for turning the FET 11 off through the driving circuit 14 when it is concluded that the load current I L  is an overcurrent. 
     When the FET 11 is turned off on the basis of the conclusion that the load current I L  is an overcurrent, a status signal informing of the fact may be outputted. 
     In this configuration, by using the shunt resistor Rs, not only the load current I L  applied to the lamp L can be detected with high accuracy, but also a sudden change in current can be detected. In addition, if a resistor with low temperature dependency is used as the shunt resistor Rs, it is possible to improve the current detection accuracy against changes in the atmospheric temperature. 
     In addition, if the reference voltage generating circuit 17 is constituted by a so-called voltage follower circuit using an operational amplifier, it is possible to generate a constant reference voltage V ref  independently of the current flowing in the resistors R12 and R13. 
     This reference voltage V ref  is set to a little higher level than the voltage V Pmax  obtained by a maximum value I Lmax  of the load current in the stationary state. 
     Next, description will be made about the operation of the thus configured overcurrent detection circuit. 
     When the lamp switch 13 is in the off-state and the lamp L is therefore in the off-state, the transistor Q1 is in the on-state, so that the capacitor C1 is being charged. The voltage V Q  at the point Q at this time takes a value which is determined by the ratio of the resistor R11 to the resistor R12 and the reference voltage V ref . 
     When the lamp switch 13 is turned on, the FET 11 is turned on. Accordingly, the lamp L is supplied with the load current I L  and therefore turned on, while the transistor Q1 is turned off. 
     A voltage drop appearing across the shunt resistor Rs and being proportional to the load current I L  is converted into a voltage by the operational amplifier OP1. The voltage V P  at the point P takes a value expressed by the following Equation 1. 
     [Equation 1] 
     
         V.sub.P =I.sub.L ·R.sub.S (R.sub.f /R.sub.2) 
    
     Here, R s  designates a resistance value of the shunt resistor Rs, R f  designates a resistance value of the feedback resistor Rf, and R 2  designates a resistance value of the resistor R2. In addition, it is assumed that the resistance value of the resistor R1 is equal to that of the resistor R 2 , and the resistance value of the resistor R3 is equal to that of the resistor R f . 
     On the other hand, when the transistor Q1 is turned off, the capacitor C1 begins to discharge. The voltage V Q  at the point Q at this time changes as shown in the following Equation 2. 
     [Equation 2] 
     
         V.sub.Q =V.sub.0 ·exp(-t/(R.sub.12 C.sub.1)+V.sub.ref 
    
     Here, V 0  designates a voltage across the capacitor C1 charged fully, and the voltage V Q  =V 0  +V ref  at this time corresponds to the reference voltage of the first level. In addition, R 12  designates a resistance value of the resistor R12, C 1  designates a capacitance of the capacitor C1, and t designates an elapsed time since the transistor Q1 is turned on, that is, since the FET 11 is turned on. 
     As is understood from the above Equation 2, the voltage V Q  approaches the voltage V ref  infinitely when time passes enough since the FET 11 is turned on. 
     The changes of the voltages V P  and V Q  will be described with reference to FIGS. 2 and 3. 
     FIG. 2 is a graph showing an example of the change in voltage when a head lamp of 65 W is used as the lamp L, and FIG. 3 is a graph showing the change in current in the case of FIG. 2. 
     In the case of FIGS. 2 and 3, the values of the respective circuit parts are set so that R S  =0.021 Ω, V 0  =1.46V, R 12  C 1  =0.062, and V ref  =0.18. 
     In FIG. 3, I T  designates a current at a level by which coating material of an electric wire of a single strand is aged by heat, that is, this current I T  shows a heat-aging characteristic of a single strand. In addition, I Q  designates a current on an overcurrent detection line according to this embodiment. 
     In FIG. 2, V T  designates a voltage appearing at the point P when the current I T  flows in the shunt resistor Rs. 
     As shown in FIG. 2, if the values of the capacitor C1, the resistor R12 and other circuit parts are adjusted properly, a voltage which is larger than the voltage V P  generated by a rush current flowing in the lamp L, and smaller than the voltage V T  generated by a current at a sufficient level to age a single strand by heat can be generated while being changed with the passage of time, as the voltage V Q  at the point Q which is a reference value to be supplied to the comparator OP2. 
     As has been described above, according to this embodiment, it is possible to generate an overcurrent detection line I Q  larger than the normal load current I L  and smaller than the current I T  with the heat-aging characteristic of a single strand as shown in FIG. 3, without providing any complicated circuit such as a timer circuit, a multi-stage current detection circuit, or the like. Consequently, an overcurrent in a load such as the lamp L in which a rush current may be generated can be detected with accuracy by a simple-configuration circuit constituted by resistors, capacitors, operational amplifiers, etc. 
     In summary, the voltage at a point P proportional to the load current I L  of a lamp L is compared by a comparator OP2 with the voltage at a point Q as a reference value for overcurrent detection. The voltage obtained by adding the voltage charged in a capacitor C1 of a charge/discharge circuit 16 to the reference voltage V ref  generated in a reference voltage generating circuit 17 is used as the reference value for overcurrent detection. When an FET 11 is turned on so that the load current I L  begins to be supplied, the charged voltage of the capacitor C1 is discharged, so that the reference value decreases. Accordingly, it is possible to suitably detect an overcurrent in the lamp L which is a load in which a rush current may be generated. 
     The reference voltage generating circuit 17 is not limited to that shown in this embodiment, but may be configured as shown in FIGS. 4 and 5. That is, FIG. 4 is a circuit diagram showing a modification of the reference voltage generating circuit 17. 
     In FIG. 4, the reference voltage generating circuit 17 is constituted by an operational amplifier OP4, resistors R21 to R23, and transistors Q11 and Q12. The not-inverted input terminal of the operational amplifier OP4 is connected to its own output terminal through the resistor R21, and connected to the collector of the transistor Q11. On the other hand, the inverted input terminal of the reference voltage generating circuit 17 is connected to its own output terminal through the resistor R22, and connected to the collector of the transistor Q12 through the resistor R23. 
     The emitters of both the transistors Q11 and Q12 are grounded, and the respective bases of the transistors Q11 and Q12 are connected to their own collectors to thereby form so-called diode-connections. In addition, this circuit is designed such that the reference voltage V ref  is outputted from the output terminal of the operational amplifier OP4. 
     Next, description will be made about the reference voltage V ref  generated by the circuit shown in FIG. 4. 
     If this circuit has a stable operating point, the differential input voltage of the operational amplifier OP4 becomes zero. As a result, the voltage drop at the resistor R21, that is, VR 21  =I 1  R 21 , is equal to the voltage drop at the resistor R22, that is, VR 22  =I 2  R 22 , so that the following Equations 1 and 2 are established. 
     [Equation 1] 
     
         I.sub.1 R.sub.21 =I.sub.2 R.sub.22                         (1) 
    
     Here, I 1  designates the current flowing in the resistor R21, I 2  designates the current flowing in the resistor R22, R 21  designates the resistance value of the resistor R21, and R 22  designates the resistance value of the resistor R22. 
     [Equation 2] 
     
         V.sub.R23 =V.sub.BE1 -V.sub.BE2                            (2) 
    
     Here, V R23  designates a voltage drop across the resistor R23, V BE1  designates a base-to-emitter voltage of the transistor Q11, and V BE2  designates a base-to-emitter voltage of the transistor Q12. 
     On the other hand, a characteristic equation expressed by the following Equation 3 is generally established in a transistor. 
     [Equation 3] 
     
         I.sub.E =I.sub.S {(exp(V.sub.BE /V.sub.T)-1}               (3) 
    
     Here, I E  designates an emitter current, I S  designates a saturation current, V BE  designates a base-to-emitter voltage, and V T  designates a thermal voltage expressed by V T  =kT/q (k is a Boltzmann constant, T is an absolute temperature, and q is an electron charge). 
     Here, because of I C  =I E  ·exp(V BE  /V T )&gt;1, the following Equation 4 is obtained from the above Equation 3. 
     [Equation 4] 
     
         I.sub.C =I.sub.S ·exp(V.sub.BE /V.sub.T)          (4) 
    
     Here, I C  designates a collector current. 
     This Equation 4 can be rewritten to obtain the following Equation 5. 
     [Equation 5] 
     
         V.sub.BE =V.sub.T ·ln(I.sub.C /I.sub.S)           (5) 
    
     If the Equation 5 is substituted into the above Equation 2, the following Equation 6 is obtained because the collector currents of the transistors Q11 and Q12 are I 1  and I 2  respectively. 
     [Equation 6] 
     
         V.sub.R23 =V.sub.T ·ln(I.sub.1 /I.sub.S1)-V.sub.T ·ln(I.sub.2 /I.sub.S2)=V.sub.T ·ln{(I.sub.1 ·I.sub.S2)/(I.sub.2 ·I.sub.S1)}         (6) 
    
     Here, V R23  designates a voltage drop across the resistor R23, I S1  designates a saturation current of the transistor Q11, and I S2  designates a saturation current of the transistor Q12. 
     If this Equation 6 is substituted into the above Equation 1, the following Equation 7 is obtained. 
     [Equation 7] 
     
         V.sub.R23 =V.sub.T ·ln{(R.sub.22 ·I.sub.S2)/(R.sub.21 ·I.sub.S1)}                                      (7) 
    
     On the other hand, because of V R23  /R 23  =V R22  /R 22  =I 2 , the following Equation 8 is obtained. 
     [Equation 8] 
     
         V.sub.R22 =(R.sub.22 /R.sub.23)·V.sub.R23         (8) 
    
     Here, V R22  designates a voltage drop across the resistor R22. Accordingly, the following Equation 9 is obtained from the above Equation 7 and this Equation 8. 
     [Equation 9] 
     
         V.sub.R22 =(R.sub.22 /R.sub.23)·V.sub.T ·ln{(R.sub.22 ·I.sub.S2)/(R.sub.21 ·I.sub.S1)}        (9) 
    
     Here, as is understood from FIG. 4, the reference voltage V ref  takes a value as follows. 
     [Equation 10] 
     
         V.sub.ref =V.sub.BE1 +V.sub.R21                            (10) 
    
     Therefore, because of V R21  =V R22  as described above, the reference voltage V ref  generated by the circuit in FIG. 4 can be expressed as follows. 
     [Equation 11] 
     
         V.sub.ref =V.sub.BE1 +(R.sub.22 /R.sub.23)·V.sub.T ·ln{(R.sub.22 ·I.sub.S2)/(R.sub.21 ·I.sub.S1)}(11) 
    
     Generally, the base-to-emitter voltage V BE  of a transistor has a temperature characteristic shown in the following Equation 12. 
     [Equation 12] 
     
         V.sub.BE =A-C·ΔT                            (12) 
    
     Here, A and C designate constants respectively, and ΔT designates a change in temperature. 
     Therefore, if a transistor having a characteristic of C=2 mV/° C. is used as the transistor Q21, and the values are set as R 21  =1 kΩ, R 22  =10 kΩ, and R 23  =1 kΩ, the temperature dependency in the first and second terms of the right side of the above Equation 11 can be canceled substantially. 
     As has been described above, according to the circuit shown in FIG. 4, it is possible to generate a reference voltage V ref  independent of temperature. 
     FIG. 5 is a circuit diagram showing another modification of the reference voltage generating circuit 17. 
     This reference voltage generating circuit 17 is constituted by a transistor Q21, resistors R31 to R33, diodes D1 to D3, and a Zener diode ZD2. 
     The resistor R31, the diode D1 in the forward direction, and the Zener diode ZD2 in the reverse direction are connected in series to the output terminal of the power supply circuit 12 (see FIG. 1). The anode of the Zener diode ZD2 is grounded. 
     In addition, in the transistor Q21, the collector is connected to the output terminal of the power supply circuit 12 (see FIG. 1), the base is connected to the junction point between the resistor R31 and the diode D1, and the emitter is connected to the anode of the diode D2. The resistors R32 and R33, and the diode D3 in the forward direction are connected in series to the cathode of the diode D2. The cathode of the diode D3 is grounded. The reference voltage generating circuit 17 is designed so that the reference voltage V ref  is outputted from the junction point between the resistors R32 and R33. 
     The reference voltage V ref  generated in this circuit is expressed by the following Equation 12. 
     [Equation 12] 
     
         V.sub.ref =(V.sub.ZD +V.sub.D1 -V.sub.BE -V.sub.D2 -V.sub.D3)·R.sub.33 /(R.sub.32 +R.sub.33)+V.sub.D3(12) 
    
     Here, V ZD  designates the Zener voltage of the Zener diode ZD2, VD1, VD2 and VD3 designate the forward-direction voltages of the diodes D1, D2 and D3 respectively, V BE  designates the base-to-emitter voltage of the transistor Q21, and R 32  and R 33  designate the resistances of the resistors R32 and R33 respectively. 
     Therefore, according to the circuit shown in FIG. 5, if the Zener voltage V ZD , the forward-direction voltages V D1 , V D2  and V D3  of the diodes D1, D2 and D3, and the resistances R 32  and R 33  of the resistors R32 and R33 are adjusted properly, it is possible to generate a desired reference voltage V ref . 
     In addition, if the resistances R 32  and R 33  of the resistors R32 and R33 are adjusted properly, it is possible to reduce the influence of the temperature dependency of the Zener diode ZD2 and the diodes D1, D2 and D3 on the reference voltage V ref . In addition, it is possible to generate a constant reference voltage V ref  without any influence of a change in impedance of the charge/discharge circuit 16. 
     As has been described above, according to the present invention, the level of the reference value set to a predetermined first level at the ON-time of the switch means and then reduced with passage of time from the ON-time so as to be converged to a predetermined second level. A detected load current is compared with the reference value, and when the load current is larger than the reference value, an overcurrent signal is outputted. Accordingly, it is possible to suitably detect an overcurrent in the load in which a rush current may be generated. 
     Further, the reference voltage of the second level is generated. When the switch means is in the off-state, a charged voltage charged from the second level to the first level is outputted. When the switch means is turned on, the charged voltage is discharged at a predetermined time constant. As a result, a voltage of the first level is outputted as the reference value at the ON-time of the switch means. The level of the voltage is reduced with passage of time from the ON-time so as to be converged to the second level. This reference value and the voltage of the level proportional to the load current are compared with each other, so that an overcurrent is detected properly. 
     Further, it is judged whether the overcurrent signal is outputted or not. The switch means is turned off in response to the conclusion that the overcurrent signal is outputted. Accordingly, the state of overcurrent is prevented from continuing.