Stufin
Home Quick Cart Profile

12mm Reed Switch/Sensor

Buy Now on Stufin

Component Documentation

12mm Reed Switch/Sensor

Overview

The 12mm Reed Switch/Sensor is a type of electromagnetic sensor that detects the presence or absence of a magnetic field. It is a popular and widely used IoT component in various applications, including industrial automation, security systems, and smart home devices.

Functionality

The 12mm Reed Switch/Sensor operates on the principle of electromagnetic induction. The sensor consists of two main componentsa reed switch and a sensing coil. When a magnet is brought close to the sensor, the magnetic field induces an electromotive force (EMF) in the sensing coil, which in turn causes the reed switch to change its state.

When the magnetic field is present, the reed switch closes, connecting the two terminals, and when the magnetic field is removed, the reed switch opens, disconnecting the terminals. This change in state can be used to trigger various actions, such as sending a signal to a microcontroller or activating a relay.

Key Features

  • Operating Principle: Electromagnetic induction
  • Sensing Range: 12mm (distance between the sensor and the magnet)
  • Reed Switch Type: Normally Open (N.O.) or Normally Closed (N.C.)
  • Voltage Rating: 5V to 24V DC
  • Current Rating: 100mA to 1A
  • Response Time: Typically <10ms
  • Operating Temperature: -20C to 80C
  • Storage Temperature: -40C to 125C
  • Humidity: 5% to 95% non-condensing
  • Physical Dimensions: 12mm diameter x 25mm length
  • Mounting Options: Through-hole or surface mount
  • Certifications: RoHS and CE compliant

Applications

  • Door and window sensors for security systems
  • Magnetic proximity sensors for industrial automation
  • Smart home devices, such as smart door locks and windows
  • Vibration sensors for condition monitoring
  • Level sensors for liquid level detection
The 12mm Reed Switch/Sensor is commonly used in various IoT applications, including

Technical Specifications

| Parameter | Value |

| --- | --- |

| Operating Frequency | 10Hz to 100kHz |

| Sensitivity | 10-20 AT (Ampere-Turns) |

| Hysteresis | 1-2 AT |

| Power Consumption | <10mA |

| Insulation Resistance | >100M |

Pinout

  • VCC: Power supply (5V to 24V DC)
  • Signal: Output signal (TTL-level)
  • GND: Ground
The 12mm Reed Switch/Sensor typically has three pins

Precautions and Handling

  • Handling: Avoid touching the sensor pins or components to prevent electrical discharge or damage.
  • Storage: Store the sensor in a dry, cool place, away from direct sunlight and moisture.
  • Operating Environment: Ensure the sensor operates within the specified temperature, humidity, and vibration ranges.

Troubleshooting Tips

  • Check the power supply and wiring connections.
  • Verify the magnet strength and orientation.
  • Ensure the sensor is properly calibrated and configured.

Conclusion

The 12mm Reed Switch/Sensor is a reliable and versatile IoT component suitable for various applications. Its compact design, low power consumption, and high sensitivity make it an ideal choice for detecting magnetic fields in a wide range of scenarios.

