What This Module Does for Your Arduino Project

The Reed Switch LM393 Magnetron Module combines a normally-open reed switch with an LM393 comparator to give both a clean digital TTL output and a raw analogue output from the same board. When a magnet comes within range, the reed closes, the comparator output snaps low, and the onboard LED lights — giving instant visual confirmation without a multimeter. This makes it a straightforward choice for non-contact magnetic proximity sensing in Arduino, ESP32, and Raspberry Pi projects.

Module Specifications at a Glance

Wiring the Reed Switch Module to Your Arduino

Connect the module to your Arduino using three wires. The supply range of 3.3V–5V means you can power it from the Arduino's 5V or 3.3V pin.

  1. VCC: Connect to Arduino 5V (or 3.3V if your project uses 3.3V logic).
  2. GND: Connect to Arduino GND.
  3. DO (Digital Output): Connect to any digital input pin on the Arduino (e.g., pin 2). The output goes LOW when a magnet is detected.
  4. AO (Analogue Output): Optional — connect to an analogue input pin if you want to read the raw reed switch voltage.

Magnet Distance and Trigger Reliability

A standard 10mm neodymium disc magnet triggers most reed switches from 10–15mm away. The reed switch inside this module is a standard 2x14mm glass capsule — typical activation distance with a neodymium magnet is around 8–12mm through air. A weaker ferrite magnet requires 3–5mm. For reliable detection in a door or window sensor, mount the module on the frame and the magnet on the moving part so the gap stays within these distances.

Sample Arduino Code

The following sketch reads the digital output from the reed module and prints a message when a magnet is detected. The digital output is active low, so the input pin reads LOW when the reed switch is closed (magnet present).

const int reedPin = 2; // Digital pin connected to DO\nvoid setup() {\n Serial.begin(9600);\n pinMode(reedPin, INPUT_PULLUP);\n}\n\nvoid loop() {\n int state = digitalRead(reedPin);\n if (state == LOW) {\n Serial.println("Magnet detected");\n } else {\n Serial.println("No magnet");\n }\n delay(100);\n}

Using INPUT_PULLUP ensures a stable HIGH when the reed is open, and the active-low output from the module pulls the pin LOW when triggered.

Practical Applications

This module is commonly used for door and window alarm sensors, liquid level float switches, magnet proximity detection, RPM counting on rotating shafts, mailbox arrival alerts, non-contact limit switches for CNC machines, and tamper detection in enclosures. The normally-open reed switch closes reliably in the presence of a magnetic field, and the LM393 comparator gives you a clean digital signal without debounce issues.