referring to fig1 a cooking apparatus is generally designated by the reference numeral 10 . the cooking apparatus 10 includes a frame 12 , a cooking chamber 14 , a door 16 , and a latch mechanism 18 embodying the present invention . during a self - cleaning operation , the latch mechanism 18 , which includes a latch arm , automatically latches the door 16 to the frame 12 . the latch mechanism 18 automatically releases the door 16 after the self - cleaning operation is completed and the temperature of the cooking chamber 14 has fallen to a predetermined temperature . the cleaning operation cannot be started without a verification signal that the door 16 is latched and closed . if the door 16 is open when an attempt is made to initiate the self - cleaning operation , the latch mechanism 18 will attempt to latch the door 16 , but upon failing to sense that the door 16 is closed , will automatically return the latch arm to its original position . the latch mechanism 18 is fixed to the frame 12 in a position near the front and center of the cooking apparatus 10 and just above the cooking chamber 14 as illustrated in fig1 . the latch mechanism includes a mounting plate 20 , a latch arm 22 , an eccentric driver pin 24 , a program cam 26 , a gear reduction transmission 28 , a d . c . motor 30 , and a switch block 32 . the motor 30 drives the program cam 26 and the driver pin 24 via the transmission 28 . the motor 30 is energized and deenergized by an electronic control unit 32 which receives signals from a switch block 34 . rotation of the motor 30 and the driver pin 24 in a single direction causes both latching and unlatching of the door 16 . referring to fig2 and 4 , the d . c . motor 30 is fixed to the mounting plate 20 such that its output shaft is normal to the plane of the mounting plate 20 . the motor has a pinion ( not shown ) for driving a first gear 36 ( fig2 ). the gear 36 has a pinion 38 fixed thereto for engaging a second gear 42 . a pinion 42 fixed to the gear 40 drives a third gear 44 . the third gear 44 is fixed to a pinion 46 which engages a fourth gear 48 , the pinion 50 of which engages a set of teeth formed on the periphery of the program cam 26 . the gears 36 , 40 , 44 , 48 and their associated pinions 38 , 42 , 46 , 50 greatly reduce the speed of the motor 30 such that the program cam 26 is driven at a relatively slow speed . the gears 36 , 40 , 44 , 48 and their associated pinions 38 , 42 , 46 , 50 are rotatably mounted on shafts which are fixed to the mounting plate 20 . the program cam 26 is rotatably fixed to a driver wheel 54 by a drive shaft 56 ( fig5 ). the driver wheel 54 is connected to the driver pin 24 for causing the latch arm 22 to move to its various positions . the drive shaft 56 is rotatably mounted at one end to the mounting plate 20 and at the other end to a bracket 60 which is fixed to the mounting plate 20 . when the door 16 is in a closed position , the latch arm 22 extends through a slot 62 in the door 16 . when the door 16 is closed and the motor 30 is energized , the latch arm 22 is adapted to swing laterally from an unlatched position ( fig6 a ) to an intermediate position ( the arm &# 39 ; s vertical position as viewed in the drawings ) and translationally to a latched position ( fig6 b ). when the latch arm 22 moves to its latched position , a hook 64 will engage a strike 68 on the door 16 and will pull the door 16 securely against the frame 12 and the motor 30 will stop . if , however , the door 16 is open when the motor 30 is energized , the latch arm 22 will move from its unlatched position to a third position ( fig6 d ) before reversing and returning to its unlatched position ( fig6 a ) and then stopping in one continuous cycle . thus , the latch mechanism senses the presence of the door 16 and its path is altered accordingly . referring to fig5 the latch arm 22 includes an irregular - shaped cut - out 70 at its proximal end , a pair of slider legs 72 , and a follower pin 74 . these parts serve to guide and direct the motion of the latch arm 22 . the slider legs 72 provide bearing surfaces for the latch arm 22 to ride on the surface of the mounting plate 20 . the cut - out 70 serves to receive and engage the driver pin 24 . the driver pin 24 has a large flattened head 76 which serves to retain the latch arm 22 . two walls 78 extending from the mounting plate 20 lie on opposite sides of the latch arm 22 for restricting side to side motion of the proximal end of the latch arm 22 . when the motor 30 is energized , the driver pin 24 orbits the drive shaft 56 and engages the cutout and , in so doing , causes the latch arm 22 to move translationally . referring to fig5 the motion of the latch arm 22 is also governed by a spring 82 and a cut - out 84 formed in the mounting plate 20 . the follower pin 74 extends from the latch arm 22 in a direction perpendicular to the latch arm 22 into the cut - out 84 . the cut - out 84 generally determines the lateral motion of the latch arm 22 as the pin 74 engages and follows a sloped cam surface 88 of the cut - out 84 . the spring 82 is connected between the latch arm 22 and the mounting plate 20 to urge the pin 74 toward the cam surface 88 . thus , as the driver pin 24 , orbiting clockwise as viewed in fig7 a , drives the latch arm 22 in a direction toward its terminal or hook end , the follower pin 74 forces the latch arm 22 to swing laterally towards the unlatched position as it follows the cam surface 88 . as the driver pin 24 moves the latch arm 22 inwardly , the latch arm 22 moves laterally away from its unlatched position as the pin 74 follows the cam surface 88 . if the door 16 is closed when the motor 30 is energized , the follower pin 74 will follow the cam surface 88 until the latch arm 22 engages the strike 68 . the driver pin 24 will , however , continue to move the latch arm 22 in an inward direction to pull the door 16 securely against the frame 12 . if the door 16 is open when the motor 30 is energized , the latch arm &# 39 ; s 22 lateral motion is governed by the shape of the cam surface 88 . with the door 16 open , the latch arm 22 moves arcuately through the intermediate position and all the way to the third position ( fig7 d and 6d ). the motor 30 continues to run causing the latch arm 22 to reverse in the third position and move back to its unlatched position in one continuous 360 ° cycle of the drive pin 24 . the d . c . motor 30 is controlled and powered by the d . c . powered electronic control unit 32 , which is preferably a microprocessor . the control unit 32 provides d . c . current to the d . c . motor 30 at times determined by the positions of a pair of switches 90 , 92 formed in the switch block 34 . each switch 90 , 92 is actuated by a separate surface of the program cam 26 . since the movement of the latch arm 22 corresponds to the movement of the program cam 26 , the switches 90 , 92 which are controlled by the program cam 26 serve to signal the position of the latch arm 22 to the controller . a first switch 90 has a follower arm 94 and a stationary arm 96 which have a pair of electrical contacts 98 forming the switch 90 . the follower arm 94 is spring biased against a first cam surface 100 . the follower arm 94 keeps the switch 90 open when following the high portion of the first cam surface 100 . when a low portion of the first cam surface 100 reaches the follower arm 94 , the switch 90 is closed signalling the controller 32 to stop the motor 30 . the cam 26 is constructed to close the first switch 90 when the latch arm 22 is in its unlatched position which signals the controller 32 to stop the motor 30 . similarly , a second switch 92 has a follower arm 102 , and a stationary arm 104 , and a pair of electrical contacts 105 . the second switch 92 is maintained open by a high portion of a second cam surface 106 . the second switch 92 is closed by a low portion of the second cam surface 106 when the latch arm 22 is in its latched position . the closing of the second switch 92 signals the controller 32 to stop the motor 30 . the signal from the second switch 92 also verifies to the controller 32 that the door 16 is latched so that heat - cleaning may be started . a override member 108 serves to prevent the second switch 92 from sending a signal to the controller 32 if the door 16 is open when the self - clean operation is initiated . thus , absent a signal from the second switch 92 , the controller 32 will not stop the motor 30 and will not start a heat - cleaning operation . the override member 108 is connected to the latch arm 22 to engage the follower arm 102 of the second switch 92 only when the latch arm 22 approaches its third position , which only occurs if the door 16 is open . while the override member 108 is engaging the follower arm 102 , it cannot follow the low portion of the cam surface 106 and cannot close the contacts 105 . thus , the motor 30 will continue to run as the latch arm 22 moves to its third position , reverses , and returns to its unlatched position whereupon the first switch 90 causes the motor 30 to be stopped . when the latch arm 22 moves toward its unlatched position , the override member 108 will disengage from the follower arm 102 . however , by this time , the high portion of the cam surface 106 will have reached the follower arm 102 . thus , the switch 92 will not be closed when the override member 108 disengages . the override member 108 is pivotally connected at one end to the follower pin 74 . the opposite end of the finger 108 has a projection 110 which fits within a slot 112 formed in the mounting plate 20 . the projection 110 follows the slot 112 and thus guides the finger 108 into engagement with the distal end of the follower arm 102 . referring to fig8 a partial schematic diagram of the control circuit is shown . a temperature sensor 128 provides an electronic measure of the temperature of the cooking chamber 14 . a d . c . power supply 130 powers the control unit 32 . a pair of d . c . relays 132 , 134 controls a . c . power to heating elements 136 , 138 . the controller is preferably a low - voltage d . c . microprocessor controller such as a commercially available erc manufactured and sold by robertshaw controls company of richmond , va . referring to fig9 in a second embodiment of the latch mechanism , a single , three position cam surface 114 is employed to control a single follower arm 116 of a three position switch 118 . the switch 118 includes two stationary arms 120 , 122 . in all other respects , this embodiment functions like that described above . when the follower arm 116 engages a high portion of the cam surface 114 , a pair of contacts 124 are closed signalling to the controller 32 that the latch arm 22 is in its unlatched position . thus , the contacts 124 perform the same function as the contacts 98 of the first embodiment . when the follower arm 116 engages a low portion of the cam surface 114 , a pair of contacts 126 are closed signalling to the controller 32 that the latch arm 22 is in its latched position . thus , the contacts 126 perform the same function as the contacts 105 of the first embodiment . just as in the first embodiment , the override member 108 engages and restrains the follower arm 116 when the latch arm 22 approaches its third position when the door 16 is open . neither pair of contacts are closed when the follower 116 rests on an intermediate surface of the cam surface 114 as illustrated in fig8 . the latch mechanism 18 is constructed of heat - resistant materials such that it can withstand temperatures of approximately 180 ° c . for example , the gears 36 , 40 , 44 , 48 and their integral pinions 38 , 42 , 46 , 50 are made of thermoset phenolic material . in addition , the motor 30 is able to withstand temperatures of approximately 180 ° c . with no additional cooling . a . d . c . motor able to withstand such temperatures is commercially available under the trademark buehler . this allows the entire latch mechanism 18 to be mounted above the cooking chamber 14 at the front and center of the oven which is a relatively hot location . while preferred embodiments of this invention have been described in detail , it will be apparent that certain modifications or alterations can be made without departing from the spirit and scope of the invention set forth in the appended claims .