KY-025 Reed Switch Module with Arduino


KY-025 Reed Switch Module is a commonly used electronic component in the field of sensors and automation. It is widely used in various fields, such as home appliances, security systems, and automotive applications. This module is highly reliable and can detect the presence of magnetic fields with high accuracy, making it an essential component in many electronic devices.

This module is compatible with popular electronic platforms like Arduino, ESP32, Raspberry Pi, and other microcontrollers. It works as a switch that detects the presence of magnetic fields with high accuracy

Hardware Required

You will require the following Hardware Components for interfacing the KY-025 Reed Switch Module with Arduino.

Components#Buy From Amazon
Arduino UNO1Buy Now
KY-025 Reed Switch Module1Buy Now
LED 5mm1Buy Now
Jumper WiresBuy Now
Breadboard1Buy Now

What is the KY-025 Reed Switch Module?

KY-025 Reed Switch Module is a type of magnetic sensor that is used to detect the presence of a magnetic field. It is composed of a small reed switch and a resistor, which are housed in a small module. When a magnetic field is present, the reed switch will be activated, and the resistance of the module will change accordingly. This change in resistance can be measured and used to trigger other electronic components.



The module is composed of several components including a 49E Linear Hall-Effect Sensor, an LM393 Dual Differential Comparator, a Potentiometer, 2 LEDs, 6 resistors, and 4 male header pins.

Operating Voltage2.7V to 6.5V
Current Consumption10mA
Maximum Contact Rating10W
Maximum Switching Voltage100V DC
Maximum Switching Current0.5A
Sensitivity1.0 mV/G min., 1.4 mV/G typ., 1.75 mV/G max.
Board Dimensions1.5cm x 3.6cm [0.6in x 1.4in]


  1. High sensitivity to magnetic fields
  2. Compact and easy to use
  3. Long service life
  4. Low power consumption
  5. Easy to integrate with other electronic components



Pin Configuration

Pin NamePin Type
+VPositive supply Pin
GGround Pin
A0Analog Pin
D0Digital Pin

Circuit Diagram

The following circuit shows you the connection of the KY-025 Reed Switch Module with Arduino Please make the connection carefully


Circuit Connections

+5V+V Pin
Pin 2D0

Installing Arduino IDE Software

First, you will require to Download the updated version of Arduino IDE Software and Install it on your PC or laptop. if you Learn How to install the Arduino step-by-step guide then click on how to install Arduino Button given Blow


//For more Projects:
int led = 13; // define the LED pin
int digitalPin = 3; // KY-025 digital interface
int analogPin = A0; // KY-025 analog interface
int digitalVal; // digital readings
int analogVal; //analog readings
void setup()
  pinMode(led, OUTPUT);
  pinMode(digitalPin, INPUT);
  //pinMode(analogPin, OUTPUT);
void loop()
  // Read the digital interface
  digitalVal = digitalRead(digitalPin); 
  if(digitalVal == HIGH) // if magnetic field is detected
    digitalWrite(led, HIGH); // turn ON Arduino's LED
    digitalWrite(led, LOW); // turn OFF Arduino's LED
  // Read the analog interface
  analogVal = analogRead(analogPin); 
  Serial.println(analogVal); // print analog value to serial


  1. Magnetic door and window sensors
  2. Security systems
  3. Automotive applications
  4. Industrial automation
  5. Home appliances


The KY-025 Reed Switch Module is an essential component in many electronic devices, due to its high reliability and accuracy in detecting magnetic fields. Its compact size and low power consumption make it ideal for use in a wide range of applications, from security systems to industrial automation. With its many features and specifications, this module is a must-have for anyone working with sensors and automation in the electronics field.

Leave a Comment