Reed Switch

### Lesson Plan: Understanding and Utilizing the Reed Switch 2*14mm in Electronic Circuits


In this lesson, we will explore the operational principles and practical applications of the Reed Switch 2*14mm, a fundamental component for sensing and actuation in electronic systems. The Reed Switch is widely used for detecting the presence or absence of magnetic fields, making it ideal for various applications such as security systems, limit switches, and proximity sensors. By the end of this lesson, you will have a comprehensive understanding of its characteristics and how to incorporate it into your electronic projects.

**Learning Objectives**

Upon completing this lesson, you will be able to:
1. Identify the physical characteristics of the Reed Switch 2*14mm.
2. Explain the function of a reed switch and its role in electronic circuits.
3. Implement the Reed Switch in various circuit configurations to detect magnetic fields and trigger actions.

**Materials Needed**

– Reed Switch 2*14mm
– Breadboard
– Jumper wires
– Raspberry Pi Pico WH
– Magnet
– 330-ohm resistor
– Multimeter (optional)

**Background Information**

The Reed Switch is an electromagnetic switch that operates by opening or closing its contacts in the presence of a magnetic field. It consists of two ferromagnetic blades hermetically sealed in a glass envelope. When exposed to a magnetic field, the blades come into contact, completing the circuit. Reed Switches are commonly used in applications requiring non-contact actuation.

**Reed Switch Characteristics**

The Reed Switch has two terminals:
– **Contact Terminals**: The ends of the switch that open or close the circuit in response to a magnetic field.

**Principles of Operation**

Reed Switches operate based on the magnetic field’s influence on their contacts:
– **Open State**: In the absence of a magnetic field, the contacts remain open, and no current flows through the switch.
– **Closed State**: When exposed to a magnetic field, the contacts close, allowing current to flow through the switch.

**Circuit Diagram and Setup**

**Step-by-Step Instructions**

1. **Identify the Reed Switch Terminals**:
– Locate the two terminals of the Reed Switch, which will be used to connect the switch in the circuit.

2. **Set Up the Breadboard Circuit**:
– Place the Reed Switch and an LED on the breadboard.
– Connect one terminal of the Reed Switch to a GPIO pin (e.g., GP14) on the Raspberry Pi Pico WH.
– Connect the other terminal of the Reed Switch to the ground (GND) pin on the Raspberry Pi Pico WH.
– Connect the anode of the LED to another GPIO pin (e.g., GP15) on the Pico through a 330-ohm resistor.
– Connect the cathode of the LED to the ground.

3. **Write the Control Code**:
– Open your MicroPython IDE and write the following code to detect the magnetic field and control the LED:

from machine import Pin

reed_switch = Pin(14, Pin.IN, Pin.PULL_UP)
led = Pin(15, Pin.OUT)

while True:
if reed_switch.value() == 0:

4. **Upload and Test the Code**:
– Connect your Raspberry Pi Pico WH to your computer using a Micro USB cable.
– Upload the code to the Raspberry Pi Pico WH.
– Bring a magnet close to the Reed Switch and observe the LED turning on, indicating the switch is closed. Remove the magnet, and the LED should turn off, indicating the switch is open.

5. **Optional: Measure Resistance Changes**:
– Use a multimeter to measure the resistance across the Reed Switch terminals in the open and closed states. Observe the resistance dropping to near zero when the switch is closed by the magnetic field.

**Applications and Extensions**

1. **Magnetic Proximity Sensors**:
– Use the Reed Switch in projects to detect the opening and closing of doors or windows.
– Integrate the switch into a security system to trigger alarms when unauthorized access is detected.

2. **Position and Limit Sensing**:
– Implement the Reed Switch in robotics or machinery to detect the end of travel of moving parts.
– Use the switch to trigger actions based on the position of objects or components.

**Summary and Review**

This lesson has provided a detailed exploration of the Reed Switch 2*14mm, covering its identification, operational principles, and practical applications in electronic circuits. By understanding and utilizing Reed Switches, you can effectively detect magnetic fields and trigger various actions, enhancing the interactivity and functionality of your electronic projects.

Post a comment

Leave a Comment

Your email address will not be published. Required fields are marked *