Abstract:
A thermal flow sensor includes a heater temperature controller that realizes stable startup characteristics and prevents degradation of a sensor element and can also accommodate a smaller heater. The sensor also includes a semiconductor substrate; a cavity portion provided in the semiconductor substrate; a dielectric film provided on the semiconductor substrate; a thin layer area formed as a result of the dielectric film covering the cavity portion; a heating resistor provided in the thin layer area on the dielectric film; a first temperature-sensitive resistor provided in the thin layer area on the dielectric film; a heating controller; a second temperature-sensitive resistor provided near the heating resistor; and a flow rate detector that detects a flow rate of a fluid on the basis of temperature of the second temperature-sensitive resistor. The heating controller controls the temperature of the heating resistor on the basis of first and second reference temperatures.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of the Invention 
         [0002]    The present invention relates to a thermal flow sensor that causes a heating resistor to generate heat to measure a rate of a fluid flowing around the heating resistor, and in particular, to a thermal flow sensor including a heating controller for controlling an amount of heat generated by a heating resistor. 
         [0003]    2. Background Art 
         [0004]    As airflow sensors that detect intake air flows of internal combustion engines in automobiles or the like, thermal airflow sensors that can directly measure mass flow rates are generally used. 
         [0005]    In recent years, a thermal flow sensor has been proposed in which a sensor element of the thermal flow sensor is produced on a semiconductor substrate such as silicon (Si) using a MEMS (Micro Electro Mechanical Systems) technology. Such a semiconductor sensor element has a cavity portion created by cutting a part of a semiconductor substrate in a rectangular shape, and a heating resistor (hereinafter, referred to as the “heater”) is formed on a dielectric film of several microns thick on the cavity portion. 
         [0006]    In such a sensor element, a temperature-sensitive resistor (hereinafter, referred to as the “detection resistor”) is formed near a heater, and a flow rate is detected on the basis of the amount of heat transferred from a fluid flowing over the heater to the detection resistor. Therefore, the temperature difference between the heater and the ambient temperature needs to be constant. As a way to control a heater temperature, an indirect heat control scheme is known in which a temperature-sensitive resistor for monitoring a heater temperature (hereinafter, referred to as the “indirect heat resistor”) is formed near a heater, and a heater driving power is feedback-controlled so that a resistance value of the indirect heat resistor has a desired value. 
         [0007]    A heater, a detection resistor, and an indirect heat resistor such as those described above are small in size, for example, several dozen to several hundred microns, and since they are formed on a thin layer of several microns thick, they have small heat capacities and are quick in response. Thus, delay in feedback control response or delay in heat transfer between a heater and an indirect heat resistor may prevent heater temperature from being appropriately controlled at the time of startup. A conventional art to solve the problem has been described in JP Patent Application Publication No. 2009-097925 A. 
         [0008]    A thermal flow sensor described in JP Patent Application Publication No. 2009-097925 A inputs voltage signals, which vary depending on a temperature of an indirect heat resistor, to an up-down counter via a comparator. Output of the up-down counter is converted into electric power via a digital/analog converter (hereinafter, the D/A converter) and a transistor for driving a heater, and supplied to the heater. In addition, at power-on, an initial value of the up-down counter is set at a reference value (preferably, a maximum output indication value of the D/A converter) and the up-down counter is operated with a faster clock signal, whereby the amount of heat generated by the heater can be quickly controlled. 
       SUMMARY OF THE INVENTION 
       [0009]    However, in the conventional art, variations in heat capacities of heaters and indirect heat resistors substantially affect startup characteristics. For example, in semiconductor sensor elements, variations occur in heat capacities of heaters and indirect heat resistors. Since a heat response obtained when a predetermined driving power is applied to a heater at the time of startup varies depending on a heat capacity, variations may occur in transient, and for example, increase in transient may cause a longer startup time. Additionally, increase in temperature transient may promote degradation of the sensor element. The conventional art has not sufficiently addressed these respects. 
         [0010]    To address these problems, it is conceivable to adjust a rate of processing, namely, a clock period, but an increased number of adjusting steps may increase the costs. Also, it is conceivable to restrict variations in heat capacities by increasing the sizes of heaters and indirect heat resistors, but power consumption would be increased. 
         [0011]    The present invention has been made in view of the foregoing problems, and an object of the invention is to provide a thermal flow sensor including a heater temperature controller that realizes stable startup characteristics and preventing degradation of a sensor element and can also accommodate a smaller heater. 
         [0012]    To this end, a thermal flow sensor of the present invention comprises: a semiconductor substrate; a cavity portion provided in the semiconductor substrate; a dielectric film provided on the semiconductor substrate so as to cover the cavity portion; a thin layer area formed as a result of the dielectric film covering the cavity portion; a heating resistor provided in the thin layer area on the dielectric film; a first temperature-sensitive resistor provided in the thin layer area on the dielectric film, a resistance value of the first temperature-sensitive resistor varying depending upon temperature; a heating controller that controls temperature of the heating resistor on the basis of temperature of the first temperature-sensitive resistor; a second temperature-sensitive resistor provided near the heating resistor, a resistance value of the second temperature-sensitive resistor varying depending upon temperature; and a flow rate detector that detects a flow rate of a fluid on the basis of temperature of the second temperature-sensitive resistor. The heating controller controls the temperature of the heating resistor on the basis of a first reference temperature, which is a target temperature of the first temperature-sensitive resistor, and a second reference temperature, which is an escape temperature of the first temperature-sensitive resistor. 
         [0013]    According to the present invention, there is provided a thermal flow sensor including a heater temperature controller that realizes stable startup characteristics and preventing degradation of a sensor element and can also accommodate a smaller heater. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0014]      FIG. 1  illustrates a schematic cross-sectional view of a sensor element according to a first embodiment. 
           [0015]      FIG. 2  illustrates a circuit configuration of a thermal flow sensor according to the first embodiment. 
           [0016]      FIG. 3  illustrates a circuit configuration of a thermal flow sensor according to a second embodiment. 
           [0017]      FIG. 4  illustrates a circuit configuration of a thermal flow sensor according to a third embodiment. 
           [0018]      FIG. 5  illustrates a circuit configuration of a thermal flow sensor according to a fourth embodiment. 
           [0019]      FIG. 6  illustrates a circuit configuration of a thermal flow sensor according to a fifth embodiment. 
           [0020]      FIG. 7  illustrates a circuit configuration of a thermal flow sensor according to a sixth embodiment. 
           [0021]      FIG. 8  illustrates changes in temperature of the indirect heat resistor at the time of startup. 
           [0022]      FIG. 9  illustrates changes in a midpoint potential V 1  at the time of startup. 
           [0023]      FIG. 10  illustrates changes in a driving current applied to a heater at the time of startup. 
           [0024]      FIG. 11  illustrates variations in characteristics at the time of startup due to heat capacity variations. 
           [0025]      FIG. 12  illustrates environment temperature dependence of degradation over time of an indirect heat resistor. 
           [0026]      FIG. 13  illustrates a block diagram of exemplary processing of a DSP. 
         DESCRIPTION OF SYMBOLS 
         [0000]    
         
             1  semiconductor substrate 
             2  cavity portion 
             3  surface of semiconductor substrate 
             4  dielectric film 
             5  thin layer area 
             6  heater 
             7  indirect heat resistor 
             8  heating control circuit 
             9  detection resistor 
             10  flow rate detecting circuit 
             11  first temperature control circuit 
             12  second temperature control circuit 
             13  feedback control circuit 
             14 ,  21  comparators 
             15  limit unit 
             16  switching element 
             17  clamp element 
             18  load resistor 
             19  resistor switch 
             20  accelerator 
             22  DSP 
             23  frequency divider 
             24  clock switch 
             25  constant selecting switch 
             26 ,  204  memory elements 
             27  program selecting switch 
             100  sensor element 
             101  to  103  fixed resistors 
             200  processing circuit 
             201  D/A converter 
             202  transistor element 
             203  oscillator 
             301  to  305  electrodes 
             401  proportional gain 
             402  integrator gain 
             403  integrator 
             404  adder 
         
       
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0064]    Now, embodiments of the present invention will be described with reference to the drawings. 
       First Embodiment 1 
       [0065]    A first embodiment of the present invention will be described with reference to  FIGS. 1 and 2 . 
         [0066]      FIG. 1  illustrates a schematic cross-sectional view of a sensor element according to the first embodiment.  FIG. 2  illustrates a circuit configuration of a thermal flow sensor according to the first embodiment. 
         [0067]    A configuration of the thermal flow sensor of the first embodiment will be described. 
         [0068]    The thermal flow sensor of the first embodiment includes a sensor element ( 100 ) and a processing circuit ( 200 ). 
         [0069]    In the sensor element ( 100 ), a dielectric film ( 4 ) is formed as a result of depositing oxides on a surface ( 3 ) of a semiconductor substrate ( 1 ) made of a material with high thermal conductivity such as silicon (Si) and ceramics, and the other side surface of the semiconductor substrate ( 1 ) is subjected etching to provide a cavity portion ( 2 ). In addition, a thin layer area ( 5 ) on the cavity portion ( 2 ) has thereon a heater ( 6 ), an indirect heat resistor ( 7 ), and detection resistors ( 9   a ) to ( 9   d ) that are made from resistance materials with a high temperature coefficient of resistance (hereinafter, referred to as the “TCR”), such as polycrystalline silicon (Si), platinum (Pt), and molybdenum (Mo). Moreover, fixed resistors ( 101 ) to ( 103 ) are formed on an area of the dielectric film ( 4 ) other than the thin layer area ( 5 ). It should be noted that although it is assumed that all of the resistance values of the fixed resistors ( 101 ) to ( 103 ) are equal for simplicity, the values may be different from each other. 
         [0070]    The processing circuit ( 200 ) includes a heating control circuit ( 8 ) that controls an amount of heat generated by the heater ( 6 ) and a flow rate detecting circuit ( 10 ) that detects a flow rate of a fluid on the heater ( 6 ). 
         [0071]    The heating control circuit ( 8 ) includes a first temperature control circuit ( 11 ) that brings the temperature of the indirect heat resistor ( 7 ) close to a first reference temperature, which is a target temperature, and a second temperature control circuit ( 12 ) that holds the temperature of the indirect heat resistor ( 7 ) at a temperature equal to or lower than a second reference temperature that is higher than the first reference temperature and an escape temperature of the indirect heat resistor ( 7 ). 
         [0072]    The first temperature control circuit ( 11 ) includes a comparator ( 21 ), a digital signal processor (hereinafter, the DSP) ( 22 ), a D/A converter ( 201 ), and a transistor element ( 202 ). 
         [0073]    The second temperature control circuit ( 12 ) includes a comparator ( 14 ) and a switching element ( 16 ). 
         [0074]    Further, the sensor element ( 100 ) is provided with electrodes ( 301 ) to ( 305 ) and is electrically connected to the processing circuit ( 200 ). In the sensor element ( 100 ), the heater ( 6 ) is connected with the electrode ( 301 ) and a reference potential. In addition, the indirect heat resistor ( 7 ) and the fixed resistors ( 101 ) to ( 103 ) form a bridge circuit; a midpoint potential (V 1 ) between the indirect heat resistor ( 7 ) and the fixed resistor ( 101 ) is connected to the electrode ( 302 ), and a midpoint potential (V 2 ) between the fixed resistor ( 102 ) and the fixed resistor ( 103 ) is connected to the electrode ( 303 ). Also, the detection resistors ( 9   a ) to ( 9   d ) form a bridge circuit; a midpoint potential between the detection resistor ( 9   a ) and the detection resistor ( 9   b ) is connected to the electrode ( 304 ), and a midpoint potential between the detection resistor ( 9   c ) and the detection resistor ( 9   d ) is connected to the electrode ( 305 ). The flow rate detecting circuit ( 10 ) determines a flow rate on the basis of signals output from the electrodes ( 304 ) and ( 305 ). 
         [0075]    Next, an operation of the thermal flow sensor of the first embodiment will be described. It should be noted that hereinafter, a state in which the startup of the thermal flow sensor is completed, that is, the temperature of the heater ( 6 ) has converged and flow rates are detected is referred to as the “steady state.” Also, a state during startup, that is, a state in which a control system is transient is referred to as the “transient state.” 
         [0076]    In the steady state, because the transistor element ( 202 ) is in an ON state depending on the output of the D/A converter ( 201 ), a driving current (Ih) is input to the sensor element ( 100 ) via the switching element ( 16 ) and the electrode ( 301 ). The driving current (Ih) causes the heater ( 6 ) to generate Joule&#39;s heat that transfers to the indirect heat resistor ( 7 ) via the dielectric film ( 4 ) and a fluid. Because of increased temperature of the indirect heat resistor ( 7 ), its resistance value is increased and a potential at the midpoint potential (V 1 ) is lowered. It should be noted that since the fixed resistors ( 101 ) to ( 103 ) are not in the thin layer area ( 2 ), the transferred heat is absorbed in the semiconductor substrate ( 1 ), so that temperature does not vary. Therefore, the midpoint potential (V 2 ) remains unchanged. 
         [0077]    Then, the midpoint potentials (V 1 ) and (V 2 ) are input to the comparator ( 21 ) via the electrodes ( 302 ) and ( 303 ). The comparator ( 21 ) compares the midpoint potentials (V 1 ) and (V 2 ) and inputs a result of the comparison to the DSP ( 22 ). The DSP ( 22 ) calculates a driving power indication value for equalizing the midpoint potentials (V 1 ) and (V 2 ), and outputs the value to the subsequent D/A converter ( 201 ). Then, in response to the driving power indication value input to the D/A converter ( 201 ), a base voltage of the transistor element ( 202 ) varies and the driving current (Ih) also varies. Such feedback control maintains the temperature of the heater ( 6 ) constant. 
         [0078]    Next, an operation in the transient state will be described with reference to  FIGS. 8 to 11 .  FIG. 8  illustrates changes in temperature of the indirect heat resistor ( 7 ) at the time of startup.  FIG. 9  illustrates changes in the midpoint potential (V 1 ) at the time of startup.  FIG. 10  illustrates changes in a driving current applied to the heater ( 6 ) at the time of startup. 
         [0079]    In addition,  FIGS. 8 to 10  also illustrate characteristics obtained if a second temperature control circuit is not included. 
         [0080]    At the time of startup, since the heater ( 6 ), the indirect heat resistor ( 7 ), and the detection resistors ( 9   a ) to ( 9   d ) have the same temperature, the midpoint potential (V 1 ) is higher than the (V 2 ) in potential. At the time of startup, because the output of the DSP ( 22 ) is an initial or an undefined value, the strength of the driving current (Ih) supplied from the transistor element ( 202 ) is arbitrary. A heat capacity of the heater ( 6 ) of the semiconductor is minute, so that any current value causes the heater ( 6 ) to generate heat. In the indirect heat resistor ( 7 ) which has received the heat of the heater ( 6 ), a resistance value increases and the midpoint potential (V 1 ) lowers. 
         [0081]    Then, when a certain time has passed, the temperature of the indirect heat resistor ( 7 ) becomes greater than the first reference temperature and approaches the second reference temperature. At the same time, the midpoint potential (V 1 ) becomes lower than the (V 2 ) in potential and reaches a potential (V 1 ′) corresponding to the second reference temperature. An operation of the second temperature control circuit ( 12 ) in this state will be described. 
         [0082]    In the second temperature control circuit ( 12 ), the comparator ( 14 ) detects, from a potential difference between the (V 1 ) and the (V 2 ), the fact that the midpoint potential (V 1 ) has reached the (V 1 ′) and inverts the output of the comparator ( 14 ) to output warning signals. Upon receiving the warning signals, the switching element ( 16 ) disconnects the transistor element ( 202 ) from the heater ( 6 ). In this state, because currents do not flow through the heater ( 6 ), an amount of heat generation is decreased. At the same time, because the temperature of the indirect heat resistor ( 7 ) is also lowered, the midpoint potential (V 1 ) approaches the (V 2 ). Then, the comparator ( 14 ) cancels the warning signals. Accordingly, the switching element ( 16 ) enters a connected state again, the temperature of the indirect heat resistor ( 7 ) increases again, and the midpoint potential (V 1 ) approaches the (V 1 ′) again. 
         [0083]    While the second temperature control circuit ( 12 ) is repeating the foregoing operation, the DSP ( 22 ) leaves the transient state and outputs an appropriate control amount. Then, even if the switching element ( 16 ) is in the connected state, the temperature of the indirect heat resistor ( 7 ) does not approach the second reference temperature and then is stabilized at the first reference temperature by a function of the first temperature control circuit ( 11 ). Thereafter, the flow rate detecting circuit ( 10 ) detects an accurate flow rate on the basis of the voltage signals of the electrodes ( 304 ) and ( 305 ). 
         [0084]    Now, the influence of heat capacity variations upon startup characteristics will be described with reference to  FIG. 11 . 
         [0085]    If the second temperature control circuit ( 12 ) is not included, the increase of the temperature at the time of startup is not controlled. The temperature is changed in a parabolic manner and converged to a target temperature. However, because variations in the heat capacities cause variations in the transient, there is also a predetermined variation Δt′ in a time required for the temperature to stabilize. 
         [0086]    On the other hand, if the second temperature control circuit ( 12 ) is included, because a temperature increase at the time of startup is clamped at a predetermined temperature, the time needed for attaining a target temperature is shortened. Furthermore, since the temperature is directly clamped, variations in heat capacities do not affect a clamp temperature. Therefore, the variation Δt in startup time caused by heat capacity variations is smaller than the Δt′. 
         [0087]    Next, advantages provided by the thermal flow sensor of the first embodiment will be described. 
         [0088]    A first advantage is that since introducing the second temperature control circuit ( 12 ) can reduce the influence of variations in heat capacities due to a manufacturing error upon the time of startup characteristics, stable startup characteristics can be achieved. As a result, a step for adjusting individual differences is not needed. In addition, uniform startup characteristics can be ensured without increasing the size of the heater ( 6 ). 
         [0089]    A second advantage is that since introducing the second temperature control circuit ( 12 ) can restrict an overshoot in temperature of the heater ( 6 ) at the time of startup, the startup time can be shortened. As a result, since the temperature of the heater ( 6 ) is more quickly stabilized, a waiting time before flow rate detection starts can be shortened. Alternatively, a longer time for self-diagnosis and the like can be ensured. 
         [0090]    A third advantage is that since introducing the second temperature control circuit ( 12 ) can prevent the temperature of the indirect heat resistor ( 7 ) from becoming higher than the second reference temperature, degradation caused by the heat of the indirect heat resistor ( 7 ) can be restricted.  FIG. 12  illustrates environment temperature dependence of the degradation over time of the indirect heat resistor ( 7 ). According to  FIG. 12 , if the temperature is restricted, degradation can also be restricted. As a result, the temperature of the heater ( 6 ) can be controlled for a long while and detection accuracy can also be maintained for a long while. 
         [0091]    A fourth advantage is that since introducing the second temperature control circuit ( 12 ) can prevent thermal runaway of the heater ( 6 ) as a fail-safe circuit that operates if the first temperature control circuit ( 11 ) fails. Thereby, the thermal flow sensor can safely transition to a fail-safe mode. 
         [0092]    It should be noted that in the present embodiment, the switching element ( 16 ) has been placed on an energizing path between the transistor element ( 202 ) and the heater ( 6 ), but even if the switching element ( 16 ) is placed between the D/A converter ( 201 ) and the transistor element ( 202 ), the same advantages are provided. Also, the comparator ( 14 ) is not necessary, and even if an analog-to-digital converter (hereinafter, the A/D converter) is installed in place of the comparator ( 21 ) and the switching element ( 16 ) is operated on the basis of the output from the A/D converter, the same advantages are provided. 
       Second Embodiment 
       [0093]    A second embodiment of the present invention will be described with reference to  FIG. 3 .  FIG. 3  illustrates a circuit configuration of a thermal flow sensor according to the second embodiment. 
         [0094]    The thermal flow sensor of the second embodiment is configured by providing a clamp element ( 17 ) in place of the switching element ( 16 ) of the first embodiment. 
         [0095]    In the second embodiment, an operation in the steady state is equal to the operation in the first embodiment. However, an operation in the transient state is partially different. Specifically, when the comparator ( 14 ) outputs warning signals, the clamp element ( 17 ) disconnects the heater ( 6 ) from the transistor element ( 202 ) and clamps the heater ( 6 ) to a predetermined potential. Thereby, a constant voltage is applied to the heater ( 6 ). At this time, it is desirable that a potential for clamping the heater ( 6 ) be a ground potential or a potential equivalent thereto. 
         [0096]    Next, advantages provided by the thermal flow sensor of the second embodiment will be described. 
         [0097]    The advantages provided by the second embodiment include the advantages of the first embodiment as well as are that voltage at a heater end that occurs when the clamp element ( 17 ) is operated can be reliably reduced. Thereby, the temperature of the heater ( 6 ) can be more reliably lowered. 
         [0098]    It should be noted that in the present embodiment, the clamp element ( 17 ) has been placed on an energizing path between the transistor element ( 202 ) and the heater ( 6 ), but even if the clamp element ( 17 ) is placed between the D/A converter ( 201 ) and the transistor element ( 202 ), the same advantages are provided. It is desirable that the clamp voltage in this case be an emitter potential of the transistor element ( 202 ), a ground potential, or a voltage equivalent thereto. In addition, even if the clamp element ( 17 ) is installed between the DSP ( 22 ) and the D/A converter ( 201 ), and a digital value output from the DSP ( 22 ) is clamped at a predetermined value, the same advantages are provided. Also, the comparator ( 14 ) is not necessary, and even if an analog-to-digital converter (hereinafter, the A/D converter) is installed in place of the comparator ( 21 ) and the clamp element ( 17 ) is operated on the basis of the output from the A/D converter, the same advantages are provided. 
       Third Embodiment 
       [0099]    A third embodiment of the present invention will be described with reference to  FIG. 4 .  FIG. 4  illustrates a circuit configuration of a thermal flow sensor according to the third embodiment. 
         [0100]    The thermal flow sensor of the third embodiment is configured by providing, in place of the switching element ( 16 ) of the first embodiment, load resistors ( 18   a ) and ( 18   b ) having two resistance values and a resistor switch ( 19 ) for selecting any one of the resistors and connecting the selected one to the heater ( 6 ). It should be noted that in the present embodiment, it is assumed that the resistance value of the load resistor ( 18   a ) is lower than the value of ( 18   b ). 
         [0101]    In the third embodiment, an operation in the steady state is equal to the operation in the first embodiment. However, it is assumed that in the steady state, a load resistor connected to the heater ( 6 ) is the resister ( 18   a ). Also, an operation in the transient state is partially different. Specifically, when the comparator ( 14 ) outputs warning signals, the resistor switch ( 19 ) switches the load resistor connected to the heater ( 6 ) from the resister ( 18   a ) to the resister ( 18   b ). Thereby, currents flowing through the heater ( 6 ) are reduced. 
         [0102]    Next, advantages provided by the thermal flow sensor of the third embodiment will be described. 
         [0103]    The advantages provided by the third embodiment include the advantages of the first embodiment as well as are that changes in driving current (Ih) that occur when the resistor switch ( 19 ) is operated can be reduced. According to the configuration of the sensor element illustrated in  FIG. 1 , since the heater ( 6 ), the indirect heat resistor ( 7 ), and the detection resistors ( 9   a ) to ( 9   d ) are provided in the thin layer area ( 5 ) and close to each other, cross-talk may occur. According to the embodiment, because noises caused by cross-talk on the sensor element can be reduced, the temperature of the heater ( 6 ) can be controlled and the detection resistor ( 9 ) can detect a flow rate with high accuracy. 
         [0104]    It should be noted that in the embodiment, the load resistors ( 18   a ) and ( 18   b ) and the resistor switch ( 19 ) have been placed on an energizing path between the transistor element ( 202 ) and the heater ( 6 ), but even if they are placed between the D/A converter ( 201 ) and the transistor element ( 202 ), the same advantages are provided. Also, the comparator ( 14 ) is not necessary, and even if an analog-to-digital converter (hereinafter, the A/D converter) is installed in place of the comparator ( 21 ) and the resistor switch ( 19 ) is operated on the basis of the output from the A/D converter, the same advantages are provided. Also, the load resistors ( 18 ) are composed of variable resistors and the resistance values of the variable resistors are changed by the resistor switch ( 19 ), whereby the same advantages are provided. In addition, even if the load resistors ( 18 ) are connected in parallel with respect to the heater ( 6 ), the same advantages are provided. 
       Fourth Embodiment 
       [0105]    A fourth embodiment of the present invention will be described with reference to  FIG. 5 .  FIG. 5  illustrates a circuit configuration of a thermal flow sensor according to the fourth embodiment. 
         [0106]    The thermal flow sensor of the fourth embodiment is configured by providing, in place of the switching element ( 16 ) of the first embodiment, frequency dividers ( 23   a ) and ( 23   b ) that divide output from the reference oscillator ( 203 ) in different dividing ratios and a clock switch ( 24 ) that selects any one of first clock signals generated by the frequency divider ( 23   a ) and second clock signals generated by the frequency divider ( 23   b ) and slower than the first clock signals, as an operation clock of the DSP ( 22 ). 
         [0107]    In the fourth embodiment, an operation in the steady state is equal to the operation in the first embodiment. However, in the steady state, the clock switch ( 24 ) selects the second clock signals. Also, an operation in the transient state is partially different. Specifically, when the comparator ( 14 ) outputs warning signals, the clock switch ( 24 ) switches an operation clock of the DSP ( 22 ) from the second clock signals to the first clock signals. Thereby, an operation speed of the DSP ( 22 ) becomes higher, and the DSP ( 22 ) quickly leaves the transient state and enters the steady state. 
         [0108]    Next, advantages provided by the thermal flow sensor of the fourth embodiment will be described. 
         [0109]    The advantages provided by the fourth embodiment include the advantages of the first embodiment as well as are that because the driving power of the heater ( 6 ) is not shut off or clamped, irregular current changes as illustrated in  FIG. 10  do not occur and a change curve is smooth, so that cross-talk can be reliably restricted. Thereby, the temperature of the heater ( 6 ) can be controlled and the detection resistor ( 9 ) can detect a flow rate with high accuracy. 
         [0110]    It should be noted that applications of the present embodiment are as follows. Even if a second reference oscillator that generates a clock having a period different from the reference oscillator is newly installed, the same advantages are provided. Also, the comparator ( 14 ) is not necessary, and even if an analog-to-digital converter (hereinafter, the A/D converter) is installed in place of the comparator ( 21 ) and the clock switch ( 24 ) is switched on the basis of the output from the A/D converter, the same advantages are provided. In addition, even if a dividing ratio of the frequency dividers ( 23 ) is variable and changed in response to the output from the comparator ( 14 ), the same advantages are provided. 
       Fifth Embodiment 
       [0111]    A fifth embodiment of the present invention will be described with reference to  FIG. 6 .  FIG. 6  illustrates a circuit configuration of a thermal flow sensor according to the fifth embodiment. 
         [0112]    The thermal flow sensor of the fifth embodiment is configured by providing, in place of the frequency dividers ( 23 ) of the fourth embodiment, a memory element ( 204 ) and a constant selecting switch ( 25 ) that selects one of two different storage values ( 204   a ) and ( 204   b ) stored in the memory element ( 204 ), as arithmetic constants of the DSP ( 22 ). In the present embodiment, it is assumed that an absolute value of the storage value ( 204   a ) is lower than an absolute value of the storage value ( 204   b ). 
         [0113]    In addition, an internal configuration of the DSP ( 22 ) will be described with reference to  FIG. 13 .  FIG. 13  illustrates a block diagram of exemplary processing of the DSP ( 22 ). 
         [0114]    The DSP ( 22 ) includes, for example, a proportional gain ( 401 ), an integrator gain ( 402 ), an integrator ( 403 ), and an adder ( 404 ) that adds outputs of the proportional gain ( 401 ) and the integrator ( 403 ) together. 
         [0115]    In the fifth embodiment, an operation in the steady state is equal to the operation in the first embodiment. However, in the steady state, as illustrated in  FIG. 6 , the constant selecting switch ( 25 ) selects the storage value ( 204   a ). Also, an operation in the transient state is partially different. Specifically, when the comparator ( 14 ) outputs warning signals, the constant selecting switch ( 25 ) switches from the storage value ( 204   a ) to the storage value ( 204   b ) to change input/output gain of the DSP ( 22 ). Thereby, values set to the proportional gain ( 401 ) and the integrator gain ( 402 ) of the DSP ( 22 ) are changed and the input/output gain of the DSP ( 22 ) increases. That is, a feedback gain is increased and accordingly responsiveness of a heater control system is improved, so that the DSP ( 22 ) quickly leaves the transient state and enters the steady state. 
         [0116]    Next, advantages provided by the thermal flow sensor of the fifth embodiment will be described. 
         [0117]    The advantages provided by the fifth embodiment include the advantages of the first embodiment as well as are that because the driving power of the heater ( 6 ) is not shut off or clamped, irregular current changes as illustrated in  FIG. 10  do not occur and a change curve is smooth, so that cross-talk can be reliably restricted. Thereby, the temperature of the heater ( 6 ) can be controlled and the detection resistor ( 9 ) can detect a flow rate with high accuracy. Furthermore, in hardware, because a component required to be added is only the memory element ( 204 ), a simple configuration may provide the advantages. 
         [0118]    It should be noted that applications of the present embodiment are as follows. In addition to the proportional gain ( 401 ) and the integrator gain ( 402 ), a gain for adjustment may also be installed. Specifically, input from the comparator ( 21 ) is amplified and then input to each gain, or a gain may be installed at a site subsequent to the adder ( 404 ). Also, the same advantages can be provided by changing the gain of the D/A converter ( 201 ), namely, a dynamic range. 
       Sixth Embodiment 
       [0119]    A sixth embodiment of the present invention will be described with reference to  FIG. 7 .  FIG. 7  illustrates a circuit configuration of a thermal flow sensor according to the sixth embodiment. 
         [0120]    The thermal flow sensor of the sixth embodiment is configured by providing, in place of the frequency dividers ( 23 ) of the fifth embodiment, a memory element ( 26 ) and a program selecting switch ( 27 ) that selects one of two different processing programs ( 26   a ) and ( 26   b ) stored in the memory element ( 26 ), as processing programs of the DSP ( 22 ). In the present embodiment, it is assumed that a capacity of the processing program ( 26   a ) is greater than a capacity of the processing program ( 26   b ). 
         [0121]    In the sixth embodiment, an operation in the steady state is equal to the operation in the first embodiment. However, in the steady state, the program selecting switch ( 27 ) selects the processing program ( 26   a ). Also, an operation in the transient state is partially different. Specifically, when the comparator ( 14 ) outputs warning signals, the program selecting switch ( 27 ) changes a processing program of the DSP ( 22 ) into the shorter processing program ( 26   b ). Thereby, an operation period of the DSP ( 22 ) is substantially shortened and accordingly responsiveness of a heater control system is improved, so that the DSP ( 22 ) quickly leaves the transient state and enters the steady state. 
         [0122]    Next, advantages provided by the thermal flow sensor of the sixth embodiment will be described. 
         [0123]    The advantages provided by the sixth embodiment include the advantages of the first embodiment as well as are that because the driving power of the heater ( 6 ) is not shut off or clamped, irregular current changes as illustrated in  FIG. 10  do not occur and a change curve is smooth, so that cross-talk can be reliably restricted. Thereby, the temperature of the heater ( 6 ) can be controlled and the detection resistor ( 9 ) can detect a flow rate with high accuracy. Furthermore, in hardware, because a component required to be added is only the memory element ( 26 ), a simple configuration may provide the advantages.