Description
The Digital Hall Effect Sensor Module uses the 3144 sensor to detect the presence or absence of a magnetic field and outputs a logic level.
PACKAGE INCLUDES:
- Digital Hall Effect Sensor Module
KEY FEATURES OF DIGITAL HALL EFFECT MODULE:
- Use 3144 Digital Hall Effect sensor
- Detects presence or absence of a magnetic field
- Logic compatible Open Collector output
- LED indicator for magnetic field detected
- 4.5 to 24V operation (5V logic compatible)
This module incorporates a digital Hall-effect sensor. Hall effect sensors detect the presence of a magnetic field and are commonly used for measuring the RPM of rotating assemblies where a magnet on the assembly alternately makes and breaks magnetic contact with the sensor as the assembly rotates, but can also be used for applications such as telling when a door has been opened and a magnet moves away from the sensor.
Hall-effect sensors have several advantages over mechanic switches, chief among them are that by being solid-state, there is no concern about contacts wearing out and the switching speed can be quite high.
This sensor utilizes a digital 3144 sensor so the output is either on or off depending on whether a magnetic field is detected. It does not detect the relative strength of the magnetic field as an analog Hall-effect sensor does.
The device is Open Collector, so with no magnetic field present, the sensor output is turned off and it is normally pulled HIGH using a pull-up resistor. Most microcontrollers like Arduino have pull-up resistors that can be enabled on their input pins as we do in the example below. When a magnetic field comes near, the sensor output is turned on and the output drops LOW. When the output goes low, an on-board red LED lights to let you know a magnetic field was detected.
These devices are able to handle a wide input voltage range of 4.5-24V, but will normally be operated off of 5V for use with a microcontroller.
Module Connections
There is a 3-pin header on the assembly. There are a couple of different versions of the markings. See pictures for clarification if needed.
1 x 3 Header
- G / ‘-‘ = Ground
- R / Center pin = 5V
- Y / S = Signal output, connects to digital input on MCU
OUR EVALUATION RESULTS:
This is an nice little module that can be used to experiment with a number of industrial type applications.
The sensor detects one pole of the magnet, so if it does not sense the magnetic field, turn the magnet or the sensor over.
The program below monitors the output of the sensor and reports when it detects a state change.
Digital Hall Effect Sensor Module Example Program
/* Digital Hall Effect Module Test Basic code for monitoring the output of the module. */ int sensorPin = 4; // Arbitrary digital pin for monitoring the output int state = 0; // Current state of the sensor int lastState = 0; //Place to save our previous state //=============================================================================== // Initialization //=============================================================================== void setup() { pinMode (sensorPin, INPUT_PULLUP); // Enable pullup on this pin since sensor output is open collector Serial.begin (9600); // Set output window comm rate } //=============================================================================== // Main //=============================================================================== void loop() { state = digitalRead (sensorPin); // Read the current state of the sensor if (state != lastState) // State has changed, so print out new state { Serial.print ("Current State: "); Serial.println (state); lastState = state; // Remember last state we were in } }
BEFORE THEY ARE SHIPPED, THESE MODULES ARE:
- Sample inspected and tested per incoming shipment
Notes:
- This module is the same as or similar to the KY-003
Technical Specifications
Operating Ratings | Vcc Range | 4.5 – 24V |
Output | No magnetic field detected | Open Collector (normally pulled up to Vcc |
Magnetic field detected | < 0.8V | |
Output Current | Open Collector | 25mA |
Dimensions | L x W (PCB) | 20mm x 15mm (0.8 x 0.6″) |
Country of Origin | China |