Arduino Uno Reed Module

This project demonstrates how to use a reed switch module with an Arduino Uno to detect the presence of a magnet.

The reed switch is a simple magnetic sensor that closes a circuit when exposed to a magnetic field, allowing Arduino to detect magnetic presence.

Components Needed

Block Diagram

Hardware Wiring Explanation:

Connect Reed Switch Module to Arduino Uno:

Connect the digital pin of the reed switch module to digital pin 2 on the Arduino.

Connect the other pin of the reed switch module to GND.

Wire up the reed switch module to the Arduino Uno as per the circuit setup section.

Software (Arduino IDE):

Open the Arduino IDE and create a new sketch.

Copy and paste the provided Arduino code into the sketch.

Upload the code to the Arduino Uno.

Project Operation:

Open the serial monitor with a baud rate of 9600.

Bring a magnet close to the reed switch. The serial monitor will display whether the reed switch is open (no magnet detected) or closed (magnet detected).

Applications

Notes

Ensure the reed switch module is oriented correctly to detect the magnet's presence reliably.

Experiment with different magnets and distances to understand the sensitivity of the reed switch.

Consider debounce techniques if necessary to handle any bouncing effect when the reed switch changes state rapidly.