KY-003 Hall Magnetic Force Sensor module is a switch that reacts to the presence of a magnetic field, turning itself on or off. Compatible with popular microcontrolers like Arduino, Raspberry Pi and ESP32.
![KY-003 Fritzing custom part image](https://arduinomodules.info/wp-content/uploads/KY-003_Fritzing_custom_part_image-130x240.png)
![KEYES KY-003 Hall magnetic sensor module for arduino](https://i0.wp.com/arduinomodules.info/wp-content/uploads/KY-003_hall_magnetic_sensor_arduino_module-240x240.jpg?resize=240%2C240&ssl=1)
KY-003 SPECIFICATIONS
This module consists of a 3144EUA-S Hall-effect switch, a 680Ω resistor, an LED and 3 male header pins.
Operating Voltage | 4.5V to 24V |
Operating Temperature Range | -40°C to 85°C [-40°F to 185°F] |
Board Dimensions | 18.5mm x 15mm [0.728in x 0.591in] |
CONNECTION DIAGRAM
Connect the board power line (middle) and ground (-) to +5 and GND on the Arduino respectively.
Connect signal (S) to pin 3 on the Arduino.
KY-003 | Arduino |
---|---|
S | Pin 3 |
middle | +5V |
– | GND |
![Arduino KY-003 connection diagram](https://arduinomodules.info/wp-content/uploads/Arduino_KY-003_Keyes_Hall_hagnetic_sensor_module_bb-1024x533.png)
KY-003 ARDUINO CODE
The following Arduino sketch will turn on the LED on pin 13 when you put a magnet near the module.
int led = 13;//LED pin
int sensor = 3; //sensor pin
int val; //numeric variable
void setup()
{
pinMode(led, OUTPUT); //set LED pin as output
pinMode(sensor, INPUT); //set sensor pin as input
}
void loop()
{
val = digitalRead(sensor); //Read the sensor
if(val == LOW) //when magnetic field is detected, turn led on
{
digitalWrite(Led, HIGH);
}
else
{
digitalWrite(Led, LOW);
}
}
DOWNLOADS
- Fritzing Part: KY-003 Hall Magnetic Sensor Module.
- 3144 Datasheet by Allegro Microsytems.
- Fritzing Official Site.The KY-003 Hall Magnetic Sensor module is a switch that reacts to the presence of a magnetic field, turning itself on or off. Compatible with popular microcontrolers like Arduino, Raspberry Pi and ESP32.
KY-003 Hall Magnetic Force Sensor SPECIFICATIONS:
This module consists of a 3144EUA-S Hall-effect switch, a 680Ω resistor, an LED and 3 male header pins.
Operating Voltage 4.5V to 24V Operating Temperature Range -40°C to 85°C [-40°F to 185°F] Board Dimensions 18.5mm x 15mm [0.728in x 0.591in] CONNECTION DIAGRAM
Connect the board power line (middle) and ground (-) to +5 and GND on the Arduino respectively.
Connect signal (S) to pin 3 on the Arduino.
KY-003 Arduino S Pin 3 middle +5V – GND KY-003 ARDUINO CODE
The following Arduino sketch will turn on the LED on pin 13 when you put a magnet near the module.
int led = 13;//LED pin int sensor = 3; //sensor pin int val; //numeric variable void setup() { pinMode(led, OUTPUT); //set LED pin as output pinMode(sensor, INPUT); //set sensor pin as input } void loop() { val = digitalRead(sensor); //Read the sensor if(val == LOW) //when magnetic field is detected, turn led on { digitalWrite(Led, HIGH); } else { digitalWrite(Led, LOW); } }
DOWNLOADS
Reviews
There are no reviews yet.