Detect Magnetic Fields with Arduino and Hall Sensor A3144


In this tutorial, we are going to Detect magnetic fields with Arduino and Hall sensor A3144, In this article, we’ll explore the fascinating capabilities of this sensor and how it can be seamlessly integrated with Arduino to detect magnetic fields. From simple proximity sensing to advanced applications, the Hall sensor A3144 opens up a world of possibilities for magnetic field detection. Let’s dive in and uncover the exciting applications that await!

Hardware Required

You will require the following Hardware Components for how to interface Hall Sensor A3144 with Arduino.

Components#Buy From Amazon
Arduino UNO1Buy Link
Hall Sensor A31441Buy Link
Resistor 10KΩ1Buy Link
9v DC Adapter (Optional)1Buy Link
Jumper Wires3Buy Link
Breadboard1Buy Link

What is Hall Sensor A3144?

A Hall sensor is a device that allows us to perform magnetic field measurements.

Hall sensors are widely used. For example, in the automotive industry, they are used for functions as diverse as the activation of seat belts, or the measurement of the position of the camshaft. They are also used to measure fluid velocities, metal detection, and induction factors, among many other applications.

An important advantage of Hall sensors is that they measure from a distance, without the need for physical contact. Although their range is limited (typically a few centimeters) this means that they hardly show mechanical wear. They are also immune to noise and dust. This makes them reliable and long-lasting sensors.

In general, we find two types of Hall sensors:

  • analog. They generate an output proportional to the intensity of the magnetic field. Used to measure the intensity of a magnetic field
  • digital. They provide a high value in the presence of a magnetic field, and a low one in its absence. Therefore, they are used to detect the existence of magnetic fields. They are in turn divided into
  • Switch, they are activated when the pole is brought closer, and they are deactivated when the pole is removed
  • A latch is activated when a pole is brought closer and keeps its value until an opposite pole is approached

In this entry, we will use an A3144 Hall sensor, digital Switch type. We can use this sensor to detect the presence of an object, to which we will have previously placed a small magnet, or to make tachometers (rev counters) simply by attaching a small neodymium magnet to the shaft.

How does a Hall sensor work?

Its operating principle is the Hall effect, named after its discoverer Edwin Herbery Hall, in 1849.

When an electric current circulates through a semiconductor in the presence of a magnetic field, the electrons are deflected by the effect of the magnetic field, giving rise to a voltage perpendicular to the current and the magnetic field.


By measuring this voltage caused by the Hall effect, we can build magnetic field sensors and meters.

Hall-effect sensor Specifications

  • Digital Output Hall-effect sensor
  • Operating voltage: 4.5V to 28V (typically 5V)
  • Output Current: 25mA
  • Can be used to detect both poles of a magnet
  • The output voltage is equal to an operating voltage
  • Operating temperature: -40°C to 85°C
  • Turn on and Turn off time is 2uS each
  • Inbuilt reverse polarity protection
  • Suitable for Automotive and Industrial Applications

Pinout of Hall Sensor


Pin Configuration of Hall Sensor

No:Pin NameDescription
1+5V (Vcc)Used to power the hall sensor, typically +5V is used
2GroundConnect to the ground of the circuit
3OutputThis pin goes high if a magnet is detected. Output voltage is equal to Operating voltage.

Circuit Diagram

The following circuit shows you the connection of how to Detect Magnetic Fields with Arduino and Hall Sensor A3144 Please make the connection carefully


Installing Arduino IDE Software

First, you will require to Download the updated version of Arduino IDE Software and Install it on your PC or laptop. if you Learn How to install the Arduino step-by-step guide then click on how to install Arduino Button given Blow

Code example

//For more Projects:

const int HALLPin = 5;
const int LEDPin = 13;

void setup() {
  pinMode(LEDPin, OUTPUT);
  pinMode(HALLPin, INPUT);

void loop() {
    digitalWrite(LEDPin, HIGH);   
    digitalWrite(LEDPin, LOW);


  1. Magnetic Door Alarm: Use the Hall sensor with Arduino to detect changes in magnetic fields, creating a door alarm system for enhanced security.
  2. Position Sensing for Robotics: Implement the A3144 sensor to provide feedback on the position of robot components, enabling precise control and navigation.
  3. Magnetic Level Indicator: Create a magnetic level gauge for liquids or granular materials, utilizing the Hall sensor to measure changes in magnetic field strength.

Leave a Comment