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 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:

  • 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⁹ Ω
Operating Temperature -40°C to +125°C
Response Time 0.5 ms to 2 ms
Glass Tube Dimensions 10 mm to 50 mm (length)

Pin Configuration and Descriptions

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)

Usage Instructions

How to Use the Reed Switch in a Circuit

  1. Placement in the Circuit: Connect the reed switch in series with the load or as part of a sensing circuit. Ensure the switch is oriented correctly to interact with the magnetic field.
  2. Magnet Placement: Place a magnet near the reed switch to close the contacts. The distance between the magnet and the switch depends on the sensitivity of the reed switch and the strength of the magnet.
  3. Pull-Up or Pull-Down Resistor: When using the reed switch as an input to a microcontroller (e.g., Arduino), include a pull-up or pull-down resistor to ensure a stable signal.

Important Considerations and Best Practices

  • Debouncing: Reed switches may produce electrical noise (bouncing) when the contacts close or open. Use a capacitor or software debouncing techniques to filter out noise.
  • Current Limitation: Do not exceed the maximum current rating of the reed switch to avoid damaging the contacts.
  • Magnetic Interference: Avoid placing the reed switch near strong magnetic fields or other magnetic components that could cause unintended operation.
  • Mounting: Handle the glass tube carefully to prevent breakage. Use appropriate mounting hardware or enclosures for protection.

Example: Connecting a Reed Switch to an Arduino UNO

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
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Reed Switch Not Responding to Magnet

    • Cause: Magnet is too weak or too far from the switch.
    • Solution: Use a stronger magnet or reduce the distance between the magnet and the reed switch.
  2. Switch Bouncing Causes Erratic Behavior

    • Cause: Electrical noise from the contacts opening and closing.
    • Solution: Add a small capacitor (e.g., 0.1 µF) across the reed switch or implement software debouncing.
  3. Reed Switch Breaks During Installation

    • Cause: Excessive force applied to the glass tube.
    • Solution: Handle the switch carefully and use protective enclosures or mounting clips.
  4. False Triggering Due to Nearby Magnetic Fields

    • Cause: Interference from other magnetic sources.
    • Solution: Shield the reed switch or relocate it away from interfering magnetic fields.

FAQs

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.