Introduction: Hall Sensor Tutorial


Hall effect sensor is very popular in magnetic field detection. This sensor module comes with the basic circuitry to help you get started. Simply power it with 5VDC and the hall sensor will ready to detect magnetic field. There are two output, digital and analog. Compatible with most of microcontroller such as Arduino/Genuino UNO, Mega, CT-UNO, CT-ARM, Raspberry Pi, and more.


  • Input Power: 5VDC
  • Based on Allegro 3144 Hall Effect Sensor.
  • Two LED indicator, one for power and another for digital output.
  • Simple interface: VCC, GND, DO, AO
  • Dimension: 2.7cm x 1.4cm

Step 1: Material Preparation

For this tutorial, the items needed to run this project are:

  1. Arduino Uno
  2. USB Cable Type A to B
  3. Female to male jumper wire
  4. Male to male jumper wire
  5. LED
  6. Magnet
  7. Resistor (220 ohm)

Step 2: Hardware Installation

Diagram above shows the simple connection between Hall Effect Sensor and Arduino Uno:

  1. Vcc > 5V
  2. GND > GND
  3. D0 > D2
  4. A0 > A0

Connection between LED and Arduino Uno:

  1. LED > D8

After completing the connection, connect the Arduino Uno to power supply with a USB cable.

Step 3: Insert Source Code

  1. Download the test code and open it by using Arduino software or IDE.
  2. Make sure that you have choose the right board and the corresponding port (In this tutorial, Arduino Uno is used).
  3. Then, upload the test code into your Arduino Uno.

Step 4: Results

When a magnet approaches the sensor of hall sensor module, the LED will be lighted up.

Step 5: Video