Reed Switch (Magnetic Switch)
π§² 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); }