door sensor circuit

Low Cost Door Sensor

This compact and affordable door sensor mechanism uses a Hall-effect sensor fixed at the corner of the door frame and a standard bar magnet fixed on the door panel close to the Hall-effect sensor. When the door is opened, the magnet moves away from the sensor to generate a wake-up signal to the rest of the electronics. This sensitive and reliable door sensor can be powered from a 9V alkaline battery pack.

MH183 door sensor At the heart of the circuit is one Unipolar Hall effect sensor MH183 (HS1). It incorporates advanced chopper stabilization technology to provide accurate and stable magnetic switch points. The internal output transistor of MH183 will be switched on in the presence of a sufficiently strong South pole magnetic field facing the marked side of the package. Similarly, the output will be switched off in the presence of a weaker South field and remain off with “0” field. A Hall-effect sensor IC (contactless & magnetically activated) is more efficient and effective than reed, inductive or opto-electronic sensors, and is virtually immune to environmental contaminants.

Schematic of the Door Sensor Circuit

door sensor circuit

Working of the circuit is simple and straight forward. As per the mechanical arrangement,when the door is closed, the bar magnet is very near to HS1 (MH183) and as a result it is turned to on state and disables the first oscillator formed by the two gates (A &B) of IC1 (CD4093-Quad 2-Input NAND Schmitt Trigger). This condition is indicated by the steadily lit red LED (LED1). Note that here LED1 is pulsed by the relaxation oscillator wired around one gate (D) of IC1. But the frequency here is comparatively high (set by C2 and R5) and hence LED1 appears to be lit continuously. Resistor R6 limits the LED current to a safe value. When the door is opened, the magnet moves away from IC1. Now HS1 turns off to enable the Two-gate oscillator (IC1A & IC1B) through resistor R2. The low frequency pulses from this oscillator are inverted by IC1C to gate the LED oscillator (IC1D) on and off.

Assemble the circuit on a small PCB and enclose in a suitable box. Fix the Hall sensor (HS1) at the corner of door frame and the magnet on the door, keeping its south pole (S) oriented towards the marked side of HS1. Align the Hall sensor and magnet such that when the door is closed, LED1 lits steadily.


  • A transistor based relay driver may be driven off the output of IC1B(TP1). This allows switching of high-power loads such as flashers,sirens or hooters working on the AC mains supply.
  • Resistor R1 (100 Ohm) is not a very crucial component. It’s added for reverse voltage protection (refer MH183 datasheet).
  • This circuit (combines “door-closed” and “door-opened” indication) has a very low current drain and can be operated long time with a standard 9V Alkaline battery.
  • It is possible to replace HS1 with any other unipolar (not a linear one) type having similar characteristics.


Join the conversation!

Error! Please fill all fields.
Looking for the latest from TI?