KY-024 KY024 Linear Magnetic Hall Effect Sensor


KY-024 KY024 Linear Magnetic Hall Effect Sensor that is widely used in electronic applications such as proximity detection, current sensing, and position sensing. It is a small, inexpensive, and versatile sensor that can detect changes in the magnetic field and convert them into electrical signals.

This module is compatible with popular electronic platforms like Arduino, ESP32, Raspberry Pi, and other microcontrollers. It works as a switch that will switch on/off when a magnet is close, equivalent to the KY-003. On the different side, the analog output can count the polarity and relative power of the magnetic field.

Hardware Required

You will require the following Hardware Components for interfacing the KY-024 KY024 Linear Magnetic Hall Effect Sensor with Arduino.

Components#Buy From Amazon
Arduino UNO1Buy Now
KY-024 Linear Magnetic Hall Sensor1Buy Now
Jumper Wires4Buy Now
Breadboard1Buy Now

What is the KY-024 Sensor Module?

KY-024 is a Linear Magnetic Hall Sensor Module that can detect the presence and strength of magnetic fields. It is based on the Hall Effect, which is a phenomenon in which an electric potential is generated in a conductor when it is placed in a magnetic field perpendicular to the current flow.



The module is composed of several components including a 49E linear Hall-Effect sensor, an LM393 dual differential comparator, a potentiometer, two LEDs, six resistors, and four male header pins.

Operating Voltage2.7V to 6.5V
Detection range±2mT
Operating temperature-40°C to +85°C
OutputAnalog voltage signal
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. Small size and easy to use
  2. Low power consumption
  3. High sensitivity and accuracy
  4. Wide detection range
  5. Stable and reliable performance



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-024 Linear Magnetic Hall Sensor Module with Arduino Please make the connection carefully


Circuit Connections

+5V+V Pin
Pin 3D0

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 ; // LED on arduino
int digitalPin = 3; // linear Hall magnetic sensor digital interface
int analogPin = A0; // linear Hall magnetic sensor analog interface
int digitalVal ; // digital readings
int analogVal; // analog readings
void setup ()
  pinMode (led, OUTPUT); 
  pinMode (digitalPin, INPUT); 
  //pinMode(analogPin, INPUT); 
void loop ()
  // Read the digital interface
  digitalVal = digitalRead(digitalPin) ; 
  if (digitalVal == HIGH) // When magnetic field is present, Arduino LED is on
    digitalWrite (led, HIGH);
    digitalWrite (led, LOW);
  // Read the analog interface
  analogVal = analogRead(analogPin);
  Serial.println(analogVal); // print analog value


  1. Position and speed sensing in robotics
  2. Proximity detection in security systems
  3. Detection of metal objects in industrial applications
  4. Current sensing in power supplies
  5. Magnetic field mapping and measurement in scientific research


Overall, the KY-024 Linear Magnetic Hall Sensor Module is a versatile and cost-effective solution for detecting magnetic fields and converting them into electrical signals. Its small size, low power consumption, and reliable performance make it ideal for a wide range of electronic applications.

Leave a Comment