The proximity switch comprises a bin body, a protection structure is arranged on the lower side of the interior of the bin body, the protection structure is formed by combining a connecting sleeve, a spring body, a sleeve and an inclined table, the spring body is arranged among the bin body, the connecting sleeve and the sleeve, and the inclined table is arranged on the lower side of the bin body. A proximity switch body is arranged on the lower portion of the inner side of the bin body. According to the proximity switch for the pedal capable of preventing starting in power failure, a connecting sleeve and a connecting screw hole can be connected together through a lug plate and a bolt, the connecting sleeve is convenient to disassemble and assemble, and therefore maintenance is convenient, after a cover plate body is opened in a sliding mode, a spring body recovers elastic deformation, and a sleeve moves upwards in the connecting sleeve; the cover plate body is connected with the limiting plate in a clamped mode through the L-shaped block, when the L-shaped block slides to the position of the open groove, the cover plate body can be taken down, a shuttle peg is convenient to replace, and mistaken touch is prevented.