Introduction
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 UNO | 1 | Buy Now |
KY-024 Linear Magnetic Hall Sensor | 1 | Buy Now |
Jumper Wires | 4 | Buy Now |
Breadboard | 1 | Buy 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.
Specifications
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 Voltage | 2.7V to 6.5V |
Detection range | ±2mT |
Operating temperature | -40°C to +85°C |
Output | Analog voltage signal |
Sensitivity | 1.0 mV/G min., 1.4 mV/G typ., 1.75 mV/G max. |
Board Dimensions | 1.5cm x 3.6cm [0.6in x 1.4in] |
Features
- Small size and easy to use
- Low power consumption
- High sensitivity and accuracy
- Wide detection range
- Stable and reliable performance
Pinout
Pin Configuration
Pin Name | Pin Type |
---|---|
+V | Positive supply Pin |
G | Ground Pin |
A0 | Analog Pin |
D0 | Digital 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
Arduino | Module |
---|---|
+5V | +V Pin |
GND | GND Pin |
A0 | A0 |
Pin 3 | D0 |
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
Code
//For more Projects: www.arduinocircuit.com
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);
Serial.begin(9600);
}
void loop ()
{
// Read the digital interface
digitalVal = digitalRead(digitalPin) ;
if (digitalVal == HIGH) // When magnetic field is present, Arduino LED is on
{
digitalWrite (led, HIGH);
}
else
{
digitalWrite (led, LOW);
}
// Read the analog interface
analogVal = analogRead(analogPin);
Serial.println(analogVal); // print analog value
delay(100);
}
Applications
- Position and speed sensing in robotics
- Proximity detection in security systems
- Detection of metal objects in industrial applications
- Current sensing in power supplies
- Magnetic field mapping and measurement in scientific research
Conclusion
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.