KY-003 Hall Magnetic Sensor Module: A Guide for Arduino User

Share:

The KY-003 Module is a 3144EUA-S Hall Magnetic Sensor Switch that turns itself ON or OFF in the presence of a magnetic field. This module is compatible with a microcontroller like Arduino, Raspberry Pi and ESP32. Module KY-003 is capable of measuring wheel RPM, detecting the poles of magnets in BLDC Motors, a position sensor for machining tools, positional feedback for control systems, etc.

Here, you will get detailed information about this hall magnetic sensor module circuit board, like specifications, pinout, circuit & connection diagram, and how to interface with Arduino.

    KY-003 Module Specifications

    • Type: Hall Effect/Magnetic Sensor
    • Operating Voltage: 4.5V to 24V
    • Board Dimantions: 18.5mm x 15mm

    KY-003 Module Pinout

    The Sensor module has 3 male header pins those are -

    1. Pin (-): GND
    2. Pin (Middle): +5V
    3. Pin (S): Signal

    KY-003 Module Circuit Diagram

    Schematic of the ky-003 hall magnetic sensor module circuit is shown below.

    KY-003 Module Interfacing with Arduino

    Connection diagram of the KY-003 hall magnetic sensor module with an Arduino is shown below.

    Connect the power pin (middle) and ground pin (-) of the ky-003 module to +5V and GND on the Arduino, respectively. The module signal pin (s) connect to digital pin 3 on the Arduino.

    Arduino Source Code

    The following Arduino sketch for the KY-003 Hall Magnetic Sensor Module.

    Set the LED on Arduino pin 13 as the output and the signal pin of the KY-003 module as the input. Using this interface, the LED will turn on when you place a magnet near the sensor.

    int led = 13; // Define LED on Arduino interface
    int sensor = 3; // Define KY-003 module interface
    int val; // Define a numeric (boolean) variable val
    void setup()
    {
    	pinMode(led, OUTPUT); // Set Arduino LED pin as output
    	pinMode(sensor, INPUT); // Set KY-003 module signal pin as input
    }
    // Start the main program loop
    void loop()
    {
    	val = digitalRead(sensor); // Read the KY-003 hall magnetic sensor module
    	if(val == LOW) // when magnetic field is detected by the module, turn LED ON
    	{
    		digitalWrite(Led, HIGH);
    	}
    	else
    	{
    		digitalWrite(Led, LOW);
    	}
    }
    

    You Might Also Like:

    No comments