Abstract:
To suppress an increase in the ripple voltage inevitable in a conventional switching power supply device used at low temperatures, a switching power supply device of the invention has a DC-DC converter that receives an input voltage and outputs a varying voltage by varying the ratio of on periods to off periods of a switching transistor, an error amplifier that compares the output voltage of the DC-DC converter or a divided voltage thereof with a reference voltage and outputs an error voltage, an operator that produces a pulse signal according to the error voltage and controls the switching transistor with the pulse signal, and a gain control circuit that varies the gain of the error amplifier according to at least one of the duty factor of the pulse signal and the ambient temperature.

Description:
BACKGROUND OF THE INVENTION  
         [0001]    1. Field of the Invention  
           [0002]    The present invention relates to a switching power supply device.  
           [0003]    2. Description of the Prior Art  
           [0004]    An example of a conventional switching power supply device is shown in FIG. 11. The switching power supply device includes a converter portion  100  and a controller portion  200 . The switching power supply device converts a direct-current voltage fed in via an input terminal IN into a desired direct-current voltage, and then supplies the thus obtained direct-current voltage to a load resistor RL.  
           [0005]    First, the configuration of the converter portion  100  will be described. The converter portion  100  includes a capacitor  1 , an NPN-type transistor  2 , a diode  3 , a coil  4 , and an output capacitor  5 , which together constitute a step-down type DC-DC converter. The collector of the transistor  2  is connected to the input terminal IN and to one end of the capacitor  1 . The emitter of the transistor  2  is connected to the cathode of the diode  3  and to one end of the coil  4 .  
           [0006]    The end of the coil  4  which is not connected to the transistor  2  is connected to the output capacitor  5 , is connected also via an output terminal OUT to the load resistor RL, and is connected also via the output terminal OUT to the resistor R 1  (described later) provided in the controller portion  200 . The end of the capacitor  1  which is not connected to the transistor  2 , the anode of the diode  3 , the end of the output capacitor  5  which is not connected to the coil  4 , and the end of the load resistor RL which is not connected to the output terminal OUT are each grounded.  
           [0007]    Next, the configuration of the controller portion  200  will be described. The controller portion  200  includes an output voltage detection circuit  6 , an error amplifier  7 , a reference voltage source  8 , an operational amplifier  9 , an oscillator  10 , and a driver circuit  11 . The output voltage detection circuit  6  is composed of a resistor R 1  and a resistor R 2  that is connected in series with the resistor R 1 . One end of the resistor R 1  is connected to the output terminal OUT, and the end of the resistor R 2  which is not connected to the resistor R 1  is grounded. The node between the resistors R 1  and R 2  is connected to the inverting input terminal of the error amplifier  7 . The non-inverting input terminal of the error amplifier  7  is connected to the reference voltage source  8 .  
           [0008]    The output terminal of the error amplifier  7  is connected to the non-inverting input terminal of the operational amplifier  9 . The inverting input terminal of the operational amplifier  9  is connected to the oscillator  10 . The output terminal of the operational amplifier  9  is connected through the driver circuit  11  to the base of the transistor  2 .  
           [0009]    Next, the operation of the switching power supply device configured as described above will be described. The direct-current voltage fed in via the input terminal IN is first smoothed by the capacitor  1  so as to be formed into an input voltage V IN , and is then converted into a pulse voltage by the switching operation of the transistor  2 .  
           [0010]    When the transistor  2  is in an on state, a current flows from the input terminal IN to the coil  4 . As a result, energy is not only accumulated in the coil  4 , but also supplied to the load resistor RL. On the other hand, when the transistor  2  is in an off state, the energy accumulated in the coil  4  is supplied through the diode  3  to the load resistor RL. Here, to the output terminal OUT is supplied an output voltage V O  smoothed by the output capacitor  5 , and this output voltage V O  is applied to the load resistor RL.  
           [0011]    The output voltage V O  of the switching power supply device is fed via the output terminal OUT to the controller portion  200  so as to be subjected to feedback control performed by the controller portion  200 . Specifically, according to the output voltage V O  of the switching power supply device, the duty factor, i.e. the ratio of the on periods to the sum of the on and off periods, of the pulse voltage output from the transistor  2  is determined. The output voltage V O  of the switching power supply device is first divided by the output voltage detection circuit  6 . The thus divided voltage V adj  is then compared with a reference voltage V ref  (=1.25 V) output from the reference voltage source  8  by the error amplifier  7 .  
           [0012]    The error amplifier  7  amplifies the difference between the divided voltage V adj  and the reference voltage V ref , and outputs an output voltage signal V A  to the operational amplifier  9 . The operational amplifier  9 , in synchronism with the output voltage V OSC  (a triangular wave) of the oscillator  10 , outputs a PWM signal V PWM  corresponding to the output voltage signal V A . Specifically, when the output voltage signal V A  from the error amplifier  7  is higher than the output voltage V OSC  from the oscillator  10 , the operational amplifier  9  outputs a high level as the PWM signal V PWM , and otherwise, i.e. when the output voltage signal V A  from the error amplifier  7  is not higher than the output voltage V OSC  from the oscillator  10 , the operational amplifier  9  outputs a low level as the PWM signal V PWM . Here, the frequency of the output voltage V OSC  (a triangular wave) oscillated by the oscillator  10  is set to be 100 kHz to prevent audible noise. Moreover, the maximum and minimum levels of the output voltage V OSC  (a triangular wave) oscillated by the oscillator  10  are set to be 1.75 V and 0.75 V, respectively.  
           [0013]    The PWM signal V PWM  is fed to the driver circuit  11 , and the driver circuit  11 , according to the PWM signal V PWM , supplies a current to the base of the transistor  2  and thereby controls the switching operation of the transistor  2 . Specifically, when the driver circuit  11  receives a high level as the PWM signal V PWM  from the operational amplifier  9 , it feeds a current I B  to the base of the transistor  2  to bring the transistor  2  into an on state. On the other hand, when the driver circuit  11  receives a low level as the PWM signal V PWM , it turns the current I B  supplied to the base of the transistor  2  to zero and thereby brings the transistor  2  into an off state. In this way, the ratio of the on periods t ON  to the off periods t OFF  of the transistor  2  is controlled in such a way that the output voltage V O  of the switching power supply device which is supplied to the load resistor RL is stabilized at a predetermined level (5 V). The duty factor “duty” of the PWM signal V PWM  and of the transistor  2  is given by formula (1) below.  
             duty   =           t   ON         t   ON     +     t   OFF         ×   100     =         V   O       V   IN       ×   100               (   1   )                               
 
           [0014]    In the on periods t ON , in which the transistor  2  is in an on state, the gradient of the current I L  that flows through the coil  4  is positive, and, in the off periods t OFF , in which the transistor  2  is in an off state, the gradient of the current I L  that flows through the coil  4  is negative.  
           [0015]    To cope with this, as described earlier, a voltage smoothed by the output capacitor  5  is supplied as the output voltage V O  to the load resistor RL. However, equivalent series resistance (hereinafter referred to as ESR) exists in the output capacitor  5 , and therefore the output voltage Vo contains a ripple voltage V rms , i.e. an alternating-current component. FIG. 12 shows a time chart of the output voltage signal V A  from the error amplifier  7 , the output voltage V OSC  from the oscillator  10 , and the PWM signal V PWM  as observed at room temperature (25° C.). The frequency of the PWM signal V PWM  is equal to that of the output voltage V OSC  from the oscillator  10 , and therefore the switching frequency f 0  of the transistor  2  is equal to the frequency of the output voltage V OSC  from the oscillator  10 , i.e. 100 kHz.  
           [0016]    However, as the temperature falls, the ESR of the output capacitor  5  increases, and thus, as shown in FIG. 13, the ripple voltage V rms  contained in the output voltage V O  increases.  
           [0017]    Here, as shown in FIG. 14, the gain G AMP  of the error amplifier  7  is fixed at 100 irrespective of the divided voltage V adj  fed to its inverting input terminal. Thus, the input-output characteristic of the error amplifier  7 , i.e. the relationship between the divided voltage V adj  and the output voltage signal V A , is as shown in FIG. 15. On the other hand, the input-output characteristic of the operational amplifier  9 , i.e. the relationship between the output voltage signal V A  and the duty factor “duty” of the PWM signal V PWM , is as shown in FIG. 16.  
           [0018]    In the switching power supply device having these characteristics, a malfunction in which the switching frequency f 0  of the transistor  2  becomes equal to half the oscillation frequency of the oscillator  10  occurs when the ripple voltage V adj1  contained in the divided voltage V adj  fed to the error amplifier  7  and the duty factor “duty” has a relationship as shown in FIG. 17. In general, a switching power supply device provided with a step-down type DC-DC converter is used in the range of duty factors “duty” from 0% to 50%. Thus, as FIG. 17 clearly shows, the lower the duty factor “duty”, the lower the ripple voltage V adj1  at which the malfunction occurs. That is, the lower the duty factor “duty”, the more likely the malfunction occurs.  
           [0019]    [0019]FIG. 18 shows a diagram in which the ripple voltage V rms  contained in the output voltage V O  shown in FIG. 13 is converted into the ripple voltage V adj2  contained in the divided voltage V adj . It is to be noted that in FIG. 18 is indicated the ripple voltage V 10% , as calculated on the basis of FIG. 17, contained in the divided voltage V adj  when the malfunction occurs at a duty factor “duty” of 10%. As FIG. 18 clearly shows, at a duty factor “duty” of 10%, a malfunction in which the switching frequency f 0  of the transistor  2  becomes equal to half the oscillation frequency of the oscillator  10  occurs at a temperature of −25° C. This is because, as shown in FIG. 19, the ripple voltage contained in the output voltage signal V A  from the error amplifier  7  becomes so high that the amplitude of the output voltage signal V A  becomes greater than that of the output voltage V OSC  from the oscillator  10 , with the result that the frequency of the PWM signal V PWM  becomes equal to twice the frequency of the output voltage V OSC  from the oscillator  10 .  
           [0020]    The ripple voltage V rms  contained in the output voltage V O  is inversely proportional to the switching frequency f 0  of the transistor  2 , and therefore, when the switching frequency f 0  of the transistor  2  becomes equal to half the oscillation frequency of the oscillator  10  as described above, the ripple voltage V rms  becomes twice as high, degrading the stability of the output voltage V O  and increasing the ripple voltage contained therein.  
         SUMMARY OF THE INVENTION  
         [0021]    An object of the present invention is to provide a switching power supply device of which the output voltage contains no higher ripple voltage even when the switching power supply device is used at low temperatures.  
           [0022]    To achieve the above object, according to the present invention, a switching power supply device is provided with a DC-DC converter that receives an input voltage and outputs a varying voltage by varying the ratio of on periods to off periods of a switching transistor, an error amplifier that compares the output voltage of the DC-DC converter or a divided voltage thereof with a reference voltage and outputs an error voltage, an operator that produces a pulse signal according to the error voltage and controls the switching transistor with the pulse signal, and a gain control circuit that varies the gain of the error amplifier according to at least one of the duty factor of the pulse signal and the ambient temperature. 
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0023]    This and other objects and features of the present invention will become clear from the following description, taken in conjunction with the preferred embodiments with reference to the accompanying drawings in which:  
         [0024]    [0024]FIG. 1 is a circuit block diagram of the switching power supply device of a first embodiment of the invention;  
         [0025]    [0025]FIG. 2 is a circuit block diagram of the switching power supply device of a second embodiment of the invention;  
         [0026]    [0026]FIG. 3 is a circuit block diagram of the switching power supply device of a third embodiment of the invention;  
         [0027]    [0027]FIG. 4 is a graph showing the gain characteristic of the error amplifier provided in the switching power supply devices shown in FIGS. 1 and 2;  
         [0028]    [0028]FIG. 5 is a graph showing the temperature characteristic of the ripple voltage contained in the divided voltage of the output voltage of the switching power supply devices shown in FIGS. 1 and 2;  
         [0029]    [0029]FIG. 6 is a graph showing the gain characteristic of the error amplifier provided in the switching power supply device shown in FIG. 3;  
         [0030]    [0030]FIG. 7 is a graph showing the temperature characteristic of the ripple voltage contained in the divided voltage of the output voltage of the switching power supply device shown in FIG. 3;  
         [0031]    [0031]FIG. 8 is a diagram showing an example of the configuration of the gain control circuit provided in the switching power supply devices shown in FIGS.  1  to  3 ;  
         [0032]    [0032]FIG. 9 is a diagram showing the configuration of the logarithmic amplifier;  
         [0033]    [0033]FIG. 10 is a graph showing the input-output characteristic of the logarithmic amplifier shown in FIG. 9;  
         [0034]    [0034]FIG. 11 is a circuit block diagram of a conventional switching power supply device;  
         [0035]    [0035]FIG. 12 is a time chart showing the waveforms of relevant signals observed at room temperature in the switching power supply device shown in FIG. 11;  
         [0036]    [0036]FIG. 13 is a graph showing the temperature characteristic of the ripple voltage contained in the output voltage of the switching power supply device shown in FIG. 11;  
         [0037]    [0037]FIG. 14 is a graph showing the gain of the error amplifier provided in the switching power supply device shown in FIG. 11;  
         [0038]    [0038]FIG. 15 is a graph showing the input-output characteristic of the error amplifier provided in the switching power supply device shown in FIG. 11;  
         [0039]    [0039]FIG. 16 is a graph showing the input-output characteristic of the operational amplifier provided in the switching power supply device shown in FIG. 11;  
         [0040]    [0040]FIG. 17 is a graph showing the relationship between the duty factor and the ripple voltage contained in the divided voltage of the output voltage when a malfunction occurs in the switching power supply device shown in FIG. 11;  
         [0041]    [0041]FIG. 18 is a graph showing the temperature characteristic of the ripple voltage contained in the divided voltage of the output voltage of the switching power supply device shown in FIG. 11; and  
         [0042]    [0042]FIG. 19 is a time chart showing the waveforms of relevant signals observed at low temperatures in the switching power supply device shown in FIG. 11. 
     
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0043]    First, the switching power supply device of a first embodiment of the invention will be described. FIG. 1 shows the switching power supply device of the first embodiment. In the following descriptions, such circuit elements and blocks as serve the same purposes as in FIG. 11 are identified with the same reference numerals or symbols, and their explanations will not be repeated. Here, the divided voltage V adj  of the output voltage V O  from the output voltage detection circuit  6  is fed to a gain control circuit  12 , and the gain control circuit  12 , according to the divided voltage V adj , varies the gain G AMP  of the error amplifier  7 . Specifically, when the divided voltage V adj  is higher than 1.253 V, the gain control circuit  12  sets the gain G AMP  of the error amplifier  7  at 100 as in the conventional switching power supply device, and, when the divided voltage V adj  is equal to or lower than 1.253 V, the gain control circuit  12  sets the gain G AMP  of the error amplifier  7  at 50. Thus, since the divided voltage V adj  and the duty factor “duty” have a relationship as shown in FIGS. 15 and 16 described earlier, when the duty factor “duty” is higher than 20%, the gain G AMP  of the error amplifier  7  is set at 100, and, when the duty factor “duty” is equal to or lower than 20%, the gain G AMP  of the error amplifier  7  is set at 50, as shown in FIG. 4.  
         [0044]    As a result of this operation, the ripple voltage contained in the divided voltage V adj  when a malfunction occurs at a duty factor “duty” of 10 % is now as indicated by V 10% ′ in FIG. 5, i.e. twice as high as V 10%  shown in FIG. 18. Thus, there no longer occurs a malfunction in which the switching frequency f 0  of the transistor  2  becomes equal to half the oscillation frequency of the oscillator  10  even at a duty factor of 10% and at a low temperature (−25° C.).  
         [0045]    Next, the switching power supply device of a second embodiment of the invention will be described. FIG. 2 shows the switching power supply device of the second embodiment. In the following descriptions, such circuit elements and blocks as serve the same purposes as in FIG. 11 are identified with the same reference numerals or symbols, and their explanations will not be repeated. Here, the input voltage V IN  and the output voltage V O  are fed to an input-output ratio detection circuit  13 , which then feeds the input-output ratio V IN /V O  to the gain control circuit  12 . The gain control circuit  12 , according to the input-output ratio V IN /V O , varies the gain G AMP  of the error amplifier  7 . Specifically, when the input-output ratio V IN /V O  is lower than 5, the gain control circuit  12  sets the gain G AMP  of the error amplifier  7  at 100 as in the conventional switching power supply device, and, when the input-output ratio V IN /V O  is equal to or higher than 5, the gain control circuit  12  sets the gain G AMP  of the error amplifier  7  at 50. Thus, since the input-output ratio V IN /V O  and the duty factor “duty” have a relationship as expressed by formula (1) described earlier, when the duty factor “duty” is higher than 20%, the gain G AMP  of the error amplifier  7  is set at 100, and, when the duty factor “duty” is equal to or lower than 20%, the gain G AMP  of the error amplifier  7  is set at 50, as shown in FIG. 4.  
         [0046]    As a result of this operation, the ripple voltage contained in the divided voltage V adj  when a malfunction occurs at a duty factor “duty” of 10% is now as indicated by V 10% ′ in FIG. 5, i.e. twice as high as V 10%  shown in FIG. 18. Thus, there no longer occurs a malfunction in which the switching frequency f 0  of the transistor  2  becomes equal to half the oscillation frequency of the oscillator  10  even at a duty factor of 10% and at a low temperature (−25° C.).  
         [0047]    Now, an example of the configuration of the gain control circuit  12  provided in the switching power supply devices of the first and second embodiments will be described with reference to FIG. 8. The gain control circuit  12  is provided with resistors R 3  to R 5 , an active device  15 , and an active device control circuit  16 . The inverting input terminal of the error amplifier  7  is connected through the resistor R 4  to the output terminal of the error amplifier  7 . The resistor R 5  is connected, through the active device  15 , in parallel with the resistor R 4 . Moreover, the resistor R 3  is connected to the node between the resistor R 4  and the inverting input terminal of the error amplifier  7 . As the active device  15 , it is possible to use a bipolar transistor, a MOS (metal-oxide semiconductor) transistor, or the like.  
         [0048]    The active device control circuit  16  receives, in the case of the switching power supply device of the first embodiment, the divided voltage V adj  from the output voltage detection circuit  6  or, in the case of the switching power supply device of the second embodiment, the input-output ratio V IN /V O  from the input-output ratio detection circuit  13 . The active device control circuit  16 , according to the input signal thus fed thereto, controls the on/off state of the active device  15 . When the active device  15  is in an on state, the gain G AMP  of the error amplifier  7  is given by formula (2) below, where R 3 , R 4 , and R 5  represent the resistances of the resistors R 3 , R 4 , and R 5 , respectively.  
               G   AMP     =         R   4     ×     R   5           (       R   4     +     R   5       )     ×     R   3                 (   2   )                               
 
         [0049]    On the other hand, when the active device  15  is in an off state, the gain G AMP  of the error amplifier  7  equals R 4 /R 3 . Thus, by making the resistances of the resistors R 4  and R 5  equal, it is possible to obtain a gain characteristic as shown in FIG. 4.  
         [0050]    The active device control circuit  16  may control the active device  15  not on an on/off basis but on a linear basis. By controlling the active device  15  linearly, it is possible to control the gain G AMP  of the error amplifier  7  linearly. Thus, by controlling the gain G AMP  of the error amplifier  7  so as to fulfill formula (6) or (8) described later, it is possible to make the total gain of the feedback system of the switching power supply device constant and thereby further enhance the stability thereof.  
         [0051]    Now, to formulate the aforementioned condition (expressed by formula (6) or (8)) that makes the total gain of the feedback system of the switching power supply device constant, the amount of feedback ΔV adj ′ with respect to the variation ΔV adj  in the divided voltage will be determined. First, on the basis of formula (1), the output voltage V O  is given by 
         
       V 
       O 
       =V 
       IN 
       ×t 
       ON 
       /T 
     
         [0052]    where T represents the period of the PWM signal V PWM . Hence, the variation ΔV O  in the output voltage with respect to the variation ΔV adj  in the divided voltage is given by formula (3) below.  
                       Δ                   V   O         Δ                   V   adj         =         Δ                   V   O         Δ                   V   A         ×       Δ                   V   A         Δ                   V   adj                       =         V   IN     T     ×       Δ                   t   ON         Δ                   V   A         ×       Δ                   V   A         Δ                   V   adj                         (   3   )                               
 
         [0053]    On the other hand, the amount of feedback ΔV adj ′ with respect to the variation ΔV adj  in the divided voltage is given by formula (4) below.  
                 Δ                   V   adj   ′         Δ                   V   adj         =       Δ                   V   O     ×       V   ref       V   O           Δ                   V   adj                 (   4   )                               
 
         [0054]    With formulae (3) and (4) combined, the amount of feedback ΔV adj ′ with respect to the variation ΔV adj  in the divided voltage is given by formula (5) below.  
                       Δ                   V   adj   ′         Δ                   V   adj         =         V   IN     T     ×       Δ                   t   ON         Δ                   V   A         ×       Δ                   V   A         Δ                   V   adj         ×       V   ref       V   O                     =         V   IN       V   O       ×     1   T     ×       Δ                   t   ON         Δ                   V   A         ×     G   AMP     ×     V   ref                     (   5   )                               
 
         [0055]    The total gain of the feedback system of the switching power supply device can be made constant by making constant the amount of feedback ΔV adj ′ with respect to the variation ΔV adj  in the divided voltage. Specifically, in formula (5), the terms 1/T, Δt ON /ΔV A , and V ref  are all constant, and therefore, by controlling the active device  15  linearly so as to fulfill formula (6) below, it is possible to make the total gain of the feedback system of the switching power supply device constant. Here, K represents a constant. This control can be applied to the switching power supply device of the second embodiment.  
                   V   IN       V   O       ×     G   AMP       =   K           (   6   )                               
 
         [0056]    Using the divided voltage V adj , the term V IN /V O  can be expressed as formula (7) below.  
                 V   IN       V   O       =     0.5   -       G   AMP     ×     (       V   adj     -     V   ref       )     ×       Δ                 duty       Δ                   V   A                     (   7   )                               
 
         [0057]    Hence, formula (6) can be expressed as formula (8) below. By controlling the active device  15  linearly so as to fulfill formula (8), it is possible to make the total gain of the feedback system of the switching power supply device constant. This control can be applied to the switching power supply device of the first embodiment.  
                 [     0.5   -       G   AMP     ×     (       V   adj     -     V   ref       )     ×       Δ                 duty       Δ                   V   A             ]     ×     G   AMP       =   K           (   8   )                               
 
         [0058]    Next, the switching power supply device of a third embodiment of the invention will be described. FIG. 3 shows the switching power supply device of the third embodiment. In the following descriptions, such circuit elements and blocks as serve the same purposes as in FIG. 11 are identified with the same reference numerals or symbols, and their explanations will not be repeated. Here, a temperature detection circuit  14  detects the ambient temperature, and feeds the resulting detection signal to the gain control circuit  12 . The gain control circuit  12 , according to the detection signal fed from the temperature detection circuit  14 , varies the gain G AMP  of the error amplifier  7 . Specifically, when the temperature T a  detected by the temperature detection circuit  14  is higher than 0° C., the gain control circuit  12  sets the gain G AMP  of the error amplifier  7  at 100 as in the conventional switching power supply device, and, when the temperature T a  detected by the temperature detection circuit  14  is equal to or lower than 0° C., the gain control circuit  12  sets the gain G AMP  of the error amplifier  7  at 50, as shown in FIG. 6.  
         [0059]    As a result of this operation, the ripple voltage contained in the divided voltage V adj  when a malfunction occurs at a duty factor “duty” of 10% is now, in the range of temperatures of 0° C. and below, as indicated by V 10% ″ in FIG. 7, i.e. twice as high as V 10%  shown in FIG. 18. Thus, there no longer occurs a malfunction in which the switching frequency f 0  of the transistor  2  becomes equal to half the oscillation frequency of the oscillator  10  even at a duty factor of 10% and at a low temperature (−25° C.).  
         [0060]    In the switching power supply device of the first or second embodiment, it is possible to additionally provide a temperature detection circuit and vary the gain G AMP  of the error amplifier  7  according to the ambient temperature.  
         [0061]    For example, in the switching power supply device of the first embodiment, the gain G AMP  of the error amplifier  7  is made lower when the ambient temperature is equal to or lower than 0° C. than when the ambient temperature is higher than 0° C. Moreover, the gain G AMP  of the error amplifier  7  is made lower when the ambient temperature is higher than 0° C. and in addition the divided voltage V adj  is equal to or lower than 1.253 V than when the ambient temperature is higher than 0° C. and in addition the divided voltage V adj  is higher than 1.253 V.  
         [0062]    On the other hand, in the switching power supply device of the second embodiment, the gain G AMP  of the error amplifier  7  is made lower when the ambient temperature is equal to or lower than 0° C. than when the ambient temperature is higher than 0° C. Moreover, the gain G AMP  of the error amplifier  7  is made lower when the ambient temperature is higher than 0° C. and in addition the input-output ratio V IN /V O  is equal to or higher than 5 than when the ambient temperature is higher than 0° C. and in addition the input-output ratio V IN /V O  is lower than 5.  
         [0063]    These configurations prevent the gain G AMP  of the error amplifier  7  from being reduced too much in normal operation in the range of temperatures from 25 to 80° C. This helps ensure the stability of the output voltage V O  against variation in the input voltage V IN .  
         [0064]    In the first embodiment, as the error amplifier  7  provided with the gain control circuit  12 , it is also possible to use a logarithmic amplifier  17  as shown in FIG. 9. The logarithmic amplifier  17  is provided with an error amplifier  7 , a diode  18 , a resistor R 3 , and a level shift amplifier  19 . The error amplifier  7  has its inverting input terminal connected to the anode of the diode  18 , and has its output terminal connected to the cathode of the diode  18 . The node between the diode  18  and the inverting input terminal of the error amplifier  7  is connected to the resistor R 3 , and the node between the diode  18  and the output terminal of the error amplifier  7  is connected to the level shift amplifier  19 . The level shift amplifier  19  adds a predetermined value to the signal fed thereto and then outputs the resulting signal as the output voltage signal V A . Here, the divided voltage V adj  and the output voltage signal V A  have a relationship as shown in FIG. 10. Specifically, the higher the divided voltage V adj , the lower the gain G AMP . This makes it possible to realize the switching power supply device of the first embodiment with a cheaper and simpler configuration than that shown in FIG. 8. However, in this configuration, it is not possible to perform control so as to fulfill formula (8), and therefore it is not possible to make the total gain of the feedback system of the switching power supply device constant.  
         [0065]    In the switching power supply devices of the first to third embodiments, a step-down type DC-DC converter is used as the DC-DC converter. However, the DC-DC converter used in the present invention is not limited to this specific type, but may be of any other type, such as a step-up or step-down/step-up type. For example, in general, a switching power supply device employing a step-up type DC-DC converter is used in the range of duty factors “duty” from 50% to 100%, and, the higher the duty factor “duty”, the lower the ripple voltage V adj1  at which a malfunction occurs. Therefore, it is advisable to lower the gain of the error amplifier at least when the duty factor of the PWM signal supplied to the switching transistor is high or when the ambient temperature is low.  
         [0066]    In the switching power supply devices of the first to third embodiments, the error amplifier  7  is connected through the output voltage detection circuit  6  to the output terminal OUT so that the error amplifier  7  receives the divided voltage V adj  of the output voltage V O . However, the present invention is not limited to this specific configuration, but may be so implemented that the error amplifier  7  is connected directly to the output terminal OUT so that the error amplifier  7  receives the output voltage V O . In this case, it is necessary to set the reference voltage V ref  output from the reference voltage source  8  higher than in the switching power supply devices of the first to third embodiments.