An actuating mechanism for object detection, comprising a main body , an electromagnetic device fixed to the main body , and a swinging rod swingably connected to the main body , wherein a position of connection between the swinging rod and the main body is opposite to an iron core of the electromagnetic device , and an upper end of the swinging rod is opposite to and spaced apart from the electromagnetic device ; a permanent magnet is disposed on the upper end of the swinging rod; and a magnetic pole direction of the permanent magnet and a magnetic pole direction of the electromagnetic device cross each other; the main body comprises a first mounting portion for mounting of the electromagnetic device , and a second mounting portion for mounting of the swinging rod ; the first mounting portion is tubular with one end sealed; and the electromagnetic device is disposed on an inner side of the first mounting portion , while the swinging rod is located on an outer side of the first mounting portion ; and a support shaft is disposed on the second mounting portion ; the swinging rod has a first through hole which extends through a body of the swinging rod; and the swinging rod is swingably connected to the support shaft via the first through hole ; characterized in that a flexible protective cover is further disposed on the second mounting portion ; and side walls of the second mounting portion and the flexible protective cover define a holding cavity; the permanent magnet , the upper end of the swinging rod and the support shaft are all located within the holding cavity; and an end, opposite to the upper end , of the swinging rod is located outside the holding cavity. a position of connection between the swinging rod and the main body is opposite to an iron core of the electromagnetic device , and an upper end of the swinging rod is opposite to and spaced apart from the electromagnetic device ; a permanent magnet is disposed on the upper end of the swinging rod; and a magnetic pole direction of the permanent magnet and a magnetic pole direction of the electromagnetic device cross each other; the main body comprises a first mounting portion for mounting of the electromagnetic device , and a second mounting portion for mounting of the swinging rod ; the first mounting portion is tubular with one end sealed; and the electromagnetic device is disposed on an inner side of the first mounting portion , while the swinging rod is located on an outer side of the first mounting portion ; and a support shaft is disposed on the second mounting portion ; the swinging rod has a first through hole which extends through a body of the swinging rod; and the swinging rod is swingably connected to the support shaft via the first through hole ; characterized in that a flexible protective cover is further disposed on the second mounting portion ; and side walls of the second mounting portion and the flexible protective cover define a holding cavity; the permanent magnet , the upper end of the swinging rod and the support shaft are all located within the holding cavity; and an end, opposite to the upper end , of the swinging rod is located outside the holding cavity. <EOS>