

A reed switch is an electromagnetic switch that opens and closes in response to a magnetic field. It consists of two ferromagnetic contacts sealed within a small glass tube. When a magnetic field is applied, the contacts close, completing an electrical circuit. Once the magnetic field is removed, the contacts return to their open state.
Reed switches are widely used in various applications due to their simplicity, reliability, and low power consumption. Common use cases include:








Below are the key technical details of a typical reed switch. Note that specifications may vary depending on the manufacturer and model.
| Parameter | Value |
|---|---|
| Contact Form | SPST (Single Pole Single Throw) |
| Switching Voltage | 3V to 250V DC/AC |
| Switching Current | 10mA to 3A |
| Contact Resistance | 50 mΩ to 200 mΩ |
| Insulation Resistance | >10⁹ Ω |
| Operating Temperature | -40°C to +125°C |
| Response Time | 0.5 ms to 2 ms |
| Glass Tube Dimensions | 10 mm to 50 mm (length) |
Reed switches typically have two leads (pins) extending from the glass tube. These leads are the electrical contacts of the switch.
| Pin | Description |
|---|---|
| Pin 1 | Contact 1 (connects to the circuit) |
| Pin 2 | Contact 2 (connects to the circuit) |
Below is an example of how to use a reed switch with an Arduino UNO to detect the presence of a magnet.
// Reed Switch Example with Arduino UNO
// This code reads the state of a reed switch and turns on an LED when the switch is closed.
const int reedSwitchPin = 2; // Pin connected to the reed switch
const int ledPin = 13; // Pin connected to the onboard LED
void setup() {
pinMode(reedSwitchPin, INPUT_PULLUP); // Set reed switch pin as input with pull-up resistor
pinMode(ledPin, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int reedState = digitalRead(reedSwitchPin); // Read the state of the reed switch
if (reedState == LOW) { // Reed switch is closed (magnet present)
digitalWrite(ledPin, HIGH); // Turn on the LED
Serial.println("Magnet detected!");
} else { // Reed switch is open (no magnet)
digitalWrite(ledPin, LOW); // Turn off the LED
Serial.println("No magnet detected.");
}
delay(100); // Small delay to stabilize readings
}
Reed Switch Not Responding to Magnet
Switch Bouncing Causes Erratic Behavior
Reed Switch Breaks During Installation
False Triggering Due to Nearby Magnetic Fields
Q: Can a reed switch handle AC signals?
A: Yes, reed switches can handle both AC and DC signals, provided the voltage and current ratings are not exceeded.
Q: How do I increase the sensitivity of a reed switch?
A: Use a stronger magnet or a reed switch with a lower pull-in sensitivity rating.
Q: Can I use a reed switch in high-vibration environments?
A: Reed switches are sensitive to vibration, which may cause false triggering. Consider using a solid-state alternative like a Hall effect sensor in such environments.