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 glass tube. When a magnetic field is applied, the contacts close, completing the circuit. Once the magnetic field is removed, the contacts return to their open state.
Reed switches are widely used in applications requiring non-contact switching. 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⁹ Ω |
Operate Time | 0.5 ms to 2 ms |
Release Time | 0.1 ms to 0.5 ms |
Operating Temperature | -40°C to +125°C |
Glass Tube Dimensions | Typically 10mm to 50mm in length |
Reed switches are simple two-terminal devices. The terminals are the two ferromagnetic contacts sealed within the glass tube. Below is a description of the pins:
Pin | Description |
---|---|
Pin 1 | One end of the reed switch contact |
Pin 2 | The other end of the reed switch contact |
Basic Circuit Connection:
Interfacing with a Microcontroller (e.g., Arduino UNO):
// 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
pinMode(ledPin, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int reedState = digitalRead(reedSwitchPin); // Read the reed switch state
if (reedState == LOW) { // LOW means the reed switch is closed
digitalWrite(ledPin, HIGH); // Turn on the LED
Serial.println("Magnetic field detected!"); // Print message to serial monitor
} else {
digitalWrite(ledPin, LOW); // Turn off the LED
Serial.println("No magnetic field."); // Print message to serial monitor
}
delay(100); // Small delay for stability
}
Reed Switch Not Activating:
Switch Stuck in Closed State:
Intermittent Operation:
No Response in Arduino Circuit:
Q: Can a reed switch detect non-magnetic materials?
A: No, reed switches only respond to magnetic fields and cannot detect non-magnetic materials.
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 cases.
Q: How do I protect the reed switch from voltage spikes?
A: Use a flyback diode across inductive loads (e.g., relays) to suppress voltage spikes and protect the reed switch contacts.
Q: Can I use a reed switch for AC applications?
A: Yes, reed switches can handle both AC and DC currents, provided the voltage and current ratings are not exceeded.