Description
A3144E Hall Effect Magnetic Sensor
The A3144E Hall-effect magnetic sensor detects the presence of magnetic fields. It provides a digital output for easy use with microcontrollers such as Arduino.
Detailed specifications
- Operating voltage: 4.5–28 V DC
- Output: Digital (open/closed circuit)
- Output current: 25 mA
- Operating temperature: −40°C to +85°C
- Response time: 2 µs (power-on and power-off)
- Reverse-polarity protection
- Dimensions: Small and compact
- Main component: Encapsulated Hall sensor
How it works
The A3144E detects magnetic fields perpendicular to the sensor surface. When it detects a magnetic field, its output goes low (0 V); when no magnetic field is present, the output returns high (the supply voltage).
Applications
- Security and alarm systems
- Proximity detection for doors and windows
- Liquid-level sensors
- Contactless-control projects
- Automotive speed measurement
- Position detection for valves and doors
Pinout
The A3144E sensor has three pins:
- VCC: Power supply (4.5–28 V)
- GND: Ground
- D0: Digital output
How to use it
Connect the A3144E sensor as follows:
- VCC to 5 V on the Arduino
- GND to GND on the Arduino
- D0 to a digital pin (for example, D3) to read the digital values
Using it with an Arduino Uno
Basic Arduino code example
const int led = 13; // LED sur l'Arduino
const int hallPin = 3; // Interface numérique du capteur Hall
int hallState; // Etat du capteur Hall
void setup() {
pinMode(led, OUTPUT);
pinMode(hallPin, INPUT);
Serial.begin(9600);
}
void loop() {
// Lecture de l'état du capteur Hall
hallState = digitalRead(hallPin);
if (hallState == LOW) {
digitalWrite(led, HIGH);
Serial.println("Magnet detected");
} else {
digitalWrite(led, LOW);
Serial.println("No magnet");
}
delay(100);
}
What the code does: It reads the Hall sensor’s digital value, turns on the Arduino LED when a magnetic field is detected, and displays the status in the serial monitor.
Components required for the basic example
- Arduino Uno
- A3144E magnetic sensor
- Connecting wires
Basic code explained
- Pin initialization: The LED pin is set as an output and the sensor pin as an input.
- Reading and displaying data: The sensor’s digital value is read and displayed in the serial monitor. The LED turns on when a magnetic field is detected.
Basic wiring
- VCC (A3144E): 5 V (Arduino)
- GND (A3144E): GND (Arduino)
- D0 (A3144E): D3 (Arduino)
Advanced Arduino code example
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
const int led = 13;
const int hallPin = 3;
int hallState;
void setup() {
lcd.begin();
lcd.backlight();
pinMode(led, OUTPUT);
pinMode(hallPin, INPUT);
Serial.begin(9600);
}
void loop() {
hallState = digitalRead(hallPin);
if (hallState == LOW) {
digitalWrite(led, HIGH);
lcd.setCursor(0, 0);
lcd.print("Magnetic: YES ");
Serial.println("Magnet detected");
} else {
digitalWrite(led, LOW);
lcd.setCursor(0, 0);
lcd.print("Magnetic: NO ");
Serial.println("No magnet");
}
delay(100);
}
What the code does: It reads the Hall sensor’s digital value, displays it on an I2C LCD, controls the Arduino LED, and reports the status in the serial monitor.
Components required for the advanced example
- Arduino Uno
- A3144E magnetic sensor
- 1602 I2C LCD
- Connecting wires
Advanced code explained
- Including libraries:
#include <Wire.h>and#include <LiquidCrystal_I2C.h>add the libraries required for the LCD. - Initialization: Communication with the LCD and sensor is set up in
setup(). - Reading and displaying data: The digital value is read and displayed on the LCD. The LED turns on when a magnetic field is detected.
Advanced wiring
- VCC (A3144E): 5 V (Arduino)
- GND (A3144E): GND (Arduino)
- D0 (A3144E): D3 (Arduino)
- VCC (LCD): 5 V (Arduino)
- GND (LCD): GND (Arduino)
- SCL (LCD): A5 (Arduino)
- SDA (LCD): A4 (Arduino)
Installing the driver/library
To use the A3144E sensor and LCD with Arduino, install the LiquidCrystal I2C library through the Arduino IDE:
- Open the Arduino IDE: Make sure you are using a recent version.
- Open the Library Manager: From the menu, choose Sketch → Include Library → Manage Libraries.
- Search for “LiquidCrystal I2C”: Use the search box to find the library.
- Install the library: Click Install to add it to your IDE.
Keywords: Hall effect, magnetic, sensor.










