Abstract: The present invention discloses a timer switch that uses an integrated circuit to control the time and a self-locking electromagnetic coil solenoid valve to drive the operation of a microswitch, which is particularly applicable to be installed on a wall as a timer switch. The switch device uses the electronic control of two 1.5V AA batteries to enter a set time through input keys, and a CPU will issue a pulse with very short timing of 30 ms to the solenoid to produce a magnetic field to drive a turning rod and open a primary switch in order to turn on or off a circuit.