Pin Configuration

  • 12mm Reed Switch/Sensor Documentation
  • Pin Description and Connection Guide
  • The 12mm Reed Switch/Sensor is a popular IoT component used to detect magnetic fields, proximity, or presence of objects. It consists of two pins, which will be explained in detail below.
  • Pin 1: Normally Open (NO) Pin
  • Function: The Normally Open (NO) pin is the output pin of the reed switch. When a magnetic field is present, the internal contacts of the switch close, connecting this pin to the other pin.
  • Connection: Connect this pin to a digital input pin on your microcontroller or a voltage signal line.
  • Notes: The NO pin is usually connected to a pull-up resistor (e.g., 1k) to ensure a clear high or low signal when the switch is open or closed.
  • Pin 2: Normally Closed (NC) Pin
  • Function: The Normally Closed (NC) pin is the other output pin of the reed switch. When a magnetic field is not present, the internal contacts of the switch are closed, connecting this pin to the NO pin.
  • Connection: Connect this pin to a ground (GND) line or a low voltage signal line.
  • Notes: The NC pin is usually connected to a ground or a low voltage signal to provide a clear return path for the signal.
  • Connection Structure:
  • Here's a step-by-step guide to connect the pins:
  • 1. Connect Pin 1 (NO) to a digital input pin on your microcontroller or a voltage signal line.
  • Use a jumper wire or a breadboard wire to connect the NO pin to the corresponding pin on your microcontroller or a voltage signal line.
  • 2. Add a pull-up resistor (e.g., 1k) between Pin 1 (NO) and VCC (if necessary).
  • This ensures a clear high or low signal when the switch is open or closed.
  • 3. Connect Pin 2 (NC) to a ground (GND) line or a low voltage signal line.
  • Use a jumper wire or a breadboard wire to connect the NC pin to the ground or low voltage signal line.
  • Example Connection Diagram:
  • Here's a simple connection diagram to illustrate the pin connections:
  • ```
  • +---------------+
  • | Microcontroller |
  • +---------------+
  • |
  • |
  • v
  • +---------------+
  • | Reed Switch |
  • | (12mm) |
  • +---------------+
  • |
  • |
  • v
  • +---------------+
  • | Pin 1 (NO) +---------------+
  • | | Pull-up |
  • | | Resistor |
  • | | (1k) |
  • +---------------+ |
  • |
  • |
  • v
  • +---------------+
  • | Pin 2 (NC) +---------------+
  • | | Ground (GND)|
  • +---------------+ |
  • |
  • |
  • v
  • +---------------+
  • | VCC (Power) |
  • +---------------+
  • ```
  • Important Notes:
  • Make sure to handle the reed switch with care, as it can be damaged by excessive voltage, current, or mechanical stress.
  • Use a suitable voltage and current rating for your application, and ensure the reed switch is compatible with your microcontroller or voltage signal lines.
  • This documentation assumes a basic understanding of electronics and microcontrollers. If you're unsure about the connections or usage, please consult the datasheet or seek guidance from a qualified professional.

Code Examples

12mm Reed Switch/Sensor Documentation
Overview
The 12mm Reed Switch/Sensor is a type of proximity sensor that detects changes in magnetic fields, allowing it to sense the presence or absence of a magnet. It consists of two contacts, a normally open (NO) contact and a normally closed (NC) contact, which are connected or disconnected when a magnet is brought near or removed from the sensor.
Pinout
The 12mm Reed Switch/Sensor has three pins:
VCC: Power supply pin (typically 5V)
 GND: Ground pin
 OUT: Output pin (connected to a microcontroller or other logic circuit)
Specifications
Operating voltage: 4.5V to 20V
 Operating current: 10mA to 50mA
 Magnetic sensitivity: 10-30 AT (Ampere-Turns)
 Switching frequency: Up to 100 Hz
 Mounting type: Through-hole or surface mount
Example 1: Basic Magnet Detection using Arduino
In this example, we will use the 12mm Reed Switch/Sensor to detect the presence of a magnet using an Arduino board.
Code:
```c++
const int reedPin = 2;  // Connect the OUT pin of the Reed Switch to digital pin 2
void setup() {
  pinMode(reedPin, INPUT);
  Serial.begin(9600);
}
void loop() {
  int reedState = digitalRead(reedPin);
  if (reedState == HIGH) {
    Serial.println("Magnet detected!");
  } else {
    Serial.println("No magnet detected.");
  }
  delay(50);
}
```
Example 2: Home Automation Using Raspberry Pi and Python
In this example, we will use the 12mm Reed Switch/Sensor to detect the opening and closing of a window or door, and trigger a Raspberry Pi to send an alert using Python.
Code:
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
reed_pin = 17  # Connect the OUT pin of the Reed Switch to GPIO 17
while True:
    if GPIO.input(reed_pin):
        print("Window/door opened!")
        # Send an alert or trigger an action here
    else:
        print("Window/door closed.")
    time.sleep(0.5)
```
Example 3: Debouncing the Reed Switch using a 555 Timer IC
In this example, we will debouce the Reed Switch using a 555 Timer IC to avoid false triggers.
Circuit Diagram:
[Insert circuit diagram]
Explanation:
The 555 Timer IC is connected in monostable mode, with the Reed Switch connected to the trigger pin (pin 2). When the Reed Switch is triggered, the 555 Timer outputs a clean pulse, which can then be connected to a microcontroller or other logic circuit.
Note: Debouncing is essential to avoid false triggers due to mechanical bouncing of the Reed Switch. This circuit ensures a clean output pulse, making it suitable for digital circuits.
I hope this documentation helps! Let me know if you need further clarification or examples.