door sensor/Using it/08. Choosing a sensor
Using it · 08 of 10

Choosing a sensor

The kit's listing gives three kinds of sensor: plastic surface-mount, hidden recessed, and one heavy metal housing. All three are a magnet and a reed switch, so the board and the sketch are the same for every one; what changes is where it fits. The listing's sizes are quoted as the listing's, not measured.

Three kinds

The three sensors in the box
Style
In the box
3 of 7
Size, per the listing
27 × 13 × 8 mm
Wires
2, no polarity
Plastic, surface mount: it suits doors and window frames. Two screws, one half on the frame and one on the door, facing each other. The listing gives 27 × 13 × 8 mm; that is the listing's figure, not a measurement. All three are two bare wires with no polarity, so any of them goes under the same two screws.

The listing describes the sensors in the box this way. Every size here is the listing's, not ours:

SensorIn the boxListing givesSuits
Plastic, surface mount327 × 13 × 8 mm, MC-38 patterndoors and window frames
Hidden, recessed3no sizecabinets and wooden doors
Metal housing, heavy duty1105 × 37 × 15 mmgates and garage doors

The listing says each sensor has its own magnet, and the kit a Start Card. Its headline says seven sensors and seven interface modules; its photo shows six modules.

Which to use

The plastic one is the default. Two screws put one half on the frame and one on the door, and the two halves face each other when the door is shut. It is the pattern most door alarms use, and the one that is easiest to test before you commit to a position.

The recessed one disappears: each half goes into a drilled hole, so nothing shows on the surface. It suits a wooden door or a cabinet, and it needs a drill and a bit that fits. Test it in the open before you drill.

The metal one is for what plastic would not survive: a gate or a garage door. The listing calls it an aluminium housing on an armoured cable, screwed on.

What they share

All three are a switch with two bare wires and a magnet. The board does not know which one it has, and nothing in the sketch changes. The two things a sensor does change are where the wire has to run and what is near the halves. A sensor on a long wire is a better antenna for noise, which the pull-down is there to hold off, and metal near the halves can change when the switch closes.

When it does not work

How far apart can the two halves be?

Nobody has measured the sensors in this kit, and the listing gives no distance. It depends on the magnet and on the case. Test yours: hold the halves apart and watch the LED, then move them apart until it goes out, and mount them closer than that.

The recessed sensor works on the bench and not in the door.

A steel screw, a metal hinge or a metal door skin near the halves can carry the magnet's field away, or hold the switch closed. Try the sensor in the open first, then in the hole, and compare with the LED.

The listing says seven modules and I count six.

The listing's text says seven interface modules; its picture shows six. This book cannot settle it from here: count your own box, and write to the seller if one is missing.

Can I put two sensors on one board?

In parallel, yes: either one closing makes SIGNAL HIGH, so the pin reads HIGH if either door is shut and LOW only when both are open. For two doors you want two pins, and so two boards.

Alongside this page
Where this goes next

Debounce, count openings, and complain when one stays open.

A door that nags →

Edit this page — content/books/door-sensor/choosing-a-sensor.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

Door Sensor

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum →