Magnetic contact switch (door sensor)
This sensor is fairly simple to understand and use. There’s an ABS plastic shell that contains a sensor for reed switch, this reed as default is open since the two wires are not having any connection between them yet, and the half located on the other side is basically a magnet. The reed is created to close whenever the magnet gets less than 0.5” away (13mm away). Why is this useful? Because it detects when objects are open such as a door, a drawer, things like that, and that’s the reason why they have screws and mounting tabs. Note that you also have the option to get double-sided foam tape from a hardware store to mount them in a way that works well without the need of screws.
- Normally open reed switch
- ABS enclosure
- Rated current: 100 mA max
- Rated voltage: 200 VDC max
- Distance: 15mm max
- Box size (each side): 27mmx14mmx8.7mm (1inx0.55inx0.34in)
- Cable Length: 25cm (10in)
- Weight (per side): 5.2g (0.18oz)
Netduino driver and Netduino sample. This sample shows how to use an interrupt handler to respond to a button press or a magnetic contact switch closing.