The working of magnetic contact sensors
A reed switch is essentially what makes up our magnetic contact sensor. A reed switch comprises two metal contacts made of magnetic material (called reeds) placed inside a glass envelope. When the contacts touch, the switch is on, and when they spring apart, the switch is off and the circuit is broken. The way to control these contacts is by means of a magnetic field that makes or breaks the circuit when it is near to the switch.
A normally open (NO) type of reed switch is normally switched off until a magnet comes close to the switch, which then pulls the contacts together.
A normally closed (NC) variety works the other way with the switch being normally on until the magnet comes close to the switch, pulling the two contacts apart.
You can now see how a magnetic reed switch can be a useful sensor in security applications, and in particular for our home security system, to detect when doors and windows are opened and closed...