Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Magnetic Reed Door Switch: Examples, Pinouts, and Specs

Image of Magnetic Reed Door Switch
Cirkit Designer LogoDesign with Magnetic Reed Door Switch in Cirkit Designer

Introduction

A magnetic reed door switch is a sensor designed to detect the opening and closing of doors or windows. It operates using a reed switch and a magnet. When the door or window is closed, the magnet aligns with the reed switch, keeping the circuit closed. When the door or window opens, the magnet moves away, causing the reed switch to open the circuit. This change in state can be used to trigger alarms, notifications, or other actions in a system.

Explore Projects Built with Magnetic Reed Door Switch

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Wi-Fi Controlled Door Monitoring System with NodeMCU and Relay
Image of relay on off low level triger: A project utilizing Magnetic Reed Door Switch in a practical application
This circuit is a door monitoring system using a NodeMCU ESP8266 microcontroller, a magnetic door switch, and a 1-channel relay. When the door is closed, the magnetic switch triggers the relay to turn on, and when the door is opened, the relay turns off, allowing for control of an external device based on the door's state.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Reed Switch Sensor with LED Indicator
Image of Interfacing Reed Switch with Arduino UNO: A project utilizing Magnetic Reed Door Switch in a practical application
This circuit uses an Arduino UNO to monitor the state of a reed switch. When the reed switch is activated by a magnetic field, the Arduino turns on an onboard LED and outputs a message to the serial monitor. The reed switch is connected to the Arduino with an internal pull-up resistor on digital pin D2, and the LED is controlled via pin D13.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Reed Switch Alarm with Buzzer
Image of Magnetic_Door_Alarm: A project utilizing Magnetic Reed Door Switch in a practical application
This circuit is a simple alarm system powered by a 18650 Li-Ion battery, regulated to 5V by a 7805 voltage regulator. It uses a reed switch to detect magnetic fields, which triggers a BC547 transistor to activate a buzzer when the switch is closed.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO RFID Door Lock System with Relay and Buzzer Notification
Image of Door Lock System: A project utilizing Magnetic Reed Door Switch in a practical application
This circuit is designed as an RFID-based access control system that operates a magnetic door lock. The Arduino UNO reads RFID tags using the RFID-RC522 module and controls a magnetic lock via a 12V relay, indicating access status with red and green LEDs and a buzzer. The system grants or denies access based on the RFID tag presented, unlocking the door for authorized tags and sounding an alert for unauthorized attempts.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Magnetic Reed Door Switch

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of relay on off low level triger: A project utilizing Magnetic Reed Door Switch in a practical application
Wi-Fi Controlled Door Monitoring System with NodeMCU and Relay
This circuit is a door monitoring system using a NodeMCU ESP8266 microcontroller, a magnetic door switch, and a 1-channel relay. When the door is closed, the magnetic switch triggers the relay to turn on, and when the door is opened, the relay turns off, allowing for control of an external device based on the door's state.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Interfacing Reed Switch with Arduino UNO: A project utilizing Magnetic Reed Door Switch in a practical application
Arduino UNO Reed Switch Sensor with LED Indicator
This circuit uses an Arduino UNO to monitor the state of a reed switch. When the reed switch is activated by a magnetic field, the Arduino turns on an onboard LED and outputs a message to the serial monitor. The reed switch is connected to the Arduino with an internal pull-up resistor on digital pin D2, and the LED is controlled via pin D13.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Magnetic_Door_Alarm: A project utilizing Magnetic Reed Door Switch in a practical application
Battery-Powered Reed Switch Alarm with Buzzer
This circuit is a simple alarm system powered by a 18650 Li-Ion battery, regulated to 5V by a 7805 voltage regulator. It uses a reed switch to detect magnetic fields, which triggers a BC547 transistor to activate a buzzer when the switch is closed.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Door Lock System: A project utilizing Magnetic Reed Door Switch in a practical application
Arduino UNO RFID Door Lock System with Relay and Buzzer Notification
This circuit is designed as an RFID-based access control system that operates a magnetic door lock. The Arduino UNO reads RFID tags using the RFID-RC522 module and controls a magnetic lock via a 12V relay, indicating access status with red and green LEDs and a buzzer. The system grants or denies access based on the RFID tag presented, unlocking the door for authorized tags and sounding an alert for unauthorized attempts.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Home security systems to detect unauthorized entry
  • Smart home automation for monitoring door/window status
  • Industrial equipment monitoring
  • Access control systems
  • Triggering lights or alarms when doors are opened

Technical Specifications

