• 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 24 June 2026 by Admin-Lavi Leave a Comment

Hall sensor feel magnet near it and it make signal when magnet is close, then signal can be digital or analog and here Arduino reads this signal.

We can view the results on a computer or LED and the circuit checks motor speed, wheel speed or position.

Arduino Code:

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 connected to DO of sensor.
  • analogPin 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 added for better reading.

Circuit Working:

Interfacing Hall Effect Magnetic Sensor Circuit Diagram with Arduino

Parts List:

ComponentsQuantity
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.

Then digital output goes HIGH or LOW based on the magnets pole and analog output gives a voltage proportional to the magnetic field.

Finally, 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:

  • First, assemble parts as in circuit diagram.
  • Next, connect Arduino 5V to sensor VCC.
  • After that, connect Arduino GND to sensor GND.
  • Now connect Arduino A0 to sensor AO (analog out).
  • Also, connect Arduino D2 to sensor DO (digital out).

Conclusion:

To conclude, Interfacing Hall Effect Magnetic Sensor Circuit with Arduino is easy and it can detect magnetic field quickly and then sensor gives analog and digital output.

Furthermore, the project supports speed sensing, detects position and enhances security systems.

Filed Under: Arduino Projects, Automation Circuits, Mini 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

  • 555 Timer Projects (129)
  • Alarm Circuits (80)
  • Amplifier Circuits (92)
  • Arduino Projects (103)
  • Audio Circuits (189)
  • Automation Circuits (139)
  • Automobile Circuits (39)
  • Battery Charger Circuits (85)
  • DIY Projects (381)
  • Free Energy (12)
  • Heater and Temperature Controllers (32)
  • High Voltage (23)
  • Hobby Circuits (220)
  • Indicator Circuits (63)
  • Inverter Circuits (17)
  • IoT projects (11)
  • LDR Circuits (46)
  • LED and Lamps (199)
  • Meters and Testers (43)
  • Mini Projects (349)
  • Motor Controllers (25)
  • Oscillator Circuits (64)
  • Power Supply Circuits (234)
  • Radio Frequency (8)
  • Remote Control Circuits (12)
  • Renewable energy (19)
  • Security and Protection (120)
  • Sensors and Detectors (233)
  • Solar Circuits (31)
  • Timer Circuits (62)
  • Transistor Circuits (175)
  • Transmitter Circuit (19)
  • Tutorials (29)
  • Voltage Regulator (40)
  • Water Level Controller (10)

Recent Posts

  • Low Current Controlled Battery Charger Circuit using LM723 IC
  • 741 Op-Amp Treble Booster Circuit
  • Simple Diode and Transistor Based Audio Limiter Circuit
  • Simple 500mW Speaker Driver Circuit
  • Easy DIY LM386 Audio Amplifier Circuit

Recent Comments

  1. Admin-Lavi on High Voltage Fence Charger Circuit
  2. egidio grzinic on High Voltage Fence Charger Circuit
  3. Logic OR Gate Circuit using Transistors - Circuit Ideas for You on Automatic Street Light Circuit using LDR
  4. Tony Gallegos on NTC Thermistor Based Temperature to Voltage Converter Circuit
  5. colin on Simple Single Transistor Audio Amplifier Circuit

Copyright © 2026 | New Circuit Ideas