Install a Reed Switch Door Sensor: Contact States, Magnetic Margin and Event Logging
A reed switch and magnet can report whether a cupboard, display case or workshop enclosure is open without a lever touching the moving door. The useful signal depends on more than placing the two pieces close together. Door movement, frame material, contact type and software interpretation all affect the result.
The PMD Way flush-mount reed switch and magnet set offers normally open and normally closed options. Its listing describes cylindrical bodies approximately 11 mm in diameter and 17 mm long. Check the selected variant and actual fit before drilling. Related devices are available in the reed switch collection.
Define the physical state and electrical state separately
“Door closed” describes the mechanism. “Contact closed” describes electrical continuity. They are not automatically the same thing. In component terminology, normally open generally describes the contact without its actuating magnetic field, but door-contact descriptions can be confusing because the normal installation may place the magnet nearby.
Resolve the ambiguity with a simple unpowered test. Measure continuity with the supplied magnet far away, then bring it into the intended closed-door position. Record both results for the actual variant. Use explicit labels such as magnet near and magnet away rather than relying on an abbreviation alone.
| Condition | Measured contact state | Meaning in the project |
|---|---|---|
| Magnet in final closed-door position | Record open or closed | Door appears closed |
| Door clearly open | Record open or closed | Door appears open |
| Sensor wire disconnected | Open circuit at the controller | May be indistinguishable from one valid state |
Map the magnetic operating region before making holes
The magnetic response is not necessarily a simple sphere around the sensor. Littelfuse's reed activation application note shows how magnet position and orientation produce different activation regions. Magnet strength and sensor sensitivity also influence the result.
Temporarily hold the sensor and magnet on a representative piece of the intended frame. Move the magnet along the actual door path and watch continuity. Rotate or offset it only in ways permitted by the mounting arrangement. Keep the orientation that provides a broad, repeatable closed-door region and a clear release when the door opens.
The PMD Way listing gives an operating-distance description between 5 mm and 15 mm. Treat that as preliminary selection information, not a guaranteed installation tolerance for every frame and orientation. Test the actual pair with the final material and nearby hardware in place.
Measure approaching and departing separately
A reed contact can operate at one position and release at another. This hysteresis can help avoid rapid toggling near the threshold, but it also means a single measured gap does not describe the complete behaviour. Manufacturer datasheets such as the Littelfuse 59150 sensor data distinguish activation and deactivation distances for specified sensor and actuator combinations.
For your installation, close the door slowly and mark where the contact changes. Then open it slowly and mark the release point. Repeat several times. Do not transfer distances from the Littelfuse example to the flush-mount set.
Leave margin for the real door
A door that sits perfectly on the bench may sag, rattle or move against its latch in service. Test the range of positions possible while it is genuinely closed. Push gently at different corners, operate the latch and check normal hinge play.
Place the sensor well inside the stable closed region, rather than at the furthest gap that happened to work once. At the same time, confirm that the system reports open by the opening distance your application actually cares about. “Magnet still detected” is not proof that a latch is engaged.
Recheck after fitting screws, strike plates and other nearby hardware. Ferromagnetic material can change the field arrangement, so a result obtained on a plastic test block does not validate a steel installation. If the frame cannot provide adequate margin, select a sensor system intended for that mounting environment.
Use the contact as a suitably limited input
The example listing states maximum voltage and current values, but those separate maxima do not establish that they may be used together. Switching power, load type and contact life also matter. For a door logger, use a properly designed low-voltage sensing input rather than driving a lamp, relay or lock directly through an undocumented contact arrangement.
Standex Detect's handling and load guidance explains how capacitive and inductive loads can stress reed contacts. A long cable and added filter components deserve attention too; a large capacitor placed directly across contacts can discharge through them when they close.
Choose input bias, protection and filtering for the controller and cable environment. Check the resulting current, voltage and input thresholds. Support the cable near the sensor and protect joints from door movement rather than allowing the short attached leads to absorb repeated flexing.
Log meaningful door events
Keep the raw electrical state, accepted door state and event history separate. A short unstable interval should not automatically become several opening events. Validate a changed state for a suitable time before recording it, choosing the interval from observed chatter and the shortest real opening that must be captured.
Count an opening when the accepted state changes from closed to open. Record the closing time separately so the open duration can be calculated. If the logger starts while the door is already open, record an initial open state with an unknown opening time rather than inventing a complete event.
For example, an educational display-case logger might report “opened at 10:14:05, closed at 10:14:12”. If power fails halfway through, mark the interval incomplete. Honest missing-data handling makes the log more useful than a neat but unsupported duration.
Test faults as well as normal operation
- Open and close slowly, quickly and with normal latch movement.
- Hold the door at the edge of the accepted closed range.
- Disconnect the sensor cable and record the reported state.
- Restore power with the door open and closed.
- Check that one real opening produces one event.
- Repeat after the final mounting and cable routing are complete.
A basic two-wire contact cannot distinguish every broken wire, short circuit or external magnet from a legitimate state. If those conditions matter, use an appropriately designed supervised system. For ordinary monitoring, document these limits along with the tested mounting gap and contact mapping so “door closed” remains a clear statement about the evidence available.