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, which close when exposed to a magnetic field and open when the field is removed. Reed switches are widely used in applications requiring non-contact switching, such as proximity sensors, security systems, and automotive electronics. Their simplicity, reliability, and low power consumption make them ideal for a variety of use cases.

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
Battery-Powered Arduino Nano Reed Switch LED Indicator
Image of Fridge Door Lighting System using Reed Sensor: A project utilizing Reed switch in a practical application
This circuit uses an Arduino Nano to control an LED based on the state of a reed switch, powered by a 18650 Li-Ion battery through a rocker switch. The reed switch's digital output is read by the Arduino, which then drives the LED through a current-limiting resistor.
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 Fridge Door Lighting System using Reed Sensor: A project utilizing Reed switch in a practical application
Battery-Powered Arduino Nano Reed Switch LED Indicator
This circuit uses an Arduino Nano to control an LED based on the state of a reed switch, powered by a 18650 Li-Ion battery through a rocker switch. The reed switch's digital output is read by the Arduino, which then drives the LED through a current-limiting resistor.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications:

  • Door and window sensors in security systems
  • Proximity detection in industrial automation
  • Position sensing in robotics
  • Speed sensing in bicycles and vehicles
  • Liquid level detection in tanks

Technical Specifications

Below are the key technical details of a typical Reed switch. Note that specifications may vary depending on the manufacturer and model.

General Specifications:

  • Switching Voltage: Up to 200 V DC (varies by model)
  • Switching Current: Typically 0.5 A (500 mA) max
  • Contact Resistance: 50 mΩ to 200 mΩ (when closed)
  • Insulation Resistance: >10⁹ Ω (when open)
  • Response Time: 0.5 ms to 2 ms
  • Operating Temperature: -40°C to +125°C
  • Lifetime: Up to 10⁷ operations (depending on load)

Pin Configuration:

Reed switches typically have two leads (pins) that serve as the switch terminals. These leads are not polarized, meaning the switch can be connected in either orientation.

Pin Number Description
1 Switch Terminal 1
2 Switch Terminal 2

Usage Instructions

How to Use a Reed Switch in a Circuit:

  1. Placement in Circuit: Connect the Reed switch in series with the load or as part of a sensing circuit. Since it is not polarized, either terminal can be connected to the positive or negative side of the circuit.
  2. Magnet Placement: Place a magnet near the Reed switch to close the contacts. The distance at which the switch activates depends on the magnet's strength and the switch's sensitivity.
  3. Pull-Up/Down Resistor: When using the Reed switch with a microcontroller, include a pull-up or pull-down resistor to ensure a stable signal when the switch is open.

Example Circuit with Arduino UNO:

Below is an example of how to use a Reed switch with an Arduino UNO to detect the presence of a magnetic field.

Circuit Connections:

  • Connect one terminal of the Reed switch to a digital input pin (e.g., pin 2) on the Arduino.
  • Connect the other terminal to the ground (GND).
  • Add a 10 kΩ pull-up resistor between the digital input pin and the 5V supply.

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 (magnet present).

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 state of the Reed switch

  if (reedState == LOW) { // LOW means the switch is closed (magnet present)
    digitalWrite(ledPin, HIGH); // Turn on the LED
    Serial.println("Magnet detected!");
  } else {
    digitalWrite(ledPin, LOW); // Turn off the LED
    Serial.println("No magnet detected.");
  }

  delay(100); // Small delay for stability
}

Important Considerations:

  • Debouncing: Reed switches may produce noise or "bounce" when switching states. Use software debouncing or a capacitor across the terminals to filter out noise.
  • Current Limiting: Avoid exceeding the maximum current rating to prevent damage to the contacts.
  • Magnet Strength: Ensure the magnet used is strong enough to reliably activate the switch at the desired distance.

Troubleshooting and FAQs

Common Issues:

  1. Switch Not Activating:
    • Ensure the magnet is strong enough and positioned correctly.
    • Check for loose or incorrect connections in the circuit.
  2. Unstable Readings:
    • Add a pull-up or pull-down resistor to stabilize the signal.
    • Use software or hardware debouncing to eliminate noise.
  3. Switch Stuck in One State:
    • Verify that the switch is not damaged or stuck due to excessive current or mechanical stress.

FAQs:

Q: Can I use a Reed switch to detect non-magnetic objects?
A: No, Reed switches only respond to magnetic fields. For non-magnetic object detection, consider using other sensors like infrared or ultrasonic sensors.

Q: How far can the magnet be from the Reed switch?
A: The activation distance depends on the magnet's strength and the sensitivity of the Reed switch. Typical distances range from a few millimeters to several centimeters.

Q: Can a Reed switch handle AC signals?
A: Yes, Reed switches can handle both AC and DC signals, but ensure the voltage and current ratings are not exceeded.

Q: How do I protect the Reed switch from high currents?
A: Use a current-limiting resistor or a relay to handle higher currents indirectly.

By following these guidelines and best practices, you can effectively integrate a Reed switch into your projects for reliable and efficient operation.