• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Interfacing Hall Effect Magnetic Sensor Circuit with Arduino

Interfacing Hall Effect Magnetic Sensor Circuit with Arduino

Last updated on 20 December 2025 by Admin-Lavi Leave a Comment

Hall sensor feel magnet near it and it make signal when magnet is close.

Signal can be digital or analog and here Arduino reads this signal.

We can see result on computer or LED.

It is use for motor, wheel speed or position check.

Circuit Coding:

int digitalPin = 2;  
int analogPin = A0;  
int digitalValue = 0;  
int analogValue = 0;  

void setup() {  
  Serial.begin(9600);  
  pinMode(digitalPin, INPUT);  
}  

void loop() {  
  digitalValue = digitalRead(digitalPin);  
  analogValue = analogRead(analogPin);  

  Serial.print("Digital Value: ");  
  Serial.println(digitalValue);  

  Serial.print("Analog Value: ");  
  Serial.println(analogValue);  

  delay(500);  
}  

Coding Explanation:

  • digitalPin is connected to DO of sensor.
  • analogPin is connected to AO of sensor.
  • In setup we start serial monitor and set in pin mode.
  • In loop Arduino reads both the values.
  • It prints digital and analog values.
  • Delay is added for better reading.

Circuit Working:

Interfacing Hall Effect Magnetic Sensor Circuit Diagram with Arduino

Parts List:

Component NameQuantity
Arduino UNO1
Hall Effect Sensor Module1

The Arduino code for the Hall sensor is simple and the circuit connections are easy.

The sensor detects a magnet nearby and its output changes when a magnetic field is present.

Digital output goes HIGH or LOW based on the magnets pole.

Analog output gives a voltage proportional to the magnetic field.

Arduino reads these values and displays the result.

Note: Go though the below link for Hall Effect Sensor Module Circuit:

Hall Effect Sensor Circuit with IC LM393

Formulas:

General formula for Hall Effect sensor is:

VH = (RH × I × B) / t

here,

  • RH is the hall coefficient
  • I is the current
  • B is the magnetic field strength
  • t is the sensor thickness

How to Build:

For Interfacing Hall Effect Magnetic Sensor Circuit with Arduino follow the below steps for connections:

  • Assemble parts as in circuit diagram.
  • Connect Arduino 5V to sensor VCC.
  • Connect Arduino GND to sensor GND.
  • Connect Arduino A0 to sensor AO (analog out).
  • Connect Arduino D2 to sensor DO (digital out).

Conclusion:

Interfacing Hall Effect Magnetic Sensor Circuit with Arduino is easy.

It can detect magnetic field quickly and sensor gives analog and digital output.

Project is useful in speed sensing and it is also used in position detection.

It works in security systems too.

References:

Interfacing GPS & hall sensor with Arduino Uno

Filed Under: Arduino Projects, Sensors and Detectors

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « Hall Effect Sensor Circuit with IC LM393
Next Post: Tilt Switch Interfacing Circuit with Arduino Uno »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Categories

  • Alarm Circuits (47)
  • Amplifier Circuits (67)
  • Arduino Projects (101)
  • Audio Circuits (120)
  • Automobile Circuits (19)
  • Battery Charger Circuits (72)
  • Free Energy (13)
  • Heater and Temperature Controllers (14)
  • High Voltage (9)
  • Indicator Circuits (48)
  • Inverter Circuits (20)
  • IoT projects (1)
  • LDR Circuits (26)
  • LED and Lamps (163)
  • Meters and Testers (31)
  • Motor Controllers (22)
  • Oscillator Circuits (43)
  • Power Supply Circuits (149)
  • Remote Control Circuits (10)
  • Security and Protection (31)
  • Sensors and Detectors (130)
  • Solar Circuits (30)
  • Timer Circuits (47)
  • Transistor Circuits (112)
  • Transmitter Circuit (17)
  • Tutorials (8)
  • Water Level Controller (7)

Recent Posts

  • High Current 5V 3A Voltage Regulator Circuit
  • How to Increase 7805 Output Voltage using Diodes
  • Simple Backup Power Supply Circuit using JFET Transistor
  • 6V Battery Backup Power Supply Circuit using 7805
  • 7806 Based 6V 1A Regulated Power Supply Circuit

Recent Comments

  1. Admin-Lavi on Simple Morse Key Circuit using IC 555
  2. Vladimír Zoch on Simple Morse Key Circuit using IC 555
  3. Admin-Lavi on FM Transmitter Circuit (100 meters range)
  4. Kark Arkle on FM Transmitter Circuit (100 meters range)
  5. ±15V Dual Regulator Circuit using Two Terminal Transformer - Circuit Ideas for You on ±15V Dual Power Supply Circuit using 7815 and 7915 ICs

Copyright © 2026 | New Circuit Ideas