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

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

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

Introduction

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:

  • Door and window sensors in security systems
  • Position and proximity sensing
  • Speed sensing in bicycles and treadmills
  • Liquid level detection in tanks
  • Automotive applications, such as brake or gear position sensing

Explore Projects Built with Reed 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!
Reed Switch-Activated Water Pump Circuit
Image of Water ATM: A project utilizing Reed Switch in a practical application
This circuit is designed to control a water pump using a DC power source and a reed switch. The reed switch acts as a sensor that, when triggered, allows current to flow from the DC jack to the water pump, turning it on. There is no microcontroller or additional control logic, indicating that the pump operates directly in response to the state of the reed switch.
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 Reed 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 Smart Light with Wemos D1 Mini and Reed Switches
Image of Crystal Puzzle: A project utilizing Reed Switch in a practical application
This circuit uses a Wemos D1 Mini microcontroller to monitor the state of multiple reed switches and control a WS2812 RGB LED strip. The microcontroller is powered by a 3xAA battery pack, and the reed switches are used to trigger different actions or lighting patterns on the LED strip.
Cirkit Designer LogoOpen Project in Cirkit Designer
Reed Switch Controlled Multi-Color LED Indicator
Image of patent: A project utilizing Reed Switch in a practical application
This circuit consists of four reed switches, each controlling a different colored LED (green, blue, red, and orange). When a reed switch is activated, it completes the circuit, allowing current to flow from the Vcc to the corresponding LED, which then lights up. All LEDs share a common ground connection.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Reed 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 Water ATM: A project utilizing Reed Switch in a practical application
Reed Switch-Activated Water Pump Circuit
This circuit is designed to control a water pump using a DC power source and a reed switch. The reed switch acts as a sensor that, when triggered, allows current to flow from the DC jack to the water pump, turning it on. There is no microcontroller or additional control logic, indicating that the pump operates directly in response to the state of the reed switch.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Interfacing Reed Switch with Arduino UNO: A project utilizing Reed 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 Crystal Puzzle: A project utilizing Reed Switch in a practical application
Battery-Powered Smart Light with Wemos D1 Mini and Reed Switches
This circuit uses a Wemos D1 Mini microcontroller to monitor the state of multiple reed switches and control a WS2812 RGB LED strip. The microcontroller is powered by a 3xAA battery pack, and the reed switches are used to trigger different actions or lighting patterns on the LED strip.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of patent: A project utilizing Reed Switch in a practical application
Reed Switch Controlled Multi-Color LED Indicator
This circuit consists of four reed switches, each controlling a different colored LED (green, blue, red, and orange). When a reed switch is activated, it completes the circuit, allowing current to flow from the Vcc to the corresponding LED, which then lights up. All LEDs share a common ground connection.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

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

Pin Configuration and Descriptions

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

Usage Instructions

How to Use the Reed Switch in a Circuit

  1. Basic Circuit Connection:

    • Connect one terminal of the reed switch to the positive side of the power supply.
    • Connect the other terminal to the load (e.g., an LED with a current-limiting resistor).
    • Complete the circuit by connecting the load to the negative side of the power supply.
    • When a magnetic field is applied near the reed switch, the circuit will close, and the load will activate.
  2. Interfacing with a Microcontroller (e.g., Arduino UNO):

    • Connect one terminal of the reed switch to a digital input pin on the Arduino.
    • Connect the other terminal to the ground (GND) pin.
    • Use a pull-up resistor (10kΩ) between the digital input pin and the 5V pin to ensure a stable signal.

Example Arduino Code

// 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
}

Important Considerations and Best Practices

  • Magnet Placement: Ensure the magnet is positioned close enough to the reed switch to reliably activate it. The activation distance depends on the strength of the magnet and the sensitivity of the reed switch.
  • Debouncing: Reed switches may produce noise or "bouncing" when switching states. Use a software debounce routine or a capacitor across the terminals to filter out noise.
  • Current Limiting: Avoid exceeding the maximum current rating of the reed switch to prevent damage to the contacts.
  • Mounting: Handle the glass tube carefully to avoid breakage. Use a secure mounting method to protect the switch from mechanical stress.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Reed Switch Not Activating:

    • Cause: The magnet is too far from the reed switch.
    • Solution: Move the magnet closer or use a stronger magnet.
  2. Switch Stuck in Closed State:

    • Cause: The contacts may have welded together due to excessive current.
    • Solution: Replace the reed switch and ensure the current does not exceed the rated value.
  3. Intermittent Operation:

    • Cause: Electrical noise or poor connections.
    • Solution: Add a pull-up or pull-down resistor, and check all connections for stability.
  4. No Response in Arduino Circuit:

    • Cause: Incorrect wiring or missing pull-up resistor.
    • Solution: Verify the wiring and ensure a pull-up resistor is used.

FAQs

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.