fig1 is an overall block diagram showing the device of the present invention built into an automatic air conditioner which is controlled by a microcomputer . numeral 1 denotes a duct of the car air conditioner disposed in the car . it takes in outdoor air from an outdoor air inlet 1a and takes in indoor air from an indoor air inlet 1b and circulates it . numeral 2 denotes a damper for changing over between indoor and outdoor air . it selectively switches the outdoor air inlet 1a and the indoor air inlet 1b to open them so as to change over between the outdoor air inlet and the indoor air circulation . the duct 1 has an adjusting unit 1c which includes a blower for sending air , an evaporator for cooling the air sent , a heater core for heating the air sent and an air mixing damper for adjusting the proportion of heating and cooling air , which are not shown . temperature is adjusted by changing the mixture of cold air and hot air so as to control the air condition within an automobile compartment 3 . numeral 4 denotes a gas detector ( hereinafter referred to as a gas sensor ) disposed in the outdoor air inlet path 1a , for sensing the density of noxious gas included in the air outside the automobile and generating an analog signal in accordance with the density . the density is read by a microcomputer 6 through an a / d converter 5 . the a / d converter 5 has , for example , an indoor air temperature sensor 7 relating to the automatic air conditioner and a multiplexer function for sequentially converting analog signals such as from an outdoor air temperature sensor or the like ( not shown ) into digital values and supplying the data to the computer 6 . an instruction for which analog input to be a / d converted is provided from the microcomputer 6 to the a / d converter 5 . a well - known heat transmission method using a metal oxide semiconductor such as sno 2 or the like is employed for the gas sensor 4 so that the resistance value may change by the adhesion of inflammable gas . it is needless to mention that a gas sensor of other components may also be used . numeral 8 denotes an electro - mechanical actuator for operating the damper 2 for changing over between indoor and outdoor air . a diaphragm actuator that is operated by vacuum produced by an engine , for instance , is used for this actuator 8 to set the damper 2 usually at the state of taking in outdoor air and setting it to the state of taking in air from the inside of the automobile compartment when it is energized with the actuator operating control signal being applied from the latched output port of the microcomputer 6 . the electro - mechanical actuator 8 is provided for operating the adjusting unit 1c . it is controlled based on the automatic air conditioning processing of the microcomputer 6 . numeral 9 denotes an operation switch and display unit of the automatic air conditioner , and 9a a switch and display unit for indicating the operation of the automatic air conditioner and the operation of the automatic indoor and outdoor air change - over unit . when this switch is depressed , an internal illuminating lamp is lighted to let the driver or passenger of the automobile to know that the automatic mode is set . similarly , 9b denotes an outdoor air inlet switch and display unit and 9c denotes an indoor air circulation switch and display unit . an automatic return type switch employing a spring is used for each switch and the instruction signal of each switch is read periodically by the microcomputer 6 . numeral 10 denotes a regulated voltage circuit , which receives a power source voltage v b from the automobile - loaded battery when the key switch of the automobile is turned on and generates a constant stable voltage v c . numeral 11 denotes an initialization circuit , which generates a start signal for starting the program processing of the microcomputer 6 from the initial address based on the build - up of the stable voltage v c . fig2 a , 2b and fig3 show control programs of the part relating to the present invention among the arithmetic processings executed by the microcomputer 6 . when the key switch of the automobile is turned on , a power v b is supplied to the control unit shown in fig1 and the microcomputer 6 starts the execution of the control program from a step 100 of the main control routine shown in fig2 a . in a step 101 , the maximum value to be handled by the microcomputer 6 ( ff in hexadecimal notation when an 8 - bit microcomputer is used ) is set as the minimum or lowest value of the gas sensor output signal and arithmetic variables necessary for other controls are initialized . in a step 102 , decision is made whether the arithmetic processing timing at every constant cycle has been reached . when the result of the decision is yes , an automatic air conditioning processing routine 103 and an indoor and outdoor air change - over processing routine 104 are executed sequentially . both of these processings are executed in a constant cycle of about several 100 ms . the automatic air conditioning processing 103 is carried out by controlling the adjusting unit 1c in accordance with the signals of the indoor air temperature sensor 7 and other temperature sensors and setting devices not shown , so that the air conditioning in the car cabin 3 is controlled . since detailed contents of the automatic air conditioning processing 103 are not the object of the present invention , the detailed explanation will be omitted . details of the indoor and outdoor air change - over processing 104 are shown in fig3 . the microcomputer 6 executes the main control routine shown in fig2 a and executes the timer interrupt routine shown in fig2 b in the cycle of approximately 10 ms . to be more specific , each time when the count value of the counter incorporated in the computer 6 reaches a value equivalent to the predetermined value of about 10 ms , the arithmetic processing of the main control routine is suspended temporarily and the timer interrupt processing is executed , upon termination of which the processing of the main control routine is returned again . in the timer interrupt processing , when a processing instruction is received from the internal counter in a step 200 , the program address of the main control routine is stored in the save register , and each routine of timer processing 201 , a / d convertion processing 202 and switch signal processing 203 is executed . in a step 204 , the program address saved in the save register is read and the execution of the main control routine is restarted . in the timer processing routine 201 , each time a timer interrupt is executed , a timer counter t 0 set to the memory of the computer 6 is increased , and the count value is used to decide whether the predetermined value has been reached in the decision step 102 . the timer counter t 0 is so designed as to return the count value to 0 when the predetermined value has been reached and a further increment is made . it may be so designed in the a / d conversion processing routine 202 that an instruction is sent to the a / d converter 5 to selectively convert the analog signals from each of the sensors 5 and 7 into digital signals and to store the digital value obtained in the predetermined memory address of the computer 6 . in order to prevent the occurrence of noise , an average value may be obtained from several digital values . in the switch signal processing routine 203 , the turn - on state of each switch is checked sequentially from the operating switch and display unit 9 . when there is an indication signal of a first switch ( 9a ), arithmetic variables ( flags ) f 1 and f 0 are set to 0 , and when there is no indication signal of the first switch ( 9a ) but there is an indication signal of a second switch ( 9b ), only the flag f 0 is set to 1 and the flag f 1 is set to 0 . when there are no indication signals of the first and second switches ( 9a and 9b ) but there is an indication signal of a third switch ( 9c ), only the flag f 1 is set to 1 and the flag f 0 is set to 0 . when none of the first , second and third switches are turned on , the flags f 1 and f 0 maintain the previous values . fig3 shows the details of the indoor and outdoor air change - over processing in the microcomputer 6 . the operation of the device will be explained below in accordance with the flow diagram showing this control program . in steps 300 and 301 , the flags f 1 and f 0 are checked and decision is made as to which control mode has been assigned from the first , second and third switches ( 9a to 9c ). then , when the second switch ( 9b ) is turned on and the intake of indoor air is instructed , the flag f 1 is set to 1 so that an operation control signal is output to the actuator 8 to drive the indoor and outdoor air change - over damper in the indoor air intake state in a step 302 . meanwhile , when the third switch ( 9c ) is turned on , the flag f 0 is set to 1 so that , in a step 303 , the operation control signal to the actuator 8 is deenergized and the indoor and outdoor air change - over damper 2 is returned to the outdoor air inlet state . by turning on the second and third switches ( 9b and 9c ), the indoor and outdoor air change - over damper 2 can be set to the desired air inlet mode . meanwhile , when the first switch ( 9a ) is turned on and the automatic change - over mode is indicated or when none of the switches are turned on from the beginning , the indoor air inlet and the outdoor air inlet are automatically controlled in accordance with the output signal value of the gas sensor 4 by the processing in steps 304 through 310 . in the step 304 , the output voltage vs of the a / d converted gas sensor 4 is compared with the minimum value v min of the gas sensor . when vs is smaller than v min , vs is set to v min in the step 305 . since the first v min upon the power source being on has been set to the maximum value in the step 101 , the first vs becomes v min . thereafter , through the steps 304 and 305 , the minimum output value is stored in v min for the period from the time when the ignition is turned on , or when a voltage is applied to the gas sensor 4 , to the time when it is turned off . subsequently in the step 306 , a true output value v out of the sensor 4 corresponding to the impurity degree of the outdoor air is calculated and it is compared with predetermined values a and b ( where a & gt ; b ) in the steps 307 and 309 . when the volume of polluted gas increases and exceeds the reference value a , the indoor and outdoor air change - over damper 2 is driven to the indoor air inlet state in the step 308 . meanwhile , when the volume of the polluted gas decreases and becomes smaller than the reference value b , the indoor and outdoor air change - over damper 2 is returned to the outdoor air inlet position in the step 310 . it should be noted that while the minimum value of the output level of the gas sensor is left in the a / d converted value in the above - described embodiment , the minimum value of the average level of the gas sensor within the time which is a reason for noise counter measures may be used as a reference level . as described above , the present invention does not compare the output level of the gas sensor to be switched from the outdoor air inlet to the indoor air inlet with a completely fixed predetermined value , but sets the minimum value of the gas sensor output as a reference level produced during the period from the time when a voltage is applied to the gas sensor to the time when it is disconnected and compares this reference level with the output of the gas sensor , so that an indoor and outdoor air change - over control unit that can operate stably without any malfunction owing to the change of the temperature , humidity and time lapse of said gas sensor change .