Here is the circuit diagram of a magnetic proximity switch sensor which can be used in various applications. The circuit is based on a magnetic reed switch as the proximity sensor. A monostable multivibrator based on NE555 and a toggle flip flop CD4013 does the rest of the circuit.
magnet is brought in the vicinity of the reed switch it operates and controls the rest of the switching circuit. In place of the reed switch, one may, as well, use a general-purpose electromagnetic reed relay as the sensor, if required. These tiny reed relays are easily available as they are widely used in telecom products. The reed switch or relay to be used with this circuit should be the normally open type.
When a magnet is brought in the vicinity of the sensor element for a moment, the contacts of the reed switch close to trigger timer IC1 wired in monostable mode. As a consequence its output at pin 3 goes high for a short duration and supplies clock to the clock input (pin 3 CD4013). LED D2 is used as a response indicator.
This CMOS IC2 consists of two independent flip-flops though here only one is used. Note that the flip-flop is wired in toggle mode with data input (pin 5) connected to the Q (pin 2) output. On receipt of clock pulse, the Q output changes from low to high state and due to this the relay driver transistor T1 gets forward-biased. As a result the relay RL1 is energised.