Key Technical Details

  • Operating Voltage: Typically 3.3V to 12V (depending on the circuit design)
  • Switch Type: Normally Open (NO) or Normally Closed (NC), depending on the model
  • Contact Rating: 10W (maximum)
  • Switching Voltage: Up to 100V DC
  • Switching Current: Up to 0.5A
  • Magnet Distance: Typically 10-20mm (varies by model)
  • Operating Temperature: -40°C to 70°C

Pin Configuration and Descriptions

The magnetic reed door switch typically has two wires or terminals. These are:

Pin/Terminal Description
Wire 1 One end of the reed switch circuit
Wire 2 The other end of the reed switch circuit

Note: Polarity is not a concern for most reed switches, as they are simple mechanical switches.

Usage Instructions

How to Use the Component in a Circuit

  1. Wiring the Switch:

    • Connect one terminal of the reed switch to the positive voltage supply (e.g., 5V).
    • Connect the other terminal to the input pin of a microcontroller (e.g., Arduino) or to the input of another circuit.
    • Use a pull-down resistor (e.g., 10kΩ) between the input pin and ground to ensure a stable signal.
  2. Placement:

    • Mount the reed switch on the stationary part of the door or window frame.
    • Mount the magnet on the moving part (e.g., the door or window itself).
    • Ensure the magnet aligns with the reed switch when the door/window is closed.
  3. Testing:

    • Close the door/window and verify that the circuit is closed (e.g., input pin reads HIGH).
    • Open the door/window and verify that the circuit is open (e.g., input pin reads LOW).

Important Considerations and Best Practices

  • Magnet Alignment: Ensure proper alignment between the reed switch and the magnet for reliable operation.
  • Distance: Keep the magnet within the specified operating distance (e.g., 10-20mm) for accurate detection.
  • Debouncing: Use software or hardware debouncing to handle any noise or false triggers caused by vibrations or rapid state changes.
  • Environment: Avoid placing the switch in areas with strong magnetic interference or extreme temperatures.

Example Code for Arduino UNO

The following example demonstrates how to use a magnetic reed door switch with an Arduino UNO to detect door status and print it to the Serial Monitor.

// Magnetic Reed Door Switch Example for Arduino UNO
// Connect one terminal of the reed switch to pin 2 and the other to GND.
// Use a 10kΩ pull-up resistor between pin 2 and 5V.

const int reedSwitchPin = 2; // Pin connected to the reed switch
int doorState = 0;           // Variable to store the door state

void setup() {
  pinMode(reedSwitchPin, INPUT_PULLUP); // Set pin as input with internal pull-up
  Serial.begin(9600);                  // Initialize serial communication
}

void loop() {
  doorState = digitalRead(reedSwitchPin); // Read the state of the reed switch

  if (doorState == LOW) {
    // If the reed switch is closed (door is closed)
    Serial.println("Door is CLOSED");
  } else {
    // If the reed switch is open (door is open)
    Serial.println("Door is OPEN");
  }

  delay(500); // Delay to avoid spamming the Serial Monitor
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. The switch does not detect door movement:

    • Solution: Check the alignment between the reed switch and the magnet. Ensure the magnet is within the specified operating distance.
  2. False triggers or unstable readings:

    • Solution: Add a pull-up or pull-down resistor to stabilize the signal. Use software debouncing in your code to filter out noise.
  3. No response from the circuit:

    • Solution: Verify the wiring and connections. Ensure the reed switch is not damaged and the magnet is strong enough to activate the switch.
  4. Interference from nearby magnets or devices:

    • Solution: Relocate the switch to a less magnetically noisy environment or shield it from interference.

FAQs

Q1: Can I use the magnetic reed door switch with a 3.3V system?
A1: Yes, most reed switches are compatible with 3.3V systems. However, check the specific model's specifications to confirm.

Q2: What happens if the magnet is too far from the reed switch?
A2: If the magnet is beyond the specified operating distance, the reed switch will remain open, and the circuit will not detect a closed door/window.

Q3: Can I use multiple reed switches in a single circuit?
A3: Yes, you can connect multiple reed switches in parallel or series, depending on your application. For example, in a security system, you might connect them in series to monitor multiple doors/windows.

Q4: How durable is a magnetic reed door switch?
A4: Reed switches are highly durable and can last for millions of operations under normal conditions. However, avoid exposing them to extreme environments for prolonged periods.

Q5: Can I use this switch outdoors?
A5: While the reed switch itself is durable, it is not typically weatherproof. Use a weatherproof enclosure if deploying it outdoors.