Stufin
Home Quick Cart Profile

Hall Effect Sensor Module

Buy Now on Stufin

Supply Voltage

4.5V to 5.5V

Operating Current

10mA (typical)

Output Type

Digital (TTL)

Output Level

High (3.3V) or Low (0V)

Sensitivity

Adjustable (on some modules) or fixed (on others)

Response Time

1ms (typical)

Operating Temperature

-20C to 80C

Storage Temperature

-40C to 125C

Applications

  • Proximity Sensing: Detect the presence or absence of an object.
  • Magnetic Switch: Use as a switch to control a circuit or device.
  • Linear Displacement Measurement: Measure the displacement of an object.
  • Robotics: Use in robotics to detect the presence of a magnet or metal object.
  • Industrial Automation: Use in industrial control systems to detect the presence or absence of a magnetic field.

Pinout

VCC

Power supply pin (5V)

GND

Ground pin

OUT

Digital output pin (TTL)

ADJ

Sensitivity adjustment pin (on some modules)

Dimensions

Length

20mm

Width

15mm

Height

5mm

Mounting

The Hall Effect Sensor Module can be mounted using a PCB or a breadboard. It is recommended to use a sturdy adhesive or mechanical fastener to secure the module to a PCB or a robotic platform.

Pin Configuration

  • Hall Effect Sensor Module Documentation
  • Pinout Explanation
  • The Hall Effect Sensor Module is a widely used IoT component for detecting magnetic fields and proximity sensing. The module typically comes with a set of pins that need to be connected properly to function correctly. Below is a detailed explanation of each pin:
  • Pinout Structure:
  • VCC (Power Supply):
  • + Pin Function: Power supply pin for the module.
  • + Pin Type: Input
  • + Recommended Voltage: 5V (can operate from 4.5V to 24V)
  • + Description: Connect to a power source, such as a battery or a regulated power supply, to power the module.
  • GND (Ground):
  • + Pin Function: Ground pin for the module.
  • + Pin Type: Input
  • + Description: Connect to the ground of the power source or the circuit.
  • DO (Digital Output):
  • + Pin Function: Digital output pin for the sensor data.
  • + Pin Type: Output
  • + Description: Connect to a microcontroller or other devices to read the sensor data. The output is a digital signal (0 or 1) indicating the presence or absence of a magnetic field.
  • AO (Analog Output):
  • + Pin Function: Analog output pin for the sensor data (optional).
  • + Pin Type: Output
  • + Description: Some Hall Effect Sensor Modules come with an analog output pin, which provides a continuous analog signal proportional to the strength of the magnetic field. This pin is usually not present on all modules.
  • Note: Some Hall Effect Sensor Modules may have additional pins, such as a Enable pin or a Vrefs pin, depending on the specific IC used. Be sure to check the datasheet of the specific module you are using for specific pinouts and functions.
  • Connection Structure:
  • To use the Hall Effect Sensor Module, follow these steps:
  • 1. Connect the VCC pin to a power source (5V is recommended).
  • 2. Connect the GND pin to the ground of the power source or the circuit.
  • 3. Connect the DO pin to a digital input pin of a microcontroller or other devices.
  • 4. If available, connect the AO pin to an analog input pin of a microcontroller or other devices.
  • Example Connection Diagram:
  • ```
  • +-----------+
  • | Power |
  • | Source |
  • +-----------+
  • |
  • |
  • v
  • +-----------+
  • | Hall |
  • | Effect |
  • | Sensor |
  • | Module |
  • +-----------+
  • |
  • |
  • v
  • +-----------+
  • | Micro- |
  • | controller|
  • | |
  • +-----------+
  • |
  • |
  • v
  • +-----------+
  • | GND |
  • | (Ground)|
  • +-----------+
  • ```
  • Important Notes:
  • Make sure to connect the power supply and ground pins correctly to avoid damage to the module.
  • Use a suitable voltage regulator if your power source is higher than 5V.
  • Consult the datasheet of the specific Hall Effect Sensor Module you are using for specific connection requirements and recommendations.
  • I hope this documentation helps you understand and use the Hall Effect Sensor Module correctly!

Code Examples

Hall Effect Sensor Module Documentation
The Hall Effect Sensor Module is a popular IoT component used to detect the presence of magnets or changes in magnetic fields. It's commonly used in applications such as motor control, proximity sensing, and position sensing.
Technical Specifications:
Operating Voltage: 5V
 Operating Current: 10mA
 Detection Range: 3-5 mm
 Output Signal: Digital (HIGH/LOW)
 Pinout:
	+ VCC: Power supply pin (5V)
	+ GND: Ground pin
	+ OUT: Output pin (digital)
Example 1: Simple Magnetic Detection using Arduino
In this example, we'll use the Hall Effect Sensor Module to detect the presence of a magnet using an Arduino board.
Hardware Requirements:
Arduino Board (e.g., Arduino Uno)
 Hall Effect Sensor Module
 Breadboard and jumper wires
 Magnet
Software Requirements:
Arduino IDE (version 1.8.x or later)
Code:
```c++
const int hallPin = 2;  // Hall Effect Sensor output pin
const int ledPin = 13;  // LED pin for indication
void setup() {
  pinMode(hallPin, INPUT);
  pinMode(ledPin, OUTPUT);
}
void loop() {
  int sensorState = digitalRead(hallPin);
  if (sensorState == HIGH) {
    digitalWrite(ledPin, HIGH);  // LED turns on when magnet is detected
  } else {
    digitalWrite(ledPin, LOW);  // LED turns off when magnet is not detected
  }
  delay(50);
}
```
In this example, we connect the Hall Effect Sensor Module's output pin to Arduino's digital pin 2. When a magnet is brought close to the sensor, the output pin goes HIGH, and we turn on the LED connected to pin 13. When the magnet is removed, the output pin goes LOW, and the LED turns off.
Example 2: Motor Control using Raspberry Pi and Python
In this example, we'll use the Hall Effect Sensor Module to control a DC motor using a Raspberry Pi and Python.
Hardware Requirements:
Raspberry Pi (e.g., Raspberry Pi 4)
 Hall Effect Sensor Module
 Breadboard and jumper wires
 DC Motor (e.g., 6V)
 Motor Driver (e.g., L293D)
Software Requirements:
Raspbian OS (latest version)
 Python 3.x
Code:
```python
import RPi.GPIO as GPIO
import time
# Set up GPIO pins
GPIO.setmode(GPIO.BCM)
hall_pin = 17  # Hall Effect Sensor output pin
motor_pin = 18  # Motor control pin
GPIO.setup(hall_pin, GPIO.IN)
GPIO.setup(motor_pin, GPIO.OUT)
while True:
    sensor_state = GPIO.input(hall_pin)
    if sensor_state:
        # Turn on the motor when magnet is detected
        GPIO.output(motor_pin, GPIO.HIGH)
    else:
        # Turn off the motor when magnet is not detected
        GPIO.output(motor_pin, GPIO.LOW)
    time.sleep(0.1)
```
In this example, we connect the Hall Effect Sensor Module's output pin to Raspberry Pi's GPIO pin 17. When a magnet is detected, we turn on the DC motor using the motor driver connected to GPIO pin 18. When the magnet is removed, we turn off the motor.
These examples demonstrate how to use the Hall Effect Sensor Module in different contexts. You can adapt these examples to suit your specific IoT project requirements.