This project is a standalone simple home security monitoring project that will trigger a buzzer when the magnetic contact is opened. Magnetic contacts are usually NC (Normally Closed) and are used on doors and windows. They consists of two parts namely a magnet and a reed switch. When the reed switch is in close proximity to the magnet, the switch will close and vice versa. Usually the magnet is fitted to the door and the reed switch is fitted to the door frame in close proximity to one another such that when the door is closed, the two parts are in close contact and hence the switch is closed. When the door is opened, the magnet will be a distance away from the reed switch and hence the switch will open.
The circuit shown below is a basic latching circuit consisting of a quad 2-input NAND Gate IC. It is configured such that the flip flop circuit U1A and U1B has both its input held at logic "1". Pin 1 is held at logic "1" by the magnetic contact and pin 6 is held at logic "1" by resistor R1. S1 switch is a normally open pushbutton switch which is used as a reset button. When S1 is pressed, the input pin 6 will be at logic "0", hence the output of U1B will go to logic "1". This logic is inverted by U1C and U1D to logic "0". The transistor Q1 will be OFF and buzzer will not sound.
When the magnetic contact sensor is opened, the input to pin 1 will be at logic "0", giving an output of logic "1" at pin 3 of U1A. Pin 5 of U1B will go "1" and pin 6 will be "1" as well giving an output at pin 4 a logic "0". This will be inverted and a logic "1" will be generated at the base of transistor Q1. The transistor Q1 will turn ON and cause the buzzer to sound continuously until the reset switch S1 is pressed.
The parts list of the project is given below.