🧲 Reed Switch (Magnetic Switch) – Normally Open (NO)
The Reed Switch is a small, sealed magnetic switch that opens or closes its contacts in the presence of a magnetic field. It's widely used in door/window security systems, proximity detection, robotics, and automation projects. The switch is normally open (NO) and closes when exposed to a nearby magnet.
⚙️ Technical Specifications
| Parameter | Specification |
|---|
| Type | Normally Open (NO) |
| Operating Voltage | 3V – 60V DC / AC |
| Current Rating | ~0.5A max |
| Switching Distance | ~10 mm (depends on magnet strength) |
| Body Material | Glass capsule |
| Length | ~14mm (glass), ~35mm total with leads |
| Contact Resistance | ≤ 100 mΩ |
| Response Time | ~0.2 ms |
✅ Features
🧲 Closes when near a magnet
🔒 Used in security systems for detecting door or window open/close
📟 Detects magnet movement or presence in robotics and automation
🛠️ Easily used with Arduino, ESP32, or Raspberry Pi
💡 No power required to operate — purely magnetic switching
📦 Compact and reliable with long lifespan
🛠️ Arduino Example Wiring
| Reed Switch Pin | Arduino Pin |
|---|
| 1 | D2 |
| 2 | GND |
Use a 10K pull-up resistor between D2 and 5V if needed.
🧪 Example Arduino Code
const int reedPin = 2;
const int ledPin = 13;
void setup() {
pinMode(reedPin, INPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
if (digitalRead(reedPin) == LOW) {
digitalWrite(ledPin, HIGH);
Serial.println("Magnet detected!");
} else {
digitalWrite(ledPin, LOW);
Serial.println("No magnet.");
}
delay(500);
}
🎥 YouTube Tutorial