Abstract:
A window opening and closing controller includes a driver for operating a window of a door; an operating state detector for detecting an operating state of this driver; jamming judgment for judging the existence of foreign substance jamming of the window with a threshold value as a reference in accordance with a change of the detected operating state using this operating state detector; and a controller for controlling the operating state of the driver on the basis of a judging result of this judgment. The window opening and closing controller further including a door detector for detecting a closing operation of the door; and a threshold value increaser for increasing the threshold value during a predetermined time in accordance with the detection of the closing operation using this door detector. The door is a door of an automobile; the door detector is a courtesy lamp switch of the automobile; and the judgment is made with the increasing threshold value as a reference during the predetermined time.

Description:
BACKGROUND OF THE INVENTION  
       [0001]     1. Field of the Invention  
         [0002]     The present invention relates to a window opening and closing controller for controlling opening and closing of a window of a vehicle, etc.  
         [0003]     2. Description of Related Art  
         [0004]     The window opening and closing controller (hereinafter called a “power window device”) used in an automobile is a device for raising and lowering a window glass of a door and opening and closing the window by rotating a motor in the normal and reverse directions by the operation of a switch.  FIG. 1  is a block diagram showing the electric construction of the power window device. Reference numerals  1 ,  2  and  4  respectively designate an operation switch for performing the opening and closing operations of the window, a motor driving circuit for driving a motor  3 , and a rotary encoder for outputting a pulse synchronized with the rotation of the motor  3 . Reference numerals  5 ,  6  and  7  respectively designate a pulse detecting circuit for detecting the pulse outputted from the rotary encoder  4 , a memory constructed from a ROM, a RAM, etc., and a door closing detecting switch for detecting the closing of the door. Reference numerals  8  and  9  respectively designate an acceleration sensor for detecting acceleration due to a vibration and an impact applied to a vehicle body, and a control section constructed by a CPU for controlling the opening and closing operations of the window.  
         [0005]     When the operation switch  1  is operated, a window opening and closing command is given to the control section  9 , and the motor  3  is rotated by the motor driving circuit  2  in the normal or reverse direction. A window opening and closing mechanism is operated in association with the motor  3  by rotating the motor  3  so that the window is opened and closed. The pulse detecting circuit  5  detects the pulse outputted from the rotary encoder  4 . The control section  9  calculates the opening and closing amount of the window and a motor speed on the basis of this detecting result, and controls the rotation of the motor  3  through the motor driving circuit  2 .  
         [0006]      FIG. 2  is a schematic construction view showing one example of the operation switch  1 . The operation switch  1  is constructed from an operation knob  11  able to be rotated in the ab direction with a shaft Q as a center, a rod  12  arranged integrally with this operation knob  11 , and a publicly known slide switch  13 . Reference numerals  14  and  20  respectively designate an actuator of the slide switch  13 , and a cover of a switch unit into which the operation switch  1  is assembled. The lower end of the rod  12  is engaged with the actuator  14  of the slide switch  13 . When the operation knob  11  is rotated in the ab direction, the actuator  14  is moved in the cd direction through the rod  12 , and an unillustrated contact of the slide switch  13  is switched in accordance with its moving position.  
         [0007]     The operation knob  11  can be switched to the respective positions of auto closing AC, manual closing MC, neutral N, manual opening MO and auto opening AO.  FIG. 2  shows a state in which the operation knob  11  is located in the position of neutral N. When the operation knob  11  is rotated by a constant amount from this position to the a-direction and is set to the position of manual closing MC, a manual closing operation for closing the window by a manual operation is performed. When the operation knob  11  is further rotated in the a-direction from this position and is set to the position of auto closing AC, an auto closing operation for closing the window by an auto operation is performed. Further, when the operation knob  11  is rotated by a constant amount from the position of neutral N in the b-direction and is set to the position of manual opening MO, a manual opening operation for opening the window by a manual operation is performed. When the operation knob  11  is further rotated from this position in the b-direction and is set to the position of auto opening AO, an auto opening operation for opening the window by an auto operation is performed. An unillustrated spring is arranged in the operation knob  11 . When a hand is separated from the rotated operation knob  11 , the operation knob  11  is returned to the position of neutral N by the force of the spring.  
         [0008]     In the case of the manual operation, the operation for closing or opening the window is performed only while the operation knob  11  is manually held continuously in the position of manual closing MC or manual opening MO. When the hand is separated from the operation knob  11  and the knob is returned to the position of neutral N, the closing operation or the opening operation of the window is stopped. On the other hand, in the case of the auto operation, when the operation knob  11  is once rotated until the position of auto closing AC or auto opening AO, the closing operation or the opening operation of the window is thereafter continuously performed even when the hand is separated from the operation knob  11  and the knob is returned to the position of neutral N.  
         [0009]      FIG. 3  is a view showing one example of the window opening and closing mechanism arranged in each window of the vehicle. Reference numerals  100 ,  101  and  102  respectively designate a window of an automobile, a window glass for opening and closing the window  100 , and the window opening and closing mechanism. The window glass  101  is raised and lowered by operating the window opening and closing mechanism  102 . The window  100  is closed by raising the window glass  101 , and is opened by lowering the window glass  101 . In the window opening and closing mechanism  102 , reference numeral  103  designates a support member attached to the lower end of the window glass  101 . Reference numerals  104  and  105  respectively designate a first arm and a second arm. One end of the first arm  104  is engaged with the support member  103 , and the other end of the first arm  104  is rotatably supported by a bracket  106 . One end of the second arm  105  is engaged with the support member  103 , and the other end of the second arm  105  is engaged with a guide member  107 . The first arm  104  and the second arm  105  are connected through a shaft in their intermediate portions. Reference numerals  3  and  4  respectively designate the above motor and the above rotary encoder. The rotary encoder  4  is connected to the rotating shaft of the motor  3 , and outputs pulses of a number proportional to the rotating amount of the motor  3 . The rotational speed of the motor  3  can be detected by counting the number of pulses outputted from the rotary encoder  4  within a predetermined time. The rotating amount of the motor  3  (the moving amount of the window glass  101 ) can be calculated from the output of the rotary encoder  4 .  
         [0010]     Reference numerals  109  and  110  respectively designate a pinion rotated and operated by the motor  3 , and a gear of a fan shape engaged with the pinion  109  and rotated. The gear  110  is fixed to the first arm  104 . The motor  3  can be rotated in the normal and reverse directions. The pinion  109  and the gear  110  are rotated by rotating the motor  3  in the normal and reverse directions so that the first arm  104  is rotated in the normal and reverse directions. In connection with this rotation, the other end of the second arm  105  is slid in the transversal direction along a groove of the guide member  107 , and the support member  103  is moved in the vertical direction. Thus, the window glass  101  is raised and lowered and the window  100  is opened and closed.  
         [0011]     When the operation knob  11  is located in the position of auto closing AC of  FIG. 2  and the auto closing operation is performed, the above power window device has a function for detecting jamming of an object. Namely, as shown in  FIG. 4 , when the object Z is jammed into a clearance of the window glass  101  during the closing of the window  100 , this jamming is detected and the closing operation of the window  100  is stopped or switched to the opening operation. The window  100  is automatically closed during the auto closing operation. Therefore, when a hand, a neck, etc. are jammed in error, such a jamming detecting function is arranged from the necessity of inhibiting the closing operation and preventing that an injury is inflicted on a human being. In the detection of the jamming, the control section  9  reads the rotational speed of the motor  3  as the output of the pulse detecting circuit  5  at any time, and compares the present rotational speed and the previous rotational speed, and judges the existence of the jamming on the basis of this comparing result. When the jamming of the object Z is generated in the window  100 , the load of the motor  3  is increased and the rotational speed is reduced so that the changing amount of the speed is increased. When this speed changing amount exceeds a predetermined threshold value, the control section  9  judges that the object Z is jammed. The threshold value is stored to the memory  6  in advance.  
         [0012]     The change of the rotational speed of the motor  3  is also generated by a vibration at the closing time of the door as well as the jamming of a foreign substance. When the rotational speed is changed by such a vibration, a case in which it is judged in error as the jamming of the foreign substance and the window is opened, might be caused although no foreign substance is jammed. As this countermeasure, it is considered to highly set the threshold value for judging the jamming. However, when the threshold value is merely raised, the load (hereinafter called “jamming load”) at a detecting time point of the jamming is increased by the raising amount of the threshold value. Therefore, a problem exists in that safety is reduced when a hand, an arm, etc. are jammed.  
         [0013]     Therefore, in Japanese Patent No. 3156553 (patent literature 1), a power window device is proposed as a solving countermeasure of this problem. In this power window device, the threshold value is raised for only a constant time from the detection of the closing of the door. Thus, at the closing operation time of the door, no speed changing amount exceeds the threshold value and the erroneous judgment is prevented even when the rotational speed of the motor is changed by a vibration. After the constant time has passed from the closing of the door, the threshold value is returned to the original threshold value so that the normal jamming detection is performed. In Japanese Patent No. 3237519 (patent literature 2), a similar technique is also disclosed. In a power window device described in Japanese Patent No. 3237520 (patent literature 3), a road surface state is judged on the basis of the change of a pulse period according to the speed of the motor. When it is judged that the vehicle is running a bad road, the threshold value is changed so as not to generate the erroneous judgment of the jamming due to a vibration during the bad road running.  
         [0014]     Power voltage supplied from a battery arranged in the automobile is generally not constant, but is changed in accordance with the state of an engine. Namely, the power voltage at a stopping time of the engine is e.g., 12 V In contrast to this, the power voltage at an operating time of the engine is raised to e.g., 14.5 V The rotation number of the motor depends on the power voltage. As the power voltage is raised, the rotation number is increased. Accordingly, in the system for raising the threshold value for only a predetermined time from the closing of the door as in patent literatures 1 and 2, the rotating amount of the motor is increased when the power voltage is high. The moving amount of the window glass is increased while a predetermined time has passed. Therefore, a problem exists in that the jamming load is increased and the jammed foreign substance is easily damaged. No countermeasures with respect to this problem are described in patent literatures 1 to 3.  
       SUMMARY OF THE INVENTION  
       [0015]     Therefore, an object of the invention is to provide a window opening and closing controller for stably detecting the jamming without having any influence on the jamming load even when the power voltage is changed.  
         [0016]     The invention resides in a window opening and closing controller comprising detecting means for detecting the rotational speed of a motor for opening and closing a window: judging means for judging whether or not a foreign substance is jammed into the window on the basis of a comparing result of a changing amount of the rotational speed detected by the detecting means and a predetermined threshold value; and control means for controlling the operation of the motor so as not to close the window when it is judged by this judging means that the foreign substance is jammed. The threshold value is constructed by a first threshold value at a normal time and a second threshold value as a reference gentler than this first threshold value. The window opening and closing controller further comprises threshold value changing means for changing the threshold value from the first threshold value to the second threshold value on the basis of the detection of closing of an opening and closing portion of a door, etc.; and threshold value returning means for returning the threshold value from the second threshold value to the first threshold value on the basis of the detection of the rotation of the motor by a predetermined rotating amount in a state in which the threshold value is set to the second threshold value.  
         [0017]     The window opened and closed by the motor is typically a window of a vehicle, but may be also a sunroof. The opening and closing portion includes a rear portion door and a bonnet, etc. in addition to the door (including a slide door). The rotational speed of the motor may be detected by counting the number of pulses generated within a constant time in synchronization with the rotation of the motor, and may be also detected by measuring the period of this pulse. The changing amount of the rotational speed may be the difference between the present rotational speed and the past rotational speed, and may be also a changing ratio of the present rotational speed with respect to the past rotational speed. Further, when the operation of the motor is controlled so as not to close the window at the detecting time of jamming, the window may be opened by reversely rotating the motor, and it may be also inhibited by stopping the operation of the motor that the window is closed. Otherwise, after it is once inhibited by stopping the operation of the motor that the window is closed, the window may be also opened by reversely rotating the motor. The first threshold value and the second threshold value are not limited to a fixing value, but may be also set to a value having a constant width. Accordingly, for example, when the threshold value is returned from the second threshold value to the first threshold value by the threshold value returning means, the first threshold value after the return may be also a value different from the original first threshold value.  
         [0018]     In the invention, the raising period of the threshold value is set to a period according to the rotating amount of the motor instead of a constant period as in the above patent literatures 1 and 2. Therefore, even when the rotating amount of the motor is increased by raising power voltage, the threshold value is returned to the original threshold value when the motor is rotated by the predetermined amount. Accordingly, no jamming load is unnecessarily increased and damage of a jammed foreign substance can be prevented.  
         [0019]     In the invention, the closing of the opening and closing portion of the door, etc. can be detected by a detecting switch. In this case, the threshold value changing means changes the threshold value from the first threshold value to the second threshold value when a detecting signal is outputted from the detecting switch. Further, the threshold value returning means returns the threshold value from the second threshold value to the first threshold value on the basis of the detection of the rotation of the motor by the predetermined rotating amount after the threshold value is changed. For example, the detecting switch may be also used as a courtesy lamp switch. A dedicated detecting switch may be also used.  
         [0020]     The closing of the opening and closing portion of the door, etc. may be also detected by using an acceleration sensor instead of the detecting switch. In this case, the threshold value changing means changes the threshold value from the first threshold value to the second threshold value when the acceleration sensor detects a constant acceleration or more. Further, the threshold value returning means returns the threshold value from the second threshold value to the first threshold value on the basis of the detection of the rotation of the motor by the predetermined rotating amount after no acceleration sensor detects the constant acceleration or more.  
         [0021]     In accordance with the invention, there is no influence on the jamming load even when the power voltage is changed. Therefore, stable jamming detection can be performed and the damage of a jammed foreign substance can be prevented. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0022]      FIG. 1  is a block diagram showing the electric construction of a power window device as an embodiment mode of the invention.  
         [0023]      FIG. 2  is a schematic construction view showing one example of an operation switch.  
         [0024]      FIG. 3  is a view showing one example of a window opening and closing mechanism.  
         [0025]      FIG. 4  is a view showing a state in which an object is jammed into a window.  
         [0026]      FIG. 5  is a flow chart showing a basic operation of the power window device.  
         [0027]      FIG. 6  is a flow chart showing a detailed procedure of manual closing processing in a first embodiment mode.  
         [0028]      FIG. 7  is a flow chart showing a detailed procedure of auto closing processing in the first embodiment mode.  
         [0029]      FIG. 8  is a flow chart showing a detailed procedure of the manual closing processing in a second embodiment mode.  
         [0030]      FIG. 9  is a flow chart showing a detailed procedure of the auto closing processing in the second embodiment mode.  
         [0031]      FIG. 10  is a flow chart showing a detailed procedure of manual opening processing.  
         [0032]      FIG. 11  is a flow chart showing a detailed procedure of auto opening processing. 
     
    
     DESCRIPTION OF PREFERRED EMBODIMENTS  
       [0033]     An embodiment mode of the invention will next be explained with reference to the drawings. In the following description, FIGS.  1  to  4  explained in the column of the background art are cited as the embodiment mode of the invention.  FIG. 1  is a block diagram showing the electric construction of a power window device as the embodiment mode of the invention. A first threshold value and a second threshold value described later are stored to a memory  6 . A control section  9  constitutes judging means, control means, threshold value changing means and threshold value returning means in the invention. A rotary encoder  4  and a pulse detecting circuit  5  constitute detecting means in the invention.  FIG. 2  is a schematic construction view showing one example of an operation switch.  FIG. 3  is a view showing one example of a window opening and closing mechanism arranged in each window of a vehicle.  FIG. 4  is a view showing a state in which an object is jammed into the window in  FIG. 3 . Each of these figures has been already explained and its overlapping explanation is therefore omitted here.  
         [0034]      FIG. 5  is a flow chart showing a basic operation of the power window device in accordance with the embodiment mode of the invention. If the operation switch  1  is located in the position of manual closing MC in a step S 1 , the processing of a manual closing operation is performed (step S 2 ). If the operation switch  1  is located in the position of auto closing AC in a step S 3 , the processing of an auto closing operation is performed (step S 4 ). If the operation switch  1  is located in the position of manual opening MO in a step S 5 , the processing of a manual opening operation is performed (step S 6 ). If the operation switch  1  is located in the position of auto opening AO in a step S 7 , the processing of an auto opening operation is performed (step S 8 ). Further, if no operation switch  1  is located in the position of auto opening AO in the step S 7 , the operation switch  1  is located in the position of neutral N and no processing is performed. The details of steps S 2 , S 4 , S 6  and S 8  will next be sequentially explained.  
         [0035]      FIGS. 6 and 7  are flow charts showing the operation of the power window device in accordance with a first embodiment mode of the invention.  FIG. 6  shows a detailed procedure of the manual closing operation in the step S 2  of  FIG. 5 .  FIG. 7  shows a detailed procedure of the auto closing operation in the step S 4  of  FIG. 5 . In the first embodiment mode, closing of a door is detected by a door closing detecting switch  7 . As this door closing detecting switch  7 , it is possible to use a courtesy lamp switch for controlling turning-on of a lamp within the vehicle in association with the opening and closing of the door.  
         [0036]     The procedure of the manual closing operation of  FIG. 6  will first be explained. This procedure is executed by a CPU constituting the control section  9 . First, it is judged whether a window  100  is perfectly closed by the manual closing operation or not on the basis of an output of the rotary encoder  4  (step S 11 ). If the window  100  is perfectly closed (step S 11 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly closed (step S 11 : NO), a normal rotation signal is outputted from a motor driving circuit  2  and a motor  3  is rotated in the normal direction and the window  100  is closed (step S 12 ). Subsequently, it is judged whether the window  100  is perfectly closed or not (step S 13 ). If the window  100  is perfectly closed (step S 13 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly closed (step S 13 : NO), it is judged whether the door closing detecting switch  7  detects the door closing or not (step S 14 ). When a detecting signal (door closing signal) is outputted from the door closing detecting switch  7 , it is judged that the door is closed. In contrast to this, when no detecting signal is outputted from the door closing detecting switch  7 , it is judged that no door is closed.  
         [0037]     When no door closing detecting switch  7  detects the door closing in the step S 14  (step S 14 : NO), it proceeds to a step S 20  and it is judged whether jamming is detected or not. In this detection of jamming, as mentioned above, the rotational speed of the motor  3  is calculated on the basis of the output of a pulse detecting circuit  5 . When a changing amount of the rotational speed exceeds a predetermined threshold value, it is judged that there is jamming.  
         [0038]     Here, the threshold value is constructed by a first threshold value at the normal time and a second threshold value as a reference gentler than this first threshold value. The second threshold value is a value judged as jamming when the load applied to the window  100  is larger in comparison with the first threshold value. For example, when the value of jamming load is used as the threshold value, the second threshold value is set to be larger than the first threshold value. As this result, when the jamming judgment is made by using the first threshold value, it is judged as jamming if the load applied to the window  100  exceeds the first threshold value. However, when the jamming judgment is made by using the second threshold value, it is not judged as jamming even when the load applied to the window  100  exceeds the first threshold value. It is judged as jamming for the first time when this load exceeds the second threshold value. Each of these threshold values is stored to the memory  6  in advance. The first threshold value is used in the jamming detection of the step S 20 .  
         [0039]     When an object Z is jammed as shown in  FIG. 4  (step S 20 : YES), a reverse rotation signal is outputted from the motor driving circuit  2  and the motor  3  is rotated in the reverse direction and the window  100  is opened (step S 21 ). Thus, the jamming is released. It is then judged whether the window  100  is perfectly opened or not (step S 22 ). If the window  100  is perfectly opened (step S 22 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly opened (step S 22 : NO), it is returned to the step S 21  and the reverse rotation of the motor  3  is continued.  
         [0040]     When no jamming is detected in the step S 20  (step S 20 : NO), it is judged whether the operation switch  1  is located in the position of manual closing MC or not (step S 23 ). If the operation switch  1  is located in the position of manual closing MC (step S 23 : YES), it is returned to the step S 12  and the normal rotation of the motor  3  is continued. In contrast to this, if no operation switch  1  is located in the position of manual closing MC (step S 23 : NO), it is judged whether the operation switch  1  is located in the position of auto closing AC or not (step S 24 ). If the operation switch  1  is located in the position of auto closing AC (step S 24 : YES), it proceeds to auto closing processing described later (in  FIG. 7 ) (step S 25 ). In contrast to this, if no operation switch  1  is located in the position of auto closing AC (step S 24 : NO), it is judged whether the operation switch  1  is located in the position of manual opening MO or not (step S 26 ). If the operation switch  1  is located in the position of manual opening MO (step S 26 : YES), it proceeds to manual opening processing described later (in  FIG. 10 ) (step S 27 ). In contrast to this, if no operation switch  1  is located in the position of manual opening MO (step S 26 : NO), it is judged whether the operation switch  1  is located in the position of auto opening AO or not (step S 28 ). If the operation switch  1  is located in the position of auto opening AO (step S 28 : YES), it proceeds to auto opening processing described later (in  FIG. 11 ) (step S 29 ). In contrast to this, if no operation switch  1  is located in the position of auto opening AO (step S 28 : NO), it is terminated without performing any processing.  
         [0041]     On the other hand, when the door closing detecting switch  7  detects the door closing in the step S 14  (step S 14 : YES), the control section  9  changes the threshold value used in the jamming detection from the first threshold value to the second threshold value (step S 15 ). After the threshold value is changed, it is judged whether the motor  3  is rotated by a predetermined amount or not (step S 116 ).  
         [0042]     If no motor  3  is rotated by the predetermined amount (step S 16 : NO), it proceeds to a step S 18  and it is judged whether jamming is detected or not. This jamming is detected in accordance with a principle similar to that of the step S 20 , but the second threshold value is used in the jamming detection of the step S 18 . This second threshold value is a threshold value gentler than the first threshold value as mentioned above. Accordingly, even when there is a vibration due to the door closing by raising the threshold value, it is possible to prevent that this vibration is judged as jamming in error. If no jamming is detected in the step S 18  (step S 18 : NO), it is returned to the step S 16 . In contrast to this, if jamming is detected (step S 18 : YES), the threshold value is returned from the second threshold value to the first threshold value (step S 19 ). It then proceeds to the step S 21  previously mentioned and the motor  3  is reversely rotated and the window is opened and the jamming is released.  
         [0043]     On the other hand, if the motor  3  is rotated by a predetermined amount in the step S 16  (step S 16 : YES), the threshold value is returned from the second threshold value to the first threshold value (step S 17 ). It then proceeds to the above step S 20  and the existence of jamming is judged on the basis of the first threshold value. The procedure after the step S 20  has been already explained and its explanation is therefore omitted here.  
         [0044]     Thus, in the procedure of  FIG. 6 , the threshold value is changed from the first threshold value to the second threshold value when the door closing is detected. Thereafter, when the motor  3  is rotated by the predetermined amount, the threshold value is returned from the second threshold value to the first threshold value (steps S 14  to S 17 ). Therefore, even when power voltage is raised and the rotating amount of the motor  3  is increased, the threshold value is returned to the original threshold value when the motor  3  is rotated by the predetermined amount. Accordingly, the jamming detection using the normal threshold value is performed from a time point at which a window glass  101  is raised until a predetermined position. As this result, no jamming load is unnecessarily increased and the damage of a jammed object Z can be prevented.  
         [0045]     Next, the procedure of the auto closing operation of  FIG. 7  will be explained. This procedure is executed by a CPU constituting the control section  9 . First, it is judged whether the window  100  is perfectly closed by the auto closing operation or not on the basis of the output of the rotary encoder  4  (step S 31 ). If the window  100  is perfectly closed (step S 31 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly closed (step S 31 : NO), a normal rotation signal is outputted to the motor driving circuit  2  and the motor  3  is rotated in the normal direction and the window  100  is closed (step S 32 ). Subsequently, it is judged whether the window  100  is perfectly closed or not (step S 33 ). If the window  100  is perfectly closed (step S 33 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly closed (step S 33 : NO), it is judged whether the door closing detecting switch  7  detects the door closing or not (step S 34 ). When a detecting signal (door closing signal) is outputted from the door closing detecting switch  7 , it is judged that the door is closed. In contrast to this, when no detecting signal is outputted, it is judged that no door is closed.  
         [0046]     When no door closing detecting switch  7  detects the door closing in the step S 34  (step S 34 : NO), it proceeds to a step S 38  and it is judged whether jamming is detected or not. In this detection of jamming, as mentioned above, the rotational speed of the motor  3  is calculated on the basis of the output of the pulse detecting circuit  5 . When the changing amount of the rotational speed exceeds a predetermined threshold value, it is judged that there is jamming. The above first threshold value is used in the jamming detection of this step S 38 .  
         [0047]     When the object Z is jammed as shown in  FIG. 4  (step S 38 : YES), a reverse rotation signal is outputted from the motor driving circuit  2  and the motor  3  is reversely rotated and the window  100  is opened (step S 41 ). Thus, the jamming is released. It is then judged whether the window  100  is perfectly opened or not (step S 42 ). If the window  100  is perfectly opened (step S 42 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly opened (step S 42 : NO), it is returned to the step S 41  and the reverse rotation of the motor  3  is continued.  
         [0048]     When no jamming is detected in the step S 38  (step S 38 : NO), it is judged whether the operation switch  1  is located in the position of manual opening MO or not (step S 43 ). If the operation switch  1  is located in the position of manual opening MO (step S 43 : YES), it proceeds to manual opening processing described later (in  FIG. 10 ) (step S 44 ). In contrast to this, if no operation switch  1  is located in the position of manual opening MO (step S 43 : NO), it is judged whether the operation switch  1  is located in the position of auto opening AO or not (step S 45 ). If the operation switch  1  is located in the position of auto opening AO (step S 45 : YES), it proceeds to auto opening processing described later (in  FIG. 11 ) (step S 46 ). In contrast to this, if no operation switch  1  is located in the position of auto opening AO (step S 45 : NO), it is returned to the step S 32  and the normal rotation of the motor  3  is continued.  
         [0049]     On the other hand, when the door closing detecting switch  7  detects the door closing in the step S 34  (step S 34 : YES), the control section  9  changes the threshold value used in the jamming detection from the first threshold value to the second threshold value (step S 35 ). After the threshold value is changed, the control section  9  judges whether the motor  3  is rotated by a predetermined amount or not (step S 36 ).  
         [0050]     If no motor  3  is rotated by the predetermined amount (step S 36 : NO), it proceeds to a step S 39  and it is judged whether jamming is detected or not. This detection of jamming is performed in accordance with a principle similar to that of the step S 38 , but the second threshold value is used in the jamming detection of the step S 39 . This second threshold value is a threshold value gentler than the first threshold value as mentioned above. Since the threshold value rises, even when there is a vibration due to the door closing, it is possible to prevent that this vibration is judged as jamming in error. If no jamming is detected in the step S 39  (step S 39 : NO), it is returned to the step S 36 . In contrast to this, if jamming is detected (step S 39 : YES), the threshold value is returned from the second threshold value to the first threshold value (step S 40 ). It then proceeds to the step S 41  previously mentioned and the motor  3  is reversely rotated and the window is opened and the jamming is released.  
         [0051]     On the other hand, if the motor  3  is rotated by the predetermined amount in the step S 36  (step S 36 : YES), the threshold value is returned from the second threshold value to the first threshold value (step S 37 ). It then proceeds to the step S 38  previously mentioned, and the existence of jamming is judged on the basis of the first threshold value. The procedure after the step S 38  has been already explained, and its explanation is therefore omitted here.  
         [0052]     Thus, in the procedure of  FIG. 7 , the threshold value is also changed from the first threshold value to the second threshold value when the door closing is detected. Thereafter, when the motor  3  is rotated by the predetermined amount, the threshold value is returned from the second threshold value to the first threshold value (steps S 34  to S 37 ). Therefore, even when the rotating amount of the motor  3  is increased by raising the power voltage, the threshold value is returned to the original threshold value when the motor  3  is rotated by the predetermined amount. Accordingly, the jamming detection using the normal threshold value is performed from a time point at which the window glass  101  is raised until a predetermined position. As this result, no jamming load is unnecessarily increased and the damage of a jammed object Z can be prevented.  
         [0053]      FIGS. 8 and 9  are flow charts showing the operation of a power window device in accordance with a second embodiment mode of the invention.  FIG. 8  shows a detailed procedure of the manual closing operation in the step S 2  of  FIG. 5 .  FIG. 9  shows a detailed procedure of the auto closing operation in the step S 4  of  FIG. 5 . In the second embodiment mode, the closing of the door is detected by an acceleration sensor  8 .  
         [0054]     First, the procedure of the manual closing operation of  FIG. 8  will be explained. This procedure is executed by the CPU constituting the control section  9 . First, it is judged whether the window  100  is perfectly closed by the manual closing operation or not on the basis of the output of the rotary encoder  4  (step S 51 ). If the window  100  is perfectly closed (step S 51 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly closed (step S 51 : NO), a normal rotation signal is outputted from the motor driving circuit  2  and the motor  3  is normally rotated and the window  100  is closed (step S 52 ). Subsequently, it is judged whether the window  100  is perfectly closed or not (step S 53 ). If the window  100  is perfectly closed (step S 53 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly closed (step S 53 : NO), it is judged whether or not the acceleration sensor  8  detects a constant acceleration or more (step S 54 ). When the door is closed, the acceleration is applied to the vehicle body by a vibration generated at that time. The acceleration sensor  8  detects this acceleration over a predetermined time (several seconds).  
         [0055]     When the acceleration sensor  8  detects the constant acceleration or more (step S 54 : YES), the control section  9  changes the threshold value used in the jamming detection from the first threshold value to the second threshold value (step S 55 ). The control section  9  then judges whether jamming is detected or not on the basis of the changed second threshold value (step S 58 ). This second threshold value is a threshold value gentler than the first threshold value as mentioned above. Since the threshold value rises, even when there is a vibration due to the door closing, it is possible to prevent that this vibration is judged as jamming in error.  
         [0056]     When the acceleration sensor  8  detects the constant acceleration or more and then does not detect this acceleration (step S 54 : NO), it is judged whether the motor  3  is rotated by a predetermined amount or not (step S 56 ). If no motor  3  is rotated by the predetermined amount (step S 56 : NO), it proceeds to a step S 58  and the existence of jamming is detected. In contrast to this, when the motor  3  is rotated by the predetermined amount (step S 56 : YES), the threshold value is returned from the second threshold value to the first threshold value (step S 57 ). It then proceeds to the step S 58  and it is judged whether jamming is detected or not on the basis of the first threshold value. In the detection of jamming in the step S 58 , as mentioned above, the rotational speed of the motor  3  is calculated on the basis of the output of the pulse detecting circuit  5 . When the changing amount of the rotational speed exceeds the first threshold value or the second threshold value, it is judged that there is jamming.  
         [0057]     When there is jamming of the object Z as shown in  FIG. 4  (step S 58 : YES), a reverse rotation signal is outputted from the motor driving circuit  2  and the motor  3  is reversely rotated and the window  100  is opened (step S 59 ). Thus, the jamming is released. It is then judged whether the window  100  is perfectly opened or not (step S 60 ). If the window  100  is perfectly opened (step S 60 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly opened (step S 60 : NO), it is returned to the step S 59  and the reverse rotation of the motor  3  is continued.  
         [0058]     When no jamming is detected in the step S 58  (step S 58 : NO), it is judged whether the operation switch  1  is located in the position of manual closing MC or not (step S 61 ). If the operation switch  1  is located in the position of manual closing MC (step S 61 : YES), it is returned to the step S 52  and the normal rotation of the motor  3  is continued. In contrast to this, if no operation switch  1  is located in the position of manual closing MC (step S 61 : NO), it is judged whether the operation switch  1  is located in the position of auto closing AC or not (step S 62 ). If the operation switch  1  is located in the position of auto closing AC (step S 62 : YES), it proceeds to auto closing processing described later (in  FIG. 9 ) (step S 63 ). In contrast to this, if no operation switch  1  is located in the position of auto closing AC (step S 62 : NO), it is judged whether the operation switch  1  is located in the position of manual opening MO or not (step S 64 ). If the operation switch  1  is located in the position of manual opening MO (step S 64 : YES), it proceeds to manual opening processing described later (in  FIG. 10 ) (step S 65 ). In contrast to this, if no operation switch  1  is located in the position of manual opening MO (step S 64 : NO), it is judged whether the operation switch  1  is located in the position of auto opening AO or not (step S 66 ). If the operation switch  1  is located in the position of auto opening AO (step S 66 : YES), it proceeds to auto opening processing described later (in  FIG. 11 ) (step S 67 ). In contrast to this, if no operation switch  1  is located in the position of auto opening AO (step S 66 : NO), it is terminated without performing any processing.  
         [0059]     Thus, in the procedure of  FIG. 8 , when the constant acceleration or more is detected, the threshold value is changed from the first threshold value to the second threshold value. When the constant acceleration or more is not detected and the motor  3  is then rotated by the predetermined amount, the threshold value is returned from the second threshold value to the first threshold value (steps S 54  to S 57 ). Therefore, even when the rotating amount of the motor  3  is increased by raising the power voltage, the threshold value is returned to the original threshold value when the motor  3  is rotated by the predetermined amount. Accordingly, the jamming detection using the normal threshold value is performed from a time point at which the window glass  101  is raised until a predetermined position. As this result, no jamming load is unnecessarily increased and the damage of a jammed object Z can be prevented.  
         [0060]     The procedure of the auto closing operation of  FIG. 9  will next be explained. This procedure is executed by the CPU constituting the control section  9 . First, it is judged whether the window  100  is perfectly closed by the auto closing operation or not on the basis of the output of the rotary encoder  4  (step S 71 ). If the window  100  is perfectly closed (step S 71 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly closed (step S 71 : NO), a normal rotation signal is outputted to the motor driving circuit  2  and the motor  3  is normally rotated and the window  100  is closed (step S 72 ). Subsequently, it is judged whether the window  100  is perfectly closed or not (step S 73 ). If the window  100  is perfectly closed (step S 73 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly closed (step S 73 : NO), it is judged whether or not the acceleration sensor  8  detects a constant acceleration or more (step S 74 ). When the door is closed, the acceleration is applied to the vehicle body by a vibration generated at that time. The acceleration sensor  8  detects this acceleration over a predetermined time (several seconds).  
         [0061]     When the acceleration sensor  8  detects the constant acceleration or more (step S 74 : YES), the control section  9  changes the threshold value used in the jamming detection from the first threshold value to the second threshold value (step S 75 ). It is then judged whether jamming is detected or not on the basis of the changed second threshold value (step S 78 ). This second threshold value is a threshold value gentler than the first threshold value as mentioned above. Since the threshold value rises, even when there is a vibration due to the door closing, it is possible to prevent that this vibration is judged as jamming in error.  
         [0062]     When the acceleration sensor  8  detects the constant acceleration or more and then does not detect this acceleration (step S 74 : NO), it is judged whether the motor  3  is rotated by a predetermined amount or not (step S 76 ). If no motor  3  is rotated by the predetermined amount (step S 76 : NO), it proceeds to the step S 78  and the existence of jamming is detected. In contrast to this, when the motor  3  is rotated by the predetermined amount (step S 76 : YES), the threshold value is returned from the second threshold value to the first threshold value (step S 77 ). It then proceeds to the step S 78  and it is judged whether jamming is detected or not on the basis of the first threshold value. In the detection of jamming in the step S 78 , as mentioned above, the rotational speed of the motor  3  is calculated on the basis of the output of the pulse detecting circuit  5 . When the changing amount of the rotational speed exceeds the first threshold value or the second threshold value, it is judged that there is jamming.  
         [0063]     When there is jamming of the object Z as shown in  FIG. 4  (step S 78 : YES), a reverse rotation signal is outputted from the motor driving circuit  2  and the motor  3  is reversely rotated and the window  100  is opened (step S 79 ). Thus, the jamming is released. It is then judged whether the window  100  is perfectly opened or not (step S 80 ). If the window  100  is perfectly opened (step S 80 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly opened (step S 80 : NO), it is returned to the step S 79  and the reverse rotation of the motor  3  is continued.  
         [0064]     When no jamming is detected in the step S 78  (step S 78 : NO), it is judged whether the operation switch  1  is located in the position of manual opening MO or not (step S 81 ). If the operation switch  1  is located in the position of manual opening MO (step S 81 : YES), it proceeds to manual opening processing described later (in  FIG. 10 ) (step S 82 ). In contrast to this, if no operation switch  1  is located in the position of manual opening MO (step S 81 : NO), it is judged whether the operation switch  1  is located in the position of auto opening AO or not (step S 83 ). If the operation switch  1  is located in the position of auto opening AO (step S 83 : YES), it proceeds to auto opening processing described later (in  FIG. 11 ) (step S 84 ). In contrast to this, if no operation switch  1  is located in the position of auto opening AO (step S 83 : NO), it is returned to the step S 72  and the normal rotation of the motor  3  is continued.  
         [0065]     Thus, in the procedure of  FIG. 9 , when the constant acceleration or more is detected, the threshold value is also changed from the first threshold value to the second threshold value. When the constant acceleration or more is not detected and the motor  3  is then rotated by a predetermined amount, the threshold value is returned from the second threshold value to the first threshold value (steps S 74  to S 77 ). Therefore, even when the rotating amount of the motor  3  is increased by raising the power voltage, the threshold value is returned to the original threshold value when the motor  3  is rotated by the predetermined amount. Accordingly, the jamming detection using the normal threshold value is performed from a time point at which the window glass  101  is raised until a predetermined position. As this result, no jamming load is unnecessarily increased and the damage of the jammed object Z can be prevented.  
         [0066]      FIG. 10  is a flow chart showing a detailed procedure of the manual opening processing (step S 6  of  FIG. 5 ).  FIG. 11  is a flow chart showing a detailed procedure of the auto opening processing (step S 8  of  FIG. 5 ). Each procedure is executed by the CPU constituting the control section  9 . Each of these constructions is not features of the invention, but will next be explained in a general way.  
         [0067]     In the manual opening processing of  FIG. 10 , it is first judged whether the window  100  is perfectly opened by the manual opening operation or not on the basis of the output of the rotary encoder  4 . (step S 91 ). If the window  100  is perfectly opened (step S 91 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly opened (step S 91 : NO), a reverse rotation signal is outputted from the motor driving circuit  2  and the motor  3  is reversely rotated and the window  100  is opened (step S 92 ). Subsequently, it is judged whether the window  100  is perfectly opened or not (step S 93 ). If the window  100  is perfectly opened (step S 93 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly opened (step S 93 : NO), it is judged whether the operation switch  1  is located in the position of manual opening MO or not (step S 94 ). If the operation switch  1  is located in the position of manual opening MO (step S 94 : YES), it is returned to the step S 92  and the reverse rotation of the motor  3  is continued. In contrast to this, if no operation switch  1  is located in the position of manual opening MO (step S 94 : NO), it is judged whether the operation switch  1  is located in the position of auto opening AO or not (step S 95 ). If the operation switch  1  is located in the position of auto opening AO (step S 95 : YES), it proceeds to auto opening processing described later (in  FIG. 11 ) (step S 96 ). In contrast to this, if no operation switch  1  is located in the position of auto opening AO (step S 95 : NO), it is judged whether the operation switch  1  is located in the position of manual closing MC or not (step S 97 ). If the operation switch  1  is located in the position of manual closing MC (step S 97 : YES), it proceeds to the manual closing processing described before (in  FIG. 6  or  8 ) (step S 98 ). In contrast to this, if no operation switch  1  is located in the position of manual closing MC (step S 97 : NO), it is judged whether the operation switch  1  is located in the position of auto closing AC or not (step S 99 ). If the operation switch  1  is located in the position of auto closing AC (step S 99 : YES), it proceeds to the auto closing processing described before (in  FIG. 7  or  9 ) (step S 100 ). In contrast to this, if no operation switch  1  is located in the position of auto closing AC (step S 99 : NO), it is terminated without performing any processing.  
         [0068]     Next, in the auto opening processing of  FIG. 11 , it is first judged whether the window  100  is perfectly opened by the auto opening operation or not on the basis of the output of the rotary encoder  4  (step S 111 ). If the window  100  is perfectly opened (step S 111 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly opened (step S 111 : NO), a reverse rotation signal is outputted from the motor driving circuit  2  and the motor  3  is reversely rotated and the window  100  is opened (step S 112 ). Subsequently, it is judged whether the window  100  is perfectly opened or not (step S 113 ). If the window  100  is perfectly opened (step S 113 : YES), the processing is terminated. In contrast to this, if no window  100  is perfectly opened (step S 113 : NO), it is judged whether the operation switch  1  is located in the position of manual closing MC or not (step S 114 ). If the operation switch  1  is located in the position of manual closing MC (step S 114 : YES), it proceeds to the manual closing processing mentioned before (in  FIG. 6  or  8 ) (step S 115 ). In contrast to this, if no operation switch  1  is located in the position of manual closing MC (step S 114 : NO), it is judged whether the operation switch  1  is located in the position of auto closing AC or not (step S 116 ). If the operation switch  1  is located in the position of auto closing AC (step S 116 : YES), it proceeds to the auto closing processing mentioned before (in  FIG. 7  or  9 ) (step S 117 ). In contrast to this, if no operation switch  1  is located in the position of auto closing AC (step S 116 : NO), it is returned to the step S 112  and the reverse rotation of the motor  3  is continued.  
         [0069]     The above-mentioned embodiment modes use examples in which the invention is applied to the power window device for a vehicle. However, the invention can be also applied to the window opening and closing controller of a window as in a building, etc.